/* ==========================================================================
   Leadboard – calm, mobile-first design system (no build step required)
   ========================================================================== */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --line: #e5e8ee;
  --line-strong: #d5dae3;
  --ink: #1c2333;
  --ink-2: #4b5468;
  --muted: #8a93a6;
  --accent: #5468d4;
  --accent-ink: #ffffff;
  --accent-soft: #eef0fc;
  --ok: #3f9a7e;
  --ok-soft: #e8f5f0;
  --warn: #c99331;
  --warn-soft: #fbf3e2;
  --bad: #c9694f;
  --bad-soft: #fbece7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 55, .04), 0 4px 16px rgba(20, 30, 55, .05);
  --shadow-lg: 0 10px 40px rgba(20, 30, 55, .14);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151d;
    --surface: #181d27;
    --surface-2: #1e2430;
    --line: #262d3b;
    --line-strong: #323a4b;
    --ink: #e8ebf2;
    --ink-2: #b4bccb;
    --muted: #7c8599;
    --accent: #7d8ff0;
    --accent-ink: #0f1320;
    --accent-soft: #232a45;
    --ok-soft: #17302a;
    --warn-soft: #33291a;
    --bad-soft: #36221d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "tnum";
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .98rem; }
p { margin: 0; }
code { font-size: .85em; background: var(--surface-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.tiny { font-size: .75rem; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--surface); --c: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--b); color: var(--c); font: 550 .9rem var(--font); cursor: pointer;
  transition: transform .12s var(--ease), background .2s, box-shadow .2s, border-color .2s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; text-decoration: none !important;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.97); }
.btn.primary { --b: var(--accent); --c: var(--accent-ink); border-color: transparent; box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { --b: transparent; border-color: transparent; }
.btn.ghost:hover { --b: var(--surface-2); }
.btn.danger { --c: var(--bad); }
.btn.danger:hover { --b: var(--bad-soft); border-color: var(--bad); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .82rem; border-radius: 10px; }
.btn.icon { padding: 0; width: 42px; }
.btn.sm.icon { width: 34px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn svg, .icon-svg { width: 18px; height: 18px; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: block; }
.field + .field { margin-top: 16px; }
.label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.error { font-size: .8rem; color: var(--bad); margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 400 16px/1.4 var(--font); /* 16px stops iOS zoom on focus */
  transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238a93a6' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.is-invalid { border-color: var(--bad); }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-group .addon { display: flex; align-items: center; padding: 0 0 0 14px; color: var(--muted); font-size: .9rem; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.input-group .input { border: 0; box-shadow: none !important; padding-left: 2px; min-width: 0; }
.input-color { width: 44px; height: 36px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: none; cursor: pointer; }
.input-color::-webkit-color-swatch-wrapper { padding: 3px; }
.input-color::-webkit-color-swatch { border: 0; border-radius: 7px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: .9rem; }
.check input { appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.check input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.check input:checked { background: var(--ok); }
.check input:checked::after { transform: translateX(16px); }
.check input.box { width: 20px; height: 20px; border-radius: 6px; }
.check input.box::after { display: none; }
.check input.box:checked { background: var(--bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.2'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/14px no-repeat; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; }
.logo-field { display: flex; align-items: center; gap: 14px; }
.logo-preview { width: 64px; height: 64px; border-radius: 14px; border: 1px dashed var(--line-strong); display: grid; place-items: center; background: var(--surface-2); overflow: hidden; flex: none; color: var(--muted); font-size: .7rem; text-align: center; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

/* ---------- Cards / surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
@media (min-width: 720px) { .card-pad { padding: 24px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .card-head { padding: 18px 24px; } }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; }
.section-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin-bottom: 10px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: .6; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

/* ---------- Lists (table on desktop, cards on mobile) ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .15s; }
.list > li:last-child { border-bottom: 0; }
@media (min-width: 720px) { .list > li { padding: 14px 24px; } }
.list > li.link:hover { background: var(--surface-2); cursor: pointer; }
.list .meta { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--c, var(--muted)); }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 650; font-size: .85rem; background: var(--accent-soft); color: var(--accent); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.avatar.round { border-radius: 50%; }
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.05rem; }

/* ---------- Alerts & toasts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-size: .88rem; background: var(--surface-2); border: 1px solid var(--line); }
.alert.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.alert.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.alert.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.alert.info { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.alert .icon-svg { margin-top: 1px; }
.toasts { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (min-width: 720px) { .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: .9rem; max-width: 460px; animation: toast-in .35s var(--ease) both; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Dialog ---------- */
dialog.modal { border: 0; padding: 0; background: var(--surface); color: var(--ink); width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 40px); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: auto; }
dialog.modal::backdrop { background: rgba(15, 20, 35, .4); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .25s var(--ease); }
@media (max-width: 719px) {
  dialog.modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 92dvh; }
  dialog.modal[open] { animation: sheet .3s var(--ease); }
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
@keyframes sheet { from { transform: translateY(100%); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 0; }
.modal-body { padding: 18px 20px 22px; }

/* ---------- Animations ---------- */
.reveal { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ==========================================================================
   Admin shell
   ========================================================================== */
.shell { min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); min-width: 0; text-decoration: none !important; }
.brand img { height: 30px; width: auto; max-width: 140px; object-fit: contain; }
.brand .mark { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 50; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .3s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.scrim { position: fixed; inset: 0; background: rgba(15, 20, 35, .35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.show { opacity: 1; pointer-events: auto; }
.sidebar .brand { padding: 20px 20px 16px; }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 520; font-size: .92rem; text-decoration: none; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 12px; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.main { padding: 18px 14px 80px; max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.page-head .crumbs a { color: var(--muted); }
@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .topbar.mobile-only, .scrim { display: none; }
  .shell { padding-left: 272px; }
  .main { padding: 32px 36px 80px; }
}
.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .stat-tiles { grid-template-columns: repeat(5, 1fr); gap: 16px; } }
.stat-tile { padding: 16px; }
.stat-tile .v { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.stat-tile .k { font-size: .8rem; color: var(--muted); }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 550; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; transition: color .2s, border-color .2s; }
.tabs a.active, .tabs a:hover { color: var(--ink); border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: rise .35s var(--ease); }
.status-grid { display: grid; gap: 10px; }
.status-row { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.status-row .controls { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 900px) {
  .status-row { grid-template-columns: auto minmax(160px, 1.2fr) 1.3fr 150px 80px auto; }
  .status-row .controls { display: contents; }
}
.picker-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.picker-list button { display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.picker-list button:last-child { border-bottom: 0; }
.picker-list button:hover, .picker-list button.selected { background: var(--accent-soft); }
.step { display: flex; gap: 14px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex: none; }
.step-body { flex: 1; min-width: 0; padding-bottom: 8px; }
.step.locked { opacity: .45; pointer-events: none; }
.copy-field { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 14px; }
.copy-field span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: 28px 24px; animation: rise .5s var(--ease); }
@media (min-width: 720px) { .auth-card { padding: 36px; } }
.auth-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-logo img { max-height: 64px; max-width: 200px; object-fit: contain; }
.auth h1 { text-align: center; font-size: 1.3rem; }
.auth .sub { text-align: center; color: var(--muted); font-size: .9rem; margin: 6px 0 24px; }
.powered { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; font-size: .76rem; color: var(--muted); }
.powered img { height: 18px; width: auto; max-width: 100px; object-fit: contain; opacity: .85; }

/* ==========================================================================
   Client dashboard
   ========================================================================== */
.cl-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; padding-top: env(safe-area-inset-top); }
.cl-header.scrolled { border-color: var(--line); }
.cl-header-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.cl-logo { height: 38px; width: auto; max-width: 150px; object-fit: contain; }
.cl-name { font-weight: 650; font-size: 1rem; line-height: 1.2; }
.cl-sub { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.cl-main { max-width: 1180px; margin: 0 auto; padding: 4px 16px calc(40px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .cl-header-inner { padding: 14px 32px; } .cl-main { padding: 8px 32px 56px; } }

.filters { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 20; margin: 0 -16px; padding: 10px 16px 12px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1024px) { .filters { top: 66px; margin: 0 -32px; padding: 12px 32px; flex-direction: row; align-items: center; justify-content: space-between; } }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding: 2px; margin: -2px; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 15px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .86rem; font-weight: 550; text-decoration: none !important; transition: background .2s, color .2s, border-color .2s, transform .12s; -webkit-tap-highlight-color: transparent; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip:active { transform: scale(.96); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .count { font-size: .74rem; opacity: .65; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: none; padding: 7px 13px; border-radius: 99px; font-size: .8rem; font-weight: 550; color: var(--muted); text-decoration: none !important; transition: background .2s, color .2s; white-space: nowrap; }
.seg a.active { background: var(--accent-soft); color: var(--accent); }

#board { transition: opacity .2s var(--ease); }
#board.loading { opacity: .45; pointer-events: none; }
.board-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.board-title h1 { font-size: 1.3rem; }
@media (min-width: 720px) { .board-title h1 { font-size: 1.6rem; } }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { position: relative; padding: 14px 14px 16px; overflow: hidden; }
.kpi.hero { grid-column: 1 / -1; padding: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #8fb6ff)); color: #fff; border: 0; }
.kpi .k { font-size: .78rem; color: var(--muted); font-weight: 550; display: flex; align-items: center; gap: 7px; }
.kpi.hero .k { color: rgba(255,255,255,.82); }
.kpi .v { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 6px; }
.kpi.hero .v { font-size: 2.6rem; }
.kpi .p { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.kpi .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--c); width: 0; transition: width 1s var(--ease); border-radius: 0 3px 3px 0; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.18); color: #fff; white-space: nowrap; }
.hero-side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.conv { font-size: .8rem; color: rgba(255,255,255,.85); }
.conv b { font-size: 1.05rem; color: #fff; }
@media (min-width: 720px) {
  .kpis { grid-template-columns: 1.4fr repeat(4, 1fr); gap: 14px; }
  .kpi.hero { grid-column: auto; flex-direction: column; align-items: flex-start; justify-content: space-between; }
  .hero-side { text-align: left; align-items: flex-start; }
  .kpi { padding: 18px; }
  .kpi .v { font-size: 2rem; }
}

.panels { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 900px) { .panels { grid-template-columns: 1.1fr 1fr; gap: 16px; margin-top: 16px; } .panels .wide { grid-column: 1 / -1; } }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.panel-title h2 { font-size: 1rem; }

.status-wrap { display: grid; gap: 18px; align-items: center; }
@media (min-width: 560px) { .status-wrap { grid-template-columns: 170px 1fr; gap: 24px; } }
.donut { position: relative; width: 170px; height: 170px; margin: 0 auto; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 15; }
.donut .seg-arc { stroke-linecap: butt; transition: stroke-dasharray 1s var(--ease), opacity .2s; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-size: 1.6rem; letter-spacing: -.03em; line-height: 1.1; }
.donut-center span { font-size: .74rem; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; }
.bar-row .name { display: flex; align-items: center; gap: 8px; font-size: .88rem; min-width: 0; }
.bar-row .num { font-size: .88rem; font-weight: 650; text-align: right; }
.bar-row .num small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.track { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--c); transition: width .9s var(--ease); }

.trend { position: relative; height: 180px; display: flex; align-items: flex-end; gap: 3px; padding-top: 22px; }
.trend .col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.trend .col i { width: 100%; max-width: 30px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--accent) 75%, transparent); height: 0; transition: height .8s var(--ease), background .2s; min-height: 2px; }
.trend .col:hover i, .trend .col:focus i { background: var(--accent); }
.trend .col .tip { position: absolute; bottom: calc(var(--h) + 6px); background: var(--ink); color: var(--bg); font-size: .72rem; font-weight: 600; padding: 3px 7px; border-radius: 6px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; pointer-events: none; z-index: 2; }
.trend .col:hover .tip, .trend .col:focus .tip { opacity: 1; transform: none; }
.trend-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 8px; }

.camp-list { display: flex; flex-direction: column; }
.camp { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: background .15s; border-radius: 10px; }
.camp:last-child { border-bottom: 0; }
.camp:hover { background: var(--surface-2); margin: 0 -10px; padding: 14px 10px; }
.camp .name { font-weight: 600; font-size: .95rem; }
.camp .total { font-weight: 700; font-size: 1.1rem; text-align: right; }
.camp .total small { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; }
.stack-bar { grid-column: 1 / -1; display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.stack-bar i { display: block; height: 100%; background: var(--c); width: 0; transition: width .9s var(--ease); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.cl-foot { display: flex; justify-content: center; margin-top: 28px; }
.user-menu { position: relative; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .18s, transform .18s var(--ease); z-index: 60; }
.user-menu.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu .who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.spin { animation: spin 1s linear infinite; }
