/* ============================================================
   Innovatek KPI - design system
   ============================================================ */
:root {
  /* ---- light (default) - matches Attendly ---- */
  --bg: #f6f7f9;
  --bg-2: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --border: #e4e7ec;
  --border-soft: #eef0f3;
  --text: #14181f;
  --text-dim: #5b636e;
  --text-faint: #99a1ad;

  --brand: #0c8f6c;
  --brand-2: #0aa67a;
  --brand-ink: #06694f;
  --brand-soft: rgba(12, 143, 108, .10);
  --brand-glow: rgba(12, 143, 108, .16);

  --green: #12a574;
  --green-soft: rgba(18, 165, 116, .12);
  --red: #e5484d;
  --red-soft: rgba(229, 72, 77, .11);
  --amber: #d98a0b;
  --amber-soft: rgba(217, 138, 11, .12);
  --cyan: #0d9bbd;
  --cyan-soft: rgba(13, 155, 189, .12);
  --violet: #6d5ef0;
  --violet-soft: rgba(109, 94, 240, .12);
  --pink: #d6489b;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .06), 0 2px 4px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 48px rgba(16, 24, 40, .14);
  --ring-track: #eaecef;
  --sidebar-w: 256px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #0a0b0d;
  --bg-2: #0d0f12;
  --surface: #141619;
  --surface-2: #1a1d21;
  --surface-3: #22262c;
  --border: #262a31;
  --border-soft: #1d2025;
  --text: #eceef1;
  --text-dim: #99a0aa;
  --text-faint: #61676f;

  --brand: #19b888;
  --brand-2: #2dd49d;
  --brand-ink: #0fa377;
  --brand-soft: rgba(25, 184, 136, .14);
  --brand-glow: rgba(25, 184, 136, .20);

  --green: #1cc08a;
  --green-soft: rgba(28, 192, 138, .15);
  --red: #f0595e;
  --red-soft: rgba(240, 89, 94, .15);
  --amber: #eaa023;
  --amber-soft: rgba(234, 160, 35, .15);
  --cyan: #28b6d6;
  --cyan-soft: rgba(40, 182, 214, .15);
  --violet: #8b7df5;
  --violet-soft: rgba(139, 125, 245, .16);

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --ring-track: #262a31;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
[data-theme="dark"] body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(800px 460px at 82% -12%, var(--brand-glow), transparent 62%);
  opacity: .5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { letter-spacing: -0.02em; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border); background-clip: padding-box; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.app.hidden { display: none; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column; padding: 20px 14px;
  gap: 4px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 6px 18px var(--brand-glow);
}
img.brand-logo { background: none; padding: 0; object-fit: contain; box-shadow: 0 6px 18px rgba(22,193,114,.25); }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: var(--text-faint); font-weight: 500; }

.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--text-faint); padding: 14px 12px 6px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 11px; color: var(--text-dim); font-weight: 550; font-size: 13.5px;
  transition: background .15s, color .15s; position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--brand), var(--brand-2));
}
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.userbox { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.userbox:hover { background: var(--surface); }
.userbox .meta { overflow: hidden; }
.userbox .meta .n { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .meta .r { font-size: 11px; color: var(--text-faint); }

/* ---------- Main ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 28px; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-soft);
}
.page-title h1 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.2px; }
.page-title p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-faint); }
.topbar .spacer { flex: 1; }

.range-pills { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 3px; gap: 2px; }
.range-pills button { background: none; border: none; color: var(--text-dim); padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; transition: .15s; }
.range-pills button:hover { color: var(--text); }
.range-pills button.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px var(--brand-glow); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); display: grid; place-items: center; transition: .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; }

.content { padding: 24px 28px 60px; }

.avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 12.5px; flex: none; letter-spacing: .3px;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; border-radius: 13px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, 1fr); }
.cols-2 { grid-template-columns: 1.5fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .cols-2, .cols-3 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--surface), var(--surface) 60%, color-mix(in srgb, var(--surface) 92%, #000));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-head .sub { font-size: 12px; color: var(--text-faint); }

.kpi {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 90%, #000));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); transition: transform .18s, border-color .18s;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--border); }
.kpi .top { display: flex; align-items: center; gap: 9px; color: var(--text-dim); font-size: 12.5px; font-weight: 600; }
.kpi .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kpi .ic svg { width: 16px; height: 16px; }
.kpi .val { font-size: 27px; font-weight: 780; letter-spacing: -.6px; margin: 10px 0 4px; }
.kpi .foot { display: flex; align-items: center; gap: 8px; }
.spark { position: absolute; right: 10px; bottom: 8px; width: 96px; height: 38px; opacity: .9; pointer-events: none; }

.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.delta.up { color: var(--green); background: var(--green-soft); }
.delta.down { color: var(--red); background: var(--red-soft); }
.delta.flat { color: var(--text-faint); background: var(--surface-3); }
.delta svg { width: 11px; height: 11px; }
.muted { color: var(--text-faint); font-size: 12px; }

/* ---------- Funnel ---------- */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-row { display: grid; grid-template-columns: 92px 1fr 60px; align-items: center; gap: 12px; }
.funnel-row .lbl { font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
.funnel-bar { height: 30px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 8px; display: flex; align-items: center; padding-left: 10px; color: #fff; font-weight: 700; font-size: 12.5px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.funnel-row .rate { font-size: 12px; color: var(--text-faint); text-align: right; font-weight: 600; }

/* ---------- Goals ---------- */
.goal { margin-bottom: 15px; }
.goal:last-child { margin-bottom: 0; }
.goal .gh { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 7px; }
.goal .gh .gv { color: var(--text-dim); font-weight: 600; }
.goal .gh .gv b { color: var(--text); }
.bar { height: 9px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar.green > i { background: linear-gradient(90deg, var(--green), #4ade80); }
.bar.amber > i { background: linear-gradient(90deg, var(--amber), #fbbf24); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; color: var(--text-faint); font-weight: 650; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 0 14px 11px; white-space: nowrap; }
table.tbl td { padding: 12px 14px; border-top: 1px solid var(--border-soft); white-space: nowrap; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .nm { font-weight: 600; }
.cell-user .tt { font-size: 11px; color: var(--text-faint); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 650; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.new { color: var(--text-dim); background: var(--surface-3); }
.badge.responded { color: var(--cyan); background: rgba(6,182,212,.14); }
.badge.interview { color: var(--brand); background: var(--brand-glow); }
.badge.won { color: var(--green); background: var(--green-soft); }
.badge.lost { color: var(--red); background: var(--red-soft); }
.badge.no_response { color: var(--amber); background: var(--amber-soft); }

.rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-3); color: var(--text-dim); }
.rank.r1 { background: linear-gradient(135deg,#f59e0b,#fbbf24); color:#000; }
.rank.r2 { background: linear-gradient(135deg,#94a3b8,#cbd5e1); color:#000; }
.rank.r3 { background: linear-gradient(135deg,#b45309,#d97706); color:#fff; }

.pill-tag { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; color:var(--text-dim); background:var(--surface-3); padding:3px 9px; border-radius:8px;}

/* ---------- Podium ---------- */
.podium { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 16px; }
.podium .card { text-align: center; position: relative; }
.podium .medal { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 20px; }
.podium .avatar { margin: 6px auto 10px; }
.podium .pname { font-weight: 700; font-size: 14px; }
.podium .pscore { font-size: 22px; font-weight: 800; margin-top: 6px; background: linear-gradient(90deg,var(--brand),var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.podium .pmeta { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.input, select.input, textarea.input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font-size: 13.5px; font-family: inherit; transition: .15s; width: 100%;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
textarea.input { resize: vertical; min-height: 64px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font-weight: 650; font-size: 13.5px; transition: .15s;
}
.btn:hover { border-color: var(--brand); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px var(--brand-glow); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: transparent; background: var(--red-soft); }
.btn.sm { padding: 7px 11px; font-size: 12.5px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(4,7,15,.6); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .15s; }
.modal { width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; animation: pop .18s; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; background: var(--surface); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 720; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-soft); position: sticky; bottom: 0; background: var(--surface); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Login ---------- */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 36px 34px; box-shadow: var(--shadow-lg); }
.login-card .brand { justify-content: center; padding-bottom: 8px; }
.login-card h2 { text-align: center; margin: 6px 0 2px; font-size: 21px; font-weight: 760; }
.login-card .lead { text-align: center; color: var(--text-faint); font-size: 13px; margin-bottom: 26px; }
.login-card .field { margin-bottom: 14px; }
.login-err { color: var(--red); font-size: 12.5px; text-align: center; min-height: 16px; margin-bottom: 6px; }
.login-hint { text-align: center; font-size: 12px; color: var(--text-faint); margin-top: 18px; }

/* ---------- Misc ---------- */
.section-gap { height: 16px; }
.empty { text-align: center; color: var(--text-faint); padding: 40px 20px; font-size: 13.5px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast-host { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 550; animation: pop .2s; min-width: 220px; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.flex { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap-gap { display:flex; flex-wrap:wrap; gap:10px; }
.hide { display: none !important; }
.big-num { font-variant-numeric: tabular-nums; }
.mt16 { margin-top: 16px; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); }

/* ---------- KPI submit board ---------- */
.badge.pending { color: var(--amber); background: var(--amber-soft); }
.badge.approved { color: var(--green); background: var(--green-soft); }
.badge.rejected { color: var(--red); background: var(--red-soft); }

.freq-pill { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.freq-pill.daily { color: var(--cyan); background: rgba(6,182,212,.14); }
.freq-pill.weekly { color: var(--brand-2); background: rgba(139,92,246,.16); }
.freq-pill.monthly { color: var(--green); background: var(--green-soft); }

.ring-txt { fill: var(--text); font-weight: 800; font-family: var(--font); }

.kboard { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 1100px) { .kboard { grid-template-columns: 1fr; } }

.kcard { display: flex; gap: 16px; align-items: flex-start; }
.kcard .ringwrap { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kcard .body { flex: 1; min-width: 0; }
.kcard .ktop { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.kcard .kic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kcard .kname { font-weight: 700; font-size: 15px; }
.kcard .kmeta { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
.kcard .weight-chip { font-size: 11px; font-weight: 650; color: var(--text-faint); background: var(--surface-3); padding: 2px 8px; border-radius: 6px; }
.kcard .ktarget { font-size: 12.5px; color: var(--text-dim); }
.kcard .ktarget b { color: var(--text); font-size: 14px; }

.submit-row { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }
.submit-row input.num { width: 92px; flex: none; text-align: center; font-weight: 700; font-size: 15px; }
.submit-row input.rmk { flex: 1; min-width: 0; }
.submit-row .btn { flex: none; }
.kcard.locked { opacity: .92; }
.locked-note { font-size: 12px; color: var(--green); display: flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 600; }
.ksparks { height: 26px; margin-top: 10px; }

/* ---------- Hero / gauge ---------- */
.hero { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: stretch; }
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; } }
.gauge-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gauge-card .glabel { font-size: 13px; color: var(--text-dim); font-weight: 600; margin-top: 2px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat-tile { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; }
.stat-tile .st-top { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12.5px; font-weight: 600; }
.stat-tile .st-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.stat-tile .st-val { font-size: 26px; font-weight: 800; margin-top: 8px; letter-spacing: -.5px; }
.stat-tile .st-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.streak { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--amber); }

/* ---------- KPI breakdown bars ---------- */
.kpibar { margin-bottom: 14px; }
.kpibar:last-child { margin-bottom: 0; }
.kpibar .kh { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 7px; }
.kpibar .kh .kl { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.kpibar .kh .kr { color: var(--text-dim); font-weight: 600; font-variant-numeric: tabular-nums; }
.kpibar .kh .kr b { color: var(--text); }
.kpibar .track { height: 10px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.kpibar .track > i { display: block; height: 100%; border-radius: 20px; transition: width .7s cubic-bezier(.2,.8,.2,1); }

/* ---------- Review queue ---------- */
.review-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; }
.review-card .rinfo { min-width: 0; }
.review-card .rname { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 9px; }
.review-card .rmeta { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; }
.review-card .rremark { font-size: 13px; color: var(--text-dim); margin-top: 8px; background: var(--surface-2); border-radius: 9px; padding: 8px 11px; border: 1px solid var(--border-soft); }
.review-card .rnums { text-align: center; }
.review-card .rnums .big { font-size: 22px; font-weight: 800; }
.review-card .rnums .small { font-size: 11.5px; color: var(--text-faint); }
.review-card .ract { display: flex; gap: 8px; }
.review-empty { text-align: center; padding: 56px 20px; }
.review-empty .big { font-size: 44px; }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { background: none; border: none; color: var(--text-dim); padding: 7px 15px; border-radius: 8px; font-weight: 650; font-size: 13px; }
.seg button.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px var(--brand-glow); }

/* ---------- Mobile nav (replaces the hidden sidebar) ---------- */
.mnav { display: none; }
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar { padding: 14px 16px; gap: 10px; }
  .page-title p { display: none; }
  .range-pills button { padding: 6px 9px; }
  .content { padding: 18px 16px 60px; }
  .mnav {
    display: flex; gap: 7px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 11px 16px; position: sticky; top: 65px; z-index: 15;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-soft);
  }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav a {
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 8px 13px; border-radius: 10px; background: var(--surface);
    border: 1px solid var(--border-soft); color: var(--text-dim);
    font-weight: 600; font-size: 12.5px;
  }
  .mnav a svg { width: 15px; height: 15px; }
  .mnav a.active { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 4px 12px var(--brand-glow); }
}
@media (max-width: 460px) { .kpi-grid { grid-template-columns: 1fr; } }
