:root {
  --blue: #1568d6;
  --blue-dark: #0b4aa8;
  --teal: #14b8b3;
  --charcoal: #34373b;
  --navy: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --bg-soft: #f8fafc;
  color-scheme: light;
  font-family: 'Rajdhani', 'Segoe UI', system-ui, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #fff; color: var(--navy); }
body { min-height: 100svh; position: relative; overflow-x: hidden; font-size: 16px; }
.glow { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.glow-left { top: -10%; left: -10%; width: 45vw; height: 45vw; background: rgba(21,104,214,.12); }
.glow-right { bottom: -15%; right: 10%; width: 35vw; height: 35vw; background: rgba(20,184,179,.10); }
#app { position: relative; z-index: 1; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 28px; padding: 14px 32px; background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar img { height: 40px; display: block; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { padding: 8px 16px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 17px; }
.nav a:hover { background: var(--bg-soft); color: var(--navy); }
.nav a.active { background: rgba(21,104,214,.1); color: var(--blue); }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.who strong { color: var(--navy); display: block; line-height: 1.1; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(21,104,214,.1); color: var(--blue); font-size: 13px; font-weight: 600; }
.pill.teal { background: rgba(20,184,179,.12); color: #0d8a86; }
.pill.red { background: #fef2f2; color: #b91c1c; }
.pill.amber { background: #fff8ec; color: #b45309; }
.pill.gray { background: #f1f5f9; color: var(--muted); }

main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
h1 { margin: 0 0 4px; font-size: 32px; letter-spacing: -.3px; }
h2 { margin: 0 0 14px; font-size: 21px; }
.sub { color: var(--muted); margin: 0 0 24px; font-size: 17px; }
.row { display: flex; gap: 20px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.stat .label { color: var(--muted); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat .value { font-size: 40px; font-weight: 700; color: var(--navy); line-height: 1.15; }
.stat .value.blue { color: var(--blue); } .stat .value.teal { color: #0d8a86; }
.stat .hint { color: var(--muted); font-size: 14px; }
.section { margin-bottom: 28px; }

/* buttons & forms */
button, .btn { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--navy);
  padding: 9px 18px; border-radius: 10px; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: var(--bg-soft); }
button.primary, .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
button.primary:hover { background: var(--blue-dark); }
button.small { padding: 4px 12px; font-size: 14px; }
button:disabled { opacity: .55; cursor: default; }
label { display: block; font-weight: 600; color: var(--charcoal); margin: 0 0 6px; font-size: 15px; }
input[type=text], input[type=password], input[type=number], input[type=month], select {
  font: inherit; width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--navy); }
input:focus, select:focus { outline: 2px solid rgba(21,104,214,.35); border-color: var(--blue); }
.field { margin-bottom: 16px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 18px; height: 18px; }
.msg { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 15px; }
.msg.err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.msg.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.msg.warn { background: #fff8ec; border: 1px solid #fcd9a8; color: #92400e; }

/* table */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tr:hover td { background: var(--bg-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; background: #fff !important; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; margin-right: 8px; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }

/* chart */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding: 8px 4px 0; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar .fill { width: 100%; max-width: 64px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--blue), var(--teal)); min-height: 3px; }
.bar .amt { font-size: 13px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.bar .m { font-size: 13px; color: var(--muted); margin-top: 6px; }
.bar.cur .fill { background: linear-gradient(180deg, var(--blue-dark), var(--blue)); }

/* login */
.login-wrap { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 40px 36px;
  box-shadow: 0 20px 50px rgba(15,23,42,.1); }
.login-card img { height: 72px; display: block; margin: 0 auto 22px; }
.login-card h1 { font-size: 26px; text-align: center; } .login-card .sub { text-align: center; margin-bottom: 24px; }
.login-card button.primary { width: 100%; padding: 12px; font-size: 17px; }

.keybox { background: var(--bg-soft); border: 1px dashed var(--blue); border-radius: 12px; padding: 14px 16px; word-break: break-all; margin: 8px 0 12px; }
ol.steps { margin: 10px 0 0; padding-left: 22px; color: var(--muted); line-height: 1.7; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 20px; }
.modal { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }
@media (max-width: 800px) { .topbar { padding: 12px 16px; gap: 12px; flex-wrap: wrap; } main { padding: 20px 16px 48px; } }
@media print {
  .topbar, .glow, .noprint { display: none !important; } body { background: #fff; }
  .card { box-shadow: none; border: 0; padding: 0; } main { padding: 0; max-width: none; }
}
