:root {
  --bg: #faf9f6; --card: #ffffff; --text: #354f40; --muted: #64745b;
  --line: #d4dccd; --soft: #edf1e7; --accent: #305d46; --accent-text: #ffffff;
  --side: #f0f2eb; --pick: #dfe7d6; --hover: #e6ebdf; --sage: #79916e; --head: #f4f7f2; --focus: #93ad87;
  --error: #a3271c; --courtesy: #d99a1c; --courtesy-text: #2a1d00;
  --present: #185a2c; --absent: #a02323; --courtesy-bg: #eef1f4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131915; --card: #1b231e; --text: #e6ece4; --muted: #9aa896;
    --line: #2f3a32; --soft: #243028; --accent: #8fbf9f; --accent-text: #10201a;
    --side: #171e19; --pick: #2c3a30; --hover: #243028; --sage: #9fb894; --head: #202a23; --focus: #8fbf9f;
    --error: #ff9488; --courtesy: #e0b040; --courtesy-text: #2a1d00;
    --present: #8fe0a4; --absent: #ff9488; --courtesy-bg: #2a3138;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Arial, sans-serif; }
h1 { margin: 0 0 12px; font: 400 1.9rem Georgia, serif; }
h2 { margin: 0; font: 400 1.2rem Georgia, serif; }
.muted { color: var(--muted); }
.error { color: var(--error); min-height: 1.4em; margin: 4px 0; }
.brand { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--text); }
.brand span { color: var(--sage); }
.spacer { flex: 1; }

/* ---------- forms and buttons ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 3px; }
.field small { display: block; margin-top: 3px; }
input, select, textarea {
  width: 100%; padding: 8px 10px; font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
}
input[type=checkbox] { width: auto; margin: 0 6px 0 0; }
textarea { min-height: 70px; resize: vertical; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button, a.button {
  display: inline-block; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  color: var(--accent-text); background: var(--accent); border: 1px solid var(--accent); border-radius: 6px;
}
button.plain { padding: 4px 8px; font-weight: 500; color: var(--accent); background: transparent; border-color: transparent; }
button.outline { color: var(--text); background: var(--card); border-color: var(--line); font-weight: 500; }
button.outline:hover { background: var(--hover); }
button.small { padding: 3px 9px; font-size: .85rem; }
button:disabled { opacity: .45; cursor: default; }
.checks { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }
.check { display: flex; align-items: center; }

/* ---------- signed-out screens ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 2px 8px #354f4010; }
.card.narrow { max-width: 380px; margin: 12vh auto 16px; }
.card.narrow button[type=submit] { margin-right: 6px; }

/* ---------- the frame ---------- */
.shell { display: grid; grid-template: auto 1fr / 250px 1fr; height: 100%; }
.topbar, .page { grid-column: 2; }
.side { grid-column: 1; grid-row: 1 / -1; display: flex; flex-direction: column; min-height: 0; padding: 26px 14px 12px; background: var(--side); border-right: 1px solid var(--line); }
.side .brand { margin: 0 0 30px; padding: 0 12px; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 32px 6px;
}
.topbar .brand { margin: 0; font-size: 1.05rem; }
.facility-pick { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.facility-pick select { width: auto; min-width: 180px; }
.sidebar { flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 22px; }
.nav-title { padding: 0 12px; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); }
.nav-link { display: block; padding: 9px 12px; margin-top: 3px; border-radius: 7px; color: var(--text); text-decoration: none; }
.nav-link:hover { background: var(--hover); }
.nav-link[aria-current=page] { background: var(--pick); font-weight: 700; }
.nav-soon { padding: 7px 12px; color: var(--muted); font-size: .9rem; }
.page { overflow: auto; padding: 14px 32px 40px; }
@media (max-width: 760px) {
  .shell { grid-template: auto auto 1fr / 1fr; }
  .topbar, .page, .side { grid-column: 1; }
  .side { grid-row: auto; padding: 14px 10px 6px; border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .side .brand { margin-bottom: 12px; }
  .topbar { padding: 10px 16px 0; }
  .page { padding: 16px; }
}

/* ---------- page parts ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.page-head input, .page-head select { width: auto; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 2px 8px #28453208; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--head); border-bottom: 1px solid var(--line); }
.panel-body { padding: 12px 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--soft); }
td.actions { white-space: nowrap; text-align: right; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px; font-size: .78rem; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
.chip.warn { border-color: var(--courtesy); }
.empty { padding: 14px; color: var(--muted); }
.total-row td { font-weight: 700; border-top: 2px solid var(--line); }

/* ---------- dialogs ---------- */
dialog.dialog { width: min(480px, calc(100vw - 32px)); padding: 26px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
dialog.dialog h2 { font-size: 1.55rem; margin-bottom: 16px; }
dialog.dialog.wide { width: min(720px, calc(100vw - 32px)); }
dialog::backdrop { background: #243b294d; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- master attendance ---------- */
.grid-wrap { overflow: auto; max-height: calc(100vh - 210px); border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
table.grid { width: auto; border-collapse: separate; border-spacing: 0; }
table.grid th, table.grid td { padding: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }
table.grid thead th { position: sticky; top: 0; z-index: 2; background: var(--soft); padding: 4px 6px; font-size: .72rem; line-height: 1.2; }
table.grid thead th.day { padding: 4px 0; min-width: 30px; color: var(--text); font-size: .8rem; }
table.grid thead th.day small { display: block; font-weight: 400; color: var(--muted); }
/* the three columns that stay put while the days scroll sideways */
table.grid .c-num, table.grid .c-first, table.grid .c-last { position: sticky; z-index: 1; padding: 4px 8px; text-align: left; background: var(--card); font-size: .88rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.grid .c-num { left: 0; min-width: 52px; max-width: 52px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
table.grid .c-first { left: 52px; min-width: 120px; max-width: 120px; }
table.grid .c-last { left: 172px; min-width: 120px; max-width: 120px; border-right: 2px solid var(--line); }
table.grid thead .c-num, table.grid thead .c-first, table.grid thead .c-last { z-index: 3; background: var(--soft); color: var(--muted); font-size: .72rem; font-weight: 600; }
table.grid td.c-ins, table.grid td.c-approved { padding: 0 8px; white-space: nowrap; font-size: .85rem; }
table.grid td.c-approved { background: color-mix(in srgb, var(--courtesy) 22%, var(--card)); }
table.grid .weekend { background: var(--soft); }
table.grid .monday { border-left: 2px solid var(--muted); }
table.grid td.sum { padding: 0 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* an insurance heading above its members */
table.grid tr.group td { padding: 4px 10px; text-align: left; font-weight: 700; font-size: .85rem; }
table.grid tr.group td span { position: sticky; left: 10px; }
table.grid .ins { background: hsl(var(--h) 65% 90%); }
table.grid .courtesy, .swatch.courtesy { background: var(--courtesy-bg); }
.cell { display: block; width: 30px; height: 28px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: .85rem; font-weight: 700; }
.cell:hover:not(:disabled) { filter: brightness(.9); }
.cell.on, .mark-on { color: var(--present); }
.cell.absent, .mark-absent { color: var(--absent); }
.cell:disabled { opacity: 1; cursor: not-allowed; }
table.grid.readonly .cell:disabled { cursor: default; }
table.grid .cell.outside { background: var(--soft); color: var(--muted); font-weight: 400; }
.cell:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }

/* where you are: month and facility, large */
.where { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.where-month { font: 400 1.5rem Georgia, serif; }
.where-facility { font-size: 1rem; color: var(--muted); }
.save-state { font-size: .85rem; color: var(--muted); }
.save-state.bad { color: var(--error); font-weight: 700; }
.lock-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; padding: 9px 14px; border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: 8px; background: var(--card); }
.lock-banner.open { border-left-color: var(--courtesy); }

/* the bar that names the member and day under the pointer */
.pointer-bar { margin-bottom: 8px; padding: 8px 14px; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 8px; background: var(--card); min-height: 2.6em; }

/* row and column under the pointer */
table.grid tr.hl th { background: var(--accent); color: var(--accent-text); font-weight: 700; }
table.grid tr.hl td { box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
table.grid thead th.hl, table.grid tfoot td.hl { background: var(--accent); color: var(--accent-text); }
table.grid th.today, table.grid td.today { border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
table.grid tfoot th, table.grid tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--soft); font-weight: 700; border-top: 2px solid var(--line); }
table.grid tfoot .c-num, table.grid tfoot .c-first, table.grid tfoot .c-last { z-index: 3; background: var(--soft); color: var(--text); }
table.grid tfoot td.sum { padding: 0 2px; min-width: 30px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; font-size: .85rem; color: var(--muted); }
.swatch { display: inline-block; width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; border-radius: 3px; border: 1px solid var(--line); }
.swatch.ins { background: hsl(var(--h) 65% 90%); }
@media (prefers-color-scheme: dark) {
  table.grid .ins, .swatch.ins { background: hsl(var(--h) 35% 24%); }
}

/* ---------- small shared parts ---------- */
.plain-list { margin: 0; padding: 10px 14px 10px 32px; }
.plain-list li { padding: 2px 0; }
/* ---------- member profile ---------- */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 18px; padding: 14px 16px 4px; }
.page-head select { max-width: 280px; }

/* ---------- dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 8px #28453208; }
a.tile:hover { background: var(--head); border-color: var(--sage); }
.tile-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile-value { font: 400 2.1rem/1.15 Georgia, serif; font-variant-numeric: tabular-nums; }
.tile-note { font-size: .82rem; color: var(--muted); }
.two-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto; align-items: center; gap: 10px; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 14px; }
.bar-fill { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--accent); }
.bar-fill.quiet { background: var(--muted); opacity: .55; }
.bar-count { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.columns { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; align-items: end; }
.column { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .75rem; color: var(--muted); }
.column-value { font-variant-numeric: tabular-nums; color: var(--text); }
.column-track { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 120px; border-bottom: 1px solid var(--line); }
.column-fill { width: 60%; max-width: 26px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); }
.column:hover .column-fill, .bar-row:hover .bar-fill { filter: brightness(1.15); }
progress.bar { display: block; width: 100%; height: 12px; margin: 0 0 16px; accent-color: var(--accent); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.tab { padding: 5px 12px; font-weight: 500; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.tab.current { color: var(--accent-text); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.page-head input[type=search] { min-width: 260px; }

/* ---------- billing worksheet ---------- */
table.sheet-table { font-size: .82rem; }
table.sheet-table th, table.sheet-table td { padding: 3px 6px; border-right: 1px solid var(--line); white-space: nowrap; }
table.sheet-table th { white-space: normal; min-width: 64px; text-transform: uppercase; font-size: .68rem; }
table.sheet-table td.calc { background: var(--soft); font-variant-numeric: tabular-nums; }
table.sheet-table td.calc.off { color: var(--error); font-weight: 700; }
input.sheet, select.sheet { width: 100%; min-width: 76px; padding: 3px 5px; font-size: .82rem; border-radius: 3px; background: var(--card); }
input.sheet.num { text-align: right; }
input.sheet:disabled { background: var(--soft); }
table.members-sheet td { padding: 2px 4px; }
table.members-sheet input.sheet { min-width: 108px; }
table.members-sheet input[type=date] { min-width: 118px; }
table.members-sheet input.num { min-width: 52px; }
table.members-sheet thead th { position: sticky; top: 0; z-index: 1; }
/* The heading row of each insurance group. */
table.members-sheet tr.group td { padding: 6px 10px; background: var(--soft); font-weight: 700; font-size: .9rem; border-top: 2px solid var(--line); }
table.members-sheet tr.group td > span { position: sticky; left: 10px; }
.table-wrap.tall { overflow: auto; max-height: calc(100vh - 190px); }
.nav-link.sub { padding: 6px 12px 6px 26px; font-size: .92em; color: var(--muted); }

/* ====================================================================== */
/* Polish layer: depth, type, motion. The layout above stays as it is.    */
/* ====================================================================== */
:root {
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgb(40 69 50 / .06), 0 1px 1px rgb(40 69 50 / .04);
  --shadow-md: 0 1px 2px rgb(40 69 50 / .05), 0 6px 18px rgb(40 69 50 / .07);
  --shadow-lg: 0 10px 40px rgb(30 50 38 / .22);
  --ring: 0 0 0 3px rgb(121 145 110 / .30);
  --accent-deep: #264a38;
}
@media (prefers-color-scheme: dark) {
  :root {
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .35);
    --shadow-md: 0 1px 2px rgb(0 0 0 / .35), 0 8px 22px rgb(0 0 0 / .28);
    --shadow-lg: 0 14px 48px rgb(0 0 0 / .6);
    --ring: 0 0 0 3px rgb(143 191 159 / .32);
    --accent-deep: #a7d0b4;
  }
}
body { font: 14px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1 { font-size: 2rem; letter-spacing: -.012em; line-height: 1.15; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::selection { background: var(--pick); }

/* ---- buttons ---- */
button, a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 16px;
  font-weight: 600; font-size: .9rem; line-height: 1; border-radius: 8px; box-shadow: var(--shadow-sm);
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .06s ease, color .15s ease;
}
button:hover:not(:disabled), a.button:hover { background: var(--accent-deep); border-color: var(--accent-deep); box-shadow: var(--shadow-md); }
button:active:not(:disabled), a.button:active { transform: translateY(1px); box-shadow: none; }
button.outline { box-shadow: var(--shadow-sm); }
button.outline:hover:not(:disabled) { background: var(--hover); border-color: var(--sage); color: var(--text); }
button.plain { min-height: 30px; padding: 0 10px; box-shadow: none; border-radius: 6px; }
button.plain:hover:not(:disabled) { background: var(--hover); border-color: transparent; color: var(--text); box-shadow: none; }
button.small { min-height: 28px; padding: 0 10px; font-size: .82rem; border-radius: 6px; }
button:disabled { box-shadow: none; }
button.cell, button.cell:hover:not(:disabled), button.cell:active:not(:disabled) { display: block; min-height: 0; padding: 0; border-radius: 0; box-shadow: none; transform: none; background: transparent; border: 0; transition: none; }
button.tab { min-height: 32px; }

/* ---- inputs ---- */
input, select, textarea { min-height: 36px; border-radius: 8px; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
input:hover:not(:disabled):not([readonly]), select:hover:not(:disabled), textarea:hover { border-color: var(--sage); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input[type=checkbox] { min-height: 0; width: 16px; height: 16px; accent-color: var(--accent); }
input:disabled, select:disabled { background: var(--soft); color: var(--muted); }
input.sheet, select.sheet { min-height: 28px; border-radius: 5px; border-color: transparent; background: transparent; }
input.sheet:hover:not(:disabled), select.sheet:hover:not(:disabled) { border-color: var(--line); background: var(--card); }
input.sheet:focus, select.sheet:focus { border-color: var(--accent); background: var(--card); }
.claim-page input { min-height: 0; border-radius: 3px; box-shadow: none; }
.field { margin-bottom: 14px; }
.field > span { font-size: .78rem; font-weight: 600; letter-spacing: .01em; margin-bottom: 5px; }
.field small { font-size: .78rem; }

/* ---- signed-out screens ---- */
body:has(> main.card:not([hidden])) { background: radial-gradient(1200px 600px at 50% -10%, var(--soft), var(--bg) 70%); }
.card { border-radius: 16px; box-shadow: var(--shadow-md); }
.card.narrow { padding: 34px 32px 28px; }
.card.narrow .brand { margin-bottom: 18px; }
.card.narrow button[type=submit] { min-width: 110px; }

/* ---- the frame ---- */
.brand { display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.brand::before { content: "B"; display: grid; place-items: center; width: 30px; height: 30px; flex: none; font: 700 17px Georgia, serif; color: #fff; border-radius: 9px; background: linear-gradient(145deg, #3d7557, #264a38); box-shadow: var(--shadow-sm); }
.brand span { margin-left: -6px; }
.side { padding: 22px 12px 12px; }
.side .brand { margin-bottom: 26px; padding: 0 10px; }
.nav-group { margin-bottom: 20px; }
.nav-title { font-size: 10.5px; letter-spacing: 1.6px; margin-bottom: 4px; opacity: .85; }
.nav-link { position: relative; padding: 8px 12px; margin-top: 2px; border-radius: 8px; transition: background-color .12s ease, color .12s ease; }
.nav-link[aria-current=page] { font-weight: 600; box-shadow: var(--shadow-sm); }
.nav-link[aria-current=page]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-link.sub { padding: 6px 12px 6px 28px; }
.nav-link.sub[aria-current=page] { color: var(--text); }
.nav-soon { font-style: italic; }
/* Routes: the Google map. */
.gmap { width: 100%; height: 560px; border-radius: 10px; overflow: hidden; background: var(--soft); }
/* Facility page: label and value pairs. */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 24px; margin-bottom: 14px; }
.fact span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.fact strong { display: block; margin-top: 3px; font-weight: 600; overflow-wrap: anywhere; }
label.fact input { display: block; width: 100%; margin-top: 5px; }
/* Billing: one card per insurer's provider portal. */
.portal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 12px 16px 16px; }
.portal { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.portal .muted { font-size: .82rem; overflow-wrap: anywhere; }
.portal-actions { display: flex; gap: 6px; margin-top: 6px; }
.portal-group { margin: 12px 16px 0; font-size: .68rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.portal-group + .portal-list { padding-top: 8px; }
/* For an Admin, a section title opens that role's portal. */
button.nav-jump { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 6px 12px; border: 0; border-radius: 7px; background: none; box-shadow: none; font-family: inherit; text-align: left; cursor: pointer; }
button.nav-jump::after { content: "›"; font-size: 15px; letter-spacing: 0; opacity: 0; transition: opacity .12s ease; }
button.nav-jump:hover, button.nav-jump:focus-visible { background: var(--hover); color: var(--accent); opacity: 1; transform: none; }
button.nav-jump:hover::after, button.nav-jump:focus-visible::after { opacity: 1; }
button.nav-back { display: block; width: 100%; margin-bottom: 16px; padding: 8px 12px; border: 1px solid var(--line, #d9ddd5); border-radius: 8px; background: none; box-shadow: none; color: var(--accent); font: inherit; font-size: .9rem; font-weight: 600; text-align: left; cursor: pointer; }
button.nav-back:hover { background: var(--hover); transform: none; }
.topbar { padding: 14px 32px 4px; }
#whoami { display: flex; align-items: center; gap: 10px; text-align: right; line-height: 1.25; }
#whoami strong { display: block; color: var(--text); font-weight: 600; }
#whoami small { display: block; font-size: .76rem; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; font-weight: 700; font-size: .8rem; letter-spacing: .02em; color: var(--accent-text); border-radius: 50%; background: linear-gradient(145deg, #3d7557, #264a38); }
@media (prefers-color-scheme: dark) { .avatar { background: linear-gradient(145deg, #a7d0b4, #7fb092); } }
.facility-pick { font-weight: 600; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.facility-pick select { text-transform: none; letter-spacing: 0; font-weight: 500; }
.page { padding: 12px 32px 48px; }

/* ---- page parts ---- */
.page-head { gap: 10px; margin-bottom: 18px; min-height: 44px; }
.panel { border-radius: var(--radius); box-shadow: var(--shadow-md); margin-bottom: 18px; }
.panel-head { padding: 13px 18px; background: transparent; }
.panel-head h2 { font: 600 .95rem "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; letter-spacing: .005em; }
.panel-body { padding: 16px 18px; }
th, td { padding: 10px 14px; }
th { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; background: var(--head); }
tbody tr { transition: background-color .1s ease; }
.panel > .table-wrap tbody tr:hover, .panel > div > .table-wrap tbody tr:hover { background: var(--head); }
table.sheet-table th, table.sheet-table td { padding: 3px 6px; }
table.members-sheet td { padding: 2px 4px; }
table.grid tbody tr { transition: none; }
.chip { padding: 2px 10px; font-size: .76rem; font-weight: 500; background: var(--head); }
.chip.strong { background: var(--pick); border-color: transparent; font-weight: 600; }
.chip.warn { background: color-mix(in srgb, var(--courtesy) 14%, var(--card)); }
.empty { padding: 22px 18px; }
.lock-banner, .pointer-bar { border-radius: 10px; box-shadow: var(--shadow-sm); }
.grid-wrap { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.tabs { gap: 2px; padding: 3px; width: fit-content; background: var(--soft); border-radius: 10px; }
.tab { border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
.tab.current { box-shadow: var(--shadow-sm); }
.where { margin-bottom: 14px; }

/* ---- dialogs ---- */
dialog.dialog { padding: 28px 28px 22px; border: 0; border-radius: 16px; box-shadow: var(--shadow-lg); animation: rise .16s ease-out; }
dialog.dialog h1 { font-size: 1.5rem; margin-bottom: 16px; }
dialog::backdrop { background: rgb(28 44 34 / .38); backdrop-filter: blur(3px); }
.dialog-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- dashboard ---- */
.tiles { gap: 14px; margin-bottom: 18px; }
.tile { padding: 16px 18px; border-radius: var(--radius); box-shadow: var(--shadow-md); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
a.tile:hover { background: var(--card); transform: translateY(-2px); box-shadow: 0 2px 4px rgb(40 69 50 / .06), 0 12px 26px rgb(40 69 50 / .11); }
.tile-label { font-size: .68rem; letter-spacing: .1em; }
.tile-value { font-size: 2.3rem; margin: 2px 0; }
.bar-track, .column-track { border-radius: 4px; }
.bar-track { background: var(--head); }

.switch-pick select { min-width: 190px; border-color: var(--line); background: var(--card); }
td select.sheet { min-width: 150px; }
/* ---- on/off switch ---- */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track { width: 40px; height: 22px; border-radius: 99px; background: var(--line); transition: background-color .15s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s ease; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }
/* ---- member profile ---- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 20px 22px; margin-bottom: 18px; background: linear-gradient(135deg, var(--card), var(--head)); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); }
.avatar.big { width: 64px; height: 64px; font-size: 1.35rem; box-shadow: var(--shadow-md); }
.hero-text { flex: 1; min-width: 220px; }
.hero-name { font: 400 1.75rem/1.15 Georgia, serif; letter-spacing: -.01em; margin-bottom: 8px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 2px; }
.hero-nav { display: flex; align-items: center; gap: 10px; }
.profile-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; align-items: start; margin-bottom: 18px; }
.profile-cards .panel { margin-bottom: 0; }
.profile-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 16px; padding: 16px 18px 4px; }
.save-bar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 12px 18px; margin-bottom: 18px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.save-bar button { min-width: 130px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- printed driver logs ---------- */
.print-area { display: grid; gap: 16px; }
.sheet-page { padding: 20px 24px; color: #000; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.sheet-page h2 { margin-bottom: 8px; font: 700 1.1rem Arial, sans-serif; text-align: center; color: #000; }
.log-meta { display: flex; align-items: baseline; gap: 6px; margin: 3px 0; font-size: .9rem; }
.log-meta .rule { flex: 1; max-width: 320px; border-bottom: 1px solid #000; }
table.log { margin-top: 10px; font-size: .82rem; }
table.log th, table.log td { padding: 5px 6px; border: 1px solid #000; color: #000; }
table.log th { background: #e8e8e8; font-size: .72rem; white-space: normal; }
table.log td.write-in { min-width: 70px; height: 30px; }
table.log td.box { text-align: center; font-size: 1.1rem; }
.log-foot { margin: 12px 0 0; font-size: .85rem; }

/* Ride2MD and Alivi trip logs: laid out like the providers' own paper forms. */
.trip-page { max-width: 1120px; min-width: 720px; padding: 30px; font: 12px Arial, sans-serif; }
.trip-brand { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 95px; margin-bottom: 12px; }
.trip-page .trip-brand h2 { flex: 1; margin: 0; font: bold 19px Arial, sans-serif; text-align: center; color: #000; }
.trip-provider-logo { width: 160px; flex-shrink: 0; }
.trip-provider-logo img { width: 100%; max-height: 85px; object-fit: contain; }
.trip-facility-logo { width: 130px; }
.trip-page.alivi .trip-brand h2 { padding-bottom: 4px; font: 30px Arial, sans-serif; text-align: left; color: #32508e; border-bottom: 1px solid #ffc890; }
/* The Alivi wordmark: navy letters with its yellow dot, cut out from the logo's shape. */
.trip-provider-logo.alivi { width: 150px; height: 60px; background: linear-gradient(#ffbd00, #ffbd00) 0 45px / 43px 16px no-repeat, #062b49;
  -webkit-mask: url("logo-alivi.webp") left top / 150px auto no-repeat; mask: url("logo-alivi.webp") left top / 150px auto no-repeat;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.trip-meta-row { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.trip-meta-row p { flex: 1; margin: 0; color: #000; }
.trip-meta-row label { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; font-size: 12px; color: #000; }
.trip-page .trip-in { width: 100%; min-width: 0; height: auto; padding: 3px; font: 12px Arial, sans-serif; text-align: center; color: #000; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.trip-page .trip-in:focus { outline: 2px solid #1a73e8; outline-offset: -2px; box-shadow: none; }
.trip-meta-row .trip-in { padding: 3px 0; text-align: left; background: #fff; border-bottom: 1px solid #111; }
.trip-draft { margin: 6px 0 2px; font-size: 10px; color: #c00000; }
.trip-log-table { width: 100%; table-layout: fixed; border-collapse: collapse; font: 12px Arial, sans-serif; color: #000; }
.trip-log-table th, .trip-log-table td { padding: 0; border: 1px solid #000; white-space: normal; overflow-wrap: anywhere; text-align: center; color: #000; background: #fff; }
.trip-log-table th { height: 55px; padding: 5px; font-weight: 400; font-size: 12px; letter-spacing: 0; text-transform: none; }
.trip-page.ride2md .trip-log-table th { font-weight: 700; background: #04b0dc; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.trip-log-table td { height: 29px; }
.trip-log-table input[type=checkbox] { width: 16px; height: 16px; margin: 4px; }
.trip-log-table .trip-col-name { padding-left: 3px; text-align: left; }
.ride2md .trip-col-date { width: 10%; } .ride2md .trip-col-tripNumber { width: 9%; } .ride2md .trip-col-name { width: 24%; } .ride2md .trip-col-los { width: 8%; }
.ride2md .trip-col-pickup, .ride2md .trip-col-dropoff, .ride2md .trip-col-miles { width: 8%; } .ride2md .trip-col-signature { width: 25%; }
.alivi .trip-col-name { width: 18%; } .alivi .trip-col-los, .alivi .trip-col-pickup, .alivi .trip-col-dropoff { width: 7%; }
.alivi .trip-col-pickupLocation, .alivi .trip-col-dropoffLocation { width: 17%; } .alivi .trip-col-miles, .alivi .trip-col-noShow { width: 5%; } .alivi .trip-col-signature { width: 17%; }
.trip-certification { margin: 28px 0 35px; font-size: 11px; line-height: 1.5; color: #000; }
.trip-driver-signature { font-size: 12px; color: #000; }
.trip-provider-footer { margin-top: 8px; text-align: center; font-size: 11px; }
.trip-provider-footer p { margin: 5px; color: #32508e; }
@page tripForm { size: letter landscape; margin: 10mm; }
@media print {
  .trip-page { page: tripForm; width: 100%; max-width: none; min-width: 0; break-inside: avoid; font-size: 9px; }
  .trip-brand { min-height: 60px; margin-bottom: 8px; }
  .trip-provider-logo { width: 135px; } .trip-provider-logo img { max-height: 55px; }
  .trip-page .trip-brand h2 { font-size: 17px; }
  .trip-meta-row { margin-bottom: 6px; }
  .trip-meta-row label, .trip-page .trip-in, .trip-log-table { font-size: 9px; }
  .trip-log-table th { height: 34px; padding: 3px; font-size: 9px; } .trip-log-table td { height: 18px; }
  .trip-page .trip-in { height: 17px; padding: 0 2px; }
  .trip-log-table input[type=checkbox] { width: 11px; height: 11px; margin: 1px; }
  .trip-certification { margin: 18px 0 22px; font-size: 8.5px; } .trip-provider-footer { font-size: 8px; }
}

/* claim preparation sheets */
.claim-page { max-width: 900px; }
.claim-brand { margin: 0; font-weight: 700; text-align: center; }
.claim-sub { margin: 0 0 10px; font-size: .8rem; text-align: center; color: #333; }
.claim-band { margin: 10px 0 4px; padding: 3px 8px; font-size: .78rem; letter-spacing: .03em; color: #000; background: #e8e8e8; }
.claim-row { display: flex; gap: 8px; margin-bottom: 5px; }
.claim-box { flex: 1; min-width: 0; font-size: .72rem; color: #333; }
.claim-box span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.claim-page input { padding: 4px 6px; font-size: .85rem; color: #000; background: #fff; border: 1px solid #999; border-radius: 3px; }
.claim-page input.linked { background: #eee; }
.claim-page input.pre { background: #e3effb; }
table.claim-table td { padding: 2px; }
table.claim-table td:nth-child(-n+2) { padding: 4px 6px; white-space: nowrap; }
.claim-total { margin: 10px 0 0; font-weight: 700; text-align: right; white-space: pre-wrap; }
.claim-none { margin: 14px 0 0; font-style: italic; }

@media print {
  .claim-page { max-width: none; }
  .claim-page input.pre { background: #fff; }
  :root { --bg: #fff; --card: #fff; --text: #000; --muted: #333; --line: #888; --soft: #eee; --accent: #000; --accent-text: #fff; --error: #000; }
  .topbar, .side, .page-head, .legend, .tabs, .pointer-bar, .no-print, .save-state { display: none !important; }
  .shell { display: block; height: auto; }
  .page { overflow: visible; padding: 0; }
  .grid-wrap, .table-wrap { overflow: visible; max-height: none; }
  .print-area { display: block; }
  .sheet-page { border: 0; border-radius: 0; padding: 0; break-after: page; }
  .panel { break-inside: avoid; }
}

/* ---------- routes ---------- */
.car-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
label.inline { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
label.inline input { width: auto; padding: 3px 6px; }
.map { position: relative; width: 960px; max-width: 100%; height: 440px; overflow: hidden; background: var(--soft); }
.map .tile { position: absolute; width: 256px; height: 256px; }
.map-lines { position: absolute; left: 0; top: 0; width: 960px; height: 440px; }
.map-credit { position: absolute; right: 0; bottom: 0; padding: 1px 6px; font-size: .7rem; color: #000; background: rgb(255 255 255 / .8); }

/* ---------- Submitting a signed trip log ---------- */
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Routes: map and calendar side by side at the top ---------- */
.routes-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .routes-top { grid-template-columns: 1fr; } }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week { font-size: 11px; text-align: center; color: var(--muted); text-transform: uppercase; }
button.cal-day { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 56px; padding: 4px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: inherit; cursor: pointer; text-align: left; }
button.cal-day:hover { border-color: var(--accent); }
button.cal-day.came { background: var(--soft); }
button.cal-day.today .cal-num { text-decoration: underline; }
button.cal-day.chosen { border: 2px solid var(--accent); padding: 3px; }
.cal-num { font-weight: 600; font-size: 13px; }
.cal-count { font-size: 10px; color: var(--muted); min-height: 12px; white-space: nowrap; }
.cal-runs { display: flex; gap: 2px; }
.cal-run { font-size: 9px; font-weight: 600; padding: 0 3px; border-radius: 3px; background: var(--accent); color: var(--accent-text); }

/* ====================================================================== */
/* Clean finish (2026-11-16). Looks only: nothing here changes what a      */
/* page does. Flat surfaces with hairline edges, one plain typeface, a     */
/* dark green side menu, and shadow only on things that float (dialogs).   */
/* To go back to the earlier look, delete from the line above to the end.  */
/* ====================================================================== */
/* Two tones (2026-11-16, owner: "two tones but not green, professional and
   clean"): a dark navy for the side menu, and one blue for buttons, links and
   whatever is selected. Everything else is white and cool grey. */
:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #131a26; --muted: #5a6473;
  --line: #d8dde5; --soft: #eef1f5; --head: #f8f9fb; --hover: #eaeef4; --pick: #dce7f8;
  --accent: #1f4fbf; --accent-deep: #183f99; --accent-text: #ffffff; --sage: #8b97a8; --focus: #6f9cf0;
  --rail: #162033; --rail-text: #e6eaf2; --rail-muted: #9ba7ba; --rail-hover: #202c45; --rail-pick: #2a3b60; --rail-mark: #86b4ff;
  --radius: 8px;
  --shadow-sm: none;
  --shadow-md: 0 1px 2px rgb(19 26 38 / .05);
  --shadow-lg: 0 12px 32px rgb(19 26 38 / .18), 0 2px 8px rgb(19 26 38 / .08);
  --ring: 0 0 0 3px rgb(31 79 191 / .22);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --card: #151b24; --text: #e6eaf0; --muted: #9aa5b4;
    --line: #283140; --soft: #1b2330; --head: #181f2a; --hover: #1e2735; --pick: #1f2f4d;
    --accent: #86b4ff; --accent-deep: #a8c9ff; --accent-text: #0d1117; --sage: #55627a; --focus: #86b4ff;
    --rail: #0a0e14; --rail-text: #dde3ec; --rail-muted: #8591a3; --rail-hover: #141b26; --rail-pick: #1c2740; --rail-mark: #86b4ff;
    --shadow-md: none;
    --shadow-lg: 0 14px 48px rgb(0 0 0 / .6);
    --ring: 0 0 0 3px rgb(134 180 255 / .28);
  }
}

/* ---- type: one plain face, numbers that line up ---- */
h1, h2, .where-month, .hero-name, .tile-value, dialog.dialog h1, dialog.dialog h2 {
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
h1 { font-size: 1.55rem; font-weight: 650; letter-spacing: -.015em; }
.where-month { font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.where-facility { font-size: .9rem; }
.hero-name { font-size: 1.5rem; font-weight: 650; }
.tile-value { font-size: 1.9rem; font-weight: 650; letter-spacing: -.02em; }
dialog.dialog h1, dialog.dialog h2 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
td, .tile-value, .bar-count, .column-value { font-variant-numeric: tabular-nums; }

/* ---- the side menu: dark green, in light and dark alike ---- */
.side { background: var(--rail); border-right: 0; scrollbar-color: var(--rail-pick) transparent; }
.side * { scrollbar-color: var(--rail-pick) transparent; }
.side .brand { color: #fff; }
.side .brand span { color: var(--rail-mark); }
.brand::before { border-radius: 6px; background: var(--accent); box-shadow: none; }
.side .brand::before { background: var(--rail-pick); color: #fff; }
.side .nav-title { color: var(--rail-muted); opacity: 1; }
.side .nav-link { color: var(--rail-text); border-radius: 6px; }
.side .nav-link:hover { background: var(--rail-hover); }
.side .nav-link.sub { color: var(--rail-muted); }
.side .nav-link.sub:hover { color: var(--rail-text); }
.side .nav-link[aria-current=page], .side .nav-link.sub[aria-current=page] { background: var(--rail-pick); color: #fff; box-shadow: none; }
.side .nav-link[aria-current=page]::before { background: var(--rail-mark); }
.side .nav-soon { color: var(--rail-muted); }
.side button.nav-jump { color: var(--rail-muted); }
.side button.nav-jump:hover, .side button.nav-jump:focus-visible { background: var(--rail-hover); color: #fff; }
.side button.nav-back { color: var(--rail-text); border-color: rgb(255 255 255 / .22); }
.side button.nav-back:hover { background: var(--rail-hover); }
.side :focus-visible { outline-color: var(--rail-mark); }
@media (max-width: 760px) { .side { border-bottom: 0; } }

/* ---- surfaces: flat, with one hairline edge ---- */
.panel, .tile, .grid-wrap, .hero, .card, .save-bar, .lock-banner, .pointer-bar { box-shadow: var(--shadow-md); }
.panel, .tile, .grid-wrap { border-radius: var(--radius); }
.hero { border-radius: var(--radius); background: var(--card); }
.card { border-radius: 10px; }
.panel-head { padding: 11px 16px; background: var(--card); }
.panel-head h2 { font-size: .9rem; font-weight: 650; }
a.tile:hover { transform: none; background: var(--head); border-color: var(--sage); box-shadow: var(--shadow-md); }
.tile-label { letter-spacing: .06em; }
.avatar, .avatar.big { background: var(--accent); box-shadow: none; }
@media (prefers-color-scheme: dark) { .avatar, .avatar.big { background: var(--accent); } }
body:has(> main.card:not([hidden])) { background: var(--bg); }

/* ---- buttons and boxes: flat and a little smaller ---- */
button, a.button { min-height: 34px; padding: 0 14px; border-radius: 6px; box-shadow: none; }
button:hover:not(:disabled), a.button:hover { box-shadow: none; }
button.outline, button.outline:hover:not(:disabled) { box-shadow: none; }
button.small { min-height: 28px; border-radius: 5px; }
button.cell, button.cell:hover:not(:disabled), button.cell:active:not(:disabled) { min-height: 0; padding: 0; border-radius: 0; }
button.cal-day { min-height: 56px; padding: 4px; }
input, select, textarea { min-height: 34px; border-radius: 6px; }
input[type=checkbox] { min-height: 0; }
input.sheet, select.sheet { min-height: 28px; border-radius: 4px; }
.tabs { border-radius: 8px; }
.tab { border-radius: 6px; }
.tab.current { box-shadow: none; }
.chip { background: var(--soft); border-color: transparent; }
.chip.warn { border-color: var(--courtesy); }

/* ---- tables: quiet headings, clear rows ---- */
th { font-size: .68rem; font-weight: 650; letter-spacing: .05em; background: var(--head); color: var(--muted); }
th, td { border-bottom-color: var(--line); }
.total-row td { border-top: 1px solid var(--line); background: var(--head); }
table.grid thead th, table.grid tfoot th, table.grid tfoot td,
table.grid thead .c-num, table.grid thead .c-first, table.grid thead .c-last,
table.grid tfoot .c-num, table.grid tfoot .c-first, table.grid tfoot .c-last { background: var(--soft); }
table.members-sheet tr.group td { border-top: 1px solid var(--line); background: var(--soft); }

/* ---- dialogs: the one thing that floats ---- */
dialog.dialog { border-radius: 10px; }
dialog::backdrop { background: rgb(14 19 17 / .45); backdrop-filter: none; }

/* Paper stays paper: printing uses black on white, as before. (Repeated here
   because the colours above come later in the file than the print rules.) */
@media print {
  :root { --bg: #fff; --card: #fff; --text: #000; --muted: #333; --line: #888; --soft: #eee; --head: #eee; --accent: #000; --accent-text: #fff; --error: #000; --shadow-md: none; }
}

/* ---- the logo (2026-11-16): a blue bingo ball, "Bingo" in red, yellow and
   blue, "Network" underneath. The ball is logo-ball.svg. ---- */
.brand::before, .side .brand::before { content: none; }
.brand, .side .brand { gap: 10px; align-items: center; }
.brand-ball { width: 46px; height: 46px; flex: none; }
.brand .brand-words, .side .brand .brand-words { display: flex; flex-direction: column; margin: 0; line-height: 1; color: inherit; }
.brand .bingo { position: relative; padding-bottom: 6px; font: 800 1.6rem/1 "Arial Rounded MT Bold", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; letter-spacing: -.02em; }
.brand .bingo i { font-style: normal; }
.brand .bingo i:nth-child(1), .brand .bingo i:nth-child(4) { color: #ff4d43; }
.brand .bingo i:nth-child(2), .brand .bingo i:nth-child(5) { color: #ffb400; }
.brand .bingo i:nth-child(3) { color: #2b8cff; }
/* the yellow swoosh under "Bingo" */
.brand .bingo::after { content: ""; position: absolute; left: 8%; right: 4%; bottom: 0; height: 6px; border-bottom: 3px solid #ffb400; border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.brand .network, .side .brand .network { margin: 2px 0 0 12px; font: 800 .98rem/1 "Arial Rounded MT Bold", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; letter-spacing: .01em; color: var(--text); }
.side .brand .network { color: #fff; }
.card.narrow .brand { margin-bottom: 22px; }
.card.narrow .brand-ball { width: 56px; height: 56px; }
.card.narrow .brand .bingo { font-size: 1.95rem; }
.card.narrow .brand .network { font-size: 1.15rem; }
@media print { .brand { display: none; } }

/* ---- colours taken from the logo (2026-11-16, owner: "build the color theme
   around the colors of the logo"). Navy = the side menu and the text. Blue =
   buttons, links and whatever is selected. Yellow = the small marker for where
   you are, and "courtesy". Red = errors and absences. Kept to those jobs so the
   pages stay calm; the bright colours are accents, not backgrounds. ---- */
:root {
  --text: #121b36; --muted: #58627a;
  --bg: #f5f7fb; --line: #d7ddea; --soft: #edf1f8; --head: #f8f9fc; --hover: #e9eef8; --pick: #dbe8fc;
  --accent: #1a6fe0; --accent-deep: #1458b8; --accent-text: #ffffff; --sage: #8a97b0; --focus: #6aa8f7;
  --rail: #0f1e4a; --rail-text: #e7ebf7; --rail-muted: #9aa7c9; --rail-hover: #19295c; --rail-pick: #223873; --rail-mark: #ffb400;
  --error: #c92b20; --absent: #c92b20; --courtesy: #f5a800;
  --ring: 0 0 0 3px rgb(26 111 224 / .24);
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e7ebf5; --muted: #9ba6bd;
    --bg: #0b1020; --card: #131a2e; --line: #26304a; --soft: #19223a; --head: #161e34; --hover: #1c2640; --pick: #1c3260;
    --accent: #6fb1ff; --accent-deep: #96c6ff; --accent-text: #0b1020; --sage: #55648a; --focus: #6fb1ff;
    --rail: #080d1c; --rail-text: #dfe5f3; --rail-muted: #8693b3; --rail-hover: #111a33; --rail-pick: #1a2850; --rail-mark: #ffb400;
    --error: #ff8177; --absent: #ff8177; --courtesy: #ffb400;
    --ring: 0 0 0 3px rgb(111 177 255 / .3);
  }
}
/* Printing stays black on white. */
@media print {
  :root { --bg: #fff; --card: #fff; --text: #000; --muted: #333; --line: #888; --soft: #eee; --head: #eee; --accent: #000; --accent-text: #fff; --error: #000; --absent: #000; }
}

/* ---- white base (2026-11-16, owner: "make the base layer white"). The page
   behind everything is white, and it stays white even when the PC itself is
   set to dark: the app no longer has a dark version. The side menu keeps the
   logo's navy. To bring the dark version back, delete this block. ---- */
:root { --bg: #ffffff; color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #ffffff; --card: #ffffff; --text: #121b36; --muted: #58627a;
    --line: #d7ddea; --soft: #edf1f8; --head: #f8f9fc; --hover: #e9eef8; --pick: #dbe8fc;
    --accent: #1a6fe0; --accent-deep: #1458b8; --accent-text: #ffffff; --sage: #8a97b0; --focus: #6aa8f7;
    --side: #f0f2eb;
    --rail: #0f1e4a; --rail-text: #e7ebf7; --rail-muted: #9aa7c9; --rail-hover: #19295c; --rail-pick: #223873; --rail-mark: #ffb400;
    --error: #c92b20; --absent: #c92b20; --present: #185a2c; --courtesy: #f5a800; --courtesy-text: #2a1d00; --courtesy-bg: #eef1f4;
    --shadow-md: 0 1px 2px rgb(19 26 38 / .05);
    --shadow-lg: 0 12px 32px rgb(19 26 38 / .18), 0 2px 8px rgb(19 26 38 / .08);
    --ring: 0 0 0 3px rgb(26 111 224 / .24);
  }
  table.grid .ins, .swatch.ins { background: hsl(var(--h) 65% 90%); }
}
/* On a white page the panels need a slightly clearer edge to stand out. */
.panel, .tile, .grid-wrap, .hero, .card { border-color: #d0d7e6; }
@media print {
  :root { --bg: #fff; --card: #fff; --text: #000; --muted: #333; --line: #888; --soft: #eee; --head: #eee; --accent: #000; --accent-text: #fff; --error: #000; --absent: #000; }
}

/* ---- the side menu wears every colour of the logo (2026-11-16, owner: "all
   the colors of the logo on the side bar"). The menu itself is the logo's
   navy; each section has one of the logo's bright colours for its title, its
   little square, and the marker beside the page you are on. ---- */
.side .nav-group { --sec: #ffb400; }
.side .nav-group.sec-admin, .side .nav-group.sec-transportation { --sec: #ff5a50; }          /* logo red */
.side .nav-group.sec-daycare_manager, .side .nav-group.sec-dispatcher { --sec: #4da3ff; }    /* logo blue */
.side .nav-group.sec-medicaid, .side .nav-group.sec-driver { --sec: #ffb400; }               /* logo yellow */
.side .nav-group .nav-title, .side .nav-group button.nav-jump { color: var(--sec); opacity: 1; }
.side .nav-group .nav-title::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 2px; background: var(--sec); vertical-align: 1px; }
.side .nav-group button.nav-jump { justify-content: flex-start; }
.side .nav-group button.nav-jump::after { margin-left: auto; }
.side .nav-group button.nav-jump:hover, .side .nav-group button.nav-jump:focus-visible { color: var(--sec); }
.side .nav-group .nav-link[aria-current=page]::before { background: var(--sec); width: 4px; }
.side .nav-group .nav-link:hover { box-shadow: inset 2px 0 0 var(--sec); }

/* ---- logo-colour accents on the white pages (2026-11-16, owner: "add accents
   to what you just made white"). Small touches only: a three-colour bar under
   each page title, a coloured edge on each panel and Home tile, and the Home
   bars in the three colours. The pages themselves stay white. ---- */
:root { --logo-red: #ff4d43; --logo-yellow: #ffb400; --logo-blue: #1a6fe0; }
.page-head h1 { position: relative; padding-bottom: 9px; }
.page-head h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 78px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--logo-red) 0 33.4%, var(--logo-yellow) 33.4% 66.7%, var(--logo-blue) 66.7%); }
.card.narrow h1 { position: relative; padding-bottom: 10px; }
.card.narrow h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 78px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--logo-red) 0 33.4%, var(--logo-yellow) 33.4% 66.7%, var(--logo-blue) 66.7%); }
/* panels: a coloured edge down the left of the heading, taking turns */
.panel > .panel-head { box-shadow: inset 4px 0 0 var(--logo-blue); }
.page > section.panel:nth-of-type(3n+1) > .panel-head, .two-panels > section.panel:nth-of-type(odd) > .panel-head { box-shadow: inset 4px 0 0 var(--logo-red); }
.page > section.panel:nth-of-type(3n+2) > .panel-head, .two-panels > section.panel:nth-of-type(even) > .panel-head { box-shadow: inset 4px 0 0 var(--logo-yellow); }
.page > section.panel:nth-of-type(3n) > .panel-head { box-shadow: inset 4px 0 0 var(--logo-blue); }
/* Home tiles: a coloured top edge, taking turns */
.tiles > .tile { border-top: 3px solid var(--logo-blue); }
.tiles > .tile:nth-child(3n+1) { border-top-color: var(--logo-red); }
.tiles > .tile:nth-child(3n+2) { border-top-color: var(--logo-yellow); }
/* Home bars in the three colours */
.bar-row:nth-child(3n+1) .bar-fill { background: var(--logo-red); }
.bar-row:nth-child(3n+2) .bar-fill { background: var(--logo-yellow); }
.bar-row:nth-child(3n) .bar-fill { background: var(--logo-blue); }
.bar-fill.quiet { background: var(--muted); }
@media print { .page-head h1::after, .card.narrow h1::after { display: none; } .panel > .panel-head { box-shadow: none !important; } .tiles > .tile { border-top: 1px solid #888; } }

/* ---------- Member profile: map location and insurance lines (2026-11-17) ---------- */
.profile-line { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.map-boxes { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 6px 0 10px; }
.map-boxes .field { margin: 0; width: 170px; }
