/* Payment Gateway — Shared Dark Theme */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #0f1117; color: #e1e4e8; min-height: 100vh; }
a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.nav { background: #161b22; border-bottom: 1px solid #30363d; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-size: 18px; font-weight: 700; color: #58a6ff; }
.nav-links { display: flex; gap: 16px; align-items: center; font-size: 14px; }
.nav-links a { color: #8b949e; }
.nav-links a:hover { color: #e1e4e8; text-decoration: none; }
.nav-user { color: #8b949e; font-size: 13px; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 40px 24px; }

/* Cards */
.card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 24px; margin-bottom: 16px; }
.card h3 { color: #58a6ff; margin-bottom: 12px; font-size: 16px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; color: #8b949e; font-size: 13px; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: #0d1117; border: 1px solid #30363d; color: #e1e4e8;
  padding: 10px 14px; border-radius: 8px; font-size: 14px; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: #58a6ff; outline: none; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; transition: all 0.2s; }
.btn-block { display: block; width: 100%; }
.btn-primary { background: #238636; color: #fff; }
.btn-primary:hover { background: #2ea043; text-decoration: none; }
.btn-danger { background: #da3633; color: #fff; }
.btn-danger:hover { background: #f85149; }
.btn-blue { background: #1f6feb; color: #fff; }
.btn-blue:hover { background: #388bfd; }
.btn-outline { background: transparent; border: 1px solid #30363d; color: #8b949e; }
.btn-outline:hover { border-color: #58a6ff; color: #58a6ff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; color: #8b949e; border-bottom: 1px solid #30363d; font-weight: 600; }
td { padding: 10px 12px; border-bottom: 1px solid #21262d; }
tr:hover { background: #1c2128; }

/* Badges */
.badge { padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; display: inline-block; }
.badge-active, .badge-confirmed { background: #1b4332; color: #2ea043; }
.badge-inactive, .badge-pending { background: #3d2c0a; color: #d29922; }
.badge-suspended, .badge-cancelled { background: #3d1414; color: #f85149; }
.badge-expired { background: #272730; color: #8b949e; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid #30363d; margin-bottom: 20px; gap: 0; flex-wrap: wrap; }
.tab { padding: 12px 20px; cursor: pointer; color: #8b949e; border-bottom: 2px solid transparent; font-size: 14px; background: none; border-top: none; border-left: none; border-right: none; }
.tab.active { color: #58a6ff; border-bottom-color: #58a6ff; }
.tab:hover { color: #e1e4e8; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 16px; text-align: center; }
.stat-value { font-size: 28px; font-weight: 700; color: #58a6ff; }
.stat-label { font-size: 12px; color: #8b949e; margin-top: 4px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #3d141433; border: 1px solid #f8514933; color: #f85149; }
.alert-success { background: #1b433233; border: 1px solid #2ea04333; color: #2ea043; }
.alert-warning { background: #3d2c0a33; border: 1px solid #d2992233; color: #d29922; }

/* Auth pages */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 60px); padding: 20px; }
.auth-card { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 32px; width: 100%; max-width: 420px; }
.auth-card h2 { color: #e1e4e8; text-align: center; margin-bottom: 24px; font-size: 22px; }
.auth-card .subtitle { color: #8b949e; text-align: center; margin-bottom: 20px; font-size: 14px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 13px; color: #8b949e; }

/* Key display */
.key-display { display: flex; gap: 8px; align-items: center; }
.key-display input { flex: 1; font-family: 'Consolas', monospace; font-size: 12px; }
.copy-btn { background: none; border: 1px solid #30363d; color: #8b949e; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 11px; white-space: nowrap; }
.copy-btn:hover { color: #e1e4e8; border-color: #58a6ff; }

/* Mono text */
.mono { font-family: 'Consolas', 'Courier New', monospace; font-size: 12px; }

/* SSE status */
.sse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.sse-dot.alive { background: #2ea043; }
.sse-dot.dead { background: #f85149; }

/* Responsive */
@media (max-width: 768px) {
  .form-row { flex-direction: column; }
  .stats { grid-template-columns: 1fr 1fr; }
  .container { padding: 16px; }
  .tabs { overflow-x: auto; }
}

/* Code blocks */
pre { background: #0d1117; border: 1px solid #30363d; border-radius: 8px; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
code { font-family: 'Consolas', 'Courier New', monospace; }

/* Docs specific */
.endpoint { background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.method { display: inline-block; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 12px; margin-right: 8px; }
.method-post { background: #1b4332; color: #2ea043; }
.method-get { background: #0d2d6e; color: #58a6ff; }
