/* =====================================================================
   GetUcare admin — "Ops" theme. Dark, utilitarian, high-contrast.
   Deliberately different from the light clinic portal, so the team always
   knows they are in the internal tool. Loaded after base.css + admin.css.
   ===================================================================== */
:root {
  --bg: #111111; --card: #0A0A0A; --tint: #1E1E1E;
  --ink: #F4F4F2; --ink-2: #C4C4BF; --muted: #8B8B86;
  --line: #2C2C2A; --line-2: #1F1F1E;
  --blue: #2BC0DA; --blue-d: #19A9C4; --brand: #2BC0DA;   /* accent = GetUcare teal (bright for the dark theme) */
  --y: #2BC0DA; --lil: #DCC8FF; --mint: #BDF5DA; --pink: #FF9DB0; --red: #FF7C7C;
  --c-im: #9A78E8; --c-af: #33AD80;                       /* chart series, validated on dark */
  --display: "Space Grotesk", "Inter Tight", system-ui, sans-serif;
  --r: 18px;
  --s-new-fg: #C4C4BF; --s-new-bg: #232322; --s-new-dot: #8B8B86;
  --s-conf-fg: #DCC8FF; --s-conf-bg: rgba(220,200,255,.13); --s-conf-dot: #DCC8FF;
  --s-prog-fg: #2BC0DA; --s-prog-bg: rgba(43,192,218,.12); --s-prog-dot: #2BC0DA;
  --s-done-fg: #BDF5DA; --s-done-bg: rgba(189,245,218,.11); --s-done-dot: #BDF5DA;
  color-scheme: dark;
}
body { background: var(--bg); color: var(--ink); }
::selection { background: var(--y); color: #000; }
:focus-visible { outline-color: var(--y); }
h1, .page-head h1, .dw-who h2, .kpi b, .tall b, .alogin-card h1 { font-family: var(--display); }
.page-head h1 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 500; letter-spacing: -.035em; }
.page-head p { color: var(--muted); }
a.link, .card-h .link, .kv dd a, .link-btn { color: var(--y); }

/* ----- Buttons & controls ----- */
.btn-primary { background: var(--y); color: #000; }
.btn-primary:hover { background: #fff; }
.btn-dark { background: var(--ink); color: #000; }
.btn-dark:hover { background: #fff; }
.btn-line { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-line:hover { border-color: #55554F; }
.icon-btn { color: var(--ink-2); } .icon-btn:hover { background: var(--tint); color: var(--ink); }
.round-btn, .acct { background: var(--card); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); }
.round-btn:hover { color: var(--ink); box-shadow: 0 0 0 1px #55554F; }
.avatar { background: var(--y); color: #000; }
.inp, .sbox { background: #161615; border-color: var(--line); color: var(--ink); }
.inp:hover { border-color: #46463F; }
.inp:focus { border-color: var(--y); box-shadow: 0 0 0 3px rgba(43,192,218,.15); }
.inp::placeholder, .sbox input::placeholder { color: #6E6E69; }
.sbox:focus-within { border-color: var(--y); }
select.inp { background-color: #161615; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23C4C4BF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator { filter: invert(.85); }
.check { color: var(--ink-2); } .check input { accent-color: var(--y); }
.pill, .vt { background: transparent; box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); }
.pill:hover { box-shadow: 0 0 0 1px #55554F; color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: #000; box-shadow: none; }
.pill[aria-pressed="true"] svg { color: #000; }
.pill-urgent[aria-pressed="true"] { background: var(--pink); color: #000; box-shadow: none; }
.vt button { color: var(--ink-2); }
.vt button[aria-pressed="true"] { background: var(--ink); color: #000; }
.vt button[aria-pressed="true"] svg { color: #000; }
.toast { background: var(--ink); color: #000; } .toast svg { color: #1B7A43; }
.toast.bad { background: var(--red); color: #000; } .toast.bad svg { color: #000; }

/* ----- Shell: black rail, white active pill ----- */
.side { background: #000; border-right: 1px solid var(--line-2); }
.side .brand b, .topbar .brand b { color: var(--ink); }
.brand img { filter: none; }
.side-label { color: #6E6E69; }
.side-nav a { color: var(--ink-2); }
.side-nav a svg { color: #8B8B86; }
.side-nav a:hover { background: #161615; color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--ink); color: #000; font-weight: 600; }
.side-nav a[aria-current="page"] svg { color: #000; }
.side-nav .cnt { background: #232322; color: var(--ink-2); }
.side-nav a[aria-current="page"] .cnt { background: #000; color: var(--ink); }
.side-nav .cnt-urgent, .mnav .cnt-urgent { background: var(--pink); color: #000; }
.side-reset { color: #6E6E69; } .side-reset:hover { background: #161615; color: var(--ink); }
.role-chip { background: var(--y); color: #000; }
.role-chip[data-role="operations"] { background: var(--lil); color: #000; }
.mainbar-l { color: var(--muted); }
@media (max-width: 900px) {
  .topbar { background: rgba(0,0,0,.9); border-bottom-color: var(--line-2); }
  .mnav { background: rgba(0,0,0,.92); border-bottom-color: var(--line-2); }
  .mnav a { color: var(--ink-2); }
  .mnav a[aria-current="page"] { background: var(--ink); color: #000; }
  .mnav .cnt { background: #232322; }
}

/* ----- Cards & tables: black with thin outline ----- */
.card { background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.card-h h2 { font-weight: 600; }
.kv dt { color: var(--muted); }
.note-box { background: #161615; }
.sub-h, .fsel span, .tbl th { color: #7A7A75; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.tbl tbody tr:hover { background: #141413; }
.atbl tr.is-urgent td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.atbl tfoot td { border-top-color: var(--line); }
.tbl-foot { color: #6E6E69; }
.empty b { color: var(--ink); }
.av { background: hsl(var(--h) 30% 20%); color: hsl(var(--h) 75% 84%); box-shadow: inset 0 0 0 1px hsl(var(--h) 30% 30%); }
.feed .dot { background: var(--card); }
.feed p { color: var(--ink-2); }
.cst-active { background: rgba(189,245,218,.11); color: var(--mint); }
.cst-inactive { background: #232322; color: var(--muted); }

/* ----- Status, tags, flags ----- */
.st-closed { background: var(--ink); color: #000; }
.tag { background: #1E1E1D; color: var(--ink-2); }
.tag-imaging { background: rgba(220,200,255,.12); color: var(--lil); }
.tag-aftercare { background: rgba(189,245,218,.1); color: var(--mint); }
.tag-urgent { background: var(--pink); color: #000; }
.lim-tag { background: #1E1E1D; color: var(--ink); }
.flag-yes { background: rgba(255,124,124,.14); color: #FFB0B0; box-shadow: inset 0 0 0 1px rgba(255,124,124,.45); }
.flag-no { background: rgba(189,245,218,.08); color: var(--mint); }
.flag-missing { background: transparent; color: var(--y); border: 1px dashed var(--y); }
.trip { color: var(--ink-2); }
.trip.soon, .soon-t { color: var(--pink) !important; } .trip.soon svg { color: var(--pink); }

/* ----- KPI tiles: solid pastel blocks, black text (from the reference) ----- */
.kpis { gap: 10px; }
.kpi { border-radius: 20px; box-shadow: none; padding: 20px 22px 18px; color: #000; min-height: 150px; align-content: end; }
.kpi:hover { box-shadow: none; filter: brightness(1.04); }
.kpi b { font-size: clamp(44px, 4.4vw, 64px); font-weight: 500; letter-spacing: -.05em; line-height: .95; }
.kpi > span:not(.kpi-ic) { font-size: 16px; font-weight: 400; margin-top: 4px; }
.kpi small { color: rgba(0,0,0,.6); }
.kpi-ic { align-self: start; background: rgba(0,0,0,.08); color: #000; }
.kpi:nth-child(1) { background: var(--y); }
.kpi:nth-child(2) { background: #2A2A28; color: var(--ink); }
.kpi:nth-child(2) small { color: var(--muted); }
.kpi:nth-child(2) .kpi-ic { background: rgba(255,255,255,.08); color: var(--ink); }
.kpi.hot:nth-child(2) { background: var(--pink); color: #000; }
.kpi.hot:nth-child(2) small { color: rgba(0,0,0,.6); }
.kpi.hot:nth-child(2) .kpi-ic { background: rgba(0,0,0,.08); color: #000; }
.kpi.hot b { color: inherit; }
.kpi:nth-child(3) { background: var(--ink); }
.kpi:nth-child(4) { background: var(--lil); }

/* ----- Overview chart ----- */
.ov-charts { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 10px; margin-bottom: 20px; }
.chart-card .card-h { flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-im { background: var(--c-im); } .lg-af { background: var(--c-af); }
.chart { position: relative; padding: 8px 20px 16px 44px; }
.chart-y { position: absolute; left: 16px; top: 8px; bottom: 40px; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: #6E6E69; text-align: right; width: 22px; }
.bars { position: relative; height: 180px; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 4px; align-items: end; border-bottom: 1px solid var(--line); background: linear-gradient(var(--line-2), var(--line-2)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 50% / 100% 1px no-repeat; }
.bar { position: relative; height: 100%; display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 2px; outline: none; }
.bar i { display: block; width: 100%; min-height: 0; }
.bar i:last-child { border-radius: 4px 4px 0 0; }
.bar .s-im { background: var(--c-im); } .bar .s-af { background: var(--c-af); }
.bar::before { content: ""; position: absolute; inset: -4px -2px; border-radius: 6px; }
.bar:hover::before, .bar:focus-visible::before { background: rgba(255,255,255,.05); }
.bar[data-tip]:hover::after, .bar[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 3; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #000; font-size: 12px; line-height: 1.35; white-space: pre; pointer-events: none; }
.bar:nth-child(-n+4)[data-tip]:hover::after { left: 0; transform: none; }
.bar:nth-last-child(-n+4)[data-tip]:hover::after { left: auto; right: 0; transform: none; }
.bars-x { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 4px; margin-top: 8px; font-size: 11px; color: #6E6E69; text-align: center; }
.chart-sum { padding: 0 20px 16px; font-size: 13px; color: var(--muted); }
.chart-sum b { color: var(--ink); font-weight: 500; }
/* tall segmented tile: open cases by type */
.tall { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 16px; gap: 12px; }
.tall-h small { display: block; font-size: 13px; color: var(--muted); }
.tall-h b { font-size: 40px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.tall-bar { display: flex; flex-direction: column; gap: 2px; min-height: 200px; border-radius: 14px; overflow: hidden; }
.tall-bar > div { display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; color: #000; min-height: 56px; }
.tall-bar > div b { font-family: var(--display); font-size: 22px; font-weight: 500; line-height: 1.1; }
.tall-bar > div span { font-size: 12.5px; font-weight: 500; }
.tall-af { background: var(--mint); } .tall-im { background: var(--lil); }

/* ----- Overview rows ----- */
.row:hover { background: #141413; }
.row.is-urgent { background: rgba(255,157,176,.08); box-shadow: inset 3px 0 0 var(--pink); }

/* ----- Board ----- */
.col { background: #0A0A0A; box-shadow: 0 0 0 1px var(--line-2); }
.col-h .n { background: #232322; color: var(--ink); }
.col-t b { font-family: var(--display); font-weight: 500; font-size: 15px; }
.col-empty { background: transparent; border: 1px dashed var(--line); color: #6E6E69; }
.kcard { background: #171716; box-shadow: 0 0 0 1px #242423; }
.kcard:hover { box-shadow: 0 0 0 1px #4A4A45; }
.kcard.is-urgent { box-shadow: 0 0 0 1.5px var(--pink); }
.kc-who b { color: var(--ink); }
.kc-meta { color: var(--ink-2); }
.kc-appt { background: #1F1F1E; color: var(--ink-2); }
.kc-appt svg { color: var(--y); }
.kc-appt b { color: var(--ink); }

/* ----- Drawer ----- */
.drawer-veil { background: rgba(0,0,0,.6); }
.drawer-panel { background: #0D0D0C; box-shadow: -1px 0 0 var(--line), -24px 0 60px -20px rgba(0,0,0,.8); }
.dw-head { background: rgba(13,13,12,.94); }
.dsec { border-top-color: var(--line-2); }
.dsec h3 { font-family: var(--display); font-weight: 500; font-size: 16px; }
.ro-note { background: #171716; color: var(--ink-2); }
.seg { background: #171716; }
.seg button { color: var(--ink-2); }
.seg button:hover:not(:disabled) { background: #232322; }
.seg button[aria-pressed="true"] { background: var(--y); color: #000; box-shadow: none; }
.fee-box { background: #171716; box-shadow: inset 0 0 0 1px var(--line); }
.fee-box b { font-family: var(--display); color: var(--y); }
.notes li { background: rgba(43,192,218,.07); box-shadow: inset 3px 0 0 var(--y); }
.thumb { background: #171716; box-shadow: 0 0 0 1px var(--line); }
.thumb-none { background: #171716; }

/* ----- Calendar ----- */
.acal-day header b { color: var(--ink); }
.acal-day.today { box-shadow: 0 0 0 1px var(--y); }
.acal-day.today header b { background: var(--y); color: #000; }
.acal-day:not(.today) header b { color: var(--ink); }
.acal-day .muted { color: #4A4A45; }
.cev { background: rgba(220,200,255,.1); border-left-color: var(--lil); }
.cev-aftercare { background: rgba(189,245,218,.08); border-left-color: var(--mint); }
.cev.is-urgent { background: rgba(255,157,176,.12); border-left-color: var(--pink); }
.cev span { color: var(--ink); }

/* ----- Login ----- */
.alogin { background: #000; }
.alogin-card { background: #0D0D0C; }
.opt { border-color: var(--line); }
.opt:hover { border-color: #46463F; }
.opt:has(input:checked) { background: #171716; border-color: var(--y); box-shadow: 0 0 0 1px var(--y); }
.opt:has(input:checked) .radio { box-shadow: inset 0 0 0 6px var(--y); }
.opt .radio { box-shadow: inset 0 0 0 1.5px #55554F; }
.opt small { color: var(--muted); }
.opt-ic { background: #1E1E1D; color: var(--y); }

@media (max-width: 1000px) { .ov-charts { grid-template-columns: 1fr; } .tall-bar { flex-direction: row; min-height: 72px; } .tall-bar > div { min-height: 0; } }
@media (max-width: 600px) {
  .kpi { min-height: 120px; padding: 16px; }
  .chart { padding-left: 36px; padding-right: 12px; }
  .bars, .bars-x { gap: 2px; }
  .bars { height: 140px; }
}
