/* ===== Design tokens =====
   Palette: true-black base (shared with landing + docs), electric cyan accent
   (QRIS/scan motif), green=settlement, amber=pending, red=failed/cancelled.
   Type: Inter Tight (display/numbers), Inter (body), JetBrains Mono (data/ids).
*/
:root {
  /* Unified true-black palette — shared with landing page and docs so moving
     between marketing site, docs, and dashboard feels like one product, not
     three. Was previously a navy-blue (#0b0e14) glassmorphism theme that
     clashed against the pure-black landing page. */
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #111111;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  --text: #fafafa;
  --text-dim: #a1a1aa;
  --text-faint: #52525b;

  --accent: #00d9ff;
  --accent-dim: rgba(0, 217, 255, 0.12);
  --accent-glow: rgba(0, 217, 255, 0.30);

  --success: #34d399;
  --success-dim: rgba(52, 211, 153, 0.14);
  --warning: #fbbf24;
  --warning-dim: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, 0.14);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Inter Tight as display face everywhere (dashboard previously used Space
     Grotesk, another source of the cross-page inconsistency). */
  --font-display: 'Inter Tight', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html {
  background: #000000;
}
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body { background: transparent; }

body {
  min-height: 100vh;
  /* Ambient background now lives in the shared .pg-bg layer (background.css),
     so it matches the landing page and docs exactly instead of using its own
     navy-tinted gradients. */
}

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.mono { font-family: var(--font-mono); }

/* ===== Glass surfaces ===== */
.glass {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
}

/* ===== Signature element: scan line =====
   A thin animated cyan line across the top of primary metric cards,
   evoking a QRIS scan pass. Used sparingly — only on hero metric cards. */
.scan-line {
  position: relative;
  overflow: hidden;
}
.scan-line::before {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  width: 40%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan-sweep 3.5s ease-in-out infinite;
  opacity: 0.8;
}
@keyframes scan-sweep {
  0% { left: -40%; }
  50% { left: 100%; }
  100% { left: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-line::before { animation: none; display: none; }
}

/* ===== Buttons ===== */
.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { border-color: var(--accent); background: rgba(34, 211, 238, 0.08); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #000000;
}
.btn-primary:hover { background: #4ddef0; border-color: #4ddef0; }

.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-dim); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Form elements ===== */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input,
.field select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color 0.15s ease;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: lowercase;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-settlement { background: var(--success-dim); color: var(--success); }
.badge-pending { background: var(--warning-dim); color: var(--warning); }
.badge-expire { background: rgba(255, 255, 255, 0.08); color: var(--text-dim); }
.badge-cancel { background: var(--danger-dim); color: var(--danger); }
.badge-failed { background: var(--danger-dim); color: var(--danger); }
.badge-active { background: var(--success-dim); color: var(--success); }
.badge-suspended { background: var(--danger-dim); color: var(--danger); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ===== Utility ===== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, rgba(255,255,255,0.04) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
