:root {
  --saffron: #FF7F00;
  --blue: #002366;
  --blue-dark: #001233;
  --bg: #ffffff;
  --surface: #f6f7fa;
  --text: #1b1f2a;
  --muted: #5c6370;
  --border: #d9dde5;
  --accent: var(--blue);
  --accent-text: #ffffff;
  --danger: #b3261e;
  --ok: #1b7f3b;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --surface: #181c25;
    --text: #e8eaf0;
    --muted: #9aa3b2;
    --border: #2b313d;
    --accent: var(--saffron);
    --accent-text: #1b1f2a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); }
.hidden { display: none !important; }

header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: var(--blue); color: #fff;
  border-bottom: 4px solid var(--saffron);
}
header.top .brand { font-weight: 700; letter-spacing: .2px; }
header.top .brand small { font-weight: 400; opacity: .8; margin-left: 8px; }
header.top .who { font-size: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--saffron); color: #1b1f2a;
}
.badge.viewer { background: #cfd6e6; color: #1b1f2a; }

main { max-width: 960px; margin: 0 auto; padding: 16px; }
.banner {
  background: color-mix(in srgb, var(--saffron) 18%, var(--surface));
  border: 1px solid var(--saffron); border-radius: var(--radius);
  padding: 10px 14px; font-size: 14px; margin-bottom: 16px;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 8px; font-size: 18px; }
.card p.muted, .muted { color: var(--muted); font-size: 14px; }

.login { max-width: 420px; margin: 48px auto; }
label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
input, select {
  width: 100%; padding: 10px 12px; font: inherit;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button {
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; background: var(--accent); color: var(--accent-text);
}
button:not(:disabled):hover { filter: brightness(1.12); }
@media (prefers-color-scheme: light) { button:not(.secondary):not(:disabled):hover { background: var(--blue-dark); filter: none; } }
button.secondary { background: transparent; color: var(--text); border-color: var(--border); }
button.small { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.row > button { flex: 0 0 auto; }
.error { color: var(--danger); font-size: 14px; margin-top: 8px; min-height: 1.2em; }
.ok { color: var(--ok); font-size: 14px; margin-top: 8px; }


table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
@media (max-width: 600px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; padding: 6px; }
  td { border: 0; padding: 4px 6px; }
  td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
}

/* nav + shared widgets */
header.top { flex-wrap: wrap; }
header.top .brand a { color: #fff; text-decoration: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { color: #fff; text-decoration: none; padding: 4px 10px; border-radius: 6px; font-size: 14px; opacity: .85; }
.nav a:hover { opacity: 1; background: rgba(255,255,255,.12); }
.nav a.on { background: var(--saffron); color: #1b1f2a; opacity: 1; font-weight: 600; }
.banner.small { padding: 6px 12px; font-size: 13px; margin-bottom: 12px; }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar > * { flex: 1 1 140px; } .toolbar > button { flex: 0 0 auto; }
.toolbar label { margin-top: 0; }
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; margin: 0; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; }
textarea { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 60; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.toast.bad { background: var(--danger); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); }
.pill.active, .pill.approved { background: #d9f2e1; color: #135c2d; border-color: transparent; }
.pill.pending, .pill.in_review, .pill.new { background: #fde9cc; color: #7a4a00; border-color: transparent; }
.pill.inactive, .pill.declined { background: #e9e9ee; color: #44475a; border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .pill.active, .pill.approved { background: #1f4d30; color: #b9efcb; }
  .pill.pending, .pill.in_review, .pill.new { background: #5a3a08; color: #ffd9a3; }
  .pill.inactive, .pill.declined { background: #2b2f3a; color: #c5c9d6; }
}
tr.click { cursor: pointer; } tr.click:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.stat { display: flex; flex-direction: column; } .stat b { font-size: 22px; color: var(--accent); } .stat span { font-size: 12px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
h1.pagetitle { font-size: 22px; margin: 4px 0 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.score { width: 70px; }
header.top button.secondary { color: #fff; border-color: rgba(255,255,255,.5); }
.badge.onboarder { background: #bfe3d0; color: #1b1f2a; } .badge.team_lead { background: #ffd9a3; color: #1b1f2a; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; margin-bottom: 4px; }
.pill.created { background: #d9f2e1; color: #135c2d; border-color: transparent; } .pill.duplicate { background: #e9e9ee; color: #44475a; border-color: transparent; } .pill.invalid { background: #f6d5d2; color: #7a1c15; border-color: transparent; }
@media (prefers-color-scheme: dark) { .pill.created { background: #1f4d30; color: #b9efcb; } .pill.duplicate { background: #2b2f3a; color: #c5c9d6; } .pill.invalid { background: #5a1f1a; color: #ffc9c4; } }
.script { background: color-mix(in srgb, var(--accent) 7%, var(--bg)); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 10px; font-size: 13.5px; margin: 12px 0 2px; }
.pill.not_onboarded { background: #f6d5d2; color: #7a1c15; border-color: transparent; } .pill.warn { background: #fde9cc; color: #7a4a00; border-color: transparent; } .pill.late { background: #f6d5d2; color: #7a1c15; border-color: transparent; }
@media (prefers-color-scheme: dark) { .pill.not_onboarded, .pill.late { background: #5a1f1a; color: #ffc9c4; } .pill.warn { background: #5a3a08; color: #ffd9a3; } }

table.att th, table.att td { padding: 6px 5px; white-space: nowrap; } table.att td.num, table.att th:not(:first-child) { text-align: center; font-variant-numeric: tabular-nums; }
table.att td.q { font-weight: 700; border-left: 1px solid var(--border); } table.att td.q.below { background: #f6d5d2; color: #7a1c15; } table.att td.q.met { color: var(--ok); }
@media (prefers-color-scheme: dark) { table.att td.q.below { background: #5a1f1a; color: #ffc9c4; } }
@media (max-width: 600px) { table.att, table.att thead, table.att tbody, table.att tr, table.att th, table.att td { display: revert; } table.att thead { display: table-header-group; } table.att td::before { content: none; } table.att tr { border: 0; margin: 0; padding: 0; } table.att td { border-bottom: 1px solid var(--border); } }

/* The hidden attribute must win over component display rules (tiles, buttons, banners). */
[hidden] { display: none !important; }

/* wide tables (volunteer directory) */
main.wide { max-width: 1320px; }
.card.scroll-x { overflow-x: auto; }
td.nowrap { white-space: nowrap; }
select.status-pick { width: auto; padding: 3px 6px; font-size: 13px; font-weight: 600; border-radius: 999px; }
select.status-pick.active { background: #d9f2e1; color: #135c2d; border-color: transparent; }
select.status-pick.inactive { background: #e9e9ee; color: #44475a; border-color: transparent; }
@media (prefers-color-scheme: dark) { select.status-pick.active { background: #1f4d30; color: #b9efcb; } select.status-pick.inactive { background: #2b2f3a; color: #c5c9d6; } }

/* searchable tick-lists (seva form: who took part) */
.checks-search { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .checks-search input { flex: 1; } .checks-search span { white-space: nowrap; font-size: 13px; }
/* Opens two people tall; drag the bottom-right corner to make it taller. */
.checks.searchable { grid-template-columns: 1fr; align-content: start; gap: 6px; height: 68px; min-height: 68px; max-height: 70vh; resize: vertical; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.checks.searchable label.check { margin: 0; }

/* social posts queue */
.card.post { margin-bottom: 12px; } .card.post h2 a { color: inherit; text-decoration: none; } .card.post h2 a:hover { text-decoration: underline; }
.caption { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 15px; }
a.button { display: inline-block; text-decoration: none; border-radius: 8px; padding: 10px 16px; font-weight: 600; } a.button.secondary { border: 1px solid var(--border); color: var(--text); background: transparent; } a.button.small { padding: 4px 10px; font-size: 13px; }

/* pick a volunteer by searching (seva page) */
.pick-results { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; } .pick-results:empty { display: none; }
.pick-results button { flex: 0 0 auto; } .pick-results .muted { font-weight: 400; font-size: 12px; }
/* things that should keep their own width inside a .row */
.row > .pill, .row > a.button { flex: 0 0 auto; }
.badge.communications { background: #e6cff2; color: #1b1f2a; }

/* ═══════════════ Look and feel, 2026-11-20: side menu, open space instead of boxes ═══════════════
   Everything below restyles what is above. Signed-in pages get body.app (set by shell() in ui.js). */
:root {
  --bg: #fbfbfd; --surface: #f1f3f8; --panel: #ffffff; --text: #171a22; --muted: #646b7a; --border: #e6e8ee;
  --radius: 14px; --side: #002366; --side-w: 232px; --ring: color-mix(in srgb, var(--blue) 30%, transparent);
  --cta: var(--saffron); --cta-text: #1b1f2a;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1016; --surface: #181c26; --panel: #151922; --text: #e9ebf1; --muted: #9aa3b2; --border: #262b37; --side: #0a1330; --ring: color-mix(in srgb, var(--saffron) 40%, transparent); }
}
body { font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.015em; }
a, button, input, select, textarea, td, .nav a { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease; }

/* ── frame ── */
header.top { border-bottom: 0; background: var(--side); padding: 14px 20px; }
header.top .brand, header.top .brand a { color: #fff; text-decoration: none; font-weight: 650; font-size: 16px; letter-spacing: -0.01em; }
header.top .brand span { color: #FF9A33; }
body.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; }
body.app header.top { position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: stretch; justify-content: flex-start; flex-wrap: nowrap; gap: 18px; padding: 20px 12px 14px; overflow-y: auto; }
body.app header.top .brand { padding: 0 10px; }
body.app .nav { flex-direction: column; gap: 2px; flex-wrap: nowrap; }
body.app .nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; opacity: .78; }
body.app .nav a svg { flex: none; }
body.app .nav a:hover { opacity: 1; background: rgba(255,255,255,.09); }
body.app .nav a.on { background: rgba(255,255,255,.15); color: #fff; opacity: 1; font-weight: 600; }
body.app .nav a.on svg { color: #FF9A33; }
body.app header.top .who { margin-top: auto; display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px 6px 0 8px; border-top: 1px solid rgba(255,255,255,.12); color: #fff; }
.who-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; flex: 1; }
.who-name { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
header.top .who .badge { font-size: 11px; padding: 0 7px; }
header.top button.secondary#signout { border: 0; background: transparent; padding: 6px; border-radius: 8px; opacity: .75; display: flex; }
header.top button.secondary#signout:hover { opacity: 1; background: rgba(255,255,255,.12); filter: none; }
main, main.wide { max-width: 1240px; margin: 0; padding: 30px 36px 60px; }
body:not(.app) main { margin: 0 auto; max-width: 720px; }

/* ── type ── */
h1.pagetitle { font-size: 26px; font-weight: 680; margin: 0 0 18px; }
.muted, .card p.muted { color: var(--muted); }

/* ── no boxes: a section is space and a heading, not a bordered card ── */
body.app .card:not(.modal):not(.post):not(.login) { background: transparent; border: 0; border-radius: 0; padding: 0; margin-bottom: 30px; }
.card h2 { font-size: 17px; font-weight: 650; margin: 0 0 10px; }
.card.modal, .card.post, .card.login, body:not(.app) .card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.05); }
.modal-wrap { background: rgba(10,14,24,.5); backdrop-filter: blur(3px); }
.card.modal { box-shadow: 0 24px 60px rgba(0,0,0,.28); }

/* ── controls ── */
input, select, textarea { border: 1px solid transparent; background: var(--surface); border-radius: 10px; padding: 9px 12px; }
input:hover, select:hover, textarea:hover { border-color: var(--border); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 4px var(--ring); background: var(--panel); }
input[type="search"], .toolbar input#q { border-radius: 999px; padding-left: 16px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); box-shadow: none; }
label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }
label.check { color: var(--text); font-size: 14px; }
button, a.button { border-radius: 999px; padding: 9px 18px; font-weight: 600; background: var(--cta); color: var(--cta-text); border: 1px solid transparent; }
button:not(.secondary):not(:disabled):hover { background: #ff9426; filter: none; transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, var(--saffron) 35%, transparent); }
button:active { transform: translateY(0) scale(.98); }
button.secondary, a.button.secondary { background: var(--surface); color: var(--text); border-color: transparent; }
button.secondary:not(:disabled):hover, a.button.secondary:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface)); filter: none; }
button.small, a.button.small { padding: 5px 12px; font-size: 13px; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--ring); }
.toolbar { gap: 12px; margin-bottom: 18px; }

/* ── lists ── */
table { font-size: 14px; }
th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 13px 10px; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--text) 3%, transparent); }
tr.click:hover td { background: color-mix(in srgb, var(--blue) 6%, transparent); }
tr.click td:first-child { border-radius: 10px 0 0 10px; } tr.click td:last-child { border-radius: 0 10px 10px 0; }
.av { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 650; flex: none; }
.person { display: flex; align-items: center; gap: 12px; } .person-name { font-weight: 600; }
.pill, .badge { font-weight: 600; padding: 2px 10px; }
select.status-pick { padding: 3px 8px; box-shadow: none; }
@media (max-width: 600px) { tr { border: 0; border-radius: 14px; background: var(--surface); padding: 10px 12px; } tbody tr:hover td { background: transparent; } }

/* ── The Admin page (admin.js): "Add users" and the members list both start folded ──
   The members' rows open one after another when the list is opened. Each cell's content sits in .u-in > div, which
   folds to nothing; while shut it is also out of the tab order. Once a row has finished opening (.done) nothing is
   clipped, so focus rings, menus and the team pop-up show in full. */
.ad-sec { margin-bottom: 18px; }
.ad-panel { margin-top: 14px; }
.ad-toggle { display: inline-flex; align-items: center; gap: 8px; }
.ad-drop { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; font-size: 16px; font-weight: 650; text-align: left; }
.ad-drop .chev { margin-left: auto; }
.chev { flex: none; transition: transform .2s ease; }
[aria-expanded="true"] > .chev { transform: rotate(180deg); }
.ad-count { font-size: 12px; font-weight: 650; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 1px 9px; }
/* Small pop-ups under a heading's button (web/js/popover.js): the Admin page's Name filter and team picker, and the
   Seva log's Seva and Team filters. */
.th-name { white-space: nowrap; }
.pop-wrap { position: relative; display: inline-block; vertical-align: middle; }
button.secondary.icon-btn { padding: 4px 5px; margin-left: 2px; border-radius: 8px; background: transparent; color: var(--muted); line-height: 0; }
button.secondary.icon-btn:hover { background: var(--surface); color: var(--text); }
button.secondary.icon-btn.on { color: var(--saffron); background: color-mix(in srgb, var(--saffron) 14%, transparent); }
.pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(300px, calc(100vw - 40px)); box-sizing: border-box; padding: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 34px rgba(16,24,40,.16);
  color: var(--text); font-size: 14px; font-weight: 400; text-align: left; white-space: normal; scroll-margin: 16px; }
@media (max-width: 860px) { .pop { scroll-margin-bottom: 96px; } }   /* clear of the menu bar along the bottom */
.pop input[type="search"] { width: 100%; }
.pop-list { max-height: 260px; overflow-y: auto; margin: 8px 0 6px; display: grid; gap: 1px; }
.pop-list label.check { margin: 0; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.pop-list label.check:hover { background: var(--surface); }
.pop-none { margin: 6px 2px; }
.pop .error { margin-top: 0; min-height: 0; }
.pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; text-align: left; }
.team-btn.none { color: var(--danger); }
@media (max-width: 600px) {   /* rows are cards: keep the headings that filter or sort (with their buttons) above them */
  #user-table thead { display: block; }
  #user-table thead tr { display: block; border: 0; background: transparent; padding: 0 0 6px; margin: 0; }
  #user-table thead th { display: none; } #user-table thead th.th-name { display: block; border: 0; padding: 0; }
  #seva-table thead { display: block; }
  #seva-table thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; border: 0; background: transparent; padding: 0 0 8px; margin: 0; }
  #seva-table thead th { display: none; } #seva-table thead th.th-tool { display: block; border: 0; padding: 0; }
}
#user-rows tr.u-row > td { transition: padding .5s ease, border-color .5s ease; }
#user-rows tr.u-row .u-in { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s ease, opacity .5s ease, transform .5s ease, visibility .5s; }
#user-rows tr.u-row .u-in > div { min-height: 0; overflow: hidden; }
#user-rows tr.u-row.done .u-in > div { overflow: visible; }
#user-rows tr.u-row.shut > td { padding-top: 0; padding-bottom: 0; border-bottom-color: transparent; }
#user-rows tr.u-row.shut .u-in { grid-template-rows: 0fr; opacity: 0; transform: translateY(-6px); visibility: hidden; }
@media (max-width: 600px) {   /* rows are cards here, with each cell's label above it: the whole card folds instead */
  #user-rows tr.u-row { max-height: 40rem; overflow: hidden; transition: max-height .5s ease, padding .5s ease, margin .5s ease, opacity .5s ease; }
  #user-rows tr.u-row.done { max-height: none; overflow: visible; }
  #user-rows tr.u-row.shut { max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; opacity: 0; }
  #user-rows tr.u-row.shut > td { padding-top: 4px; padding-bottom: 4px; }
  #user-rows tr.u-row.shut .u-in { grid-template-rows: 1fr; transform: none; }
}

/* ── home numbers, notes ── */
.stats { gap: 14px; } .stat { background: var(--surface); border-radius: 16px; padding: 14px 16px; } .stat b { font-size: 28px; font-weight: 680; letter-spacing: -0.02em; color: var(--text); }
.banner { border: 0; border-radius: 14px; background: color-mix(in srgb, var(--saffron) 14%, var(--bg)); padding: 12px 16px; }
.script { border-left: 0; border-radius: 12px; background: var(--surface); padding: 10px 14px; }
.caption { background: var(--surface); border: 0; border-radius: 12px; }
.checks.searchable { border: 0; background: var(--surface); border-radius: 12px; }
.toast { border-radius: 999px; padding: 10px 20px; background: #171a22; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* ── phones: the menu becomes a bar along the bottom ── */
@media (max-width: 860px) {
  body.app { display: block; }
  body.app header.top { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; gap: 10px; overflow: visible; }
  body.app header.top .brand { flex: 1; padding: 0; }
  body.app header.top .who { margin: 0; padding: 0; border: 0; flex: 0 0 auto; } .who-text { display: none; }
  body.app .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; flex-direction: row; gap: 0; background: var(--side); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; }
  body.app .nav a { flex: 1 0 68px; flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 10.5px; text-align: center; white-space: nowrap; }
  main, main.wide { padding: 18px 16px 96px; }
  h1.pagetitle { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 860px) { body.app .nav { scrollbar-width: none; } body.app .nav::-webkit-scrollbar { display: none; } }

/* Purchase requests: the answers side by side on wide screens, stacked on phones. */
.pr { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 16px; }
.pr label { margin: 0 0 4px; font-size: 12px; }
.pr .caption { font-size: 14px; overflow-wrap: anywhere; }

/* ───────── Social posts board ───────── */
.board-stats { margin: 4px 0 14px; max-width: 350px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; align-items: start; }
.lane { background: var(--surface); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; min-width: 0; scroll-snap-align: start; }
.lane.over { outline: 2px solid var(--saffron); outline-offset: -2px; }
.lane > h2 { margin: 2px 2px 0; font-size: 14px; display: flex; justify-content: space-between; }
.lane > h2 span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.lane-empty { margin: 0; padding: 6px 4px; font-size: 13px; color: var(--muted); }
.lane-skipped { margin-top: 14px; } .lane-skipped summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 2px; }
.lane-skipped .lane { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); min-height: 70px; margin-top: 6px; }
.kcard { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.kcard[draggable="true"] { cursor: grab; } .kcard.dragging { opacity: .45; }
.kt { font-weight: 600; font-size: 14px; } .ks { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ktags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 4px; }
.kwho { margin-left: auto; display: inline-flex; } .kwho .av { width: 24px; height: 24px; font-size: 11px; }
.kneeds { font-size: 13px; background: color-mix(in srgb, var(--saffron) 14%, var(--bg)); border-radius: 8px; padding: 6px 8px; overflow-wrap: anywhere; }
.kfoot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kfoot select { flex: 1 1 110px; min-width: 0; width: auto; padding: 5px 8px; font-size: 13px; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }
/* Large money figures (nine digits) must fit their tile on any screen. */
.stat b { font-size: clamp(18px, 2.3vw, 28px); overflow-wrap: anywhere; line-height: 1.2; }

/* ───────── Warning pop-up (confirmModal) ───────── */
.modal.urgent { padding: 0; overflow: hidden; max-width: 460px; border: 0; }
.urgent-head { background: var(--blue); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-top: 6px solid var(--saffron); }
.urgent-head h2 { margin: 0; color: #fff; font-size: 18px; }
.urgent-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--saffron); color: #1b1f2a; display: grid; place-items: center; }
.urgent-body { padding: 16px 20px 20px; } .urgent-body p { margin: 0 0 12px; }
.urgent-big { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.urgent-big b { font-size: 34px; line-height: 1; color: var(--saffron); font-weight: 720; letter-spacing: -0.02em; } .urgent-big span { color: var(--muted); font-size: 14px; }
.urgent-tick { display: flex; gap: 10px; align-items: flex-start; background: color-mix(in srgb, var(--saffron) 14%, var(--bg)); border: 1px solid color-mix(in srgb, var(--saffron) 55%, transparent); border-radius: 12px; padding: 10px 12px; font-weight: 600; cursor: pointer; }
.urgent-tick input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--saffron); }
.modal.urgent button:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) { .modal.urgent { animation: urgent-in .18s ease-out; } @keyframes urgent-in { from { transform: translateY(8px) scale(.98); opacity: 0; } } }

/* ───────── Purchase requests board ───────── */
a.extlink { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-weight: 600; }
.kcard .ksoon { font-size: 12px; color: var(--muted); }
.pr-detail label { margin-top: 10px; } .pr-detail .caption { white-space: pre-wrap; overflow-wrap: anywhere; }
details.fold { margin-top: 4px; } details.fold > summary { cursor: pointer; font-weight: 600; padding: 6px 0; list-style-position: inside; }
.kitems { font-size: 13px; background: var(--surface); border-radius: 8px; padding: 6px 8px; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; }
.kitems b { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.kitems > div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .kitems.none { color: var(--muted); display: block; }
.buylist { display: flex; flex-direction: column; gap: 8px; }
.buyrow { display: flex; gap: 10px; align-items: center; background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.buyrow .buytext { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; } .buyrow button { flex: 0 0 auto; min-width: 92px; }
.buyrow.done .buytext { color: var(--muted); }

/* ───────── Choose a password: a bar that fills and requirements that tick while typing ───────── */
.pw-labelrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pw-labelrow button { margin-bottom: 5px; }
.pw-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; --ok-text: color-mix(in srgb, var(--ok) 62%, var(--text)); }
.pw-bar { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.pw-bar span { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--text) 14%, transparent); transition: background .2s; }
.pw-bar[data-n="1"] span:nth-child(-n+1), .pw-bar[data-n="2"] span:nth-child(-n+2), .pw-bar[data-n="3"] span:nth-child(-n+3),
.pw-bar[data-n="4"] span:nth-child(-n+4) { background: var(--saffron); }
.pw-bar[data-n="5"] span { background: var(--ok); }
.pw-count { flex: 0 0 auto; min-width: 78px; text-align: right; font-size: 13px; font-weight: 600; color: var(--muted); }
.pw-count.ok { color: var(--ok-text); }
.pw-checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 12px; font-size: 13.5px; }
.pw-checks li { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); }
.pw-checks .dot { flex: 0 0 18px; height: 18px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--text) 38%, transparent); display: grid; place-items: center; font-size: 11px; font-weight: 700; line-height: 1; color: transparent; }
.pw-checks li.ok { color: var(--text); font-weight: 600; }
.pw-checks li.ok .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.pw-checks.tried li:not(.ok) { color: var(--danger); } .pw-checks.tried li:not(.ok) .dot { border-color: var(--danger); }
@media (prefers-reduced-motion: no-preference) { .pw-checks li.new .dot { animation: pw-pop .22s ease-out; } @keyframes pw-pop { from { transform: scale(.6); } 60% { transform: scale(1.2); } } }
.pw-match { font-size: 13.5px; margin-top: 8px; min-height: 1.3em; color: var(--muted); }
.pw-match.ok { color: color-mix(in srgb, var(--ok) 62%, var(--text)); font-weight: 600; }
.pw-match.tried:not(.ok) { color: var(--danger); }
@media (max-width: 400px) { .pw-checks { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ───────── Onboarding queue: notes, a booked call, No response ───────── */
.qnote { font-size: 12.5px; margin-top: 3px; overflow-wrap: anywhere; }
.qbooked { font-size: 12.5px; font-weight: 600; margin-top: 3px; color: var(--accent); }
.qbooked.past { color: var(--danger); }
.qactions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* ───────── Seva approvals: the status trail on a proposal card (Proposed → Regional coordinators → Decision) ─────────
   Each step is a .pill, so its colours (approved, pending, late, declined) already work in light and dark.
   Colour is not the only signal: every state has its own mark and wording (web/js/approval-trail.js), and the
   late and not-reached steps also differ in their outline. Steps wrap onto further lines on a phone; an arrow
   stays with the step it follows. */
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 14px; }
.trail-seg { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.trail-step { display: inline-flex; align-items: flex-start; gap: 7px; min-width: 0; padding: 4px 12px 4px 5px; border-radius: 14px; font-size: 13px; font-weight: 500; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.trail-step > span:last-child { min-width: 0; }
.trail-step b { font-weight: 700; }
.trail-mark { flex: 0 0 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1; background: color-mix(in srgb, currentColor 16%, transparent); }
.trail-step.t-waiting .trail-mark { padding-bottom: 5px; }   /* "…" sits low in its line; lift it to the middle of the circle */
.trail-step.t-late { box-shadow: inset 0 0 0 1.5px currentColor; }
.trail-step.t-todo { background: transparent; color: var(--muted); border-style: dashed; border-color: color-mix(in srgb, var(--text) 32%, transparent); }
.trail-step.t-todo .trail-mark { background: transparent; font-size: 13px; }
.trail-arrow { flex: 0 0 auto; color: var(--muted); font-weight: 700; }

/* ───────── Home: a team lead's team(s) at a glance (web/js/lead-home.js, drawn by app.js) ───────── */
.lead-home { margin: 0 0 30px; }
.lead-home > h2 { font-size: 17px; font-weight: 650; margin: 0 0 10px; }
.lead-home > p { margin: 0; }
.lh-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.lh-stats .stat .lh-note { margin-top: 3px; overflow-wrap: anywhere; }
.lh-stats .stat .lh-note.ok { font-weight: 600; color: color-mix(in srgb, var(--ok) 62%, var(--text)); }
.lh-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; margin-top: 22px; align-items: start; }
.lh-list h3 { font-size: 15px; font-weight: 650; margin: 0 0 4px; }
.lh-list > p { margin: 0; font-size: 14px; }
.lh-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.lh-row:last-child { border-bottom: 0; }
.lh-count { flex: 0 0 auto; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); background: color-mix(in srgb, var(--saffron) 20%, var(--bg)); }
.lh-text { flex: 1; min-width: 0; padding-top: 5px; font-size: 14px; overflow-wrap: anywhere; }
.lh-text > a { font-weight: 600; }
.lh-items { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.lh-items .kneeds { margin-top: 4px; color: var(--text); }
.lh-track { margin-left: 4px; font-weight: 600; white-space: nowrap; }
@media (max-width: 800px) { .lh-lists { grid-template-columns: 1fr; } }

/* ───────── Volunteers list: headings that sort, tick boxes with a "Make inactive" bar, sevas attended ─────────
   A sortable heading is a real button inside its <th>; the arrow shows the direction and aria-sort says it aloud.
   On a phone the table has no headings, so .vol-phone carries "Sort by" and "Select all shown" instead. */
th button.sortbtn { display: inline-flex; align-items: center; gap: 5px; margin: -3px -6px; padding: 3px 6px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; }
th button.sortbtn:not(:disabled):hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); transform: none; box-shadow: none; filter: none; }
th button.sortbtn:not(:disabled):focus-visible { box-shadow: 0 0 0 3px var(--ring); }
.sortbtn .arr { font-size: 11px; opacity: .4; }
th[aria-sort="ascending"] .sortbtn, th[aria-sort="descending"] .sortbtn { color: var(--text); }
th[aria-sort="ascending"] .arr, th[aria-sort="descending"] .arr { opacity: 1; color: var(--accent); }
th.pick, td.pick { width: 38px; padding-right: 0; }
td.pick { cursor: default; }
.pick input, .vol-phone label.check input { width: 18px; height: 18px; margin: 0; padding: 0; vertical-align: middle; cursor: pointer; accent-color: var(--accent); }
.pick input:disabled, .vol-phone label.check input:disabled { cursor: default; }
.pick input:focus-visible, .vol-phone label.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
tbody tr.picked td, tbody tr.picked:hover td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.bulkbar { position: sticky; top: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 8px 10px 8px 18px; border-radius: 16px; background: var(--side); color: #fff; border: 1px solid color-mix(in srgb, #fff 16%, transparent); box-shadow: 0 10px 26px rgba(10,14,24,.22); font-size: 14px; }
.bulkbar .bulk-n { margin-right: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.bulkbar button.secondary, .bulkbar button.secondary:not(:disabled):hover { background: rgba(255,255,255,.16); color: #fff; }
.bulkbar button.secondary:not(:disabled):hover { background: rgba(255,255,255,.28); }
.vol-phone { display: none; }
@media (max-width: 600px) {
  .vol-phone { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; margin: -4px 0 16px; }
  .vol-phone > div { flex: 1 1 170px; } .vol-phone label { margin-top: 0; } .vol-phone label.check { flex: 0 0 auto; margin: 0 0 10px; }
  td.pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; width: auto; padding-right: 6px; }
  td.pick::before { font-size: 13px; }
  tr.picked { box-shadow: inset 0 0 0 2px var(--accent); }
  tbody tr.picked td, tbody tr.picked:hover td { background: transparent; }
}
/* Sevas attended, at the top of a volunteer's record: a figure over its label, like the home page's numbers but small. */
.att-sum { margin: 2px 0 6px; min-height: 86px; }
.att-sum-title { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.att-sum dl { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.att-sum dl > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 68px; padding: 8px 12px; border-radius: 12px; background: var(--surface); }
.att-sum dt { font-size: 12px; color: var(--muted); }
.att-sum dd { margin: 0; font-size: 20px; font-weight: 680; line-height: 1.25; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.att-sum .when dd { font-size: 14px; font-weight: 600; line-height: 1.8; letter-spacing: 0; }
.att-sum p { margin: 6px 0 0; font-size: 12px; }

/* ───────── Team notes: numbered rows, a + to add, tap a number to move (web/js/team-notes-ui.js) ───────── */
.lh-notes { margin-top: 26px; }
.tn h3 { font-size: 15px; font-weight: 650; margin: 0 0 4px; }
.tn-row:last-of-type { border-bottom: 0; }
button.tn-num { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
button.tn-num:not(:disabled):hover { transform: none; box-shadow: 0 0 0 3px var(--ring); filter: none; }
button.tn-num.open { box-shadow: 0 0 0 2px var(--accent); }
.tn-text { font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.tn-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tn-for { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; }
.tn-for.mine { background: color-mix(in srgb, var(--saffron) 22%, var(--panel)); }
.tn-move { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.tn-move .tn-place { min-width: 34px; padding: 5px 0; text-align: center; }
.tn-move [data-remove] { margin-left: 8px; }
.tn-empty { margin: 4px 0 0; font-size: 14px; }
button.tn-plus { width: 34px; height: 34px; padding: 0; margin-top: 10px; border-radius: 50%; font-size: 20px; line-height: 1; display: inline-grid; place-items: center; }
.tn-form { margin-top: 10px; }
.tn-form textarea { width: 100%; }
.tn-formrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.tn-formrow select { width: auto; max-width: 100%; flex: 0 1 auto; }
.tn-gap { flex: 1; }
.tn-hint { font-size: 12.5px; margin: 6px 0 0; }

/* ───────── Plan a seva: the Upcoming / Log tabs, plan rows and a plan's page (web/js/seva-plans-ui.js) ───────── */
.tabs { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--saffron); }
.pl-acts { text-align: right; white-space: nowrap; } .pl-acts button + button { margin-left: 6px; }
.pl-hold { margin-bottom: 14px; }
.pl-actions { margin-top: 16px; gap: 8px; flex-wrap: wrap; align-items: center; }
table.kv th { text-align: left; vertical-align: top; font-weight: 600; color: var(--muted); }
@media (max-width: 700px) { .pl-acts { text-align: left; white-space: normal; } }

/* ───────── Home, for a lead: the late check-in bar and the Next seva card (planned sevas) ───────── */
.lh-late { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 22px; padding: 14px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--danger) 13%, var(--panel)); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.lh-late.due { background: color-mix(in srgb, var(--saffron) 14%, var(--panel)); border-color: color-mix(in srgb, var(--saffron) 45%, transparent); }
.lh-late-text { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; overflow-wrap: anywhere; }
.lh-late-text b { font-size: 15px; }
.lh-next { display: flex; flex-direction: column; gap: 3px; margin-top: 14px; padding: 16px 18px; border-radius: 16px; text-decoration: none;
  background: var(--blue); color: #fff; overflow-wrap: anywhere; }
.lh-next:hover { background: var(--blue-dark); }
.lh-next-top { font-size: 13px; font-weight: 600; color: var(--saffron); }
.lh-next b { font-size: clamp(20px, 3.4vw, 28px); line-height: 1.2; font-weight: 720; letter-spacing: -0.01em; }
.lh-next-what { font-size: 15px; font-weight: 600; }
.lh-next-where { font-size: 13.5px; opacity: .9; }
.lh-next-open { align-self: flex-start; margin-top: 10px; padding: 6px 14px; border-radius: 999px; background: var(--saffron); color: #1b1f2a; font-size: 13px; font-weight: 700; }
.pl-quiet { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; margin-top: 8px; }
.pl-quiet > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
