/* ==========================================================================
   CANDAI theme 2026-11 (looks only)
   Dark navy, CANDAI red brand, clean cards. Loaded after every other style
   in templates/base.html, so it overrides colours and spacing only.
   Remove the <link> line (or run /root/candai-theme-undo.sh) to go back.
   ========================================================================== */

:root{
  /* palette */
  --ct-bg:#0a1020;
  --ct-bg-2:#0d1428;
  --ct-surface:#111a2f;
  --ct-surface-2:#162138;
  --ct-raised:#1b2843;
  --ct-line:#223152;
  --ct-line-2:#2f4170;
  --ct-text:#e8edf7;
  --ct-dim:#b4c0d8;
  --ct-muted:#8d9bb8;
  --ct-red:#ef2b38;
  --ct-red-strong:#e30613;
  --ct-red-soft:rgba(239,43,56,.14);
  --ct-blue:#7aa7ff;
  --ct-green:#34d399;
  --ct-amber:#fbbf24;
  --ct-radius:14px;
  --ct-radius-sm:10px;
  --ct-shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.28);

  /* re-point the existing desk variables so everything built on them turns dark */
  --red:#e30613;
  --red-dark:#c20511;
  --red-soft:rgba(239,43,56,.14);
  --red-glow:rgba(227,6,19,.28);
  --bg:var(--ct-bg);
  --bg-soft:var(--ct-surface-2);
  --bg-card:var(--ct-surface);
  --bg-card-2:var(--ct-surface-2);
  --line:var(--ct-line);
  --line-2:var(--ct-line-2);
  --ink:var(--ct-text);
  --ink-dim:var(--ct-dim);
  --muted:var(--ct-muted);
  --ok:#10b981;
  --warn:#f59e0b;
  --radius:var(--ct-radius);
  --radius-sm:var(--ct-radius-sm);
  --shadow:var(--ct-shadow);
  --shadow-hover:0 1px 0 rgba(255,255,255,.04) inset, 0 12px 30px rgba(0,0,0,.35);
  --font-display:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --font-body:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  /* style.css (old) variables */
  --card:var(--ct-surface);
  --text:var(--ct-text);
  --accent:#e30613;
  color-scheme:dark;
}

/* ---------- base ---------- */
html{
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(80,110,200,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(227,6,19,.06), transparent 60%),
    var(--ct-bg) !important;
  min-height:100%;
}
html body{
  background:transparent !important;
  color:var(--ct-text);
  font-family:var(--font-body);
  font-feature-settings:"cv11","ss01";
  letter-spacing:-.005em;
}
html body a{color:var(--ct-blue)}
html body a:hover{color:#a9c6ff}
html body strong,html body b{color:var(--ct-text)}
html body h1,html body h2,html body h3,html body h4{color:var(--ct-text);font-family:var(--font-display);letter-spacing:-.02em}
html body p,html body li,html body dd,html body td,html body label{color:inherit}
html body hr{border:0;border-top:1px solid var(--ct-line)}
html body code,html body pre{background:var(--ct-surface-2);color:#cfe0ff;border-radius:6px}
html body .muted,html body .dim,html body small{color:var(--ct-muted) !important}
html body ::selection{background:rgba(122,167,255,.35);color:#fff}
html body ::-webkit-scrollbar{width:10px;height:10px}
html body ::-webkit-scrollbar-thumb{background:#26365c;border-radius:6px;border:2px solid var(--ct-bg)}
html body ::-webkit-scrollbar-track{background:transparent}

/* no fade-in on scroll: content is always visible (no blank gaps on phones) */
html body .animate-on-view,html body [data-anim]{opacity:1 !important;transform:none !important}
html body .particle-layer,html body .marquee{display:none !important}
html body .desk-progress{height:2px;opacity:.8}

/* ---------- layout + sidebar ---------- */
html body .layout{background:transparent}
html body .side{
  width:240px;
  background:linear-gradient(180deg,#0c1326 0%,#0a1020 100%) !important;
  border-right:1px solid var(--ct-line) !important;
  padding:20px 14px 28px;
}
html body .side h1{
  display:flex;align-items:center;gap:10px;
  font-family:var(--font-display);font-size:15px;font-weight:800;letter-spacing:.14em;color:#fff;margin:0 0 2px;
}
html body .side h1::before{
  content:"C";
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;
  width:28px;height:28px;border-radius:8px;
  background:linear-gradient(135deg,#ff3b47,#c20511);
  color:#fff;font-size:15px;font-weight:800;letter-spacing:0;
  box-shadow:0 4px 14px rgba(227,6,19,.35);
}
html body .side .sub{color:var(--ct-muted) !important;font-size:12px;margin:0 0 18px 38px}
html body .side a,html body .side .side-btn{
  min-height:38px;padding:8px 12px;margin-bottom:1px;
  border-radius:9px;font-size:13.5px;font-weight:500;
  color:#c3cde2;transform:none !important;
}
html body .side a:hover,html body .side .side-btn:hover{background:rgba(122,167,255,.08);color:#fff}
html body .side a.active{
  background:rgba(122,167,255,.12) !important;
  color:#fff;font-weight:600;
  box-shadow:inset 3px 0 0 var(--ct-red) !important;
}
html body .side .panel{background:rgba(255,255,255,.03);border:1px solid var(--ct-line);box-shadow:none}
html body .side .btn{background:rgba(255,255,255,.04);border:1px solid var(--ct-line);color:#dbe3f3;min-height:38px;border-radius:9px}
html body .side .btn:hover{background:rgba(255,255,255,.08);border-color:var(--ct-line-2)}
html body .side .notification{color:var(--ct-muted);border-top-color:var(--ct-line)}
html body .side .cu-count{background:var(--ct-red-strong)}

html body .main{padding:28px 36px 56px;max-width:1240px}

/* mobile top bar */
html body .desk-topbar{background:rgba(10,16,32,.92) !important;backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--ct-line) !important}
html body .desk-brand{color:#fff !important;letter-spacing:.16em;font-weight:800;display:inline-flex;align-items:center;gap:8px}
html body .desk-brand::before{
  content:"C";display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:24px;border-radius:7px;background:linear-gradient(135deg,#ff3b47,#c20511);
  color:#fff;font-size:13px;letter-spacing:0;
}
html body .desk-backdrop{background:rgba(3,6,14,.6)}

/* ---------- page header ---------- */
html body .top{margin-bottom:20px;gap:10px 14px}
html body .top h2{font-size:24px;font-weight:700;letter-spacing:-.025em;color:#fff}
html body .top .muted{font-family:var(--font-body);font-size:13px;letter-spacing:0}
html body .queue-live-badge{
  background:rgba(16,185,129,.10) !important;border:1px solid rgba(16,185,129,.35) !important;color:#6ee7b7 !important;
  font-family:var(--font-body);letter-spacing:.06em;
}
html body .queue-live-badge .pulse{background:#34d399;box-shadow:0 0 0 0 rgba(52,211,153,.5)}

/* ---------- cards / panels ---------- */
html body .card,html body .panel,html body .table-wrap,html body .alert-banner,html body .empty-state,
html body .cu-box,html body .cu-list .cu-task,html body .cu-card,html body .chart-cell,html body .login-box,html body .x-card{
  background:var(--ct-surface) !important;
  border:1px solid var(--ct-line) !important;
  border-radius:var(--ct-radius);
  box-shadow:var(--ct-shadow) !important;
  color:var(--ct-text);
}
html body .card:hover,html body .panel:hover,html body .table-wrap:hover,html body .login-box:hover,html body .alert-banner:hover{
  transform:none !important;border-color:var(--ct-line-2) !important;box-shadow:var(--shadow-hover) !important;
}
html body .card::after{background:linear-gradient(90deg,var(--ct-red),transparent);height:2px}
html body .panel{padding:20px 22px}
html body .panel h3,html body .cu-box h3{color:#fff;font-size:15px;font-weight:650}

/* stat cards */
html body .cards{gap:14px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
html body .card{padding:16px 18px 18px}
html body .card .label{
  font-family:var(--font-body);font-size:11.5px;font-weight:600;letter-spacing:.06em;color:var(--ct-muted);
}
html body .card .num{font-family:var(--font-display);font-size:26px;font-weight:700;letter-spacing:-.03em;color:#fff;margin-top:8px}
html body .card:hover .num{color:#fff}
html body .card .num.red{color:#ff5a64 !important}
html body .card .num.green,html body .tb2 .card .num.green{color:#34d399 !important}
html body .card .num.amber,html body .tb2 .card .num.amber{color:#fbbf24 !important}
html body .card .sub{color:var(--ct-muted);opacity:1 !important;font-size:12px}

/* period tabs (Today / 7 days / ...) */
html body .tb2-periods{gap:4px;padding:4px;background:var(--ct-surface);border:1px solid var(--ct-line);border-radius:12px;display:inline-flex !important;margin-bottom:14px !important}
html body .tb2-periods a{border:0 !important;opacity:1 !important;color:var(--ct-dim) !important;padding:7px 14px !important;border-radius:9px !important;font-size:13px !important}
html body .tb2-periods a:hover{background:rgba(255,255,255,.05);color:#fff !important}
html body .tb2-periods a.on{background:var(--ct-raised) !important;color:#fff !important;box-shadow:0 1px 0 rgba(255,255,255,.06) inset,0 2px 8px rgba(0,0,0,.3)}

/* ---------- filters / chips ---------- */
html body .filters{
  gap:8px;padding:14px;background:var(--ct-surface);border:1px solid var(--ct-line);border-radius:var(--ct-radius);
}
html body .filters a,html body .filters button,html body .chip{
  min-height:34px;padding:6px 13px;border-radius:999px;
  background:var(--ct-surface-2) !important;border:1px solid var(--ct-line) !important;color:var(--ct-dim) !important;
  font-size:12.5px;font-weight:600;transform:none !important;
}
html body .filters a:hover:not(.on):not(.active),html body .filters button:hover,html body .chip:hover{
  background:var(--ct-raised) !important;border-color:var(--ct-line-2) !important;color:#fff !important;
}
html body .filters a.on,html body .filters a.active,html body .chip.active,html body .chip.on{
  background:rgba(239,43,56,.16) !important;border-color:rgba(239,43,56,.55) !important;color:#ffd5d8 !important;box-shadow:none !important;
}
html body .filters .btn-primary,html body .filters button.btn-primary{
  background:var(--ct-red-strong) !important;border-color:var(--ct-red-strong) !important;color:#fff !important;
}
html body .filters input[type="search"],html body .filters input[type="text"],html body .filters input[name="q"]{
  min-height:38px;border-radius:10px;background:var(--ct-bg-2) !important;
}
html body .chip-label{font-size:11px !important;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ct-muted) !important;font-family:var(--font-body)}
html body .chip-group .chip{background:var(--ct-surface-2) !important;color:var(--ct-dim) !important}
html body .chip-group .chip.pending{background:rgba(251,191,36,.12) !important;border-color:rgba(251,191,36,.4) !important;color:#fcd34d !important}

/* ---------- buttons ---------- */
html body .btn,html body button.btn,html body .cu-box button,html body .cu-form button,html body .cu-task-actions button{
  min-height:38px;padding:8px 14px;border-radius:10px;
  background:var(--ct-surface-2);border:1px solid var(--ct-line-2);color:var(--ct-text);
  font-size:13.5px;font-weight:600;box-shadow:none;transform:none !important;
}
html body .btn:hover,html body .cu-box button:hover{background:var(--ct-raised);border-color:#3d5288;color:#fff;box-shadow:none}
html body .btn-primary,html body .btn.btn-primary,html body button.btn-primary{
  background:linear-gradient(180deg,#f0222f,#d10512) !important;
  border:1px solid #e30613 !important;color:#fff !important;
  box-shadow:0 1px 0 rgba(255,255,255,.18) inset,0 6px 16px rgba(227,6,19,.25) !important;filter:none !important;
}
html body .btn-primary:hover,html body .btn.btn-primary:hover{background:linear-gradient(180deg,#ff3a46,#e30613) !important;color:#fff !important}
html body .btn-secondary,html body .btn.secondary{background:var(--ct-surface-2) !important;color:var(--ct-text) !important;border-color:var(--ct-line-2) !important}
html body .btn-danger,html body .btn.btn-danger{background:rgba(239,68,68,.10) !important;border-color:rgba(239,68,68,.45) !important;color:#fca5a5 !important}
html body .btn-danger:hover{background:#b91c1c !important;color:#fff !important;border-color:#b91c1c !important}
html body .btn-ok{background:#059669 !important;border-color:#059669 !important;color:#fff !important}
html body .btn-ok:hover{background:#047857 !important}
html body .btn-call{min-height:44px;padding:10px 18px;font-size:14.5px}
html body .btn-x,html body .btn-pdf{background:var(--ct-surface-2) !important;color:var(--ct-text) !important}
html body .cu-wa{background:#16a34a !important;border-color:#16a34a !important;color:#fff !important}

/* ---------- inputs ---------- */
html body input[type="text"],html body input[type="email"],html body input[type="password"],html body input[type="number"],
html body input[type="search"],html body input[type="tel"],html body input[type="url"],html body input[type="date"],
html body input[type="datetime-local"],html body input[type="time"],html body input:not([type]),html body select,html body textarea,
html body .row input,html body .row select,html body .row textarea,html body .cu-table input,html body .cu-form input,html body .cu-branch input{
  background:var(--ct-bg-2) !important;
  border:1px solid var(--ct-line-2) !important;
  color:var(--ct-text) !important;
  border-radius:10px !important;
  min-height:40px;padding:8px 12px;font-size:14px;
}
html body input::placeholder,html body textarea::placeholder{color:#7584a3 !important}
html body input:focus,html body select:focus,html body textarea:focus{
  outline:none !important;border-color:#5b7fd6 !important;box-shadow:0 0 0 3px rgba(91,127,214,.25) !important;
}
html body input[type="file"]{color:var(--ct-dim)}
html body input[type="file"]::file-selector-button{
  background:var(--ct-raised);color:var(--ct-text);border:1px solid var(--ct-line-2);border-radius:8px;padding:7px 12px;margin-right:10px;cursor:pointer;font:inherit;font-weight:600
}
html body input[type="checkbox"],html body input[type="radio"]{accent-color:#e30613}
html body .row label,html body .cu-form label{color:var(--ct-dim)}
html body .row label{font-family:var(--font-body);font-size:11.5px;letter-spacing:.06em;color:var(--ct-muted)}
html body .grid2{border-color:var(--ct-line)}
html body .grid2 > .row{border-bottom-color:var(--ct-line)}
html body fieldset,html body .cu-form fieldset{border:1px solid var(--ct-line) !important;border-radius:12px;background:rgba(255,255,255,.015)}
html body legend{color:#fff}

/* ---------- tables ---------- */
html body table{background:transparent !important;color:var(--ct-text)}
html body th{
  background:var(--ct-surface-2) !important;color:var(--ct-muted) !important;
  font-family:var(--font-body) !important;font-size:11px;font-weight:600;letter-spacing:.07em;
  border-bottom:1px solid var(--ct-line) !important;
}
html body td{border-bottom:1px solid var(--ct-line) !important;color:var(--ct-text)}
html body tr:hover td{background:rgba(122,167,255,.04) !important}
html body tr.selected td{background:rgba(122,167,255,.08) !important}
html body .cu-table th,html body .cu-table td{border-bottom-color:var(--ct-line) !important}

/* lead queue table */
html body .queue-table th,html body .queue-table td{padding:12px 12px}
html body .queue-table .lead-row td{background:transparent !important}
html body .queue-table .lead-row:hover td{background:rgba(122,167,255,.06) !important}
html body .queue-table .lead-row > td:first-child{
  width:3px !important;min-width:3px;max-width:3px;padding:0 !important;
  background:#2a3a60 !important;
}
html body .queue-table .lead-row.is-hot > td:first-child,
html body .queue-table .lead-row.is-flagged > td:first-child{background:var(--ct-red-strong) !important;box-shadow:0 0 12px rgba(227,6,19,.5)}
html body .queue-table .lead-row[data-band="WARM"] > td:first-child{background:#f59e0b !important}
html body .queue-table .lead-row.is-flagged td{background:rgba(251,146,60,.06) !important}
html body .queue-table td strong{font-weight:600;color:#fff}
html body .queue-table td a[href^="tel:"]{color:var(--ct-text);font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:500}
html body .queue-table td a[href^="tel:"]:hover{color:var(--ct-blue)}
html body .queue-table td:nth-child(4){color:var(--ct-muted);white-space:nowrap}
html body .queue-table td .btn-call,html body .queue-table td .btn-primary{
  min-height:34px !important;min-width:72px !important;padding:6px 14px !important;font-size:13px !important;
  background:var(--ct-surface-2) !important;border:1px solid var(--ct-line-2) !important;color:#fff !important;box-shadow:none !important;
}
html body .queue-table .lead-row:hover .btn-primary{background:linear-gradient(180deg,#f0222f,#d10512) !important;border-color:#e30613 !important}

/* ---------- badges / pills ---------- */
html body .badge{
  font-family:var(--font-body);font-size:11px;font-weight:700;letter-spacing:.04em;
  padding:3px 9px;border-radius:999px;line-height:1.35;border:1px solid transparent;box-shadow:none;transform:none !important;
  background:rgba(148,163,184,.14);color:#cbd5e1;
}
html body .badge-company{
  background:rgba(122,167,255,.10) !important;color:#c9d8ff !important;border-color:rgba(122,167,255,.28) !important;
  font-size:11px !important;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;vertical-align:middle;text-transform:none;letter-spacing:0;font-weight:600;
}
/* bands */
html body .badge-HOT,html body .cu-band-HOT,html body .pill.HOT,html body .bg-h{background:rgba(239,43,56,.16) !important;color:#ff8a92 !important;border:1px solid rgba(239,43,56,.5) !important;box-shadow:none !important}
html body .badge-WARM,html body .cu-band-WARM,html body .pill.WARM,html body .bg-w{background:rgba(245,158,11,.14) !important;color:#fcd34d !important;border:1px solid rgba(245,158,11,.45) !important}
html body .badge-NURTURE,html body .badge-COLD,html body .cu-band-NURTURE,html body .bg-n{background:rgba(56,189,248,.12) !important;color:#7dd3fc !important;border:1px solid rgba(56,189,248,.35) !important}
html body .badge-EXIT,html body .badge-DISQUALIFIED,html body .cu-band-EXIT,html body .cu-band-DISQUALIFIED{background:rgba(148,163,184,.12) !important;color:#a8b3c7 !important;border:1px solid rgba(148,163,184,.3) !important}
/* statuses */
html body .badge-NEW,html body .ct-st-NEW{background:rgba(96,165,250,.14) !important;color:#93c5fd !important;border:1px solid rgba(96,165,250,.4) !important}
html body .badge-CALL,html body .ct-st-CALL{background:rgba(34,211,238,.12) !important;color:#67e8f9 !important;border:1px solid rgba(34,211,238,.35) !important}
html body .badge-MISS,html body .ct-st-MISS{background:rgba(251,146,60,.13) !important;color:#fdba74 !important;border:1px solid rgba(251,146,60,.4) !important}
html body .badge-BOOKED,html body .ct-st-BOOKED{background:rgba(167,139,250,.14) !important;color:#c4b5fd !important;border:1px solid rgba(167,139,250,.4) !important}
html body .badge-PITCH,html body .ct-st-PITCH{background:rgba(129,140,248,.14) !important;color:#a5b4fc !important;border:1px solid rgba(129,140,248,.4) !important}
html body .badge-ORDERED,html body .ct-st-ORDERED{background:rgba(45,212,191,.13) !important;color:#5eead4 !important;border:1px solid rgba(45,212,191,.4) !important}
html body .badge-SURVEYED,html body .badge-IN_MANUFACTURE,html body .badge-FIT_BOOKED,
html body .ct-st-SURVEYED,html body .ct-st-IN_MANUFACTURE,html body .ct-st-FIT_BOOKED{background:rgba(20,184,166,.12) !important;color:#99f6e4 !important;border:1px solid rgba(20,184,166,.35) !important}
html body .badge-FITTED,html body .ct-st-FITTED{background:rgba(16,185,129,.15) !important;color:#6ee7b7 !important;border:1px solid rgba(16,185,129,.45) !important}
html body .badge-CLOSED,html body .ct-st-CLOSED{background:rgba(148,163,184,.12) !important;color:#a8b3c7 !important;border:1px solid rgba(148,163,184,.3) !important}
html body .badge-test,html body .badge-probe{background:rgba(251,146,60,.16) !important;color:#fdba74 !important;border:1px solid rgba(251,146,60,.45) !important}
html body .badge-status{background:rgba(148,163,184,.12);color:var(--ct-dim);border-radius:999px;padding:3px 9px;font-size:11px;font-weight:600}
html body .badge-status.is-hot{background:rgba(239,43,56,.16) !important;color:#ff8a92 !important}
html body .cu-pill{background:rgba(148,163,184,.14);color:var(--ct-dim)}
html body .cu-count{background:var(--ct-red-strong)}
html body .cu-timer-badge,html body .cu-timer{background:rgba(239,43,56,.16) !important;color:#ff9aa1 !important;border:1px solid rgba(239,43,56,.45);font-family:var(--font-body)}
html body .fx-tag{background:rgba(148,163,184,.14) !important;color:var(--ct-dim) !important}
html body .fx-ok{background:rgba(16,185,129,.15) !important;color:#6ee7b7 !important}
html body .fx-warn,html body .fx-tag[style*="fef3c7"]{background:rgba(245,158,11,.14) !important;color:#fcd34d !important}
html body .fx-bad{background:rgba(239,68,68,.14) !important;color:#fca5a5 !important}
html body .fx-info{background:rgba(96,165,250,.14) !important;color:#93c5fd !important}
html body .fx-note{background:rgba(251,146,60,.08) !important;border-color:rgba(251,146,60,.35) !important;color:#fdba74 !important}

/* bant chips */
html body .bant-chip{background:var(--ct-surface-2) !important;border-color:var(--ct-line) !important;color:var(--ct-muted) !important}
html body .bant-chip .k{background:var(--ct-raised) !important;color:var(--ct-dim) !important}
html body .bant-chip.is-on{background:rgba(16,185,129,.12) !important;border-color:rgba(16,185,129,.4) !important;color:#6ee7b7 !important}
html body .bant-chip.is-on .k{background:#10b981 !important;color:#04211a !important}
html body .bant-inline .off,html body .bant-dash-v.off{color:#fca5a5 !important}
html body .bant-inline .on,html body .bant-dash-v.on{color:#6ee7b7 !important}

/* ---------- alerts / flashes ---------- */
html body .alert-banner.is-hot{border-left:3px solid var(--ct-red) !important}
html body .alert-banner.is-warn{border-left:3px solid #f59e0b !important}
html body .alert-banner.is-test,html body .alert-banner.is-probe{background:rgba(251,146,60,.08) !important;border-left:3px solid #fb923c !important}
html body .flash,html body .flash-notice{background:rgba(245,158,11,.10) !important;border:1px solid rgba(245,158,11,.35) !important;color:#fde68a !important;border-radius:10px}
html body .flash-error,html body .err{background:rgba(239,68,68,.10) !important;border:1px solid rgba(239,68,68,.4) !important;color:#fecaca !important;border-radius:10px}

/* ---------- login ---------- */
html body .login-wrap{background:transparent !important}
html body .login-wrap::before{opacity:.25;background-size:56px 56px}
html body .login-box{max-width:400px;padding:34px 30px 26px;border-radius:18px !important;background:rgba(17,26,47,.92) !important;backdrop-filter:blur(8px)}
html body .login-box::before{content:none}
html body .login-brand{
  display:flex;align-items:center;justify-content:center;gap:10px;
  font-size:22px !important;letter-spacing:.14em !important;color:#fff !important;font-weight:800;
}
html body .login-brand::before{
  content:"C";display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#ff3b47,#c20511);
  color:#fff;font-size:18px;letter-spacing:0;box-shadow:0 6px 18px rgba(227,6,19,.35);
}
html body .login-brand span{color:#ff4d58 !important}
html body .login-tag{color:var(--ct-muted) !important;font-family:var(--font-body) !important;letter-spacing:0 !important}
html body .login-hint{background:rgba(122,167,255,.06) !important;border:1px solid var(--ct-line) !important;color:var(--ct-dim) !important;border-radius:10px}
html body .login-hint strong{color:#fff}
html body .login-box .btn-primary{width:100%;min-height:44px}
html body .login-ask{color:var(--ct-muted)}
html body .login-ask a{color:#ff6b74 !important}

/* ---------- lead detail ---------- */
html body .contact-hero{padding-bottom:18px;border-bottom:1px solid var(--ct-line);margin-bottom:22px}
html body .contact-hero h2{font-size:28px;color:#fff;letter-spacing:-.03em}
html body .detail-section h3{color:var(--ct-muted);font-family:var(--font-body);letter-spacing:.08em}
html body .detail-kv dt{font-family:var(--font-body);color:var(--ct-muted)}
html body .detail-kv dd{color:var(--ct-text)}
html body .detail-kv dd a{color:var(--ct-blue) !important}
html body .event{background:var(--ct-surface-2) !important;border-left:2px solid var(--ct-line-2) !important}
html body .event:hover{border-left-color:var(--ct-red) !important}
html body .event-pill{background:var(--ct-raised) !important;border-color:var(--ct-line-2) !important;color:var(--ct-dim) !important;font-family:var(--font-body)}
html body .event-pill.is-hot{background:rgba(239,43,56,.16) !important;color:#ff8a92 !important;border-color:rgba(239,43,56,.45) !important}
html body .event-pill.is-warm{background:rgba(245,158,11,.14) !important;color:#fcd34d !important;border-color:rgba(245,158,11,.4) !important}
html body .event-pill.is-call{background:rgba(16,185,129,.15) !important;color:#6ee7b7 !important;border-color:rgba(16,185,129,.45) !important}
html body .event-time{font-family:var(--font-body);color:var(--ct-muted)}
html body figure{background:var(--ct-surface-2) !important;border-color:var(--ct-line) !important}

/* ---------- mobile lead cards (queue under 800px) ---------- */
html body .lead-card{background:var(--ct-surface) !important;border:1px solid var(--ct-line) !important;border-radius:14px !important;box-shadow:var(--ct-shadow) !important;overflow:hidden}
html body .lead-card.is-hot{border-left:3px solid var(--ct-red-strong) !important}
html body .lead-card.is-flagged{background:rgba(251,146,60,.06) !important}
html body .lead-card-name{color:#fff;font-weight:650}
html body .lead-card-meta{color:var(--ct-muted)}
html body .lead-card-call{background:linear-gradient(180deg,#f0222f,#d10512) !important;color:#fff !important}
html body .lead-card-call.is-empty{background:var(--ct-raised) !important;color:var(--ct-muted) !important}

/* ---------- upgrade pages (cu_*) ---------- */
html body .cu-due-strip,html body .cu-task.is-overdue{background:rgba(239,43,56,.07) !important;border:1px solid rgba(239,43,56,.35) !important;border-radius:12px}
html body .cu-due-item.is-overdue a:first-child,html body .cu-red,html body .cu-mini-task.is-overdue b{color:#ff7a83 !important}
html body .cu-reasons li{border-bottom:1px dashed var(--ct-line) !important}
html body .cu-msg,html body .cu-ai-out,html body .cu-empty{background:var(--ct-surface-2) !important;color:var(--ct-dim) !important;border:1px solid var(--ct-line)}
html body .cu-mini-task,html body .cu-quote-row{border-bottom:1px solid var(--ct-line) !important}
html body .cu-stage{background:var(--ct-surface-2) !important;color:var(--ct-dim) !important;border:1px solid var(--ct-line)}
html body .cu-stage.is-done{background:rgba(16,185,129,.12) !important;color:#6ee7b7 !important;border-color:rgba(16,185,129,.35)}
html body .cu-stage.is-on{background:var(--ct-red-strong) !important;color:#fff !important;border-color:var(--ct-red-strong)}
html body .cu-col{background:var(--ct-bg-2) !important;border:1px solid var(--ct-line);border-radius:14px !important}
html body .cu-col h3{color:var(--ct-muted);text-transform:uppercase;letter-spacing:.07em;font-size:11.5px}
html body .cu-card{background:var(--ct-surface) !important;color:var(--ct-text) !important}
html body .cu-card:hover{border-color:var(--ct-line-2) !important}
html body .cu-wa-mini{color:#4ade80 !important}
html body .cu-cofilter{color:var(--ct-dim)}
html body .cu-cofilter select{min-height:34px}
html body .cu-photos img{border:1px solid var(--ct-line)}
html body #cu-banner{background:linear-gradient(90deg,#c20511,#e30613) !important}
html body .cu-notify-link{color:var(--ct-dim)}

/* intelligence side panel on the queue */
html body .intel-slide{background:var(--ct-surface) !important;border-left:1px solid var(--ct-line) !important}
html body .intel-slide-head{background:var(--ct-surface-2) !important}
html body .intel-overlay{background:rgba(3,6,14,.6) !important}

/* glow / x panels already dark: keep readable */
html body .glow-panel{border:1px solid var(--ct-line)}

/* ---------- inline light backgrounds in templates (catch-all) ---------- */
html body [style*="background:#fff"]:not(.badge),html body [style*="background: #fff"]:not(.badge),
html body [style*="background:white"],html body [style*="background:#ffffff"],
html body [style*="background:#f8fafc"],html body [style*="background:#fafafa"],html body [style*="background:#f9fafb"]{
  background:var(--ct-surface-2) !important;color:var(--ct-text);border-color:var(--ct-line) !important;
}
html body [style*="background:#f1f5f9"],html body [style*="background:#f3f4f6"],html body [style*="background:#eef2f6"]{background:var(--ct-raised) !important;color:var(--ct-text)}
html body [style*="background:#fef3c7"],html body [style*="background:#fff7ed"],html body [style*="background:#fffbeb"]{background:rgba(245,158,11,.12) !important;color:#fde68a !important}
html body [style*="background:#fee2e2"],html body [style*="background:#fef2f2"],html body [style*="background:#fff1f2"],html body [style*="background:#fff7f7"]{background:rgba(239,68,68,.12) !important;color:#fecaca !important}
html body [style*="background:#dcfce7"],html body [style*="background:#ecfdf5"],html body [style*="background:#f0fdf4"]{background:rgba(16,185,129,.12) !important;color:#a7f3d0 !important}
html body [style*="background:#dbeafe"],html body [style*="background:#eff6ff"]{background:rgba(96,165,250,.12) !important;color:#bfdbfe !important}
html body [style*="color:#111"],html body [style*="color:#000"],html body [style*="color:#0b1220"],html body [style*="color:#0f172a"],html body [style*="color:#1f2937"],html body [style*="color:#374151"]{color:var(--ct-text) !important}
html body [style*="color:#c2410c"],html body [style*="color:#92400e"]{color:#fdba74 !important}

/* ---------- responsive ---------- */
@media (max-width:800px){
  html body .main{padding:16px 14px 36px !important}
  html body .side{width:min(280px,86vw)}
  html body .top h2{font-size:21px}
  html body .cards{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px}
  html body .card{padding:13px 14px 14px}
  html body .card .num{font-size:22px}
  html body .tb2 .card.wide{grid-column:span 2}
  html body .tb2-periods{display:flex !important;width:100%}
  html body .tb2-periods a{flex:1;text-align:center;padding:7px 6px !important}
  html body .filters{padding:12px}
  html body .filters form{width:100%;flex-wrap:nowrap !important}
  html body .filters form input[type="search"]{min-width:0 !important;flex:1 1 auto !important;width:auto !important}
  html body .filters form .btn{flex:0 0 auto}
  html body .filters form a.btn{display:none}
  html body .panel{padding:16px 14px;overflow-x:auto}
  html body .panel table,html body .cu-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  html body .contact-hero h2{font-size:23px}
  html body .contact-hero .btn-call{width:100%}
  html body .badge-company{max-width:160px}
  html body .cu-grid{grid-template-columns:1fr}
  html body .cu-board{grid-template-columns:1fr}
  html body .cu-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  html body .cu-form input:not([type=checkbox]):not([type=color]),html body .cu-form textarea{max-width:100%}
  html body img{max-width:100%;height:auto}
}
@media (max-width:420px){
  html body .card .label{font-size:10.5px;letter-spacing:.04em}
  html body .chip,html body .filters a{padding:5px 11px;font-size:12px}
}

/* ---------- fixes after screenshot review ---------- */
/* thin colour strip on queue rows */
html body .queue-table thead th:first-child,
html body .queue-table .lead-row > td:first-child{width:3px !important;min-width:3px !important;max-width:3px !important;padding:0 !important;font-size:0 !important;border-bottom-color:transparent !important}
html body .queue-table td:nth-child(5) .muted{display:block;margin-left:0 !important;margin-top:2px}

/* search + filter bar: clean rows */
html body .filters > form:first-of-type{flex:1 1 100% !important;width:100% !important;flex-wrap:nowrap !important;margin-bottom:6px !important}
html body .filters > form:first-of-type input[type="search"]{flex:1 1 auto !important;min-width:0 !important}
html body .filters > form:nth-of-type(2){flex:0 1 auto !important;min-width:0 !important;flex-wrap:nowrap !important;margin-right:6px}
html body .filters > form .btn{min-height:38px !important;border-radius:10px !important;padding:8px 16px !important}

/* lead page band badge and small tags */
html body .contact-hero .queue-live-badge{background:rgba(239,43,56,.14) !important;border-color:rgba(239,43,56,.5) !important;color:#ff8a92 !important}
html body .contact-hero .queue-live-badge .pulse{background:#ff4d58}
html body .fx-tag{padding:2px 9px !important;border-radius:999px !important;font-size:11.5px !important;font-weight:600 !important;vertical-align:middle;line-height:1.5}
html body h3 .fx-tag{margin-left:6px}

/* login brand: keep CANDAI as one word */
html body .login-brand{display:block !important;text-align:center}
html body .login-brand::before{display:inline-flex;vertical-align:middle;margin:-4px 12px 0 0}

/* mobile lead cards: stacked, call button full width, timer in the corner */
html body .lead-card{position:relative;flex-wrap:wrap;margin-bottom:12px}
html body .lead-card-main{flex:1 1 100% !important;padding:14px 16px 12px !important;color:var(--ct-text) !important}
html body .lead-card-main:hover{background:rgba(122,167,255,.04) !important;color:var(--ct-text) !important}
html body .lead-card-name{font-family:var(--font-display);font-size:16px;padding-right:86px}
html body .lead-card-meta{font-family:var(--font-body);gap:6px 8px;align-items:center}
html body .lead-card > .cu-timer-badge,html body .lead-card > .cu-timer{position:absolute;top:14px;right:14px;margin:0;height:auto;align-self:flex-start}
html body .lead-card-call{
  flex:1 1 100% !important;min-height:46px;border-radius:0 !important;
  font-family:var(--font-body) !important;font-size:14.5px !important;letter-spacing:0 !important;text-transform:none !important;font-weight:650 !important;
  transform:none !important;box-shadow:none !important;
}
html body .queue-mobile > .lead-card-call{border-radius:12px !important;justify-content:center !important;box-shadow:0 6px 16px rgba(227,6,19,.25) !important}
/* lead page shows the same Call button twice on phones: keep the top one */
html body .contact-hero:has(a.btn-call[href^="tel:"]) ~ .queue-mobile:has(> .lead-card-call:only-child){display:none}
@media (max-width:800px){
  html body .filters > form:nth-of-type(2){flex:1 1 100% !important;margin-right:0}
  html body .filters > form:nth-of-type(2) input[type="search"]{flex:1 1 auto !important}
  html body .cu-box{overflow-x:auto}
  html body .cu-box table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
}

html body .table-wrap{overflow-x:auto !important}
html body .queue-table th,html body .queue-table td{padding:12px 10px}
html body .queue-table td:last-child{padding-right:14px;white-space:nowrap}
html body .queue-table .badge-company{max-width:190px}
html body .filters .btn{white-space:nowrap}
html body .queue-table td:nth-child(5){min-width:150px}
html body .cu-cofilter select{width:auto !important;min-width:220px;max-width:100%}
html body input[type="month"],html body input[type="week"]{background:var(--ct-bg-2) !important;border:1px solid var(--ct-line-2) !important;color:var(--ct-text) !important;border-radius:10px !important;min-height:40px;padding:8px 12px;color-scheme:dark}
html body input[type="color"]{background:var(--ct-bg-2) !important;border:1px solid var(--ct-line-2) !important;border-radius:8px;height:36px;width:52px;padding:3px}
html body label > input[type="checkbox"],html body label > input[type="radio"]{width:18px !important;height:18px;min-height:0 !important;margin:0 8px 0 0;vertical-align:-3px;display:inline-block}
@media (max-width:800px){
  html body .main table:not(.queue-table){display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
}
html body .cu-table td:first-child,html body .cu-table th,html body .panel table th{white-space:nowrap}
html body .panel{overflow-x:auto}

/* ---------- nav v2 (16 Nov 2026): grouped, compact ---------- */
html.ctn-on body .side{width:228px;padding:18px 12px 22px;display:flex;flex-direction:column}
html.ctn-on body .side h1{font-size:14px}
html.ctn-on body .side .sub{margin:0 0 14px 38px;font-size:11.5px}
html.ctn-on body .side nav{display:flex;flex-direction:column;gap:0}
html.ctn-on body .side .ctn-g{margin:0 0 10px}
html.ctn-on body .side .ctn-h{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer;
  padding:6px 10px 5px;font-size:10.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#6f7d9b;border-radius:6px}
html.ctn-on body .side .ctn-h:hover{color:#c3cde2}
html.ctn-on body .side .ctn-h::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:-3px 2px 0 0;transition:transform .15s}
html.ctn-on body .side .ctn-g.shut .ctn-h::after{transform:rotate(-45deg);margin-top:0}
html.ctn-on body .side .ctn-h:focus-visible{outline:2px solid #7aa7ff;outline-offset:1px}
html.ctn-on body .side a.ctn-a{display:flex !important;align-items:center;gap:10px;min-height:32px !important;padding:6px 10px !important;margin:0 0 1px !important;
  font-size:13px !important;line-height:1.2;font-weight:500;color:#b7c2d9;border-radius:8px}
html.ctn-on body .side a.ctn-a:hover{color:#fff}
html.ctn-on body .side a.ctn-a.active{color:#fff;font-weight:600}
html.ctn-on body .side .ctn-i{flex:0 0 16px;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.75}
html.ctn-on body .side a.ctn-a.active .ctn-i{opacity:1;stroke:#ff4d57}
html.ctn-on body .side a.ctn-a .cu-count,html.ctn-on body .side a.ctn-a [class*="count"],html.ctn-on body .side a.ctn-a .badge{margin-left:auto;font-size:10.5px;min-width:18px;height:18px;line-height:18px;padding:0 5px;border-radius:9px}
html.ctn-on body .side > .sub:last-of-type,html.ctn-on body .side .notification{margin-top:auto !important;margin-left:0 !important;padding:10px 10px 0;border-top:1px solid var(--ct-line);font-size:11px;color:#6f7d9b !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
