:root {
  --brand: #0ea5a4;
  --brand-2: #2563eb;
  --brand-grad: linear-gradient(135deg, #0ea5a4 0%, #2563eb 100%);
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #e6eaf1;
}
* { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Login ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--brand-grad);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(2, 32, 71, .25);
  padding: 34px 30px;
}
.auth-logo {
  width: 60px; height: 60px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--brand-grad); color: #fff; font-size: 28px;
  margin-bottom: 16px;
}

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0;
  background: #0b1220; color: #cbd5e1;
  padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 26px; padding: 0 6px;
}
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--brand-grad);
  display: grid; place-items: center; font-size: 20px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; color: #94a3b8;
  cursor: pointer; font-weight: 500; margin-bottom: 4px; transition: .15s;
  border: none; background: none; width: 100%; text-align: left; font-size: 15px;
}
.nav-item i { font-size: 18px; }
.nav-item:hover { background: #16203400; color: #e2e8f0; background: rgba(255,255,255,.05); }
.nav-item.active { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.35); }
.main { flex: 1; min-width: 0; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 16px 28px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 10;
}
.topbar h5 { margin: 0; font-weight: 800; }
.content { padding: 26px 28px; }

/* ---------- Cards / stats ---------- */
.card-soft {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: 0 2px 10px rgba(15,23,42,.03);
}
.stat {
  border-radius: 20px; padding: 20px 22px; color: #fff; overflow: hidden; position: relative;
}
.stat .n { font-size: 32px; font-weight: 800; line-height: 1; }
.stat .l { opacity: .85; font-weight: 500; margin-top: 6px; }
.stat i { position: absolute; right: 14px; top: 12px; font-size: 46px; opacity: .18; }
.g-teal { background: linear-gradient(135deg,#0ea5a4,#14b8a6); }
.g-blue { background: linear-gradient(135deg,#2563eb,#3b82f6); }
.g-violet { background: linear-gradient(135deg,#7c3aed,#a855f7); }
.g-amber { background: linear-gradient(135deg,#d97706,#f59e0b); }

/* ---------- Table ---------- */
.table thead th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; border-color: var(--line); }
.table td { vertical-align: middle; border-color: var(--line); }
.code-badge { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; }
.kind-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.k-tol { background:#dbeafe; color:#1e40af; }
.k-transit { background:#d1fae5; color:#065f46; }
.k-merchant { background:#fef3c7; color:#92400e; }
.k-parkir { background:#fce7f3; color:#9d174d; }
.k-topup { background:#e0e7ff; color:#3730a3; }
.k-default { background:#e2e8f0; color:#334155; }

.btn-brand { background: var(--brand-grad); border: none; color: #fff; font-weight: 600; }
.btn-brand:hover { color: #fff; opacity: .92; }
.search-box { max-width: 340px; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; }

@media (max-width: 820px) {
  .sidebar { position: fixed; left: -260px; z-index: 1000; transition: .2s; }
  .sidebar.open { left: 0; }
  .content { padding: 18px 14px; }
}
