/* ═══════════════════════════════════════════════════════════════════════════
   SBP PayOut — Design System
   Dark Premium: Graphite-black + Gold/Amber
   Fonts: Cormorant Garamond (display) · Syne (UI) · Space Mono (data)
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Syne:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/fill/style.css');

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:          #080808;
  --bg-1:        #0f0f0f;
  --bg-2:        #161616;
  --bg-3:        #1e1e1e;

  /* Borders */
  --border:      #242424;
  --border-2:    #2e2e2e;

  /* Gold */
  --gold:        #c9a84c;
  --gold-light:  #e8c96e;
  --gold-dark:   #8a6f2e;
  --gold-glow:   rgba(201,168,76,0.12);
  --gold-subtle: rgba(201,168,76,0.06);

  /* Text */
  --text:        #ede8e0;
  --text-2:      #7a7060;
  --text-3:      #3e3a32;

  /* Semantic */
  --success:     #4db87a;
  --danger:      #e05555;
  --warning:     #e8b84b;
  --info:        #4d94e8;

  --success-bg:  rgba(77,184,122,0.10);
  --danger-bg:   rgba(224,85,85,0.10);
  --warning-bg:  rgba(232,184,75,0.10);
  --info-bg:     rgba(77,148,232,0.10);

  --success-border: rgba(77,184,122,0.25);
  --danger-border:  rgba(224,85,85,0.25);
  --warning-border: rgba(232,184,75,0.25);
  --info-border:    rgba(77,148,232,0.25);

  /* Fonts */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui:      'Syne', system-ui, sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;

  /* Sidebar */
  --sidebar-w: 228px;

  /* Misc */
  --radius:    6px;
  --radius-sm: 3px;
  --radius-lg: 10px;
  --shadow:    0 8px 32px rgba(0,0,0,0.6);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.4);
  --transition: 0.18s ease;
}

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

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

button { font-family: var(--font-ui); cursor: pointer; }
input, select, textarea { font-family: var(--font-ui); }

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

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}

/* Decorative gold radial glow at bottom of sidebar */
.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  background: radial-gradient(ellipse at 50% 110%, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Dot-grid pattern on sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 50%;
  height: 100%;
  background-image: radial-gradient(circle at 1px 1px, rgba(201,168,76,0.06) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--gold-glow);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-sub {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-left: 42px;
}

/* Sidebar navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  padding: 14px 20px 5px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 20px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition), background var(--transition);
  position: relative;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}

.nav-item.active {
  color: var(--gold);
  background: var(--gold-subtle);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

.nav-item svg,
.nav-item i {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item:hover svg,
.nav-item:hover i,
.nav-item.active svg,
.nav-item.active i {
  opacity: 1;
}

/* Brand icon */
.brand-icon svg,
.brand-icon i {
  font-size: 18px;
  line-height: 1;
}

/* Logout link icon */
.logout-link svg,
.logout-link i {
  font-size: 14px;
  line-height: 1;
  opacity: 0.7;
}

/* User avatar icon */
.user-avatar svg,
.user-avatar i {
  font-size: 16px;
  line-height: 1;
}

/* Status icons */
.status-icon i {
  font-size: 30px;
  line-height: 1;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  background: var(--gold-glow);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.user-role {
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.logout-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 0;
  transition: color var(--transition);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
}

.logout-link:hover { color: var(--danger); }

.logout-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* ── Main content ──────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 36px;
  min-width: 0;
}

/* ── Page header ───────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 5px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 20px;
  text-decoration: none;
  transition: color var(--transition);
  letter-spacing: 0.03em;
}

.back-link:hover { color: var(--gold); }

.back-link svg {
  width: 14px;
  height: 14px;
}

/* ── Grid ──────────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ── Stat cards ────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
}

/* Top accent line */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 60%);
}

/* Decorative corner geometry */
.stat-card::after {
  content: '';
  position: absolute;
  top: -24px; right: -24px;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(201,168,76,0.08);
  border-radius: 50%;
  pointer-events: none;
}

.stat-card.accent {
  border-color: rgba(201,168,76,0.2);
  background: linear-gradient(135deg, var(--bg-1) 0%, rgba(201,168,76,0.03) 100%);
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-2);
  margin-bottom: 10px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
}

.stat-value.gold { color: var(--gold); }
.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.danger { color: var(--danger); }

.stat-footer {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 8px;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-accent-left {
  border-left: 2px solid var(--gold);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: var(--font-ui);
  background: var(--bg-2);
}

thead th:first-child { padding-left: 20px; }
thead th:last-child  { padding-right: 20px; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 12px 14px;
  color: var(--text);
  vertical-align: middle;
}

tbody td:first-child { padding-left: 20px; }
tbody td:last-child  { padding-right: 20px; }

.td-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}

.td-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-amount {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
}

.td-muted { color: var(--text-2); }

.tr-expired { opacity: 0.35; }
.tr-danger  { background: rgba(224,85,85,0.04) !important; }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-ui);
  border: 1px solid;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}

.badge-muted {
  background: rgba(122,112,96,0.10);
  color: var(--text-2);
  border-color: rgba(122,112,96,0.20);
}

.badge-gold {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: rgba(201,168,76,0.3);
}

/* Live pulse badge */
.badge-live {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
  animation: pulse-badge 2.5s ease-in-out infinite;
}

.badge-offline {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Primary: gold fill */
.btn-primary {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #0a0a0a;
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

/* Danger */
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}
.btn-danger:hover {
  background: rgba(224,85,85,0.18);
}

/* Success */
.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.btn-success:hover {
  background: rgba(77,184,122,0.18);
}

/* Warning */
.btn-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}

/* Sizes */
.btn-sm {
  padding: 6px 12px;
  font-size: 10px;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 13px;
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

.form-control::placeholder { color: var(--text-3); }

.form-control[readonly] {
  background: var(--bg-1);
  color: var(--text-2);
  cursor: default;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%237a7060' d='M5 7L1 2h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.form-hint {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 5px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
  line-height: 1.5;
}

.alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-border); }

/* ── Filter bar ────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  transition: all var(--transition);
  cursor: pointer;
  background: transparent;
  font-family: var(--font-ui);
}

.filter-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-pill.active {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold);
}

/* ── Definition list (order details) ──────────────────────────────────── */
.dl {
  display: grid;
  grid-template-columns: 200px 1fr;
}

.dl dt {
  padding: 11px 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.dl dd {
  padding: 11px 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  word-break: break-all;
}

.dl dt:last-of-type,
.dl dd:last-of-type {
  border-bottom: none;
}

/* ── Amount display ────────────────────────────────────────────────────── */
.amount-hero {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
}

.amount-hero-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-2);
  margin-bottom: 8px;
}

.amount-secondary {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text-2);
  margin-top: 6px;
}

/* ── Timer/countdown ───────────────────────────────────────────────────── */
.timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  transition: color var(--transition);
}

.timer svg { width: 12px; height: 12px; }

.timer.warning { color: var(--warning); }
.timer.danger  { color: var(--danger); }
.timer.expired { color: var(--text-3); }

/* ── QR / Payload box ──────────────────────────────────────────────────── */
.qr-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  word-break: break-all;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

/* ── SSE indicator ─────────────────────────────────────────────────────── */
.sse-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.sse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  flex-shrink: 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.sse-dot.live {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(77,184,122,0.2);
  animation: sse-pulse 2s ease-in-out infinite;
}

.sse-dot.offline {
  background: var(--danger);
}

@keyframes sse-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(77,184,122,0.2); }
  50%       { box-shadow: 0 0 0 5px rgba(77,184,122,0.05); }
}

/* ── Auth page ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Dot grid background */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(201,168,76,0.07) 1px, transparent 0);
  background-size: 36px 36px;
  pointer-events: none;
}

/* Large ambient glow */
.auth-page::after {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(201,168,76,0.05) 0%, transparent 65%);
  pointer-events: none;
}

/* Second glow bottom-right */
.auth-glow-br {
  position: absolute;
  bottom: -20%;
  right: -15%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(201,168,76,0.04) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.auth-brand {
  text-align: center;
  margin-bottom: 36px;
}

.auth-brand-icon {
  width: 52px;
  height: 52px;
  background: var(--gold-glow);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.auth-brand-icon svg {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1;
}

.auth-subtitle {
  font-size: 11px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: 6px;
}

/* ── Payment page (trader) ─────────────────────────────────────────────── */
.payment-card {
  max-width: 560px;
  margin: 0 auto;
}

.payment-amount-section {
  text-align: center;
  padding: 32px 20px;
  position: relative;
}

/* Decorative rings */
.payment-amount-section::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  pointer-events: none;
}

/* ── Status page (trader) ──────────────────────────────────────────────── */
.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.status-icon.pending {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}

.status-icon.completed {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
}

.status-icon.disputed {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.status-icon svg {
  width: 30px;
  height: 30px;
}

/* Spinner for pending */
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(232,184,75,0.2);
  border-top-color: var(--warning);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Chart container ───────────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 100px;
  margin-top: 16px;
}

.chart-wrap-md {
  position: relative;
  height: 160px;
}

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.pagination a,
.pagination span {
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.pagination .current {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold);
  font-weight: 700;
}

.pagination-info {
  margin-left: auto;
  color: var(--text-2);
}

/* ── Section divider ───────────────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
  position: relative;
}

.section-divider::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 60px;
  height: 1px;
  background: var(--gold);
}

/* ── Utility classes ───────────────────────────────────────────────────── */
.flex   { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.gap-8  { gap: 32px; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-3   { margin-top: 12px; }
.mt-4   { margin-top: 16px; }
.mt-6   { margin-top: 24px; }
.mt-8   { margin-top: 32px; }
.mb-1   { margin-bottom: 4px; }
.mb-2   { margin-bottom: 8px; }
.mb-3   { margin-bottom: 12px; }
.mb-4   { margin-bottom: 16px; }
.mb-6   { margin-bottom: 24px; }
.mb-8   { margin-bottom: 32px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.overflow-x-auto { overflow-x: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.relative { position: relative; }

/* Text colors */
.text-gold    { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info    { color: var(--info); }
.text-muted   { color: var(--text-2); }
.text-dim     { color: var(--text-3); }

/* Font helpers */
.font-display { font-family: var(--font-display); }
.font-mono    { font-family: var(--font-mono); }

/* Text sizes */
.text-xs  { font-size: 10px; }
.text-sm  { font-size: 12px; }
.text-md  { font-size: 14px; }
.text-lg  { font-size: 18px; }
.text-xl  { font-size: 24px; }
.text-2xl { font-size: 32px; }

.fw-bold   { font-weight: 700; }
.fw-medium { font-weight: 500; }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.08em; }

/* Credit / Debit colors */
.credit { color: var(--success); }
.debit  { color: var(--danger); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-2);
}

.empty-state svg {
  width: 44px;
  height: 44px;
  opacity: 0.2;
  margin: 0 auto 14px;
  display: block;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.empty-state-sub {
  font-size: 12px;
  color: var(--text-3);
}

/* Action group */
.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Decorative geometric 2D elements ──────────────────────────────────── */

/* Dot grid overlay — can be added to section backgrounds */
.dot-grid {
  position: relative;
}
.dot-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(201,168,76,0.06) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
  border-radius: inherit;
}

/* Diagonal stripe accent */
.stripe-accent {
  position: relative;
  overflow: hidden;
}
.stripe-accent::before {
  content: '';
  position: absolute;
  top: 0; right: -40px;
  width: 80px;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(201,168,76,0.04) 6px,
    rgba(201,168,76,0.04) 7px
  );
  pointer-events: none;
}

/* Gold line top border variant */
.gold-top {
  border-top: 1px solid var(--gold) !important;
}

/* Geometric corner decoration */
.corner-deco::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 48px;
  height: 48px;
  border-bottom: 1px solid rgba(201,168,76,0.15);
  border-right: 1px solid rgba(201,168,76,0.15);
  border-radius: 0 0 var(--radius) 0;
  pointer-events: none;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
    padding: 20px 16px;
  }
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .dl {
    grid-template-columns: 1fr;
  }
  .dl dt { border-bottom: none; padding-bottom: 2px; }
  .dl dd { padding-top: 2px; }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Nav badge (new order count) */
.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #080808;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: var(--font-mono);
  line-height: 1.4;
  min-width: 18px;
  text-align: center;
}
