/* ── Pay Server Admin Dashboard CSS ── */
:root {
  --bg:       #0b1120;
  --surface:  #111827;
  --surface2: #1a2540;
  --border:   rgba(255,255,255,.07);
  --accent:   #00e676;
  --accent2:  #00b4d8;
  --text:     #e2e8f0;
  --text2:    #94a3b8;
  --danger:   #ef4444;
  --warning:  #f59e0b;
  --success:  #22c55e;
  --info:     #3b82f6;
  --sidebar-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .8; }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-top {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sidebar-logo .logo-main {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}

.sidebar-nav { padding: 16px 0; flex: 1; }

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 8px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text2);
  border-left: 3px solid transparent;
  transition: all .15s;
}
.nav-item:hover { background: rgba(255,255,255,.03); color: var(--text); }
.nav-item.active {
  color: var(--accent);
  background: rgba(0,230,118,.06);
  border-left-color: var(--accent);
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text2);
}

/* ── Main Content ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.admin-badge {
  background: rgba(0,230,118,.1);
  color: var(--accent);
  border: 1px solid rgba(0,230,118,.2);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}

.page-content { padding: 28px; flex: 1; }

/* ── Cards & Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color .2s;
}
.stat-card:hover { border-color: rgba(255,255,255,.15); }
.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-sub {
  font-size: 12px;
  color: var(--text2);
  margin-top: 6px;
}
.stat-accent { border-top: 2px solid var(--accent); }
.stat-info    { border-top: 2px solid var(--info); }
.stat-warning { border-top: 2px solid var(--warning); }
.stat-danger  { border-top: 2px solid var(--danger); }

/* ── Table ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}
th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-success { background: rgba(34,197,94,.12);  color: #4ade80; }
.badge-warning { background: rgba(245,158,11,.12); color: #fbbf24; }
.badge-danger  { background: rgba(239,68,68,.12);  color: #f87171; }
.badge-info    { background: rgba(59,130,246,.12); color: #60a5fa; }
.badge-neutral { background: rgba(148,163,184,.1); color: #94a3b8; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,230,118,.1);
}
select.form-control option { background: var(--surface); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary  { background: var(--accent); color: #0b1120; }
.btn-primary:hover { background: #00ff88; }
.btn-danger   { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-ghost    { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,.05); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-info     { background: rgba(59,130,246,.15); color: #60a5fa; border: 1px solid rgba(59,130,246,.25); }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 13px;
}
.alert-success { background: rgba(34,197,94,.08);  border: 1px solid rgba(34,197,94,.2);  color: #4ade80; }
.alert-danger  { background: rgba(239,68,68,.08);  border: 1px solid rgba(239,68,68,.2);  color: #f87171; }
.alert-warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: #fbbf24; }
.alert-info    { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.2); color: #60a5fa; }

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.page-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  text-decoration: none;
}
.page-btn.active { background: var(--accent); color: #0b1120; border-color: var(--accent); }
.page-btn:hover:not(.active) { color: var(--text); border-color: rgba(255,255,255,.2); }

/* ── Login Page ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo h1 { font-size: 20px; font-weight: 800; }
.login-logo p  { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* ── Misc ── */
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.text-muted { color: var(--text2); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info    { color: var(--info); }

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}
.section-sub {
  font-size: 13px;
  color: var(--text2);
  margin-top: -14px;
  margin-bottom: 20px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text2);
}
.empty-state h4 { font-size: 15px; margin-bottom: 6px; color: var(--text); }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-box h3 { font-size: 16px; font-weight: 800; margin-bottom: 20px; }
