/* Events: one app, two layouts.
   Desktop (>= 1024px): fixed sidebar with grouped navigation, wide content, real tables.
   Phone: top app bar, bottom tab bar for the main places, a drawer for everything else,
   and tables that reflow into cards. The tenant's accent is set at runtime on :root. */

:root {
  --accent: #0B4F4A;
  --accent-text: #ffffff;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --sidebar: #15181d;
  --sidebar-text: #c9ced6;
  --sidebar-strong: #ffffff;
  --sidebar-hover: #222730;
  --text: #15181d;
  --muted: #5b616c;
  --line: #e1e4e9;
  --line-strong: #cfd4db;
  --ok: #1b7343;
  --ok-bg: #e5f3eb;
  --warn: #835400;
  --warn-bg: #fcf1d8;
  --bad: #b3261e;
  --bad-bg: #fbe8e6;
  --info: #1d5aa0;
  --info-bg: #e6eff9;
  --r: 8px;
  --r-lg: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 18px 48px rgba(0, 0, 0, .28);
  --side-w: 248px;
  --bar-h: 56px;
  --bottom-h: 64px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #101216;
    --surface: #181b20;
    --surface-2: #1f232a;
    --sidebar: #0b0d10;
    --sidebar-hover: #1a1e25;
    --text: #eceef2;
    --muted: #a2a8b3;
    --line: #2b3038;
    --line-strong: #3a404a;
    --ok: #6fd39b; --ok-bg: #16301f;
    --warn: #f0c060; --warn-bg: #352a10;
    --bad: #ff8a80; --bad-bg: #3a1a18;
    --info: #8cb8f0; --info-bg: #172840;
    --shadow: none;
    color-scheme: dark;
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--info); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--s2); }
h1 { font-size: 1.5rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 var(--s3); }
svg.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.boot { padding: 2rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 60; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ── app shell ───────────────────────────────────────────────────────── */
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow-y: auto;
}
.side-brand {
  background: var(--accent);
  color: var(--accent-text);
  padding: var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 72px;
}
.side-brand img { height: 40px; width: auto; max-width: 96px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; }
.side-brand .name { font-weight: 700; line-height: 1.25; font-size: 1rem; }
.side-brand .sub { font-size: .75rem; opacity: .85; }
.side nav { padding: var(--s3) var(--s2); flex: 1; }
.side .group { margin-bottom: var(--s4); }
.side .group-label { font-size: .72rem; font-weight: 700; color: #8a919c; padding: var(--s2) var(--s3) var(--s1); }
.side a.nav {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 9px var(--s3);
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
}
.side a.nav:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }
.side a.nav[aria-current="page"] { background: var(--sidebar-hover); color: var(--sidebar-strong); box-shadow: inset 3px 0 0 var(--accent); }
.side a.nav .badge { margin-left: auto; }
.side-foot { border-top: 1px solid #262b33; padding: var(--s3) var(--s4) var(--s4); }
.side-foot .who { color: var(--sidebar-strong); font-weight: 600; }
.side-foot .role { font-size: .8rem; color: #8a919c; margin-bottom: var(--s2); }
.side-foot select { width: 100%; margin-bottom: var(--s2); background: var(--sidebar-hover); color: var(--sidebar-strong); border: 1px solid #333944; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: .85rem; }
.side-foot button { width: 100%; background: transparent; color: var(--sidebar-text); border: 1px solid #333944; border-radius: 6px; padding: 8px; font: inherit; font-size: .875rem; cursor: pointer; }
.side-foot button:hover { color: #fff; border-color: #555d6a; }

.content { margin-left: var(--side-w); min-height: 100vh; }
main { max-width: 1240px; margin: 0 auto; padding: var(--s6) 40px 64px; }
.narrow { max-width: 440px; margin: 2rem auto; }
.appbar, .bottom, .scrim { display: none; }

.badge {
  display: inline-block;
  min-width: 1.35rem;
  padding: 0 .4rem;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.35rem;
  text-align: center;
}

/* Phone and tablet: top bar, bottom tabs, sidebar becomes a drawer */
@media (max-width: 1023px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; width: min(84vw, 300px); box-shadow: var(--shadow-pop); }
  .side.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(8, 10, 14, .5); z-index: 35; }
  .content { margin-left: 0; }
  .appbar {
    display: flex;
    align-items: center;
    gap: var(--s3);
    position: sticky;
    top: 0;
    z-index: 30;
    height: calc(var(--bar-h) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) var(--s4) 0 var(--s2);
    background: var(--accent);
    color: var(--accent-text);
  }
  .appbar button { background: none; border: 0; color: inherit; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; }
  .appbar .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .appbar img { height: 30px; width: auto; max-width: 80px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px; }
  .bottom {
    display: flex;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 30;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom a, .bottom button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 2px 6px;
    min-height: var(--bottom-h);
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    font-size: .7rem;
    font-weight: 600;
    background: none;
    border: 0;
    position: relative;
    cursor: pointer;
  }
  .bottom svg.ic { width: 24px; height: 24px; }
  .bottom [aria-current="page"] { color: var(--accent); }
  :root[data-theme="dark"] .bottom [aria-current="page"] { color: var(--text); }
  .bottom .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
  main { padding: var(--s4) var(--s4) calc(var(--bottom-h) + 40px); }
  h1 { font-size: 1.3rem; }
}

/* ── page structure ──────────────────────────────────────────────────── */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2) var(--s4); margin-bottom: var(--s5); }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--s2); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s4); }
.toolbar select, .toolbar input[type=search] { width: auto; min-width: 11rem; }
.toolbar input[type=search] { flex: 1 1 14rem; max-width: 22rem; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.seg a { padding: 7px 14px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .875rem; background: var(--surface); }
.seg a + a { border-left: 1px solid var(--line-strong); }
.seg a[aria-current="page"] { background: var(--text); color: var(--surface); }

/* Two-column layouts on desktop: main column + side panel */
.split { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.split > .aside { position: sticky; top: var(--s5); }
.stats { display: grid; gap: var(--s4); grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--s5); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
.stat .k { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat .v { font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .v.bad { color: var(--bad); }
.stat .h { font-size: .8rem; color: var(--muted); }
a.stat:hover { border-color: var(--line-strong); }
.cols2 { display: grid; gap: var(--s5); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

@media (max-width: 1180px) { .split { grid-template-columns: minmax(0, 1fr) 280px; } }
@media (max-width: 900px) {
  .split, .cols2 { grid-template-columns: 1fr; }
  .split > .aside { position: static; order: -1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .stat .v { font-size: 1.5rem; }
}

/* ── surfaces ────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: var(--s5);
  margin-bottom: var(--s4);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { color: var(--muted); font-size: .85rem; }
.card-head .actions { margin-left: auto; display: flex; gap: var(--s2); flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.row > .grow { flex: 1 1 12rem; min-width: 0; }
.stack > * + * { margin-top: var(--s3); }
.grid2 { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.empty { text-align: center; color: var(--muted); padding: var(--s6) var(--s4); }
.notes { white-space: pre-wrap; background: var(--surface-2); border-left: 3px solid var(--line-strong); padding: 6px 10px; border-radius: 4px; font-size: .875rem; margin-top: 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.date-chip { display: inline-grid; place-items: center; width: 52px; height: 56px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); flex: none; line-height: 1.05; }
.date-chip b { font-size: 1.2rem; }
.date-chip span { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }

/* Board: one event per card, shifts as rows that line up like a table on desktop */
.board-event .card-head { gap: var(--s4); }
.shift-row { display: grid; grid-template-columns: minmax(10rem, 1.3fr) minmax(10rem, 1fr) 8rem 17rem; gap: var(--s4); align-items: center; padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.shift-row:first-of-type { border-top: 0; }
.shift-row .pos { font-weight: 600; }
.shift-row .act { justify-self: end; text-align: right; }
.shift-row .notes { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 760px) {
  .shift-row { grid-template-columns: 1fr auto; gap: 2px var(--s3); padding: var(--s3) var(--s4); }
  .shift-row .when, .shift-row .spots { grid-column: 1; }
  .shift-row .act { grid-column: 2; grid-row: 1 / span 3; align-self: center; max-width: 45vw; }
  /* A sentence (why you cannot take it) gets its own line instead of squeezing the details. */
  .shift-row:has(.act > span.small) .act { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; text-align: left; max-width: none; margin-top: 4px; }
  .shift-row .act > span.small { max-width: none !important; }
}

/* ── status chips and fill bars ──────────────────────────────────────── */
.chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chip.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.fill { display: flex; align-items: center; gap: var(--s2); font-size: .85rem; color: var(--muted); min-width: 9rem; }
.fill .bar { flex: 1; min-width: 4rem; height: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.fill .bar i { display: block; height: 100%; background: var(--accent); }
.fill .bar i.full { background: var(--ok); }

/* ── forms and buttons ───────────────────────────────────────────────── */
label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 4px; }
.field { margin-bottom: var(--s4); }
.field .hint { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 8px 10px;
  min-height: 40px;
}
input:hover, select:hover, textarea:hover { border-color: #a9b0ba; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--info); outline-offset: 0; border-color: var(--info); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
textarea { min-height: 6rem; resize: vertical; }
input[type=color] { width: 3.5rem; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: var(--s2); }
.check input { width: 1.1rem; height: 1.1rem; margin-top: 3px; flex: none; accent-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: .875rem;
  min-height: 38px; padding: 7px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #a9b0ba; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--bad); border-color: currentColor; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: .82rem; }
.btn.link { border: 0; background: none; color: var(--info); padding: 4px; min-height: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.error-box { background: var(--bad-bg); color: var(--bad); padding: 10px 14px; border-radius: var(--r); margin-bottom: var(--s4); }
.info-box { background: var(--info-bg); color: var(--info); padding: 10px 14px; border-radius: var(--r); margin-bottom: var(--s4); }
.token { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; word-break: break-all; background: var(--surface-2); border: 1px dashed var(--line-strong); padding: 10px; border-radius: var(--r); }
@media (max-width: 1023px) {
  .btn { min-height: 44px; }
  .btn.small { min-height: 38px; }
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
  input[type=date], input[type=datetime-local], input[type=search], input[type=url], select { min-height: 44px; font-size: 16px; }
}

/* Add-shifts grid */
.shift-grid { display: grid; gap: var(--s2); }
.shift-grid .gr { display: grid; gap: var(--s2) var(--s3); grid-template-columns: 1fr; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.shift-grid .gr .field { margin-bottom: 0; }
@media (min-width: 900px) {
  .shift-grid .gr { grid-template-columns: 1.5fr 1.3fr 1.3fr .6fr .9fr auto; align-items: end; }
  .shift-grid .gr .notes-in { grid-column: 1 / -1; }
}

/* ── tables: real tables on desktop, stacked cards on phones ─────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
td.check-col, th.check-col { width: 40px; }
@media (max-width: 760px) {
  table.rt thead { display: none; }
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; }
  table.rt tr { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); position: relative; }
  table.rt tbody tr:last-child { border-bottom: 0; }
  table.rt td { border: 0; padding: 2px 0; }
  table.rt td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; }
  table.rt td.primary-cell::before, table.rt td.actions::before { content: none; }
  table.rt td.primary-cell { font-size: 1rem; padding-right: 2.5rem; }
  table.rt td.actions { text-align: left; padding-top: var(--s2); }
  table.rt td.check-col { position: absolute; right: var(--s3); top: var(--s3); width: auto; }
  tbody tr:hover td { background: none; }
}

/* ── dialogs and toasts ──────────────────────────────────────────────── */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgba(8, 10, 14, .55); }
dialog form, dialog .dlg { padding: var(--s5); }
dialog h2 { margin-bottom: var(--s4); }
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: grid; gap: var(--s2); width: min(92vw, 400px); }
.toast { background: #23262d; color: #fff; padding: 12px 16px; border-radius: var(--r); box-shadow: var(--shadow-pop); }
.toast.bad { background: var(--bad); }
@media (max-width: 1023px) {
  .toasts { right: 50%; transform: translateX(50%); bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); }
  dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
}
@media (max-width: 520px) {
  .card { padding: var(--s4); }
  .card-head, .list > li { padding-left: var(--s4); padding-right: var(--s4); }
  .page-head .actions { margin-left: 0; width: 100%; }
  .page-head .actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Sign-in and public pages: no app shell */
.public { min-height: 100vh; display: grid; place-items: center; padding: var(--s4); }
.public .narrow { margin: 0; width: min(100%, 420px); }
.public .card { padding: var(--s6); }
@media (max-width: 520px) { .public .card { padding: var(--s5); } }

/* Card grids (My shifts) and three-up sections */
.card-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
.card-grid > .card { margin-bottom: 0; }
.cols3 { display: grid; gap: var(--s5); grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1180px) { .cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cols3 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .card-grid { grid-template-columns: 1fr; } }

/* A card header that stacks its content (shift cards, setup sections) */
.event-head { padding: var(--s4) var(--s5); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.event-head h2, .event-head h3 { margin: 0; }
@media (max-width: 520px) { .event-head { padding: var(--s3) var(--s4); } }

/* Links inside tables and lists read as names, not as blue web links */
td a:not(.btn):not(.chip), .list a:not(.btn):not(.chip), .card-head a:not(.btn) { color: var(--text); text-decoration: none; }
td a:not(.btn):not(.chip):hover, .list a:not(.btn):not(.chip):hover { text-decoration: underline; color: var(--accent); }
:root[data-theme="dark"] td a:not(.btn):not(.chip):hover, :root[data-theme="dark"] .list a:not(.btn):not(.chip):hover { color: var(--text); }
.page-head .small a { color: var(--muted); text-decoration: none; }
.page-head .small a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  table.rt td:empty { display: none; }
  table.rt td[data-label] > div { display: inline; }
  table.rt td[data-label] > div > div { display: inline; margin-left: .35em; }
  table.rt td[data-label] > div > div::before { content: "· "; }
}

/* ── calendar ────────────────────────────────────────────────────────── */
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: -8px 0 var(--s3); font-size: .82rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s4); align-items: start; }
.cal-card { margin: 0; }
.cal-day { margin: 0; position: sticky; top: var(--s5); }
.cal-grid { display: grid; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head > div { padding: 8px 10px; font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-head .short { display: none; }
.cal-cell { min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.cal-row > .cal-cell:last-child { border-right: 0; }
.cal-grid > .cal-row:last-child .cal-cell { border-bottom: 0; }
.cal-cell.out { background: var(--surface-2); }
.cal-cell.out .cal-num { color: var(--muted); }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-num { border: 0; background: none; font: inherit; font-weight: 600; font-size: .85rem; width: 28px; height: 28px; border-radius: 999px; cursor: pointer; color: var(--text); padding: 0; }
.cal-cell.today .cal-num { background: var(--accent); color: var(--accent-text); }
.cal-items { display: grid; gap: 3px; margin-top: 2px; }
.cal-ev { display: block; font-size: .78rem; line-height: 1.3; padding: 3px 6px; border-radius: 4px; text-decoration: none; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; background: var(--surface-2); }
.cal-ev:hover { filter: brightness(.96); }
.cal-ev .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-ev .f { color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-more { border: 0; background: none; color: var(--info); font: inherit; font-size: .78rem; font-weight: 600; text-align: left; padding: 0 6px; cursor: pointer; }
.cal-dots { display: none; gap: 3px; justify-content: center; margin-top: 4px; }
.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; flex: none; background: var(--muted); }
/* Tones: the fill color and the event's left edge */
.t-full { border-color: var(--ok); } .cal-ev.t-full { background: var(--ok-bg); } .cal-dot.t-full { background: var(--ok); }
.t-filling { border-color: var(--accent); } .cal-dot.t-filling { background: var(--accent); }
.t-short { border-color: var(--bad); } .cal-ev.t-short { background: var(--bad-bg); } .cal-dot.t-short { background: var(--bad); }
.t-draft { border-color: var(--line-strong); border-left-style: dashed; } .cal-ev.t-draft { background: transparent; color: var(--muted); } .cal-dot.t-draft { background: transparent; border: 1.5px dashed var(--muted); }
.t-cancelled { border-color: var(--line-strong); } .cal-ev.t-cancelled { text-decoration: line-through; color: var(--muted); }
.t-mine { border-color: var(--ok); } .cal-ev.t-mine { background: var(--ok-bg); } .cal-dot.t-mine { background: var(--ok); }
.t-asked { border-color: var(--info); } .cal-ev.t-asked { background: var(--info-bg); } .cal-dot.t-asked { background: var(--info); }
.t-open { border-color: var(--accent); } .cal-dot.t-open { background: var(--accent); }
@media (max-width: 1180px) { .cal-wrap { grid-template-columns: 1fr; } .cal-day { position: static; } }
@media (max-width: 760px) {
  .cal-head .long { display: none; }
  .cal-head .short { display: inline; }
  .cal-head > div { text-align: center; padding: 6px 2px; }
  .cal-cell { min-height: 56px; padding: 4px 2px; text-align: center; }
  .cal-items { display: none; }
  .cal-dots { display: flex; }
}

/* ── support mode banner (HDM inside a tenant) ───────────────────────── */
.support-bar { background: #fdf3d6; color: #5c4300; border-bottom: 1px solid #ecd9a0; padding: 8px 40px; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; font-size: .875rem; }
.support-bar button { margin-left: auto; }
@media (max-width: 1023px) { .support-bar { padding: 8px var(--s4); } }

/* Calendar, large: the grid takes the full width; the chosen day is listed under it. */
.cal-wrap { grid-template-columns: 1fr; }
.cal-day { position: static; }
.cal-cell { min-height: 132px; }
.cal-ev { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; padding: 4px 7px; }
.cal-ev .n { font-weight: 600; }
.cal-ev .m { display: block; color: var(--muted); font-size: .74rem; }
.t-filling { border-color: var(--info); } .cal-ev.t-filling { background: var(--info-bg); } .cal-dot.t-filling { background: var(--info); }
.t-open { border-color: var(--info); } .cal-ev.t-open { background: var(--info-bg); } .cal-dot.t-open { background: var(--info); }
@media (max-width: 760px) { .cal-cell { min-height: 56px; } }

/* ── calendar day popup ──────────────────────────────────────────────── */
.cal-tip { margin: -6px 0 var(--s3); }
.cal-cell { user-select: none; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.out:hover { background: var(--line); }
.cal-menu {
  position: fixed;
  z-index: 70;
  width: 300px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 6px;
}
.cal-menu-head { display: flex; align-items: center; gap: var(--s2); padding: 6px 6px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cal-menu-x { margin-left: auto; border: 0; background: none; font-size: 1.4rem; line-height: 1; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; color: var(--muted); }
.cal-menu-x:hover { background: var(--surface-2); color: var(--text); }
.cal-menu-ev, .cal-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 6px; border: 0; background: none;
  font: inherit; font-size: .9rem; text-align: left; color: var(--text); text-decoration: none; cursor: pointer;
}
.cal-menu-ev .grow { min-width: 0; }
.cal-menu-ev:hover, .cal-menu-item:hover, .cal-menu-ev:focus-visible, .cal-menu-item:focus-visible { background: var(--surface-2); }
.cal-menu-ev + .cal-menu-item, .cal-menu-ev + .cal-menu-item.primary { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.cal-menu-item.primary { color: var(--accent); font-weight: 600; }
:root[data-theme="dark"] .cal-menu-item.primary { color: var(--text); }
.cal-menu-item svg.ic { color: var(--muted); }
.cal-menu.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 14px 14px 0 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.cal-menu.sheet .cal-menu-ev, .cal-menu.sheet .cal-menu-item { min-height: 48px; }
@media (max-width: 760px) { .cal-tip { display: none; } }

/* ── sidebar styles (organization setting) ───────────────────────────── */
.side.side-light {
  --sidebar: #ffffff; --sidebar-text: #3d434d; --sidebar-strong: #15181d; --sidebar-hover: #f0f2f5;
  border-right: 1px solid var(--line);
}
.side.side-light .side-foot { border-top-color: var(--line); }
.side.side-light .group-label, .side.side-light .side-foot .role { color: #6b717c; }
.side.side-light .side-foot select, .side.side-light .side-foot button { border-color: var(--line-strong); background: transparent; color: var(--sidebar-strong); }
.side.side-brand { --sidebar: var(--brand, var(--accent)); --sidebar-text: var(--brand-text, var(--accent-text)); --sidebar-strong: var(--brand-text, var(--accent-text)); --sidebar-hover: rgba(0, 0, 0, .18); }
.side.side-brand .side-brand { background: rgba(0, 0, 0, .18); }
.side.side-brand .group-label, .side.side-brand .side-foot .role { color: var(--accent-text); opacity: .75; }
.side.side-brand .side-foot { border-top-color: rgba(255, 255, 255, .2); }
.side.side-brand .side-foot select, .side.side-brand .side-foot button { border-color: currentColor; background: transparent; color: var(--accent-text); }
.side.side-brand a.nav[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent-text); }
:root[data-theme="dark"] .side.side-light { --sidebar: #181b20; --sidebar-text: #c9ced6; --sidebar-strong: #ffffff; --sidebar-hover: #22262d; }
.side-previews { display: flex; gap: var(--s3); flex-wrap: wrap; }
.side-preview { display: grid; gap: 6px; justify-items: center; font-weight: 500; font-size: .85rem; cursor: pointer; }
.side-preview input { position: absolute; opacity: 0; }
.side-preview .pv { width: 74px; height: 54px; border-radius: 6px; border: 2px solid var(--line-strong); display: grid; align-content: start; gap: 5px; padding: 8px 7px; }
.side-preview input:checked + .pv { border-color: var(--info); box-shadow: 0 0 0 2px var(--info-bg); }
.side-preview input:focus-visible + .pv { outline: 2px solid var(--info); outline-offset: 2px; }
.pv i { display: block; height: 5px; border-radius: 3px; background: currentColor; opacity: .55; }
.pv i:first-child { width: 70%; opacity: .9; }
.pv-dark { background: #15181d; color: #c9ced6; }
.pv-light { background: #fff; color: #3d434d; }
.pv-brand { background: var(--accent); color: var(--accent-text); }

/* ── event colors ────────────────────────────────────────────────────── */
.swatches { border: 0; padding: 0; margin: 0 0 var(--s4); }
.swatches legend { margin-bottom: 6px; }
.swatch { display: inline-block; margin: 0 6px 6px 0; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 999px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch span.none { background: repeating-linear-gradient(45deg, var(--surface) 0 5px, var(--line) 5px 6px); }
.swatch input:checked + span { border-color: var(--surface); box-shadow: 0 0 0 2px var(--text); }
.swatch input:focus-visible + span { outline: 2px solid var(--info); outline-offset: 3px; }
.event-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 999px; margin-right: 8px; vertical-align: middle; }
.page-head h1 .event-swatch { width: 14px; height: 14px; }
.series-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.series-dates a { text-decoration: none; }
.seg.small a { padding: 3px 10px; font-size: .8rem; }
.cal-legend .seg { margin-right: var(--s3); }

/* calendar popup rows with a Cancel action */
.cal-menu-row { display: flex; align-items: center; gap: 4px; }
.cal-menu-row .cal-menu-ev { flex: 1; min-width: 0; }
.cal-menu-cancel { border: 1px solid var(--line-strong); background: var(--surface); color: var(--bad); font: inherit; font-size: .8rem; font-weight: 600; border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.cal-menu-cancel:hover { background: var(--bad-bg); }
.cal-menu-row + .cal-menu-item { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; }

/* welcome message for staff, invite QR */
.welcome { display: flex; gap: var(--s3); align-items: flex-start; background: var(--info-bg); color: var(--text); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: var(--r); margin-bottom: var(--s4); }
.welcome p { margin: 0; flex: 1; white-space: pre-wrap; }
img.qr { image-rendering: pixelated; background: #fff; padding: 6px; border-radius: 6px; max-width: 100%; height: auto; }

/* Tighter navigation so admins see every item without scrolling on shorter screens */
.side a.nav { padding: 7px var(--s3); }
.side .group { margin-bottom: var(--s2); }
.side nav { padding: var(--s2) var(--s2); }

/* Password confirmation and reset code */
.pw-match.ok { color: var(--ok); }
.pw-match.bad { color: var(--bad); }
input.code-input { font-size: 1.4rem; letter-spacing: .3em; font-variant-numeric: tabular-nums; max-width: 12rem; }
dialog > form { padding: var(--s5); }

/* ── plans and pricing ───────────────────────────────────────────────── */
.plan-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; margin-bottom: var(--s5); }
@media (max-width: 1180px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plan-grid { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--accent); }
.plan.current { box-shadow: 0 0 0 3px var(--info-bg); border-color: var(--info); }
.plan h3 { font-size: 1.15rem; margin: 0 0 4px; }
.plan .ribbon { position: absolute; top: -12px; left: var(--s5); background: var(--accent); color: var(--accent-text); font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan .price { margin: 10px 0 14px; }
.plan .price b { font-size: 2rem; letter-spacing: -.02em; }
.plan .price span { color: var(--muted); }
.plan .btn { margin-top: auto; width: 100%; }
.plan .current-btn { background: var(--surface-2); color: var(--muted); cursor: default; }
.plan-list { list-style: none; padding: 0; margin: 0 0 var(--s4); font-size: .9rem; display: grid; gap: 7px; }
.plan-list li { padding-left: 22px; position: relative; }
.plan-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 10px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.seg.interval { margin-top: var(--s3); }
.usage { margin-top: var(--s3); }
.upgrade-card { text-align: center; padding: var(--s6) var(--s5); }
.upgrade-card h2 { margin: 10px 0 6px; }

/* Public pricing page */
main.pricing { max-width: 1180px; padding-top: var(--s5); }
.pricing-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s6); }
.brandmark { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.pricing-hero { text-align: center; max-width: 680px; margin: 0 auto var(--s6); }
.pricing-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.02em; margin-bottom: 12px; }
.pricing-hero p { font-size: 1.05rem; color: var(--muted); }
.pricing-foot { text-align: center; }
@media (max-width: 1023px) { main.pricing { padding-bottom: 48px; } }

/* ── feedback ────────────────────────────────────────────────────────── */
.feedback-bar { display: flex; align-items: center; gap: var(--s3); padding: 9px 40px; background: var(--info-bg); color: var(--text); border-bottom: 1px solid var(--line); font-size: .9rem; }
.feedback-bar .fb-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--info); flex: none; }
.fb-x { border: 0; background: none; font-size: 1.3rem; line-height: 1; width: 32px; height: 32px; border-radius: 6px; color: var(--muted); cursor: pointer; flex: none; }
.fb-x:hover { background: rgba(0, 0, 0, .06); color: var(--text); }
@media (max-width: 1023px) { .feedback-bar { padding: 8px var(--s4); flex-wrap: wrap; } .feedback-bar .grow { flex: 1 1 60%; } }
.side-feedback { display: flex; align-items: center; gap: 8px; width: 100%; background: transparent; border: 1px dashed #3a404a; color: var(--sidebar-text); border-radius: 6px; padding: 7px 10px; font: inherit; font-size: .85rem; cursor: pointer; margin-bottom: var(--s3); }
.side-feedback:hover { color: var(--sidebar-strong); border-color: #6b7380; }
.side.side-light .side-feedback, .side.side-brand .side-feedback { border-color: currentColor; color: inherit; }
.side-feedback svg.ic { width: 16px; height: 16px; }
.fb-types { border: 0; padding: 0; margin: 0 0 var(--s4); display: grid; gap: 6px; }
.fb-types legend { margin-bottom: 6px; }
.fb-type { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); font-weight: 400; cursor: pointer; margin: 0; }
.fb-type input { margin-top: 4px; accent-color: var(--accent); }
.fb-type span { display: grid; }
.fb-type:has(input:checked) { border-color: var(--info); background: var(--info-bg); }
.fb-item .msg { white-space: pre-wrap; margin: 8px 0; }
.fb-item .meta { font-size: .8rem; color: var(--muted); }

/* ── billing dashboard ───────────────────────────────────────────────── */
.stats.stats6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) { .stats.stats6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .stats.stats6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats6 .stat .v { font-size: 1.55rem; }
.rev-wrap { position: relative; }
.rev-chart { width: 100%; height: auto; display: block; }
.rev-chart .grid { stroke: var(--line); stroke-width: 1; }
.rev-chart .axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.rev-chart .bar { fill: var(--info); }
.rev-chart .hit { fill: transparent; cursor: default; }
.rev-chart .hit:hover, .rev-chart .hit:focus { fill: rgba(127, 127, 127, .08); outline: none; }
.rev-tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--text); color: var(--surface); font-size: .8rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; pointer-events: none; opacity: 0; white-space: nowrap; }
.rev-tip.on { opacity: 1; }
.billing-plan .kv { font-size: .95rem; }

/* A selected segment stays readable wherever it sits (card headers style links too) */
.seg a[aria-current="page"], .card-head .seg a[aria-current="page"] { background: var(--text); color: var(--surface); }

/* ── icon rail (desktop sidebar folded) ─────────────────────────────── */
.side-rail { display: flex; align-items: center; gap: 8px; width: 100%; background: transparent; border: 0; color: var(--sidebar-text); border-radius: 6px; padding: 7px 10px; font: inherit; font-size: .85rem; cursor: pointer; margin-bottom: var(--s2); }
.side-foot .side-rail { border: 0; width: 100%; padding: 7px 10px; text-align: left; }
.side-rail:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }
.side-rail svg.ic { width: 18px; height: 18px; }
@media (max-width: 1023px) { .side-rail { display: none; } }
@media (min-width: 1024px) {
  body.rail { --side-w: 68px; }
  body.rail .side { overflow-x: hidden; }
  body.rail .side .lbl, body.rail .side .group-label, body.rail .side-brand > div,
  body.rail .side-foot .who, body.rail .side-foot .role, body.rail .side-foot select, body.rail .side-foot > button:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.rail .side-brand { justify-content: center; padding: var(--s3) 6px; }
  body.rail .side-brand img { max-width: 48px; height: 32px; }
  body.rail .side a.nav { justify-content: center; padding: 10px 0; position: relative; }
  body.rail .side a.nav .badge { position: absolute; top: 2px; right: 4px; min-width: 1.1rem; line-height: 1.1rem; font-size: .65rem; padding: 0 .25rem; }
  body.rail .side .group { margin-bottom: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid rgba(127, 127, 127, .2); }
  body.rail .side-foot { padding: var(--s2) 6px var(--s3); }
  body.rail .side-feedback, body.rail .side-rail { justify-content: center; padding: 9px 0; }
  body.rail .side-feedback { border-style: solid; border-color: transparent; }
}

/* ── schedule board ────────────────────────────────────────────────── */
.sched-bar { justify-content: space-between; }
.sched-sums { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sched-sums a.chip { text-decoration: none; }
.sb-wrap { overflow-x: auto; }
.sb-grid { display: grid; grid-template-columns: 200px repeat(7, minmax(118px, 1fr)); min-width: 1026px; }
.sb-row { display: contents; }
.sb-row > div { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
.sb-row > div:last-child { border-right: 0; }
.sb-corner, .sb-dayhead { background: var(--surface-2); padding: 8px 10px; font-size: .78rem; font-weight: 600; color: var(--muted); position: sticky; top: 0; z-index: 1; }
.sb-corner { display: flex; align-items: flex-end; }
.sb-dayhead { display: flex; align-items: baseline; gap: 6px; }
.sb-dayhead b { font-size: 1.05rem; color: var(--text); font-variant-numeric: tabular-nums; }
.sb-dayhead.today b { background: var(--accent); color: var(--accent-text); border-radius: 999px; padding: 0 8px; }
.sb-rowhead { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); position: sticky; left: 0; z-index: 1; }
.sb-rowhead strong { font-size: .9rem; line-height: 1.3; overflow-wrap: anywhere; }
.sb-cell { padding: 6px; display: flex; flex-direction: column; gap: 6px; min-height: 64px; }
.sb-cell.today { background: color-mix(in srgb, var(--info-bg) 45%, transparent); }
.sb-attn > div { background: var(--surface-2); }
.sb-attn .sb-rowhead { background: var(--surface-2); }
.sb-attn-cell { display: flex; flex-wrap: wrap; gap: 4px; }
.sb-attn-cell a.chip { text-decoration: none; }
.sb-empty { font-size: .78rem; color: var(--muted); padding: 2px 4px; }
.sb-block { display: grid; gap: 3px; text-align: left; width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid; border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.sb-block:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.sb-block.t-full { border-left-color: var(--ok); }
.sb-block.t-filling { border-left-color: var(--info); }
.sb-block.t-short { border-left-color: var(--bad); background: var(--bad-bg); }
.sb-block.t-draft { border-left-style: dashed; border-left-color: var(--line-strong); color: var(--muted); }
.sb-time { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-name { font-size: .84rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.sb-name .event-swatch { width: 8px; height: 8px; margin-right: 5px; }
.sb-fill { display: block; height: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.sb-fill i { display: block; height: 100%; background: currentColor; }
.sb-block.t-full .sb-fill i { background: var(--ok); }
.sb-block.t-filling .sb-fill i { background: var(--info); }
.sb-block.t-short .sb-fill i { background: var(--bad); }
.sb-block.t-draft .sb-fill i { background: var(--muted); }
.sb-meta { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-req { color: var(--warn); font-weight: 700; }
.sched-list { display: grid; gap: var(--s3); }
.sched-day { display: grid; gap: 8px; padding: var(--s3) var(--s4); }
.sb-dialog .list > li { padding: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sb-dialog .list > li .grow { flex: 1 1 12rem; }

/* ── staff: next shift ─────────────────────────────────────────────── */
.next-shift { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-lg); padding: var(--s4) var(--s5); margin-bottom: var(--s5); box-shadow: var(--shadow); }
.ns-eyebrow { display: flex; justify-content: space-between; gap: var(--s3); font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.ns-when { color: var(--ok); }
.ns-main { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); align-items: center; }
.ns-main .grow { flex: 1 1 18rem; }
.ns-main h2 { font-size: 1.2rem; margin-bottom: 2px; }
.ns-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.ns-offer { display: block; margin-top: var(--s3); padding: 8px 12px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn); font-weight: 600; text-decoration: none; }
@media (max-width: 520px) { .next-shift { padding: var(--s3) var(--s4); } .ns-actions .btn { flex: 1 1 auto; } }

.side-initial { display: none; }
@media (min-width: 1024px) {
  body.rail .side { scrollbar-width: none; }
  body.rail .side-initial { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(0, 0, 0, .2); font-weight: 700; font-size: 1.1rem; }
}
.sched-none { display: flex; align-items: center; gap: var(--s2); padding: 4px var(--s2); font-size: .875rem; }
.sched-list { gap: var(--s2); }

/* ── announcements: unread badge, popup, feed ─────────────────────── */
.badge.new { background: var(--info); }
:root[data-theme="dark"] .badge.new { color: #0b1220; }
.side a.nav.has-new { color: var(--sidebar-strong); font-weight: 700; }
.bottom a.has-new { color: var(--info); }
.toast.news { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-left: 4px solid var(--info); padding: 10px 10px 10px 14px; }
.news-toast { display: flex; align-items: center; gap: var(--s3); }
.news-toast .nt-label { font-size: .75rem; font-weight: 700; color: var(--info); }
.news-toast .nt-subject { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.nt-x { border: 0; background: none; font-size: 1.3rem; line-height: 1; width: 30px; height: 30px; border-radius: 6px; color: var(--muted); cursor: pointer; flex: none; }
.nt-x:hover { background: var(--surface-2); color: var(--text); }
.news-item.unread { border-left: 4px solid var(--info); }
.news-item .row { gap: var(--s2); flex-wrap: wrap; }

/* ── platform: system announcements ───────────────────────────────── */
.ann-form fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); }
.ann-form legend { margin-bottom: 6px; }
.ann-form .check { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; font-weight: 400; }
.org-pick { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; margin: 6px 0 0 24px; }
.when-pick { margin: 8px 0 0 24px; }
.ann-item .msg { white-space: pre-wrap; margin: 8px 0; }
.ann-item .meta { font-size: .8rem; color: var(--muted); }
.ann-item .row { gap: var(--s2); }

/* ── announcements inbox (Gmail-like) ─────────────────────────────── */
.inbox-bar { justify-content: space-between; }
.inbox ul { list-style: none; margin: 0; padding: 0; }
.ib-row { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ib-row:last-child { border-bottom: 0; }
.ib-row.unread { background: var(--surface); }
.ib-link { display: grid; grid-template-columns: 14px minmax(8rem, 13rem) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; color: var(--muted); text-decoration: none; }
.ib-link:hover { box-shadow: inset 0 -1px 0 var(--line-strong), 0 1px 3px rgba(16, 24, 40, .12); position: relative; z-index: 1; }
.ib-dot { width: 9px; height: 9px; border-radius: 50%; }
.ib-row.unread .ib-dot { background: var(--info); }
.ib-from, .ib-subject { color: var(--text); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.ib-subject { flex: none; max-width: 60%; }
.ib-snippet { color: var(--muted); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ib-tag { flex: none; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 4px; background: var(--line); color: var(--text); }
.ib-date { font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ib-row.unread .ib-from, .ib-row.unread .ib-subject, .ib-row.unread .ib-date { font-weight: 700; color: var(--text); }
@media (max-width: 760px) {
  .ib-link { grid-template-columns: 12px minmax(0, 1fr) auto; grid-template-areas: "dot from date" ". main main"; gap: 2px 10px; padding: 12px 14px; }
  .ib-dot { grid-area: dot; } .ib-from { grid-area: from; } .ib-date { grid-area: date; }
  .ib-main { grid-area: main; flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; }
  .ib-subject { max-width: 100%; white-space: normal; }
  .ib-snippet { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: .9rem; }
}
.ib-message { padding: 0; }
.ib-meta { display: flex; align-items: center; gap: 12px; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ib-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; flex: none; }
.ib-body { white-space: pre-wrap; padding: var(--s5); font-size: 1rem; line-height: 1.6; }
.ib-message .btn-row { padding: 0 var(--s5) var(--s5); }
.ib-meta .grow { flex: 1; min-width: 12rem; }


/* ════════════════════════════════════════════════════════════════════
   STAFFED LOOK (Crew Together): the website's brand carried into the app.
   Deep teal and coral, Lexend headings over Nunito Sans, pill buttons, soft cards.
   Organizations keep their own accent for buttons and highlights.
   ════════════════════════════════════════════════════════════════════ */
@font-face { font-family: "Lexend"; src: url("fonts/lexend.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("fonts/nunito-sans.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
:root {
  --ink: #0B4F4A; --signal: #FF6F59; --signal-ink: #C2381F; --amber: #F7B733;
  --display: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #F4F8F7; --surface: #FFFFFF; --surface-2: #F1F6F5;
  --text: #12302D; --muted: #4C6460; --line: #E1EBE9; --line-strong: #C8D7D4;
  --sidebar: #0B3B37; --sidebar-text: #C5DCD8; --sidebar-strong: #FFFFFF; --sidebar-hover: #14524C;
  --r: 12px; --r-lg: 20px;
  --shadow: 0 1px 2px rgba(11, 79, 74, .05), 0 8px 22px rgba(11, 79, 74, .06);
  --shadow-pop: 0 18px 48px rgba(7, 26, 24, .28);
}
:root[data-theme="dark"] {
  --bg: #071A18; --surface: #0E2623; --surface-2: #13302C;
  --text: #E7F2F0; --muted: #9DB7B2; --line: #1F3D39; --line-strong: #2D514C;
  --sidebar: #04110F; --sidebar-text: #B6CFCA; --sidebar-strong: #FFFFFF; --sidebar-hover: #0F2B27;
  --shadow: none;
}
body { color: var(--text); background: var(--bg); font-family: var(--body); }
h1, h2, h3, .side-brand .name, .stat .v, .sb-dayhead b, .date-chip b, .plan .price, .ns-main h2, .appbar .name { font-family: var(--display); letter-spacing: -.02em; }
h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; }
h2 { font-weight: 600; }
h3 { font-weight: 600; }
.page-head .sub { font-size: .95rem; }
:focus-visible { outline: 3px solid var(--signal-ink); outline-offset: 2px; }
:root[data-theme="dark"] :focus-visible { outline-color: var(--signal); }

/* Buttons: pills, like the website */
.btn { border-radius: 999px; padding: 7px 18px; border-width: 1.5px; border-color: var(--line-strong); }
/* Outline buttons darken their border on hover; filled ones keep their fill (a plain .btn:hover
   background here once turned white-text primary buttons blank). */
.btn:not(.primary):not(.danger):hover { border-color: var(--text); background: var(--surface); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); filter: brightness(1.12); }
.btn.small { padding: 4px 12px; }
.btn.link { border-radius: 6px; }

/* Segmented controls: a pill track with the chosen one filled */
.seg, .seg.small { border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.seg a, .seg a + a { border: 0; border-radius: 999px; background: transparent; padding: 6px 14px; }
.seg a:hover { background: var(--surface-2); }
.seg a[aria-current="page"], .card-head .seg a[aria-current="page"] { background: var(--text); color: var(--surface); }

/* Surfaces */
.card, .stat, .next-shift, .plan { border-radius: var(--r-lg); }
.stat .v { font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea { border-radius: var(--r); border-width: 1.5px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--signal) 35%, transparent); border-color: var(--signal-ink); }
.toast { background: var(--ink); border-radius: 12px; }
:root[data-theme="dark"] .toast:not(.news) { background: #E7F2F0; color: #12302D; }

/* Sidebar: ink, with the Signal marker on the current page */
.side { background: var(--sidebar); }
.side-brand { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.side a.nav { border-radius: 10px; }
.side a.nav[aria-current="page"] { box-shadow: inset 3px 0 0 var(--signal); background: var(--sidebar-hover); }
.side .group-label { color: #8693AD; letter-spacing: .02em; }
.side-foot { border-top-color: rgba(255, 255, 255, .08); }
.side-foot button { border-radius: 999px; border-color: rgba(255, 255, 255, .18); }
.side-feedback { border-radius: 999px !important; }
.side.side-light a.nav[aria-current="page"] { box-shadow: inset 3px 0 0 var(--signal); }
.powered { display: flex; align-items: center; gap: 8px; margin-top: var(--s3); font-size: .75rem; color: #8693AD; text-decoration: none; }
.powered img { width: 18px; height: 18px; border-radius: 4px; }
.powered:hover { color: var(--sidebar-strong); }
.side.side-light .powered { color: var(--muted); }

/* Appearance switch */
.theme-switch { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.theme-switch button { border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: .875rem; padding: 7px 16px; border-radius: 999px; cursor: pointer; }
.theme-switch button:hover { background: var(--surface-2); }
.theme-switch button[aria-checked="true"] { background: var(--text); color: var(--surface); }
.side-theme { margin-bottom: var(--s3); }
.side-theme > span { display: block; font-size: .72rem; font-weight: 700; color: #8693AD; margin-bottom: 4px; }
.theme-switch.compact { display: flex; width: 100%; border-color: rgba(255, 255, 255, .18); background: transparent; }
.theme-switch.compact button { flex: 1; color: var(--sidebar-text); padding: 5px 4px; font-size: .78rem; }
.theme-switch.compact button:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }
.theme-switch.compact button[aria-checked="true"] { background: var(--sidebar-strong); color: var(--ink); }
.side.side-light .theme-switch.compact { border-color: var(--line-strong); }
.side.side-light .theme-switch.compact button { color: var(--text); }
.side.side-light .theme-switch.compact button[aria-checked="true"] { background: var(--text); color: var(--surface); }
@media (min-width: 1024px) { body.rail .side-theme, body.rail .powered .lbl { display: none; } body.rail .powered { justify-content: center; } }

/* Sign-in and other public pages */
.public-logo { display: block; width: max-content; margin: 0 auto var(--s5); }
.public-logo img { height: 30px; width: auto; }
main.public .card { border-radius: 18px; padding: var(--s6) var(--s5); }
main.public h1 { font-size: 2rem; }

/* Calendar and schedule details in the brand */
.sb-dayhead.today b, .cal-cell.today .cal-num { font-family: var(--display); }
.chip { font-weight: 600; }
@media (min-width: 1024px) { body.rail .side-foot > button:not(.side-rail):not(.side-feedback) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
/* Before anyone signs in there is no organization color: public pages use the website's Signal button. */
main.public .btn.primary, main.pricing .btn.primary { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
main.public .btn.primary:hover, main.pricing .btn.primary:hover { filter: none; background: #0E625B; }
main.public a:not(.btn) { color: var(--text); }
/* The organization's own color, unchanged in either theme, for its name strip and the phone top bar. */
.side-brand, .appbar { background: var(--brand, var(--accent)); color: var(--brand-text, var(--accent-text)); }

/* ── manager notifications ────────────────────────────────────────── */
.note-link { grid-template-columns: 14px 34px minmax(0, 1fr) auto; }
.note-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.ib-row.unread .note-ic { background: color-mix(in srgb, var(--signal) 18%, transparent); color: var(--signal-ink); }
.note-ic svg.ic { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .note-link { grid-template-columns: 12px 30px minmax(0, 1fr) auto; grid-template-areas: "dot ic main date"; align-items: start; }
  .note-link .note-ic { grid-area: ic; width: 30px; height: 30px; }
  .note-link .ib-main { grid-area: main; }
}
.appbar .bell { margin-left: auto; position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: inherit; border-radius: 10px; }
.appbar .bell .badge { position: absolute; top: 2px; right: 0; min-width: 1.15rem; line-height: 1.15rem; font-size: .66rem; padding: 0 .3rem; }
.side a.nav.has-new { font-weight: 700; }

/* ── scheduled maintenance banner ─────────────────────────────────── */
.maint-bar { display: flex; align-items: center; gap: var(--s3); padding: 10px 40px; background: #FFF1DC; color: #5C3300; border-bottom: 1px solid #F3D9AE; font-size: .92rem; }
.maint-bar.live { background: #FDE8E7; color: #7A1712; border-bottom-color: #F5C6C2; }
.maint-bar strong { font-weight: 800; }
.maint-ic { flex: none; display: grid; place-items: center; }
.maint-ic svg.ic { width: 18px; height: 18px; }
.maint-msg { opacity: .9; }
:root[data-theme="dark"] .maint-bar { background: #3A2A0E; color: #FBD99B; border-bottom-color: #5A4216; }
:root[data-theme="dark"] .maint-bar.live { background: #3A1715; color: #FFB4AC; border-bottom-color: #5C2420; }
main.public .maint-bar { border-radius: 14px; border: 1px solid #F3D9AE; margin-bottom: var(--s4); padding: 12px 16px; }
@media (max-width: 1023px) { .maint-bar { padding: 9px var(--s4); } }
/* Staff: people waiting to join, shown whatever the filter */
.pending-panel { border: 1.5px solid #F3D9AE; background: color-mix(in srgb, #FFF1DC 55%, var(--surface)); }
.pending-panel .card-head { border-bottom-color: #F3D9AE; }
.pending-panel h2 { font-size: 1.05rem; }
.pending-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal-ink); flex: none; }
:root[data-theme="dark"] .pending-panel { border-color: #5A4216; background: #2A220F; }
:root[data-theme="dark"] .pending-panel .card-head { border-bottom-color: #5A4216; }

/* ── guided tours ─────────────────────────────────────────────────── */
.tour-ring, .tour-shade, .tour-hand { position: fixed; pointer-events: none; opacity: 0; transition: opacity .2s; }
.tour-ring { z-index: 90; border-radius: 12px; box-shadow: 0 0 0 3px var(--signal), 0 0 0 9999px rgba(7, 26, 24, .42); transition: top .35s ease, left .35s ease, width .35s ease, height .35s ease, opacity .2s; }
.tour-shade { z-index: 89; inset: 0; background: rgba(7, 26, 24, .42); }
.tour-ring.on, .tour-shade.on, .tour-hand.on { opacity: 1; }
.tour-hand { z-index: 91; left: 0; top: 0; width: 34px; height: 34px; transition: transform .8s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.tour-hand svg { width: 34px; height: 34px; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); animation: tour-tap 2.4s ease-in-out infinite; transform-origin: 6px 4px; }
.tour-arrow { fill: #fff; stroke: #12302D; stroke-width: 1.8; stroke-linejoin: round; }
.tour-ripple { fill: none; stroke: var(--signal); stroke-width: 3; opacity: 0; transform-origin: 6px 5px; animation: tour-ripple 2.4s ease-out infinite; }
@keyframes tour-tap { 0%, 50% { transform: scale(1); } 58% { transform: scale(.82); } 68%, 100% { transform: scale(1); } }
@keyframes tour-ripple { 0%, 55% { opacity: 0; transform: scale(.3); } 60% { opacity: .9; } 100% { opacity: 0; transform: scale(2.2); } }
.tour-card { position: fixed; z-index: 92; width: min(360px, calc(100vw - 24px)); background: var(--surface); color: var(--text); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 16px 18px 14px; border-top: 4px solid var(--signal); }
.tour-card h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.tour-card p { margin: 0 0 12px; }
.tour-top { display: flex; align-items: center; justify-content: space-between; }
.tour-count { font-size: .78rem; font-weight: 800; color: var(--signal-ink); letter-spacing: .02em; }
:root[data-theme="dark"] .tour-count { color: var(--signal); }
.tour-x { border: 0; background: none; font-size: 1.4rem; line-height: 1; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.tour-x:hover { background: var(--surface-2); color: var(--text); }
.tour-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.tour-hint { font-size: .82rem; color: var(--muted); margin-right: auto; display: inline-flex; align-items: center; gap: 6px; }
.tour-hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); animation: tour-pulse 1.4s ease-in-out infinite; }
@keyframes tour-pulse { 50% { opacity: .3; } }
@media (max-width: 639px) { .tour-card { width: auto; } }
@media (prefers-reduced-motion: reduce) { .tour-hand, .tour-ring { transition: none; } .tour-hand svg, .tour-ripple, .tour-hint::before { animation: none; } }

/* Get started checklist */
.get-started { border: 1.5px solid color-mix(in srgb, var(--signal) 40%, var(--line)); }
.gs-head { display: flex; align-items: flex-start; gap: var(--s3); }
.gs-head h2 { margin: 0 0 2px; }
.gs-bar { height: 6px; border-radius: 999px; background: var(--surface-2); margin: 14px 0 6px; overflow: hidden; }
.gs-bar i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.gs-list { list-style: none; margin: 0; padding: 0; }
.gs-list li { display: flex; align-items: center; gap: var(--s3); padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.gs-list li:first-child { border-top: 0; }
.gs-check { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.gs-list li.done .gs-check { background: var(--ok-bg); color: var(--ok); }
.gs-list li.done strong { text-decoration: line-through; text-decoration-color: var(--muted); }
.gs-check svg.ic { width: 18px; height: 18px; stroke-width: 2.6; }

/* Help page and inline positions */
.tour-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s4); margin-bottom: var(--s4); }
.tour-pick-ic { width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--signal) 16%, transparent); color: var(--signal-ink); display: grid; place-items: center; margin-bottom: 12px; }
.pos-suggest { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── maintenance screen ───────────────────────────────────────────── */
.maint-screen { text-align: center; padding: var(--s6) var(--s5); }
.maint-big { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: #FFF1DC; color: #8A4B00; }
.maint-big svg.ic { width: 34px; height: 34px; }
:root[data-theme="dark"] .maint-big { background: #3A2A0E; color: #FBD99B; }
.mode-chip.read_only { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.mode-chip.offline { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.maint-now { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.maint-now .big { font-family: var(--display); font-size: 1.4rem; font-weight: 700; }

/* ── checkout on our own page ─────────────────────────────────────── */
.checkout-page { max-width: 1080px; margin: 0 auto; padding: var(--s5) var(--s4) 64px; }
.checkout-page > h1 { margin: var(--s4) 0 var(--s5); }
.checkout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s5); align-items: start; }
.co-summary, .co-pay { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: var(--s5); box-shadow: var(--shadow); }
.co-summary { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.co-kicker { font-size: .78rem; font-weight: 800; color: var(--signal-ink); letter-spacing: .02em; }
:root[data-theme="dark"] .co-kicker { color: var(--signal); }
.co-summary h2 { font-size: 1.6rem; margin: 4px 0 4px; }
.co-price { margin: 16px 0 4px; }
.co-amount { font-family: var(--display); font-size: 2.6rem; font-weight: 700; letter-spacing: -.03em; }
.co-save { color: var(--ok); font-weight: 700; margin: 0 0 8px; }
.co-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0; font-size: .95rem; }
.co-kv dt { color: var(--muted); } .co-kv dd { margin: 0; overflow-wrap: anywhere; }
.co-features { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; font-size: .95rem; }
.co-features li { padding-left: 24px; position: relative; }
.co-features li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 11px; height: 6px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.co-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 8px; font-size: 1.05rem; }
.co-total strong { font-family: var(--display); font-size: 1.4rem; }
.co-pay h2 { margin-bottom: var(--s4); }
.co-form { min-height: 320px; }
.co-loading { padding: 40px 0; text-align: center; }
.co-secure { display: flex; gap: 8px; align-items: flex-start; margin: var(--s4) 0 var(--s2); }
.co-lock svg.ic { width: 16px; height: 16px; margin-top: 2px; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }

/* ── text invites ─────────────────────────────────────────────────── */
.sms-share { margin: 16px 0 4px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 12px; }
.sms-share summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.sms-share > .btn { margin: 4px 0 12px; }
.sms-list > li { padding: 8px 0; }
.sms-list > li:first-child { border-top: 0; }

/* Announcements: remove from my inbox (Gmail-style: the bin shows on hover or keyboard focus; always on touch). */
.ib-row { position: relative; }
.ib-remove { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; opacity: 0; }
.ib-row:hover .ib-remove, .ib-remove:focus-visible { opacity: 1; }
.ib-remove:hover { color: var(--bad); border-color: var(--bad); }
.ib-row:hover .ib-date { visibility: hidden; }
@media (hover: none) { .ib-remove { opacity: 1; position: static; transform: none; margin: 0 14px 10px auto; } .ib-row:hover .ib-date { visibility: visible; } }
.toast-undo { margin-left: 10px; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 2px 4px; }
