/* CareMakers CRM — palette per Reference Documentation/CareMakers_Collective_
   Brand_Design_Reference.md (deck palette: slate-teal, cream, teal, coral,
   green, saffron; Poppins headings, Open Sans body; dashed-stitch motif). */
:root {
  --slate: #233849; --cream: #F5F3E9; --teal: #007890; --teal-dark: #00697F;
  --coral: #C67F6E; --coral-fill: #A85B47; --green: #60A830; --green-fill: #457C22;
  --saffron: #F8A020; --ink: #2E3A42; --muted: #646C74; --border: #E6E1D2;
  --card: #FFFFFF;
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: 'Open Sans', system-ui, sans-serif; background: var(--cream);
  color: var(--ink); font-size: 15px; min-height: 100vh; display: flex;
}
h1, h2, h3, .brand { font-family: 'Poppins', sans-serif; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── sidebar ── */
.sidebar {
  width: 220px; min-height: 100vh; background: var(--slate); color: var(--cream);
  display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0;
  height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 16px;
  font-weight: 600; font-size: 15px; line-height: 1.2; color: #fff;
}
.sidebar .brand img { width: 34px; height: 32px; }
.sidebar nav { flex: 1; padding: 8px; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; margin: 2px 0; border-radius: 8px;
  color: rgba(245,243,233,.85); font-weight: 600; font-size: 14px;
}
.sidebar nav a:hover { background: rgba(245,243,233,.08); text-decoration: none; }
.sidebar nav a.active { background: var(--teal); color: #fff; }
.sidebar nav .count {
  min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--saffron); color: var(--slate);
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center;
}
/* Admin and Help sit at the bottom, quieter than the workspaces */
.sidebar .nav-foot { margin-top: auto; padding-top: 8px; border-top: 1px dashed rgba(245,243,233,.22); }
.sidebar .nav-foot a { padding: 7px 12px; font-size: 13px; color: rgba(245,243,233,.7); }
.menu-toggle {
  display: none; margin-left: auto; padding: 6px 12px; border-radius: 999px; font: 600 13px 'Open Sans', sans-serif;
  background: transparent; color: #fff; border: 1px solid rgba(245,243,233,.45); cursor: pointer;
}
.menu-toggle:focus-visible, .sidebar nav a:focus-visible, .ws-tabs a:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* a workspace's pages, as tabs across the top (Finance draws its own, with counts) */
.ws-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 18px; padding-bottom: 10px;
           border-bottom: 1.5px dashed rgba(198,127,110,.55); }
.ws-tabs a { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--slate);
             white-space: nowrap; }
.ws-tabs a:hover { background: rgba(0,120,144,.08); text-decoration: none; }
.ws-tabs a[aria-current="page"] { background: var(--slate); color: #fff; }
.sidebar .tagline {
  padding: 14px 16px; font-style: italic; font-size: 12.5px; color: var(--coral);
  border-top: 1.5px dashed rgba(198,127,110,.55);
}

/* ── layout ── */
.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; gap: 14px; align-items: center; padding: 12px 24px;
  background: var(--card); border-bottom: 1px solid var(--border);
}
.topbar form.search { flex: 1; max-width: 480px; }
.topbar input[type=search] {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 999px; font: inherit; background: var(--cream);
}
.topbar .who { margin-left: auto; font-size: 13px; color: var(--muted); }
.content { padding: 22px 24px 48px; max-width: 1180px; }
.page-title { font-size: 22px; margin-bottom: 4px; color: var(--slate); }
.page-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

/* ── cards, grids ── */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; box-shadow: 0 1px 2px rgba(35,56,73,.05);
}
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 950px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.kpi .num { font-family: 'Poppins'; font-size: 26px; font-weight: 700; color: var(--slate); }
.kpi .lbl { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi .sub { font-size: 12.5px; color: var(--coral-fill); margin-top: 2px; }
.card h2 { font-size: 15px; color: var(--slate); margin-bottom: 10px; }
.mt { margin-top: 14px; }

/* ── tables ── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
     color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--border); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: #FBFAF4; }

/* ── badges & pills ── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
         font-weight: 700; white-space: nowrap; }
.badge.funder { background: rgba(0,120,144,.12); color: var(--teal-dark); }
.badge.partner { background: rgba(96,168,48,.15); color: var(--green-fill); }
.badge.volunteer { background: rgba(248,160,32,.18); color: #8a5a0a; }
.badge.board { background: rgba(198,127,110,.18); color: var(--coral-fill); }
.badge.donor { background: rgba(35,56,73,.1); color: var(--slate); }
.badge.plain { background: var(--cream); color: var(--muted); border: 1px solid var(--border); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px;
        font-weight: 600; background: var(--cream); border: 1px solid var(--border);
        color: var(--muted); }
.pill.inprogress { border-color: var(--teal); color: var(--teal-dark); }
.pill.onboarded { border-color: var(--green-fill); color: var(--green-fill); }
.pill.deadend { color: #9a9a92; }
.pill.warn { border-color: var(--saffron); color: #8a5a0a; background: rgba(248,160,32,.1); }
.resp { font-weight: 700; padding: 1px 8px; border-radius: 6px; font-size: 12px; }
.resp.Y { background: rgba(96,168,48,.15); color: var(--green-fill); }
.resp.N { background: rgba(198,127,110,.2); color: var(--coral-fill); }
.resp.q { background: rgba(248,160,32,.15); color: #8a5a0a; }
.resp.none { background: var(--cream); color: var(--muted); }

/* ── buttons & forms ── */
.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; border: 0;
       font: inherit; font-weight: 600; cursor: pointer; font-size: 13.5px; }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.coral { background: var(--coral-fill); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--ink); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn.link { background: none; color: var(--teal); padding: 0; font-weight: 600; }
input, select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid #d8d2c2; border-radius: 8px;
  background: #fff; width: 100%;
}
textarea { min-height: 74px; resize: vertical; }
label { font-size: 12.5px; font-weight: 700; color: var(--slate); display: block;
        margin: 10px 0 4px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.checks label { display: flex; gap: 6px; align-items: center; font-weight: 400;
                font-size: 13.5px; margin: 0; }
.checks input { width: auto; }

/* ── misc ── */
.fillbar { height: 10px; background: var(--cream); border: 1px solid var(--border);
           border-radius: 999px; overflow: hidden; }
.fillbar > div { height: 100%; background: var(--teal); }
.bar-row { display: grid; grid-template-columns: 160px 1fr 40px; gap: 10px;
           align-items: center; margin: 6px 0; font-size: 13.5px; }
.bar-row .bar { height: 14px; border-radius: 4px; background: var(--teal); min-width: 2px; }
.bar-row:nth-child(even) .bar { background: var(--green); }
.muted { color: var(--muted); font-size: 13px; }
.callout { border-left: 3px solid var(--coral); background: rgba(198,127,110,.07);
           padding: 10px 12px; border-radius: 0 8px 8px 0; font-size: 13.5px; }
.callout.teal { border-color: var(--teal); background: rgba(0,120,144,.06); }
.queue { border: 1.5px dashed var(--coral); border-radius: 10px; padding: 12px 14px;
         background: rgba(198,127,110,.05); }
.timeline { list-style: none; padding-left: 18px; border-left: 2px dashed var(--coral); }
.timeline li { margin: 0 0 14px 10px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -17.5px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.timeline li.auto::before { background: var(--teal); }
.flash { padding: 10px 14px; border-radius: 8px; background: rgba(96,168,48,.12);
         color: var(--green-fill); font-weight: 600; margin-bottom: 14px; }
.login-wrap { margin: auto; width: 340px; }
.login-wrap .card { padding: 26px; }
.login-logo { text-align: center; margin-bottom: 14px; }
.login-logo img { width: 64px; }
.error { color: #B5432E; font-size: 13.5px; margin-top: 8px; }
.two-col { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 950px) { .two-col { grid-template-columns: 1fr; } }
table.users td { vertical-align: middle; }

/* ── giving report ──
   Series colours validated with the dataviz palette checker (CVD-safe pair,
   both >= 3:1 on white): donations = teal nudged from --teal for chroma,
   ticket sales = --coral-fill. Identity is never colour-alone: legend, labels
   and the Type pills all name the series. */
:root { --gift: #007C9A; --tix: #A85B47; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.filters label { display: inline; margin: 0; }
.filters input[type=date] { width: auto; padding: 5px 8px; }
.filters .quick { font-size: 13px; color: var(--muted); }
.filters .csv { margin-left: auto; }
.kpi .note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi .num .of { font-size: 14px; color: var(--muted); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; margin-bottom: 8px; }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px;
              margin-right: 6px; vertical-align: -1px; }
.sw.gift, .seg.gift { background: var(--gift); }
.sw.tix, .seg.tix { background: var(--tix); }
.share { display: flex; gap: 2px; height: 22px; border-radius: 4px; overflow: hidden; }
.share .seg { flex-basis: 0; min-width: 3px; }
.minibar { display: flex; gap: 2px; height: 10px; border-radius: 3px; overflow: hidden; }
.minibar .seg { min-width: 2px; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.barcol { width: 34%; min-width: 120px; vertical-align: middle; }
.card-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
             justify-content: space-between; margin-bottom: 6px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
          color: var(--muted); border: 1px solid var(--border); }
.tabs a.on { background: var(--slate); border-color: var(--slate); color: #fff; }
.tabs a:hover { text-decoration: none; }
.table-scroll { overflow-x: auto; }
table.giving td { vertical-align: middle; }
table.months td:first-child { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.small { font-size: 12px; }
.pill.gift, .pill.tix { color: var(--ink); background: #fff; white-space: nowrap; }
table.giving td .pill:not(.gift):not(.tix) { border-radius: 8px; line-height: 1.35; }
.pill.gift { border-color: var(--gift); }
.pill.tix { border-color: var(--tix); }
.pill.gift::before, .pill.tix::before { content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.pill.gift::before { background: var(--gift); }
.pill.tix::before { background: var(--tix); }
.pill.ok { border-color: var(--green-fill); color: var(--green-fill); background: rgba(96,168,48,.08); }
.pill.bad { border-color: var(--coral-fill); color: #fff; background: var(--coral-fill); }
.pill.plain { color: var(--muted); }
.called { color: var(--green-fill); font-weight: 700; font-size: 13px; }
form.inline { display: inline; margin: 0; }
form.receipt-one { display: block; margin-top: 4px; }
.receipt-batch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 8px; }
table.giving .pickcol { width: 1%; padding-right: 0; }
.footnote { margin-top: 12px; max-width: 760px; line-height: 1.5; }

/* ── phones: sidebar becomes a top bar ── */
@media (max-width: 700px) {
  body { flex-direction: column; }
  .sidebar { width: auto; min-height: 0; height: auto; position: static; }
  .sidebar .brand { padding: 10px 16px; }
  .menu-toggle { display: inline-block; }
  .sidebar nav { display: none; padding: 0 8px 10px; }
  .sidebar.open nav { display: flex; }
  .sidebar .nav-foot { margin-top: 6px; }
  .sidebar .tagline { display: none; }
  .ws-tabs, .content .fin-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .topbar { flex-wrap: wrap; padding: 10px 16px; }
  .topbar form.search { flex: 1 1 100%; max-width: none; }
  .topbar .who { margin-left: 0; flex: 1; }
  .content { padding: 16px 16px 40px; }
  .filters .csv { margin-left: 0; }
  .barcol { display: none; }
}

/* ── tags ── */
.tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 1px 9px; border-radius: 999px;
       font-size: 12px; font-weight: 600; color: var(--teal-dark); background: #fff;
       border: 1px dashed var(--teal); white-space: nowrap; }
a.tag:hover, .tag a:hover { text-decoration: none; background: rgba(0,120,144,.06); }
.tag a { color: inherit; }
.tag-x { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1;
         padding: 0 0 0 4px; cursor: pointer; }
.tag-x:hover { color: var(--coral-fill); }
.tagpick { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tagpick .lbl { font-size: 12.5px; font-weight: 700; color: var(--slate); }
.tagcheck { display: inline-flex; gap: 5px; align-items: center; margin: 0; font-weight: 600;
            font-size: 13px; color: var(--ink); border: 1px dashed var(--teal); border-radius: 999px;
            padding: 3px 10px; background: #fff; }
.tagcheck input { width: auto; }
.tagpick select { width: auto; }

/* ── contacts: bulk actions; text previews ── */
.bulkbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
           background: var(--slate); color: #fff; padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; }
.bulkbar[hidden] { display: none; }
.bulkbar input { width: auto; }
.bulkbar .btn.ghost { background: #fff; }
.bulkbar .btn.link { color: #fff; text-decoration: underline; }
.bulkbar .sep { width: 1px; height: 22px; background: rgba(255,255,255,.35); margin: 0 4px; }
.sms-bubble { background: #E9EEF2; color: var(--ink); border-radius: 16px 16px 16px 4px; padding: 10px 14px;
              max-width: 360px; white-space: pre-line; font-size: 14.5px; line-height: 1.45; }

/* ── modal dialog (Contacts → OK to text) ── */
.dlg { margin: auto; /* the global * { margin: 0 } reset would pin it top-left */
  border: 1px solid var(--border); border-radius: 12px; padding: 22px; width: min(440px, calc(100vw - 32px));
  color: var(--ink); background: var(--card); box-shadow: 0 12px 40px rgba(35, 56, 73, .25); }
.dlg::backdrop { background: rgba(35, 56, 73, .45); }
.dlg h2 { font-size: 17px; color: var(--slate); margin-bottom: 8px; }
.dlg p { margin-bottom: 12px; line-height: 1.45; }
.dlg label { display: block; font-weight: 600; margin-bottom: 4px; }
.dlg input { width: 100%; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ── Offline gifts (gifts.html) ── */
.gift-form { padding: 6px 22px 22px; max-width: 860px; }
.gf-step { padding: 16px 0; border-bottom: 1.5px dashed var(--border); }
.gf-step:last-of-type { border-bottom: 0; }
.gf-step h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 6px; }
.gf-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--coral-fill); color: #fff; font-size: 13px; }
.gf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.gf-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .gf-grid, .gf-grid-3 { grid-template-columns: 1fr; } }
.gf-hint { display: block; font-size: 12.5px; margin-top: 4px; }
.gf-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.gf-price { font-weight: 600; color: var(--slate); margin-top: 10px; min-height: 1.2em; }
.gf-check { display: flex; gap: 10px; align-items: center; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.gf-check input { width: 18px; height: 18px; accent-color: var(--teal); }
.gf-check input:disabled + span { color: var(--muted); }

/* live contact search */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); list-style: none;
  padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(35, 56, 73, .16); max-height: 340px; overflow-y: auto; }
.combo-list li { padding: 8px 10px; border-radius: 7px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.combo-list li .muted { font-size: 12.5px; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: rgba(0, 120, 144, .09); }
.combo-list li.combo-create { color: var(--teal-dark); font-weight: 600; border-top: 1px dashed var(--border); margin-top: 2px; }

/* expanding panels: rows animate from 0 to their natural height */
.acc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.acc.open { grid-template-rows: 1fr; }
.acc > .acc-inner { overflow: hidden; min-height: 0; }
.acc.open > .acc-inner { padding-top: 2px; }
@media (prefers-reduced-motion: reduce) { .acc { transition: none; } }
.newc-box, .event-box { margin-top: 12px; padding: 14px 16px; border: 1.5px dashed var(--teal);
  border-radius: 10px; background: rgba(0, 120, 144, .04); }
.newc-box h3 { font-size: 14px; color: var(--slate); }
.chosen { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 6px;
  border: 1px solid var(--teal); border-radius: 10px; background: rgba(0, 120, 144, .06); }
.chosen[hidden] { display: none; }
.chosen-who { flex: 1; min-width: 0; }
.chosen-who b { font-size: 15.5px; }

/* segmented choice: real radios, styled as joined buttons */
.seg { border: 0; padding: 0; margin: 8px 0 4px; display: flex; flex-wrap: wrap; }
.seg legend { font-size: 12.5px; font-weight: 700; color: var(--slate); margin-bottom: 6px; padding: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label { margin: 0; padding: 8px 16px; border: 1px solid #d8d2c2; background: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink); }
.seg label:not(:first-of-type) { margin-left: -1px; }
.seg label:first-of-type { border-radius: 8px 0 0 8px; }
.seg label:last-of-type { border-radius: 0 8px 8px 0; }
.seg input:checked + label { background: var(--teal); border-color: var(--teal); color: #fff; position: relative; }
.seg input:focus-visible + label { outline: 2px solid var(--slate); outline-offset: 2px; position: relative; }
.seg input:disabled + label { opacity: .45; cursor: not-allowed; }

/* confirmation overlay */
.dlg-wide { width: min(560px, calc(100vw - 32px)); }
.cf { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 4px 0 12px; }
.cf dt { font-weight: 700; color: var(--slate); font-size: 13px; padding-top: 1px; }
.cf dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.cf-warn { display: block; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }

tr.voided td { color: var(--muted); text-decoration: line-through; }
tr.voided td:last-child { text-decoration: none; }
.table-scroll { overflow-x: auto; }

.dup-warn { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--saffron); border-radius: 10px;
  background: rgba(248, 160, 32, .1); }
.dup-warn p { margin-bottom: 8px; }
.combo input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/* ── action items: visibility pills, add form ── */
.pill.vis-private { border-color: var(--coral-fill); color: var(--coral-fill); }
.pill.vis-board { border-color: var(--teal); color: var(--teal-dark); }
.pill.vis-everyone { border-color: var(--green-fill); color: var(--green-fill); }
.task-add { display: grid; grid-template-columns: 2fr 1.4fr 0.9fr 1.3fr 0.9fr auto; gap: 0 10px; align-items: start; }
.task-add label { margin-top: 0; }
.owner-other { margin-top: 6px; }
@media (max-width: 1100px) { .task-add { grid-template-columns: 1fr 1fr; } }

/* ── action items: status (To do / In progress / Done) and the filters, 2026-11-04 ── */
.task-tabs { margin: 0.25rem 0 0.75rem; }
.task-tabs .n, .tf-more summary .n { display: inline-block; min-width: 1.4em; padding: 0 0.35em; margin-left: 0.2em;
  border-radius: 999px; background: var(--cream); color: var(--slate); font-size: 0.8em; text-align: center; }
.task-tabs a[aria-current="page"] .n { background: rgba(255,255,255,.2); color: #fff; }
.task-filters { margin-bottom: 0.5rem; }
.tf-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 0 0.75rem; align-items: start; }
.tf-grid label, .tf-label { margin-top: 0; }
.tf-label { font-size: 0.78rem; font-weight: 700; color: var(--slate); display: block; margin-bottom: 0.25rem; }
.tf-more { margin-top: 0.75rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.tf-more summary { cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--slate); }
.tf-more summary:focus-visible, .status-set button:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.tf-more[open] summary { margin-bottom: 0.6rem; }
.tf-more .tf-grid { grid-template-columns: repeat(5, 1fr); }
.tf-chip { display: inline-flex; gap: 0.5rem; align-items: center; padding: 0.35rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--teal); color: var(--teal-dark); font-size: 0.85rem; font-weight: 600; }
.tf-chip a { font-weight: 700; }
.tf-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.75rem; }
.tf-summary { font-size: 0.82rem; color: var(--muted); margin: 0 0 0.6rem; }
.status-set { display: inline-flex; margin: 0; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.status-set button { border: 0; border-right: 1px solid var(--border); background: #fff; color: var(--ink);
  font: inherit; font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.6rem; cursor: pointer; white-space: nowrap; }
.status-set button:last-child { border-right: 0; }
.status-set button:hover { background: var(--cream); }
.status-set button[aria-pressed="true"] { color: #fff; cursor: default; }
.status-set button.st-todo[aria-pressed="true"] { background: var(--slate); }
.status-set button.st-doing[aria-pressed="true"] { background: var(--teal-dark); }
.status-set button.st-done[aria-pressed="true"] { background: var(--green-fill); }
.st-when { font-size: 0.72rem; margin-top: 0.2rem; }
.pill.st-todo { color: var(--slate); }
.pill.st-doing { border-color: var(--teal); color: var(--teal-dark); }
.pill.st-done { border-color: var(--green-fill); color: var(--green-fill); }
tr.task-done td:first-child { color: var(--muted); }
@media (max-width: 1100px) { .tf-grid, .tf-more .tf-grid { grid-template-columns: 1fr 1fr; } .tf-q { grid-column: 1 / -1; } }
@media (max-width: 560px) { .tf-grid, .tf-more .tf-grid { grid-template-columns: 1fr; } }

/* ── event table plan + guests ── */
.tplan { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tcard { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 13.5px; }
.tcard-top { display: flex; justify-content: space-between; align-items: baseline; }
.tcount { font-weight: 700; color: var(--slate); }
.tcard.full { border-color: var(--saffron); background: rgba(248, 160, 32, .07); }
.tcard.over { border-color: #B5432E; background: rgba(181, 67, 46, .07); }
.tcard.over .tcount { color: #B5432E; }
.tcard-host { margin: 4px 0 2px; min-height: 1.3em; overflow-wrap: anywhere; }
.g-name { max-width: 230px; padding: 5px 8px; }
.g-seat { padding: 5px 8px; }

/* ── volunteers ── */
.vol-add { display: grid; grid-template-columns: 1.2fr 1.5fr 1fr auto; gap: 0 10px; }
.vol-add label { margin-top: 0; }
.vol-row { display: grid; grid-template-columns: 1fr 1fr 70px 1.6fr auto auto; gap: 6px; align-items: center; }
.vol-row input { padding: 6px 8px; }
@media (max-width: 800px) { .vol-add, .vol-row { grid-template-columns: 1fr; } }

/* ── check-in (phones and tablets first) ── */
.ci { max-width: 1100px; container: ci / inline-size; }
.ci-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ci-total { font-family: 'Poppins', sans-serif; color: var(--slate); }
.ci-total b { font-size: 30px; color: var(--green-fill); }
.ci-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px;
  position: sticky; top: 0; background: var(--cream); padding: 8px 0; z-index: 5; }
.ci-tools input[type="search"] { flex: 1; min-width: 200px; font-size: 17px; padding: 12px 14px; }
.ci-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
/* narrow (phones, and any browser without container queries): a card per guest, name and
   table on top, then party, affiliation and recognition, each labelled, then the button */
.ci-colhead { display: none; }
.ci-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.ci-row.is-in { background: rgba(96, 168, 48, .07); border-color: rgba(69, 124, 34, .35); }
.ci-who { min-width: 0; }
.ci-who b { font-size: 17px; overflow-wrap: anywhere; }
.ci-cell { min-width: 0; font-size: 14px; color: var(--slate); overflow-wrap: anywhere; line-height: 1.25; grid-column: 1 / -1; }
.ci-cell:empty { display: none; }
.ci-party { order: 1; font-size: 13px; color: var(--muted); }
.ci-aff { order: 2; }
.ci-rec { order: 3; }
.ci-lbl { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ci-party .ci-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ci-table { text-align: center; min-width: 56px; line-height: 1.1; }
.ci-table .ci-none { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ci-table b { font-family: 'Poppins', sans-serif; font-size: 22px; color: var(--slate); }
.ci-btn { min-width: 112px; min-height: 48px; border-radius: 10px; border: 0; cursor: pointer; font: inherit;
  font-weight: 700; font-size: 16px; background: var(--teal); color: #fff; order: 4; grid-column: 1 / -1; width: 100%; }
.ci-row > .pill { order: 4; grid-column: 1 / -1; justify-self: start; }
.ci-btn:hover { background: var(--teal-dark); }
.ci-btn.done { background: var(--green-fill); }
.ci-btn:disabled { opacity: .6; cursor: wait; }
.ci-btn:focus-visible { outline: 3px solid var(--slate); outline-offset: 2px; }
/* wide enough: one row per guest in columns, like the printed list */
@container ci (min-width: 700px) {
  .ci-colhead, .ci-row { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr) 56px 120px;
    column-gap: 14px; }
  .ci-colhead { display: grid; padding: 0 15px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase;
    letter-spacing: .04em; font-weight: 600; }
  .ci-colhead .c { text-align: center; }
  .ci-row > * { order: 0; grid-column: auto; }
  .ci-row > .pill { grid-column: auto; justify-self: center; }
  .ci-cell:empty { display: block; }
  .ci-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ci-btn { width: auto; }
}

.csv-request { display: flex; justify-content: flex-end; margin: -4px 0 12px; }

/* guest list: this person's card may duplicate one already in Contacts */
.g-dup { margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: #8a5a0a; background: rgba(248,160,32,.1);
  border-radius: 6px; padding: 3px 7px; }
.g-dup a { color: inherit; font-weight: 600; }
.g-held { margin-top: 2px; font-size: 12.5px; line-height: 1.5; background: rgba(0,120,144,.07); border-radius: 6px; padding: 3px 7px; }
.g-held .btn.link { padding: 0 4px; }

/* pledge cards (pledges.py): the typing-up form, and the event page's list */
.pf-person { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: rgba(0,120,144,.05); max-width: 560px; }
.pf-person[hidden] { display: none; }
.pf-new { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 8px; max-width: 640px; }
.pf-set { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.pf-set legend { font-size: 12.5px; font-weight: 700; color: var(--slate); margin-bottom: 6px; padding: 0; }
.pf-helps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.pf-helps label, .pf-roles label { display: flex; gap: 7px; align-items: flex-start; font-weight: 400; font-size: 14px;
  color: var(--ink); margin: 0; }
.pf-helps input, .pf-roles input { width: auto; margin-top: 3px; }
.pf-roles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline;
  margin: -2px 0 4px 22px; padding: 6px 10px; border-left: 2px solid var(--border); }
.pf-roles.off { opacity: .55; }
@media (max-width: 700px) { .pf-helps { grid-template-columns: 1fr; } }
.pl-sum { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; margin: -2px 0 10px; }
.pl-sum b { color: var(--slate); }
.pl-notes { max-width: 360px; white-space: pre-line; font-size: 13px; }
.g-pledge { margin-top: 3px; font-size: 12.5px; }
.g-att { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; font-size: 13px; color: var(--ink);
  margin: 0; white-space: nowrap; cursor: pointer; }
.g-att input { width: auto; }
.g-att.is-in span { color: var(--green-fill); font-weight: 600; }

/* event page: Raised box (pledges.raised) */
.raised-tbl { max-width: 560px; font-size: 14px; }
.raised-tbl td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.raised-tbl td.amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.raised-tbl td.ind { padding-left: 22px; }
.raised-tbl tr.sub td { padding-top: 10px; font-weight: 600; color: var(--slate); border-bottom: 0; }
.raised-tbl tr.tot td { font-weight: 700; color: var(--slate); border-top: 2px solid var(--border); }
