/* Council Desk — phone-first, responsive to desktop */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --line: #dde3ec;
  --text: #17202e;
  --muted: #5d6b80;
  --brand: #16325c;
  --brand-ink: #ffffff;
  --accent: #e3b341;
  --focus: #2f6fdb;
  --red: #c62f2f;      --red-bg: #fdecec;
  --amber: #a15c00;    --amber-bg: #fff4dc;
  --green: #1d7a46;    --green-bg: #e5f5ec;
  --blue: #1f5fbf;     --blue-bg: #e7effc;
  --grey: #5d6b80;     --grey-bg: #edf0f5;
  /* engagement types */
  --t-sp: #4f46e5; --t-hearing: #0d8f84; --t-meeting: #2563eb; --t-event: #e0620f; --t-courtesy: #9333ea; --t-other: #64748b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 30, 54, .06), 0 4px 14px rgba(16, 30, 54, .06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1520; --surface: #172030; --surface-2: #1d2839; --line: #2a374b; --text: #e8edf5; --muted: #9aa8bd;
    --brand: #8fb3ff; --brand-ink: #0f1520; --focus: #8fb3ff;
    --red: #ff8a8a; --red-bg: #3a1d22; --amber: #ffc366; --amber-bg: #36290f; --green: #6fdc9d; --green-bg: #15301f;
    --blue: #8fb3ff; --blue-bg: #18284a; --grey: #a4b1c4; --grey-bg: #222d3e;
    --t-sp: #8b84ff; --t-hearing: #3cc7b9; --t-meeting: #6aa0ff; --t-event: #ff9a57; --t-courtesy: #c58cff; --t-other: #9aa8bd;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1520; --surface: #172030; --surface-2: #1d2839; --line: #2a374b; --text: #e8edf5; --muted: #9aa8bd;
  --brand: #8fb3ff; --brand-ink: #0f1520; --focus: #8fb3ff;
  --red: #ff8a8a; --red-bg: #3a1d22; --amber: #ffc366; --amber-bg: #36290f; --green: #6fdc9d; --green-bg: #15301f;
  --blue: #8fb3ff; --blue-bg: #18284a; --grey: #a4b1c4; --grey-bg: #222d3e;
  --t-sp: #8b84ff; --t-hearing: #3cc7b9; --t-meeting: #6aa0ff; --t-event: #ff9a57; --t-courtesy: #c58cff; --t-other: #9aa8bd;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.boot { padding: 40vh 0 0; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------ shell */
.shell { min-height: 100vh; }
.side { display: none; }
.main { padding: calc(12px + var(--safe-t)) 16px calc(96px + var(--safe-b)); max-width: 760px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; min-height: 40px; }
.topbar h1 { font-size: 26px; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.topbar .sub { color: var(--muted); font-size: 14px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11px; color: var(--muted); text-decoration: none; position: relative; }
.tabbar a svg { width: 25px; height: 25px; }
.tabbar a.on { color: var(--brand); font-weight: 600; }
.tabbar .dot, .side .dot { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 17px; text-align: center; padding: 0 4px; font-weight: 700; }
.fab {
  position: fixed; right: 18px; bottom: calc(74px + var(--safe-b)); z-index: 21; width: 58px; height: 58px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); border: 0; box-shadow: 0 6px 18px rgba(22, 50, 92, .35); display: grid; place-items: center;
}
.fab svg { width: 28px; height: 28px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 236px 1fr; }
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; gap: 2px;
    background: var(--surface); border-right: 1px solid var(--line);
  }
  .side .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; padding: 4px 10px 18px; }
  .side .brand img { width: 30px; height: 30px; border-radius: 8px; }
  .side a { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 15px; }
  .side a svg { width: 20px; height: 20px; color: var(--muted); }
  .side a:hover { background: var(--surface-2); }
  .side a.on { background: var(--blue-bg); color: var(--blue); font-weight: 600; }
  .side a.on svg { color: var(--blue); }
  .side .dot { position: static; margin-left: auto; }
  .side .add { margin: 0 0 14px; justify-content: center; }
  .side .me .row { flex-wrap: wrap; }
  .side .me { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); font-size: 14px; }
  .main { padding: 24px 32px 48px; max-width: 1180px; margin: 0; }
  .main.wide { max-width: none; }
  .tabbar, .fab { display: none; }
  .phone-only { display: none !important; }
}
@media (max-width: 899px) { .desk-only { display: none !important; } }

/* ------------------------------------------------ basics */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 14px 16px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 22px 4px 8px; display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; text-decoration: none; color: var(--text); white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.green { background: var(--green); color: #fff; border-color: var(--green); }
.btn.danger { color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 14px; border-radius: 8px; }
.btn.lg { min-height: 50px; font-size: 16px; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .5; cursor: default; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.red { color: var(--red); background: var(--red-bg); }
.pill.amber { color: var(--amber); background: var(--amber-bg); }
.pill.green { color: var(--green); background: var(--green-bg); }
.pill.blue { color: var(--blue); background: var(--blue-bg); }
.pill.grey { color: var(--grey); background: var(--grey-bg); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.lock { display: inline-flex; color: var(--amber); }
.lock svg { width: 15px; height: 15px; }

/* type colors */
[data-type="SP Session"] { --tc: var(--t-sp); }
[data-type="Committee Hearing"] { --tc: var(--t-hearing); }
[data-type="Meeting"] { --tc: var(--t-meeting); }
[data-type="Event"] { --tc: var(--t-event); }
[data-type="Courtesy Call"] { --tc: var(--t-courtesy); }
[data-type="Other"] { --tc: var(--t-other); }
.tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--tc); flex: none; display: inline-block; }

/* ------------------------------------------------ Today */
.hello { margin: 2px 0 14px; }
.hello h1 { font-size: 28px; margin: 0; letter-spacing: -.01em; }
.hello .sub { color: var(--muted); }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--amber-bg); color: var(--amber); font-weight: 600; text-decoration: none; margin-bottom: 14px; }
.banner svg { width: 22px; height: 22px; flex: none; }
.next { position: relative; overflow: hidden; padding: 16px 16px 14px; border-left: 6px solid var(--tc); }
.next .label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tc); }
.next h2 { font-size: 21px; line-height: 1.25; margin: 4px 0 6px; }
.next .when { font-size: 17px; font-weight: 600; }
.next .meta { color: var(--muted); margin-top: 2px; }
.next .countdown { position: absolute; top: 14px; right: 14px; }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 0; min-width: 88px; }

/* engagement rows */
.elist { display: flex; flex-direction: column; gap: 8px; }
.erow { display: flex; gap: 12px; align-items: stretch; padding: 12px 14px; cursor: pointer; text-align: left; width: 100%; color: inherit; }
.erow:hover { border-color: color-mix(in srgb, var(--tc) 50%, var(--line)); }
.erow .time { width: 74px; flex: none; font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.erow .time .end { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.erow .bar { width: 4px; border-radius: 4px; background: var(--tc); flex: none; }
.erow .body { flex: 1; min-width: 0; }
.erow .title { font-weight: 600; line-height: 1.3; }
.erow .meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.erow.past { opacity: .55; }
.erow.inv { border-style: dashed; }
.erow.tent .bar { background: repeating-linear-gradient(var(--tc) 0 6px, transparent 6px 10px); }
.erow.off .title { text-decoration: line-through; }
.erow .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.daygroup { margin-top: 18px; }
.daygroup h3 { font-size: 15px; margin: 0 4px 8px; display: flex; gap: 8px; align-items: baseline; }
.daygroup h3 .muted { font-weight: 400; font-size: 14px; }

/* to-dos */
.tlist { display: flex; flex-direction: column; }
.trow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow .chk { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; display: grid; place-items: center; padding: 0; margin-top: -2px; }
.trow .chk svg { width: 16px; height: 16px; opacity: 0; color: #fff; }
.trow.done .chk { background: var(--green); border-color: var(--green); }
.trow.done .chk svg { opacity: 1; }
.trow.done .ttl { text-decoration: line-through; color: var(--muted); }
.trow .tbody { flex: 1; min-width: 0; cursor: pointer; }
.trow .ttl { font-weight: 500; }
.trow .meta { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------ Calendar */
.calhead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.calhead h2 { margin: 0 6px; font-size: 20px; min-width: 150px; }
.iconbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; padding: 0; }
.iconbtn svg { width: 20px; height: 20px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.month .dow { padding: 6px 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.month .cell { min-height: 54px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; cursor: pointer; position: relative; background: var(--surface); text-align: left; border-top: 0; border-left: 0; font: inherit; color: inherit; display: block; width: 100%; }
.month .cell:nth-child(7n) { border-right: 0; }
.month .cell.other { background: var(--surface-2); color: var(--muted); }
.month .cell .num { font-size: 13px; font-weight: 600; display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 12px; }
.month .cell.today .num { background: var(--brand); color: var(--brand-ink); }
.month .cell.sel { box-shadow: inset 0 0 0 2px var(--focus); }
.month .cell.drop { background: var(--blue-bg); }
.month .dots { display: flex; gap: 3px; flex-wrap: wrap; margin: 4px 0 0 3px; }
.month .chips { display: none; }
@media (min-width: 900px) {
  .month .cell { min-height: 118px; padding: 6px; }
  .month .dots { display: none; }
  .month .chips { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
}
.chip { display: block; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--tc) 14%, var(--surface)); border-left: 3px solid var(--tc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; color: var(--text); }
.chip b { font-weight: 700; }
.chip.inv { border-left-style: dashed; background: var(--surface); outline: 1px dashed color-mix(in srgb, var(--tc) 60%, transparent); }
.chip.tent { opacity: .7; }
.chip.off { text-decoration: line-through; opacity: .55; }
.chip.more { background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week .wcol { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-height: 420px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.week .wcol.today { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.week .wcol.drop { background: var(--blue-bg); }
.week .whead { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); }
.week .wcard { font-size: 13px; padding: 7px 8px; border-radius: 8px; border-left: 4px solid var(--tc); background: color-mix(in srgb, var(--tc) 10%, var(--surface)); cursor: grab; }
.week .wcard .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.week .wcard.inv { border-left-style: dashed; }
.week .wcard.off { opacity: .5; text-decoration: line-through; }
.week .wadd { margin-top: auto; border: 1px dashed var(--line); background: transparent; border-radius: 8px; color: var(--muted); padding: 6px; font-size: 13px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }

/* ------------------------------------------------ Legislation */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { padding: 12px 14px; }
.tile .n { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 13px; color: var(--muted); }
.mcard { padding: 14px 16px; cursor: pointer; display: block; width: 100%; text-align: left; color: inherit; }
.mcard .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.mcard .ttl { font-weight: 600; margin: 6px 0 8px; line-height: 1.3; }
.prog { display: flex; gap: 3px; }
.prog i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.prog i.on { background: var(--blue); }
.prog.done i.on { background: var(--green); }
.prog.bad i.on { background: var(--red); }
.mcard .foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; margin-top: 8px; color: var(--muted); }
.mgrid { display: grid; gap: 10px; }
@media (min-width: 900px) { .mgrid { grid-template-columns: repeat(2, 1fr); } }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.steps li::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .b { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); flex: none; margin-top: 1px; }
.steps li.done .b { background: var(--blue); border-color: var(--blue); }
.steps li.cur .b { background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-bg); }
.steps li.todo { color: var(--muted); }

/* ------------------------------------------------ Sheet (detail / forms) */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(10, 18, 32, .45); display: flex; justify-content: flex-end; align-items: stretch; animation: fade .15s; }
.sheet {
  background: var(--bg); width: 100%; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(8px + var(--safe-t)) 16px calc(24px + var(--safe-b)); animation: up .2s ease-out;
}
@media (min-width: 900px) {
  .sheet { width: 520px; border-left: 1px solid var(--line); padding: 16px 24px 32px; animation: slide .18s ease-out; }
  .sheet.center { width: 440px; height: auto; max-height: 86vh; margin: auto; border-radius: 16px; border: 1px solid var(--line); }
  .sheet-wrap.centered { justify-content: center; align-items: center; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: .4; } }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
.sheet-head { position: sticky; top: calc(-8px - var(--safe-t)); z-index: 2; background: var(--bg); display: flex; align-items: center; gap: 8px; padding: 6px 0 10px; margin-bottom: 4px; }
@media (min-width: 900px) { .sheet-head { top: -16px; } }
.sheet-head h2 { font-size: 17px; margin: 0; flex: 1; }
.dtitle { font-size: 23px; line-height: 1.25; margin: 6px 0 4px; }
.kv { display: grid; grid-template-columns: 26px 1fr; gap: 10px 8px; align-items: start; margin: 14px 0; }
.kv svg { width: 20px; height: 20px; color: var(--muted); margin-top: 1px; }
.prose { white-space: pre-wrap; }
.notice { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.notice.amber { background: var(--amber-bg); color: var(--amber); }
.notice.red { background: var(--red-bg); color: var(--red); }
.notice.blue { background: var(--blue-bg); color: var(--blue); }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.field label, .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: 16px; /* 16px stops iOS zooming into inputs */
}
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 22px; height: 22px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--blue); padding: 6px 0; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 10px; }
.formbar { display: flex; gap: 8px; margin-top: 6px; position: sticky; bottom: calc(-24px - var(--safe-b)); background: var(--bg); padding: 10px 0; }
.formbar .btn { flex: 1; }
.err { color: var(--red); font-size: 14px; }

/* lists inside sheets */
.linked { display: flex; flex-direction: column; gap: 6px; }
.linked button { text-align: left; }

/* action sheet (＋ menu) */
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu button { display: flex; gap: 12px; align-items: center; padding: 14px; text-align: left; font-weight: 600; font-size: 16px; }
.menu button svg { width: 22px; height: 22px; color: var(--brand); }
.menu .d { font-weight: 400; font-size: 13px; color: var(--muted); }

/* tables (desktop lists, staff, report) */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.tablewrap { overflow-x: auto; }

/* More page (phone) */
.mlist { display: flex; flex-direction: column; }
.mlist a, .mlist button { display: flex; gap: 14px; align-items: center; padding: 15px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-decoration: none; color: var(--text); font-size: 16px; text-align: left; width: 100%; position: relative; }
.mlist a:last-child, .mlist button:last-child { border-bottom: 0; }
.mlist svg { width: 22px; height: 22px; color: var(--brand); }
.mlist .dot { position: static; margin-left: auto; min-width: 20px; height: 20px; line-height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; text-align: center; font-weight: 700; padding: 0 6px; }

/* search */
.searchbox { position: relative; }
.searchbox input { padding-left: 40px; }
.searchbox svg { position: absolute; left: 12px; top: 12px; width: 20px; height: 20px; color: var(--muted); }

/* report */
.report { background: #fff; color: #111; padding: 28px 32px; border-radius: var(--radius); border: 1px solid var(--line); }
.report h1 { font-size: 22px; margin: 0; }
.report h2 { font-size: 16px; margin: 22px 0 8px; border-bottom: 2px solid #16325c; padding-bottom: 4px; color: #16325c; }
.report .rtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.report .rtiles div { border: 1px solid #d5dbe5; border-radius: 8px; padding: 8px 10px; }
.report .rtiles b { display: block; font-size: 22px; }
.report table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report th, .report td { border: 1px solid #d5dbe5; padding: 5px 7px; text-align: left; vertical-align: top; }
.report th { background: #eef2f8; }
@media (max-width: 699px) { .report { padding: 16px; } .report .rtiles { grid-template-columns: repeat(2, 1fr); } }

/* login */
.login { max-width: 400px; margin: 0 auto; padding: calc(12vh + var(--safe-t)) 20px 40px; }
.login .logo { width: 64px; height: 64px; border-radius: 16px; display: block; margin-bottom: 18px; }
.login h1 { margin: 0 0 4px; font-size: 26px; }

/* toast */
#toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(150px + var(--safe-b)); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
@media (min-width: 900px) { #toast-root { bottom: 28px; } }
.toast { background: #17202e; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); max-width: 90vw; }
.toast.error { background: #a32626; }

/* print: only the report */
@media print {
  @page { size: letter; margin: 0.6in; }
  body { background: #fff; }
  .side, .tabbar, .fab, .topbar, .noprint, #sheet-root, #toast-root { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
}
