:root {
  /* Dark theme, modeled on X: true black page, near-black cards, hairline borders. */
  --ink: #E7E9EA;
  --ink-2: #D6D9DB;
  --paper: #000000;
  --white: #16181C;
  --raise: #1D1F23;
  --rose: #FF8A5B;
  --rose-dark: #FF7440;
  --rose-lit: #FF8A5B;
  --rose-soft: rgba(255,138,91,.12);
  --sage: #2DD4BF;
  --sage-soft: rgba(45,212,191,.12);
  --amber: #FFC56E;
  --amber-soft: rgba(255,197,110,.12);
  --slate: #A3A9AE;
  --muted: #71767B;
  --line: #2F3336;
  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
h1 { font: 800 clamp(26px, 3vw, 34px)/1.15 var(--display); letter-spacing: -.025em; }
h2 { font: 700 19px/1.2 var(--display); letter-spacing: -.015em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.strong { font-weight: 600; }
.eyebrow { font: 600 11.5px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--rose); margin-bottom: 8px; }
.eyebrow a { color: inherit; text-decoration: none; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 8px; }
.stack-lg { display: grid; gap: 20px; align-content: start; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: 700 14px/1 var(--body); padding: 12px 18px; border-radius: 999px; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn-primary { background: #EFF3F4; color: #0F1419; }
.btn-primary:hover { background: #D7DBDC; }
.btn-soft { background: var(--sage-soft); color: var(--sage); }
.btn-soft:hover { background: rgba(45,212,191,.2); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px #536471; }
.btn-ghost:hover { background: rgba(239,243,244,.08); }
.btn-danger { background: #F4212E; color: #fff; }
.btn-sm { padding: 8px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; margin-top: 8px; padding: 14px; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }

/* Forms */
label { font: 600 12.5px/1.2 var(--body); color: var(--slate); }
input, select, textarea { font: 400 15px/1.3 var(--body); color: var(--ink); background: #000; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(45,212,191,.18); }
input::placeholder, textarea::placeholder { color: #5B6066; }
input[type=date], input[type=month], input[type=datetime-local] { color-scheme: dark; }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field.check { display: flex; gap: 10px; align-items: center; }
.field.check input { width: auto; }
.field.check label { font-weight: 500; color: var(--ink); font-size: 14px; }
.input-sm { max-width: 140px; padding: 7px 10px; }
.inline-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-top: 16px; }
.inline-form .field { min-width: 0; }
.inline-form .grow { flex: 1 1 200px; }
.log-form { display: grid; gap: 10px; margin-bottom: 18px; }
.log-form .btn { justify-self: start; }

/* Auth pages */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(90% 60% at 80% 0%, rgba(45,212,191,.12), transparent 60%), #000; }
.auth-card { width: 100%; max-width: 400px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; display: grid; gap: 14px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.auth-brand { font: 800 24px/1 var(--display); letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.alert { background: var(--rose-soft); color: #FFB59A; padding: 10px 12px; border-radius: 10px; font-size: 14px; }

/* Shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: #000; border-right: 1px solid var(--line); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; font: 800 22px/1 var(--display); letter-spacing: -.03em; color: #fff; text-decoration: none; padding: 0 8px; }
.side-nav { display: grid; gap: 2px; }
.side-nav { gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 14px; color: #E7E9EA; text-decoration: none; padding: 12px 14px; border-radius: 999px; font-weight: 500; font-size: 15.5px; }
.side-nav a:hover { background: rgba(231,233,234,.1); color: #fff; }
.side-nav a.on { color: #fff; font-weight: 800; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 0 14px; font-size: 13px; color: var(--muted); }
.side-foot a { color: var(--muted); text-decoration: none; }
.side-foot a:hover, .side-foot .linklike:hover { color: #fff; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px clamp(16px, 3vw, 36px); background: rgba(0,0,0,.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; background: #202327; border-radius: 999px; padding: 0 12px; color: var(--muted); }
.search input { border: 0; background: transparent; padding: 10px 0; }
.search input:focus { box-shadow: none; }
.oe { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); white-space: nowrap; }
.oe b { font: 500 13px/1 var(--mono); color: var(--rose); }
.oe .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.who { font-weight: 600; font-size: 14px; margin-left: auto; white-space: nowrap; }
.top-signout { display: none; margin: 0; font-size: 13px; color: var(--slate); }
.flash { margin: 18px clamp(16px, 3vw, 36px) 0; background: var(--sage-soft); color: var(--sage); padding: 11px 14px; border-radius: 10px; font-weight: 500; }
.content { padding: 32px clamp(16px, 3.4vw, 44px) 72px; max-width: 1320px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head .muted { margin-top: 8px; max-width: 60ch; }
.head-meta { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

/* Stats: the numbers are the point of the dashboard */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: grid; gap: 10px; align-content: start; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.stat:hover { border-color: var(--slate); }
.stat-label { font-size: 13.5px; color: var(--slate); font-weight: 600; }
.stat-num { font: 800 38px/1.05 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.stat-alert { background: var(--rose-soft); border-color: rgba(255,138,91,.35); }
.stat-alert .stat-num { color: var(--rose); }

/* Panels */
.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
.grid-contact { grid-template-columns: 1fr 1fr; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 24px; }
.stack-lg .panel { margin-bottom: 0; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-head a { color: var(--rose); text-decoration: none; font-weight: 600; }
.subhead { font: 700 11.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.empty { color: var(--muted); padding: 22px; text-align: center; background: var(--raise); border-radius: 14px; }
.empty a { color: var(--rose); }

/* Callback rows */
.cb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cb { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; border-left: 4px solid var(--sage); }
.cb.is-overdue { border-left-color: var(--rose); background: rgba(255,138,91,.06); }
.cb-compact .cb { padding: 9px 12px; border-left-color: var(--line); }
.cb-main { display: grid; gap: 2px; min-width: 0; }
.cb-when { font: 500 12.5px/1.2 var(--mono); color: var(--slate); }
.cb-name { font-weight: 700; text-decoration: none; }
.cb-name:hover { color: var(--rose); }
.cb-reason { font-size: 14px; color: var(--slate); }
.cb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-actions form { margin: 0; }
.tag-overdue { font: 700 10.5px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--rose); background: var(--rose-soft); padding: 3px 6px; border-radius: 5px; margin-left: 4px; }
.overdue-text { color: var(--rose); font-weight: 600; }

/* Stage pills + pipeline */
.pill { display: inline-block; font: 600 12px/1 var(--body); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.pill-new { background: rgba(29,155,240,.15); color: #5CB8F5; }
.pill-contacted { background: var(--amber-soft); color: var(--amber); }
.pill-quoted { background: rgba(167,139,250,.15); color: #B9A4FB; }
.pill-enrolled { background: var(--sage-soft); color: var(--sage); }
.pill-renewal { background: var(--rose-soft); color: var(--rose); }
.pill-lost { background: rgba(113,118,123,.18); color: var(--slate); }
.seg-new { background: #1D9BF0; }
.seg-contacted { background: #FFC56E; }
.seg-quoted { background: #A78BFA; }
.seg-enrolled { background: var(--sage); }
.seg-renewal { background: var(--rose); }
.seg-lost { background: #536471; }
.pipe-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin-bottom: 14px; }
.pipe-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.pipe-list a { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 6px 0; font-size: 14px; }
.pipe-list b { margin-left: auto; font: 500 14px/1 var(--mono); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mini-list li:first-child { border-top: 0; padding-top: 2px; }
.mini-list a { font-weight: 600; text-decoration: none; }
.mini-list a:hover { color: var(--rose); }
.mini-list .pill, .mini-list .mono { margin-left: auto; }

/* Contacts table */
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filters select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-block; font: 500 13px/1 var(--body); padding: 8px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--slate); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #0F1419; }
.chip-radio input { position: absolute; opacity: 0; }
.chip-radio span { display: inline-block; font: 500 13px/1 var(--body); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; color: var(--ink); }
.chip-radio input:checked + span { background: var(--ink); color: #0F1419; border-color: var(--ink); }
.chip-radio input:focus-visible + span { outline: 3px solid var(--rose); outline-offset: 2px; }
.quick-due { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 600 11.5px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; background: transparent; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(231,233,234,.03); }
.table a { text-decoration: none; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.tag { font-size: 11.5px; background: var(--raise); color: var(--slate); padding: 3px 8px; border-radius: 6px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.tl { position: relative; }
.tl::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--white); border: 2px solid var(--slate); }
.tl-call::before { border-color: var(--sage); background: var(--sage); }
.tl-stage::before { border-color: var(--rose); background: var(--rose); }
.tl-callback::before { border-color: var(--amber); }
.tl-kind { font-weight: 700; font-size: 13px; }
.tl-body { font-size: 14.5px; margin-top: 2px; overflow-wrap: anywhere; }
.danger-zone { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.danger-zone summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.danger-zone form { margin-top: 12px; }


/* Members */
.yn-list { display: grid; gap: 4px; }
.yn-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.yn-row:first-child { border-top: 0; padding-top: 0; }
.yn-row .label { font-size: 14.5px; color: var(--ink); font-weight: 600; }
.chip-note { font-weight: 500; opacity: .7; font-size: 13px; }
.followup { border-left: 2px solid var(--rose); padding-left: 14px; }
.chip-radio input[type=checkbox] + span::before { content: "+"; margin-right: 6px; opacity: .6; }
.chip-radio input[type=checkbox]:checked + span::before { content: "✓"; opacity: 1; }
.year-pick { display: flex; align-items: center; gap: 18px; padding: 18px 24px; }
.chip-lg span { font-size: 16px; font-weight: 700; padding: 11px 22px; }
.res-ahead { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.res-ahead span { display: inline-flex; gap: 7px; align-items: center; font: 600 12.5px/1 var(--body); background: var(--raise); border: 1px solid var(--line); color: var(--slate); padding: 7px 11px; border-radius: 999px; }
.res-ahead b { color: var(--ink); font-weight: 800; }
.delay-note { margin: -14px 0 22px; max-width: 80ch; }
.carrier-stats .live { background: rgba(255,138,91,.1); }
.carrier-stats .live b { color: var(--rose); }
.rate-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.rate-input { display: inline-flex; align-items: center; gap: 2px; background: #000; border: 1px solid var(--line); border-radius: 8px; padding: 0 0 0 9px; color: var(--muted); }
.rate-input.unset { border-color: var(--rose); }
.rate-input input { border: 0; background: transparent; width: 72px; padding: 7px 8px 7px 2px; font-variant-numeric: tabular-nums; }
.rate-input input:focus { box-shadow: none; }
span.label { font: 600 12.5px/1.2 var(--body); color: var(--slate); }
[hidden] { display: none !important; }
.stat-live .stat-num { color: var(--rose); text-shadow: 0 0 24px rgba(255,138,91,.35); }
.carrier-jump { margin-bottom: 18px; }
.carrier { scroll-margin-top: 80px; }
.carrier-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.carrier-stats > div { background: var(--raise); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.carrier-stats b { font-size: 18px; font-weight: 500; }
.carrier-stats .short { background: var(--rose-soft); }
.carrier-stats .short b { color: var(--rose); }
.table-tight th, .table-tight td { padding: 9px 12px; }
.gain-text { color: var(--sage); font-weight: 600; }
.payout-log { margin-top: 14px; }
.payout-log summary { cursor: pointer; color: var(--slate); font-size: 13px; font-weight: 600; }
.payout-log .mini-list { margin-top: 8px; }
.payout-log form { margin: 0 0 0 auto; }
.tpa-split { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.tpa-split span { display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px/1 var(--body); background: var(--raise); border: 1px solid var(--line); color: var(--slate); padding: 7px 11px; border-radius: 999px; }
.tpa-split b { color: var(--ink); font-weight: 800; }
@media (max-width: 900px) { .carrier-stats { grid-template-columns: repeat(2, 1fr); } }
.notice { background: var(--amber-soft); color: var(--amber); padding: 11px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.notice a { color: inherit; font-weight: 700; }
.key-banner { border-color: rgba(255,138,91,.35); background: rgba(255,138,91,.05); display: grid; gap: 10px; }
.key-banner ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.key-line { display: block; font: 500 13px/1.5 var(--mono); background: #000; border: 1px solid var(--line); color: var(--sage); padding: 12px 14px; border-radius: 10px; overflow-wrap: anywhere; user-select: all; }
.renew-panel { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-left: 4px solid var(--sage); }
.renew-panel h2 { margin-bottom: 4px; }
.filter-search { width: auto; flex: 1 1 200px; max-width: 280px; }
.table .mono { white-space: nowrap; }
.tag-todo { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.done-check { color: var(--sage); font-weight: 600; font-size: 13px; }
.pill-auth-not_sent { background: rgba(113,118,123,.18); color: var(--slate); }
.pill-auth-sent { background: var(--amber-soft); color: var(--amber); }
.pill-auth-authorized { background: var(--sage-soft); color: var(--sage); }
.pill-auth-other_agent { background: var(--rose-soft); color: var(--rose); }
.pill-auth-not_needed { background: var(--raise); color: var(--muted); }
.pill-m-pending, .pill-m-pending_payment { background: rgba(29,155,240,.15); color: #5CB8F5; }
.pill-m-active { background: var(--sage-soft); color: var(--sage); }
.pill-m-terminated { background: rgba(113,118,123,.18); color: var(--slate); }
.lock { font: 600 10px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--sage); background: var(--sage-soft); padding: 2px 5px; border-radius: 4px; margin-left: 4px; vertical-align: 1px; }
.panel-note { margin: -6px 0 14px; max-width: 70ch; }
.static { padding: 10px 0; font-size: 14px; }
.grid-member { grid-template-columns: 1.6fr 1fr; }
.todo-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--amber); font-weight: 600; }
.audit-list { list-style: none; margin: 0; padding: 0; display: grid; }
.audit-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.audit-list li:first-child { border-top: 0; }
.audit-list a { font-weight: 600; text-decoration: none; }
.twostep { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.qr { width: 180px; height: 180px; flex: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.qr svg { width: 100%; height: 100%; display: block; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; flex: 1 1 280px; font-size: 14.5px; }
.steps code { background: var(--raise); padding: 2px 6px; border-radius: 6px; user-select: all; }
.steps .inline-form { margin-top: 8px; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-contact, .grid-member { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; z-index: 10; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); overflow-x: auto; }
  .side-brand { font-size: 0; padding: 0; gap: 0; flex: none; }
  .side-nav { display: flex; gap: 2px; }
  .side-nav a { padding: 9px 10px; white-space: nowrap; font-size: 13.5px; }
  .side-nav a.on { box-shadow: none; }
  .side-foot { display: none; }
  .top-signout { display: block; }
  .topbar { position: static; flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .who { margin-left: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .pipe-list { grid-template-columns: 1fr; }
  .stat-num { font-size: 32px; }
}
@media (max-width: 420px) {
  .side-nav a span { display: none; }
  .side-nav a { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Halloween */
.pumpkin { flex: none; overflow: visible; filter: drop-shadow(0 0 6px rgba(255,122,26,.55)) drop-shadow(0 0 14px rgba(255,122,26,.3)); animation: pumpkin-glow 3.2s ease-in-out infinite; }
.pumpkin-face { filter: drop-shadow(0 0 3px #FFB020); animation: candle 2.4s steps(1) infinite; }
@keyframes pumpkin-glow { 0%, 100% { filter: drop-shadow(0 0 5px rgba(255,122,26,.5)) drop-shadow(0 0 12px rgba(255,122,26,.25)); } 50% { filter: drop-shadow(0 0 9px rgba(255,140,40,.8)) drop-shadow(0 0 22px rgba(255,122,26,.45)); } }
@keyframes candle { 0%, 100% { opacity: 1; } 12% { opacity: .75; } 15% { opacity: 1; } 47% { opacity: .85; } 52% { opacity: 1; } 78% { opacity: .7; } 80% { opacity: 1; } }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; }

.spooky { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; animation: spooky-bg 3.4s ease forwards; }
@keyframes spooky-bg { 0% { background: rgba(0,0,0,.92); } 45% { background: rgba(0,0,0,.6); } 100% { background: rgba(0,0,0,0); } }
.smoke i { position: absolute; left: 50%; top: 50%; width: 46vmin; height: 46vmin; margin: -23vmin; border-radius: 50%;
  background: radial-gradient(circle, rgba(170,170,180,.55), rgba(90,90,100,.25) 45%, transparent 70%); filter: blur(14px);
  transform: rotate(var(--a)) translateX(0) scale(.2); opacity: 0; animation: smoke 2.6s cubic-bezier(.15,.7,.3,1) var(--d) forwards; }
.smoke i:nth-child(3n) { background: radial-gradient(circle, rgba(255,138,60,.45), rgba(120,60,20,.2) 45%, transparent 70%); }
@keyframes smoke { 0% { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(.2); } 15% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateX(26vmin) scale(1.8); } }
.spooky-pumpkin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.3); opacity: 0; animation: pop 2s ease forwards; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -50%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.9); } }
.bat { position: absolute; left: 50%; top: 50%; width: 110px; height: 55px; margin: -27px -55px; opacity: 0; color: #0A0A0A;
  animation: fly 2.6s cubic-bezier(.3,.1,.6,1) var(--d) forwards; }
.bat svg { width: 100%; height: 100%; fill: #141414; filter: drop-shadow(0 0 2px rgba(255,160,80,.95)) drop-shadow(0 0 10px rgba(255,122,26,.6)); overflow: visible; }
.bat .wing-l { transform-origin: 32px 14px; animation: flap var(--f) ease-in-out infinite alternate; }
.bat .wing-r { transform-origin: 32px 14px; animation: flap var(--f) ease-in-out infinite alternate-reverse; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(-.35); } }
@keyframes fly { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 10% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(var(--s)); } }
@media (prefers-reduced-motion: reduce) { .spooky { display: none; } .pumpkin, .pumpkin-face { animation: none; } }

/* Residual income boxes on the member form */
.residuals { display: grid; gap: 10px; }
.residual-row { display: grid; grid-template-columns: 1fr 160px; align-items: center; gap: 16px; padding: 12px 14px; background: var(--raise); border: 1px solid var(--line, #2F3336); border-radius: 12px; }
.residual-row label { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.residual-row label small { color: var(--muted, #71767B); font-size: 12px; }
.residual-row input { text-align: right; font-variant-numeric: tabular-nums; }
.residual-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding: 0 14px; }
.residual-total b { font-size: 20px; color: var(--sage); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .residual-row { grid-template-columns: 1fr 120px; } }
.money-in { position: relative; display: block; }
.money-in::before { content: '$'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.residual-row .money-in input { width: 100%; padding-left: 28px; text-align: left; }

.flash-error { background: rgba(244,33,46,.12); color: #FF6B74; border: 1px solid rgba(244,33,46,.35); }

/* Dashboard: full book run rate under the residual box */
.run-rate { display: block; margin-top: 10px; font-size: 12.5px; color: var(--slate); }
.run-rate b { color: var(--sage); font-weight: 800; }

/* "Cha-ching" banner after a deal is saved */
.cha-ching { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 0 0 22px; padding: 20px 24px; border-radius: 18px;
  background: radial-gradient(120% 160% at 0% 0%, rgba(45,212,191,.22), rgba(45,212,191,.04) 60%), var(--white);
  border: 1px solid rgba(45,212,191,.45); box-shadow: 0 0 0 0 rgba(45,212,191,.5); animation: chaPop .6s cubic-bezier(.2,1.4,.4,1) both, chaGlow 2.4s ease-out .3s 2; }
.cha-plus { font: 800 clamp(34px, 6vw, 52px)/1 var(--body); color: var(--sage); letter-spacing: -.02em; text-shadow: 0 0 28px rgba(45,212,191,.45); }
.cha-plus small { font-size: .4em; font-weight: 700; margin-left: 3px; color: var(--slate); }
.cha-text { display: flex; flex-direction: column; gap: 4px; color: var(--slate); font-size: 14px; }
.cha-text > b { color: var(--ink); font-size: 17px; }
.cha-text b.countup { color: var(--sage); }
@keyframes chaPop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes chaGlow { 0% { box-shadow: 0 0 0 0 rgba(45,212,191,.45); } 100% { box-shadow: 0 0 0 18px rgba(45,212,191,0); } }
@media (prefers-reduced-motion: reduce) { .cha-ching { animation: none; } }
.res-month { display: block; font: 700 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--rose); margin: 2px 0 -2px; }
.res-ahead.res-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex-wrap: nowrap; }
.res-ahead.res-3 span { flex-direction: column; align-items: flex-start; gap: 4px; padding: 7px 9px; border-radius: 10px; font-size: 11px; }
.res-ahead.res-3 b { font-size: 13px; }

/* Big plan-year switch on ACA Members */
.year-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.year-tab { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 18px 20px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); color: var(--slate); text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.year-tab span { font: 800 30px/1 var(--body); letter-spacing: -.02em; color: var(--ink); }
.year-tab small { font-size: 13px; font-weight: 600; }
.year-tab:hover { border-color: var(--slate); text-decoration: none; }
.year-tab.on { background: var(--ink); border-color: var(--ink); }
.year-tab.on span, .year-tab.on small { color: #000; }
.btn-big { margin-top: 14px; padding: 16px 28px; font-size: 17px; border-radius: 999px; }
.cha-cheer { color: var(--ink); font-size: 15px; }
.cha-cheer b { color: var(--sage); font-weight: 800; }
.stats.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stat.stat-on { border-color: var(--ink); }
@media (max-width: 760px) { .stats.stats-3 { grid-template-columns: 1fr; } }

.payday { margin: -4px 0 14px; font-size: 13.5px; color: var(--slate); }
.payday b { color: var(--ink); }
.payday-in { display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--sage-soft); color: var(--sage); font-weight: 700; font-size: 12px; }
.payday-late { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(244,33,46,.12); border: 1px solid rgba(244,33,46,.35); color: #FF6B74; font-size: 13.5px; }
.edit-pencil { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--slate); vertical-align: middle; transition: color .15s, border-color .15s, background .15s; }
.edit-pencil:hover { color: var(--rose); border-color: var(--rose); background: rgba(255,138,91,.08); text-decoration: none; }
td:has(> .edit-pencil) { white-space: nowrap; }
.del-confirm { padding: 16px; border-radius: 14px; border: 1px solid rgba(244,33,46,.4); background: rgba(244,33,46,.08); }
.del-confirm p { margin: 0 0 6px; }
.del-confirm .row-gap { margin-top: 12px; }
.year-switch { gap: 8px; }
.year-chip { display: inline-flex; align-items: baseline; gap: 6px; font: 700 16px/1 var(--body); padding: 11px 22px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: none; cursor: pointer; text-decoration: none; }
.year-chip:hover { border-color: var(--slate); text-decoration: none; }
.year-chip.on { background: var(--ink); color: #0F1419; border-color: var(--ink); cursor: default; }
.year-chip.off { opacity: .35; cursor: default; }
.year-chip.year-new { border-style: dashed; }
.year-chip small { font-size: 11px; font-weight: 600; color: var(--sage); }
.oe-row { flex-wrap: wrap; } .oe-actions { display: inline-flex; gap: 8px; align-items: center; } .oe-row .del-confirm { flex-basis: 100%; margin-top: 10px; }

/* Statement check */
.stmt-months { margin: 4px 0 10px; }
.stmt-table tfoot th { border-top: 1px solid var(--line); padding-top: 10px; }
.stmt-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin: 10px 0 18px; }

/* Dashboard: callbacks and newest members side by side, same height */
.dash-row { align-items: stretch; grid-template-columns: 1fr 1fr; }
.dash-row > .stack-lg { align-content: stretch; grid-template-rows: 1fr; grid-auto-rows: auto; }
.dash-tall { min-height: 420px; margin-bottom: 0; }
@media (max-width: 1100px) { .dash-row { grid-template-columns: 1fr; } .dash-tall { min-height: 0; } }

/* Login page: moonlit night sky with bats swooping behind the sign-in card */
.auth-page { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 78% 12%, #0d1626 0%, #060a12 45%, #000 100%); }
.auth-card { position: relative; z-index: 2; background: rgba(22,24,28,.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(200,215,255,.06), 0 -20px 60px -30px rgba(220,230,255,.25); }
.night { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.stars { position: absolute; left: 0; top: 0; width: 1px; height: 1px; border-radius: 50%; animation: twinkle 5s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
.moon { position: absolute; top: 9vh; right: 11vw; width: clamp(110px, 20vmin, 220px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 38%, rgba(160,150,120,.35) 0 7%, transparent 8%),
    radial-gradient(circle at 62% 30%, rgba(160,150,120,.28) 0 5%, transparent 6%),
    radial-gradient(circle at 56% 64%, rgba(160,150,120,.32) 0 10%, transparent 11%),
    radial-gradient(circle at 28% 66%, rgba(160,150,120,.22) 0 4%, transparent 5%),
    radial-gradient(circle at 74% 52%, rgba(160,150,120,.2) 0 3.5%, transparent 4.5%),
    radial-gradient(circle at 40% 35%, #fffdf2, #f3ecd2 55%, #d8cfae 100%);
  box-shadow: 0 0 40px 8px rgba(255,250,225,.45), 0 0 120px 40px rgba(210,225,255,.18), inset -14px -10px 30px rgba(120,110,80,.35);
  animation: moonpulse 6s ease-in-out infinite alternate; }
@keyframes moonpulse { from { filter: brightness(.96); } to { filter: brightness(1.06); } }
.moonglow { position: absolute; inset: 0; background: radial-gradient(60vmax 50vmax at calc(100% - 11vw - 10vmin) calc(9vh + 10vmin), rgba(200,215,255,.16), rgba(120,140,190,.06) 40%, transparent 70%); }
.cloud { position: absolute; height: 9vmin; border-radius: 50%; background: rgba(150,160,185,.13); filter: blur(14px); animation: drift linear infinite; }
.cloud.c1 { top: 14vh; width: 46vmin; animation-duration: 90s; animation-delay: -30s; }
.cloud.c2 { top: 24vh; width: 34vmin; animation-duration: 120s; animation-delay: -80s; background: rgba(130,140,165,.1); }
.cloud.c3 { top: 6vh; width: 28vmin; animation-duration: 150s; animation-delay: -10s; background: rgba(170,180,200,.09); }
@keyframes drift { from { transform: translateX(110vw); } to { transform: translateX(-60vmin); } }
.lbat { position: absolute; top: 0; left: 0; width: var(--size); aspect-ratio: 5 / 2; margin-left: calc(var(--size) / -2); opacity: var(--o); filter: blur(var(--blur));
  animation: swoop var(--dur) linear var(--delay) infinite; will-change: transform; }
.lbat svg { width: 100%; height: 100%; fill: #030304; overflow: visible; filter: drop-shadow(0 0 1px rgba(215,228,255,.85)) drop-shadow(0 0 6px rgba(190,210,255,.35)); }
.lbat .eye { fill: #ff8a3c; }
.lbat .wl, .lbat .wr { transform-origin: 50px 20px; animation: wingbeat var(--f) ease-in-out infinite alternate; }
@keyframes wingbeat { 0% { transform: scaleY(1) rotate(0); } 60% { transform: scaleY(.25); } 100% { transform: scaleY(-.75); } }
@keyframes swoop {
  0%   { transform: translate(calc(50vw - var(--dir) * 70vw), var(--y0)) rotate(calc(var(--dir) * -10deg)); }
  25%  { transform: translate(calc(50vw - var(--dir) * 35vw), var(--y1)) rotate(calc(var(--dir) * 8deg)); }
  50%  { transform: translate(50vw, var(--y2)) rotate(calc(var(--dir) * -6deg)); }
  75%  { transform: translate(calc(50vw + var(--dir) * 35vw), var(--y3)) rotate(calc(var(--dir) * 10deg)); }
  100% { transform: translate(calc(50vw + var(--dir) * 70vw), var(--y1)) rotate(calc(var(--dir) * -8deg)); }
}

/* Confirm paid toggle on Live Carrier Totals */
.confirm-form { display: inline-block; margin-left: 8px; vertical-align: middle; }
.rate-form { display: inline-flex; vertical-align: middle; }
.confirm-paid { background: rgba(239,243,244,.92); color: #0F1419; border: 0; font-weight: 600; white-space: nowrap; }
.confirm-paid:hover { background: #fff; }
.confirm-paid.is-paid { background: #16a34a; color: #fff; box-shadow: 0 0 0 1px rgba(34,197,94,.6), 0 0 14px rgba(34,197,94,.35); }
.confirm-paid.is-paid:hover { background: #15803d; }
.confirm-tally { margin: 6px 0 4px; padding: 10px 14px; border-radius: 12px; background: rgba(239,243,244,.05); border: 1px solid var(--line); font-size: 14px; }
.confirm-tally.is-short { color: #ff7a6b; border-color: rgba(255,122,107,.5); background: rgba(255,122,107,.08); }
.confirm-tally.is-done { color: #4ade80; border-color: rgba(74,222,128,.45); background: rgba(74,222,128,.07); }
.list-filter { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.list-filter a { font-weight: 500; margin-left: 4px; }

/* 2027 enrollment tracker on the 2026 members page */
.oe-tracker { display: grid; gap: 10px; margin-bottom: 18px; padding: 18px 20px; border-radius: 16px; background: var(--white); border: 1px solid rgba(255,138,91,.45); color: inherit; text-decoration: none; }
.oe-tracker:hover { text-decoration: none; border-color: var(--rose); }
.oe-tracker.stat-on { box-shadow: 0 0 0 2px var(--rose); }
.oe-tracker.is-done { border-color: rgba(74,222,128,.45); }
.oe-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.oe-count { font-size: 15px; }
.oe-count b { font-size: 22px; color: var(--rose); }
.oe-bar { height: 10px; border-radius: 999px; background: var(--raise); overflow: hidden; }
.oe-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--rose), #ffc56e); }
.oe-tracker.is-done .oe-bar i { background: #4ade80; }
.greet-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.stats.stats-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .stats.stats-2 { grid-template-columns: 1fr; } }
.miss-actions { display: flex; gap: 6px; justify-content: flex-end; }
.miss-actions form { margin: 0; }
.miss-owed { color: var(--rose); }
.side-nav a span { white-space: nowrap; }
.tag-jail { background: var(--rose-soft); color: var(--rose); text-decoration: none; margin-left: 6px; }
.jail-note { margin: -4px 0 12px; }
.jail-note a { color: var(--rose); font-weight: 600; text-decoration: none; }
.mc-search { position: relative; }
.mc-results { list-style: none; margin: 4px 0 0; padding: 6px; background: var(--raise); border: 1px solid var(--line); border-radius: 12px; max-height: 320px; overflow-y: auto; }
.mc-results li[hidden] { display: none; }
.mc-results button { width: 100%; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.mc-results button:hover, .mc-results button:focus { background: rgba(239,243,244,.08); outline: none; }
.mc-none { padding: 10px 12px; }
.members-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.members-head .subhead { margin: 0; }
.carrier-search { width: 220px; max-width: 55%; padding: 8px 12px; font-size: 13.5px; border-radius: 999px; }
.pill-tpa-active { background: var(--sage-soft); color: var(--sage); }
.pill-tpa-inactive, .pill-tpa-cancelled, .pill-m-inactive, .pill-m-cancelled { background: rgba(244,33,46,.16); color: #FF6B75; }
.pill-tpa-pending, .pill-tpa-pending_payment { background: rgba(29,155,240,.15); color: #5CB8F5; }
