@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #181818;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --accent: #7c6ff7;
  --accent-light: #a78bfa;
  --accent-bg: rgba(124,111,247,0.1);
  --accent-border: rgba(124,111,247,0.3);
  --text: #ffffff;
  --text-muted: rgba(255,255,255,0.45);
  --text-faint: rgba(255,255,255,0.25);
  --danger: #ef4444;
  --danger-bg: rgba(239,68,68,0.1);
  --success: #22c55e;
  --success-bg: rgba(34,197,94,0.1);
  --warning: #f59e0b;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 0.5px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  color: var(--text); text-decoration: none;
}
.logo:hover { text-decoration: none; }

.logo-mark {
  width: 28px; height: 28px;
  background: var(--accent-bg);
  border: 0.5px solid var(--accent-border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 14px; height: 14px; }

.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-email { font-size: 13px; color: var(--text-muted); }

/* ── Auth card ── */
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  padding: 2.5rem;
}

.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo .logo { justify-content: center; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 2rem; }

/* ── Forms ── */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.05em; text-transform: uppercase; }

input[type="email"],
input[type="password"],
input[type="text"],
input[type="url"] {
  width: 100%;
  background: var(--surface2);
  border: 0.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s;
}
input:focus { border-color: var(--accent); }
input::placeholder { color: var(--text-faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; border-radius: 0;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost {
  background: transparent;
  border: 0.5px solid var(--border-hover);
  color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); }
.btn-danger { background: var(--danger-bg); border: 0.5px solid var(--danger); color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.auth-footer { margin-top: 1.5rem; text-align: center; font-size: 13px; color: var(--text-muted); }

/* ── Dashboard layout ── */
.dash-body { display: flex; flex: 1; }

.sidebar {
  width: 220px; flex-shrink: 0;
  border-right: 0.5px solid var(--border);
  padding: 24px 0;
  position: sticky; top: 57px; height: calc(100vh - 57px);
}

.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 24px;
  font-size: 13px; color: var(--text-muted);
  cursor: pointer; transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
}
.sidebar-item:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.sidebar-item.active { color: var(--accent-light); border-left-color: var(--accent); background: var(--accent-bg); }
.sidebar-item svg { width: 15px; height: 15px; flex-shrink: 0; }

.content { flex: 1; padding: 32px; max-width: 900px; }

.section-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-faint);
  margin-bottom: 16px;
}

/* ── Metric cards ── */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 0.5px solid var(--border); margin-bottom: 28px; }
.metric { background: var(--bg); padding: 20px 20px; }
.metric-label { font-size: 10px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.metric-value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.metric-value.accent { color: var(--accent-light); }

/* ── Table ── */
.table-wrap { border: 0.5px solid var(--border); margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); padding: 10px 16px; text-align: left; border-bottom: 0.5px solid var(--border); }
td { padding: 12px 16px; border-bottom: 0.5px solid var(--border); font-size: 13px; color: var(--text-muted); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
td.mono { font-family: monospace; font-size: 12px; color: var(--accent-light); }

/* ── Badges ── */
.badge { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px; }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-revoked { background: rgba(255,255,255,0.05); color: var(--text-faint); }

/* ── Panels ── */
.panel { border: 0.5px solid var(--border); padding: 24px; margin-bottom: 20px; }
.panel-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.panel-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }

/* ── Topup info ── */
.topup-steps { list-style: none; counter-reset: steps; }
.topup-steps li { counter-increment: steps; display: flex; gap: 14px; padding: 14px 0; border-bottom: 0.5px solid var(--border); }
.topup-steps li:last-child { border-bottom: none; }
.step-num { width: 22px; height: 22px; background: var(--accent-bg); border: 0.5px solid var(--accent-border); color: var(--accent-light); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.step-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.step-text strong { color: var(--text); font-weight: 500; }

/* ── Key reveal ── */
.key-reveal { background: var(--surface2); border: 0.5px solid var(--accent-border); padding: 16px; margin: 16px 0; }
.key-reveal p { font-size: 11px; color: var(--text-faint); margin-bottom: 8px; letter-spacing: 0.05em; text-transform: uppercase; }
.key-reveal code { font-family: monospace; font-size: 13px; color: var(--accent-light); word-break: break-all; }

/* ── Alert ── */
.alert { padding: 12px 16px; font-size: 13px; margin-bottom: 16px; border-left: 2px solid; }
.alert-error { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.alert-info { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-light); }

/* ── Tabs (dashboard view switcher) ── */
.tabs { display: none; }

/* ── Utilities ── */
.hidden { display: none !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }

/* ── Landing ── */
.hero { padding: 100px 32px 80px; max-width: 1100px; margin: 0 auto; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; border: 0.5px solid var(--accent-border); background: var(--accent-bg); padding: 5px 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 28px; }
.hero h1 { font-size: 64px; font-weight: 700; line-height: 1.06; letter-spacing: -0.025em; margin-bottom: 20px; }
.hero h1 span { color: var(--accent-light); }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 520px; line-height: 1.7; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 12px; }
.hero-btns .btn { padding: 12px 24px; }
.btn-outline { background: transparent; border: 0.5px solid var(--border-hover); color: var(--text-muted); }
.btn-outline:hover { color: var(--text); border-color: var(--border-hover); }
.divider { border: none; border-top: 0.5px solid var(--border); }
.features { padding: 64px 32px; max-width: 1100px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border: 0.5px solid var(--border); }
.feature { background: var(--bg); padding: 28px; }
.feature-icon { width: 38px; height: 38px; border: 0.5px solid var(--accent-border); background: var(--accent-bg); color: var(--accent-light); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-icon svg { width: 16px; height: 16px; }
.feature h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.feature p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.landing-nav-links { display: flex; gap: 24px; font-size: 13px; color: var(--text-muted); }
.landing-nav-links a { color: var(--text-muted); }
.landing-nav-links a:hover { color: var(--text); text-decoration: none; }
