/* Tidemere for Households, Option B design system. */
:root {
  --bg: #FBFAF7; --app-bg: #F1F4F4; --card: #FFFFFF;
  --ink: #16262F; --ink-soft: #46565E; --muted: #8A9499;
  --accent: #5F7F78; --accent-soft: #E7EEEC; --accent-deep: #3C564F;
  --sand: #C4A882; --sand-soft: #F5EDE0; --sand-deep: #8A6A44;
  --line: rgba(22,38,47,0.08); --line-2: rgba(22,38,47,0.14);
  --font-head: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background: var(--app-bg); color: var(--ink); -webkit-font-smoothing: antialiased; min-height: 100vh; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 300; letter-spacing: -0.01em; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--accent-deep); }

/* ── quiet full-page sign-in ─────────────────────────── */
body.gate { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 32px 20px 96px; }
.gate-wrap { width: 100%; max-width: 380px; }
.gate-mark { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 34px; }
.gate-mark .wordmark { font-family: var(--font-head); font-weight: 300; font-size: 1.55rem; letter-spacing: 0.01em; }
.gate-mark .under { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sand-deep); font-weight: 500; }
.gate-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px 30px; }
.gate-card h1 { font-size: 1.22rem; margin-bottom: 4px; }
.gate-card .sub { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.field input { width: 100%; background: var(--card); border: 1px solid var(--line-2); border-radius: 11px; padding: 12px 14px; font-family: var(--font-body); font-size: 0.92rem; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--accent); }
.btn { width: 100%; background: var(--ink); color: #fff; border: none; border-radius: 11px; padding: 13px; font-size: 0.92rem; font-weight: 500; margin-top: 6px; }
.btn:hover { background: var(--accent-deep); }
.gate-foot { text-align: center; font-size: 0.74rem; color: var(--muted); margin-top: 20px; line-height: 1.6; }
.gate-foot a { color: var(--sand-deep); text-decoration: none; border-bottom: 1px solid var(--sand); }
.error { background: #FBF0EE; border: 1px solid rgba(160,70,50,0.25); color: #7A3B2C; border-radius: 10px; padding: 10px 14px; font-size: 0.82rem; margin-bottom: 16px; line-height: 1.5; }
.note-quiet { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.65; background: var(--sand-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.secretbox { font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem; letter-spacing: 0.06em; background: var(--app-bg); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; margin: 10px 0 16px; word-break: break-all; color: var(--ink-soft); }

/* ── chooser ─────────────────────────────────────────── */
.choose-list { display: flex; flex-direction: column; gap: 10px; }
.choose-item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; transition: border-color .15s; }
.choose-item:hover { border-color: var(--accent); }
.choose-item .av { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 0.85rem; flex-shrink: 0; }
.choose-item .nm { font-family: var(--font-head); font-size: 1rem; }
.choose-item .rl { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ── app frame ───────────────────────────────────────── */
.appbar { background: var(--card); border-bottom: 1px solid var(--line); padding: 0 28px; height: 60px; display: flex; align-items: center; gap: 14px; }
.appbar .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1rem; }
.appbar .orgname { font-size: 0.86rem; color: var(--ink-soft); border-left: 1px solid var(--line-2); padding-left: 14px; }
.appbar .spacer { flex: 1; }
.appbar .who { font-size: 0.82rem; color: var(--ink-soft); }
.appbar form { display: inline; }
.appbar .signout, .appbar .switch { background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-size: 0.78rem; color: var(--ink-soft); text-decoration: none; }
.appbar .signout:hover, .appbar .switch:hover { border-color: var(--accent); color: var(--accent-deep); }
.main { max-width: 980px; margin: 0 auto; padding: 40px 24px 80px; }
.main .eyebrow { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand-deep); font-weight: 500; margin-bottom: 8px; }
.main h1 { font-size: 1.7rem; margin-bottom: 6px; }
.main .lede { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.65; margin-bottom: 30px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 20px; }
.card h2 { font-size: 0.98rem; font-weight: 500; font-family: var(--font-head); margin-bottom: 10px; }
.card .big { font-family: var(--font-head); font-size: 2rem; font-weight: 300; }
.card .cap { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.card ul { list-style: none; }
.card li { font-size: 0.85rem; color: var(--ink-soft); padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.card li:last-child { border-bottom: none; }
.card li .who { color: var(--ink); }
.card li .what { color: var(--muted); font-size: 0.78rem; text-align: right; }
.pill { display: inline-block; font-size: 0.7rem; font-weight: 500; background: var(--sand-soft); color: var(--sand-deep); border-radius: 999px; padding: 3px 10px; }
.pill.alert { background: #FBF0EE; color: #7A3B2C; }

/* ── mobile: splash and quick entry ──────────────────── */
body.m-splash { background: radial-gradient(120% 80% at 50% 18%, #FFFFFF 0%, var(--sand-soft) 130%); display: flex; align-items: stretch; }
.splash-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 28px 70px; min-height: 100vh; }
.splash-word { font-family: var(--font-head); font-weight: 300; font-size: 1.9rem; letter-spacing: 0.01em; margin-top: 6px; }
.splash-sub { font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sand-deep); font-weight: 500; }
.splash-actions { margin-top: 44px; width: 100%; max-width: 280px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.facebtn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--ink); color: #fff; border: none; border-radius: 999px; padding: 14px 20px; font-size: 0.94rem; font-weight: 500; text-decoration: none; }
.facebtn:hover { background: var(--accent-deep); }
.quietlink { font-size: 0.8rem; color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.splash-foot { position: absolute; bottom: 26px; font-size: 0.72rem; color: var(--muted); }
body.m-gate { padding: 22px 16px 96px; align-items: flex-start; }
body.m-gate .gate-wrap { max-width: 340px; margin: 0 auto; }
body.m-gate .gate-card { padding: 26px 22px 24px; }

/* ── small screens ───────────────────────────────────── */
@media (max-width: 700px) {
  .appbar { padding: 0 14px; gap: 8px; height: 54px; }
  .appbar .orgname, .appbar .who { display: none; }
  .main { padding: 24px 16px 96px; }
  .main h1 { font-size: 1.4rem; }
  .cards { grid-template-columns: 1fr; }
  .devpanel { font-size: 0.68rem; gap: 8px; }
}

/* ── console left rail (mockup layout, plus collapse) ── */
.layout { display: flex; min-height: 100vh; }
.side { width: 228px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: width .15s ease; }
.side .s-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1rem; padding: 2px 10px 14px; white-space: nowrap; }
/* the one rail header: the organization's monogram and name (every console) */
.side .org-brand { align-items: flex-start; }
.org-mark { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 400; font-size: 1rem; flex-shrink: 0; }
.layout.railless .org-brand { justify-content: center; }
.side .s-org { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand-deep); font-weight: 500; padding: 0 10px 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .s-group { font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 14px 10px 6px; white-space: nowrap; }
.side .s-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 0.85rem; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.side .s-item svg { flex-shrink: 0; }
.side .s-item:hover { background: var(--app-bg); color: var(--ink); }
.side .s-item.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 500; }
/* rail sub-menus: a parent item opens an indented group of children */
.side .s-parent { cursor: pointer; }
.side .s-parent .s-caret { margin-left: auto; transition: transform 0.15s; }
.side .s-parent.open .s-caret { transform: rotate(90deg); }
.side .s-sub { display: none; }
.side .s-sub.open { display: block; }
.side .s-sub a.s-item { padding-left: 36px; font-size: 0.82rem; }
.layout.railless .side .s-sub { display: none !important; }
.layout.railless .side .s-parent .s-caret { display: none; }

/* ── The Registry: the one layout every department sees ─────────────
   Lifted from the stays experience dashboard so the Registry looks the
   same everywhere; only the data differs. */
.reg-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .reg-grid { grid-template-columns: 1fr; } }
.reg-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; max-height: calc(100vh - 200px); overflow-y: auto; }
.reg-search { position: sticky; top: 0; z-index: 2; box-shadow: 0 4px 6px -4px rgba(22,38,47,0.12); width: 100%; border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 12px; font-size: 0.82rem; font-family: inherit; color: var(--ink); margin-bottom: 6px; background: var(--card); }
.reg-search::placeholder { color: var(--muted); }
.reg-party { font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 10px 10px 5px; }
.reg-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; text-decoration: none; color: var(--ink); }
.reg-row:hover { background: var(--app-bg); }
.reg-row.on { background: var(--sand-soft); }
.reg-av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 500; font-size: 0.72rem; flex-shrink: 0; }
.reg-row.on .reg-av { background: var(--sand); color: #fff; }
.reg-rn { font-size: 0.83rem; font-weight: 500; flex: 1; min-width: 0; }
.reg-rn .rs { font-size: 0.7rem; color: var(--muted); font-weight: 400; margin-top: 1px; }
.reg-dot { width: 8px; height: 8px; border-radius: 50%; background: #B3583F; flex-shrink: 0; }
.reg-detail { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.reg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.reg-head .rh-av { width: 48px; height: 48px; border-radius: 50%; background: var(--sand-soft); color: var(--sand-deep); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 500; font-size: 1rem; flex-shrink: 0; }
.reg-head .rh-n { font-family: var(--font-head); font-size: 1.2rem; font-weight: 500; }
.reg-head .rh-s { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.allergy-banner { display: flex; align-items: center; gap: 9px; background: #FBF0EE; border: 1px solid rgba(179,88,63,0.35); color: #7A3B2C; border-radius: 10px; padding: 10px 14px; font-size: 0.82rem; font-weight: 500; margin: 14px 0 4px; }
.reg-sec-h { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 16px 0 7px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.det-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.83rem; }
.det-row:last-child { border-bottom: none; }
.det-row .dk { color: var(--muted); }
.det-row .dv { font-weight: 500; text-align: right; }
.sensitive-tag { font-size: 0.58rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; background: var(--sand-soft); color: var(--sand-deep); border-radius: 999px; padding: 2px 8px; margin-left: 8px; }
.panel-note { font-size: 0.74rem; color: var(--muted); background: var(--app-bg); border-radius: 9px; padding: 9px 12px; line-height: 1.5; }
/* collapsible profile sections (the exec chef dashboard's pattern) */
.fsec { border-top: 1px solid var(--line); margin: 0 -22px; }
.fsec-hd { display: flex; align-items: center; gap: 8px; padding: 12px 22px; cursor: pointer; user-select: none; }
.fsec-hd:hover { background: var(--app-bg); }
.fsec-label { font-size: 0.66rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); flex: 1; }
.fsec-chev { color: var(--muted); transition: transform 0.2s; display: inline-flex; }
.fsec-chev.open { transform: rotate(180deg); }
.fsec-body { padding: 7px 22px 14px; display: none; }
.fsec-body.open { display: block; }
.sizes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.size-cell { background: var(--app-bg); border-radius: 10px; padding: 9px 11px; }
.size-cell .sk { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }
.size-cell .sv { font-size: 0.92rem; font-weight: 500; margin-top: 3px; }
.allergy-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; flex-wrap: wrap; }
.allergy-row:last-child { border-bottom: none; }
.allergy-row .aname { flex: 1; font-weight: 500; }
.allergy-row .anote { font-size: 0.75rem; color: var(--muted); width: 100%; margin-top: 2px; }
.dietary-note { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.55; margin-top: 8px; }

/* ── the Staff template: list by department, detail to the right ─────
   Lifted from the Westshore club manager so staff screens look the same
   across the whole universe. */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } .split .detail { position: static; } }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-size: 0.82rem; color: var(--ink-soft); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ilist { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 220px); overflow-y: auto; padding-right: 4px; }
.sdeptband { font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 10px 4px 4px; }
.icard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 14px 15px; cursor: pointer; text-decoration: none; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; }
.icard:hover { border-color: var(--line-2); }
.icard.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.icard .irow1 { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.icard .isubj { font-size: 0.92rem; font-weight: 500; }
.icard .imeta { font-size: 0.76rem; color: var(--muted); margin-top: 3px; }
.detail { position: sticky; top: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden auto; max-height: calc(100vh - 40px); }
.idet-empty { padding: 56px 30px; text-align: center; }
.idet-empty .eic { width: 46px; height: 46px; border-radius: 50%; background: var(--app-bg); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); margin: 0 auto 12px; }
.idet-empty p { font-size: 0.88rem; color: var(--muted); }
.idet-head { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.idet-head .idet-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.idet-head h2 { font-size: 1.15rem; font-weight: 500; line-height: 1.4; margin-bottom: 6px; }
.idet-head .itime { font-size: 0.78rem; color: var(--muted); }
.idet-foot { padding: 16px 22px; display: flex; gap: 10px; }
.staff-sec { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.staff-sec .ss-h { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.ss-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 0.85rem; }
.ss-row .ss-k { color: var(--muted); }
.ss-row .ss-v { font-weight: 500; text-align: right; }
.staff-edit { font-size: 0.74rem; font-weight: 500; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-soft); border-radius: 8px; padding: 5px 11px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; text-decoration: none; }
.staff-edit:hover { border-color: var(--ink); color: var(--ink); }
.staff-archive { margin: 16px 22px 0; background: var(--sand-soft); border: 1px solid #ECD9B8; border-radius: 12px; padding: 12px 15px; }
.staff-archive .sa-t { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand-deep); font-weight: 500; margin-bottom: 4px; }
.staff-archive .sa-m { font-size: 0.83rem; color: var(--ink-soft); line-height: 1.5; }
.pill.p-ok { background: var(--accent-soft); color: var(--accent-deep); }
.pill.p-neutral { background: #F0F0EE; color: #5A5A54; }
.pill.p-other { background: #E9E7F2; color: #4C4670; }
.ef-row { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.ef-row label { width: 110px; flex-shrink: 0; font-size: 0.74rem; color: var(--muted); font-weight: 500; }
.ef-row input, .ef-row select { flex: 1; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; font-family: inherit; font-size: 0.85rem; color: var(--ink); background: var(--card); }
.btn-resolve { background: var(--ink); color: #fff; border: none; border-radius: 10px; padding: 10px 18px; font-size: 0.84rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-resolve:hover { background: var(--accent-deep); }
.btn-sec { background: var(--card); color: var(--ink-soft); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 18px; font-size: 0.84rem; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.btn-sec:hover { border-color: var(--ink); color: var(--ink); }
.tmodal { position: fixed; inset: 0; background: rgba(22,38,47,0.5); display: flex; align-items: flex-start; justify-content: center; z-index: 70; padding: 30px 16px; }
.tmodal-wrap { background: var(--card); border-radius: 16px; width: 100%; max-width: 640px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(22,38,47,0.5); }
.tmodal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--app-bg); flex-shrink: 0; }
.tmodal-bar .tm-t { font-size: 0.95rem; font-weight: 500; }
.tmodal-body { padding: 18px 20px; overflow-y: auto; }
.tmodal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-shrink: 0; }
.ef-sec { margin-bottom: 18px; }
.ef-sec .ef-h { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ef-info { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); font-size: 0.62rem; font-weight: 600; line-height: 1; cursor: help; }
.ef-doc { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.84rem; }
.ef-doc:last-of-type { border-bottom: none; }
.ef-doc .ef-dn { flex: 1; }
.ef-doc .ef-dm { color: var(--muted); font-size: 0.76rem; }
.ef-noteitem { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ef-noteitem:last-child { border-bottom: none; }
.ef-noteitem .ef-nm { font-size: 0.85rem; line-height: 1.5; }
.ef-noteitem .ef-nb { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.ef-empty { font-size: 0.8rem; color: var(--muted); padding: 4px 0; }

/* ── the schedule grid: one layout across the whole universe ─────────
   Lifted from the Westshore club manager's schedule. */
.sched-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.sched-kpis .kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; }
.sched-kpis .kpi.alert { border-color: rgba(179,88,63,0.4); }
.sched-kpis .kpi .k { font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.sched-kpis .kpi .v { font-family: var(--font-head); font-size: 1.7rem; font-weight: 300; margin-top: 3px; }
.sched-kpis .kpi.alert .v { color: #7A3B2C; }
.sched-kpis .kpi .d { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.sched-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.sched { min-width: 760px; }
.sched-row { display: grid; grid-template-columns: 172px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.sched-row:last-child { border-bottom: none; }
.sched-row.head { position: sticky; top: 0; background: var(--card); z-index: 2; }
.sched-row.head .sc { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 12px 8px; text-align: center; }
.sched-row.head .sc.today { color: var(--accent-deep); }
.sched-dept { padding: 9px 14px; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; color: var(--ink-soft); background: var(--app-bg); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.sched-dept i { width: 9px; height: 9px; border-radius: 3px; }
.sname { padding: 11px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.sname .n { font-size: 0.86rem; font-weight: 500; }
.sname .r { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }
.scell { border-right: 1px solid var(--line); min-height: 54px; padding: 6px; display: flex; align-items: center; justify-content: center; }
.scell:last-child { border-right: none; }
.scell.todaycol { background: #F7FAF9; }
.shift { width: 100%; font-size: 0.72rem; font-weight: 500; text-align: center; border-radius: 7px; padding: 6px 4px; line-height: 1.25; }
.shift.off { color: var(--muted); background: transparent; font-weight: 400; }
.shift.draft { opacity: 0.55; }
.shift.away { background: var(--app-bg); color: var(--ink-soft); border: 1px dashed var(--line-2); }
.shift.d-childcare { background: var(--accent-soft); color: var(--accent-deep); }
.shift.d-culinary { background: var(--sand-soft); color: var(--sand-deep); }
.shift.d-hospitality { background: #E8EDF2; color: #3D5566; }
.shift.d-housekeeping { background: #EFEAF2; color: #5A4A66; }
.shift.d-logistics { background: #EDEFEB; color: #4A554E; }
.shift.d-other { background: #F0F0EE; color: #5A5A54; }
.dot-d-childcare { background: var(--accent); }
.dot-d-culinary { background: var(--sand); }
.dot-d-hospitality { background: #7A96AC; }
.dot-d-housekeeping { background: #9B85AC; }
.dot-d-logistics { background: #8B9A90; }
.dot-d-other { background: #B9B9B2; }

/* ── departments grid + task cards (the household manager mockup's shapes) ── */
.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .dept-grid { grid-template-columns: repeat(2, 1fr); } }
.dept-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; text-decoration: none; color: var(--ink); transition: border-color 0.15s; }
.dept-card:hover { border-color: var(--line-2); }
.dept-card .di { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.dept-card h3 { font-size: 1.02rem; font-weight: 500; margin-bottom: 3px; }
.dept-card .loc { font-size: 0.76rem; color: var(--muted); margin-bottom: 12px; }
.dept-card .stats { display: flex; gap: 16px; margin-bottom: 6px; }
.dept-card .stat { font-size: 0.78rem; color: var(--ink-soft); }
.dept-card .stat b { font-family: var(--font-head); font-weight: 500; font-size: 0.95rem; color: var(--ink); display: block; }
.tk-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.tk-cardhd { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.tk-cardhd h3 { font-size: 1.02rem; font-weight: 500; margin-bottom: 0; }
.tk-count { background: var(--app-bg); border: 1px solid var(--line); color: var(--ink-soft); font-size: 0.72rem; font-weight: 500; border-radius: 999px; padding: 2px 10px; }
.tk-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tk-row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line); }
.tk-row:last-child { border-bottom: none; }
.tk-check { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--line-2); background: var(--card); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; padding: 0; }
.tk-check.done { background: var(--accent); border-color: var(--accent); }
.tk-check.still { cursor: default; }
.tk-txt { flex: 1; font-size: 0.9rem; color: var(--ink); min-width: 0; }
.tk-row.done .tk-txt { color: var(--muted); text-decoration: line-through; }
.tk-who { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.tk-when { font-size: 0.74rem; color: var(--sand-deep); white-space: nowrap; }
.side .s-spacer { flex: 1; }
.side .s-who { display: flex; align-items: center; gap: 9px; padding: 10px; border-top: 1px solid var(--line); }
.side .s-who .av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 600; flex-shrink: 0; }
.side .s-who .nm { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .s-who .rl { font-size: 0.68rem; color: var(--muted); white-space: nowrap; }
/* rail foot, the Clubs standard: a quiet sign-out row, then Powered by
   Tidemere. The rail's one control sits on its own edge (.rail-toggle). */
.s-signout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; font-size: 0.82rem; font-weight: 500; color: var(--ink-soft); background: none; border: none; text-align: left; cursor: pointer; white-space: nowrap; }
.s-signout:hover { background: var(--app-bg); color: var(--ink); }
.s-signout .ic { display: inline-flex; flex-shrink: 0; color: var(--muted); }
.s-powered { display: flex; align-items: center; gap: 7px; font-size: 0.66rem; color: var(--muted); padding: 8px 10px 0; opacity: 0.6; white-space: nowrap; }
.rail-toggle { position: fixed; z-index: 12; top: 30px; left: 228px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(22,38,47,0.12); transition: left 0.16s ease, background 0.15s ease, color 0.15s ease; cursor: pointer; padding: 0; }
.rail-toggle:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.rail-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rail-toggle svg { transition: transform 0.16s ease; }
.layout.railless .rail-toggle { left: 62px; }
.layout.railless .rail-toggle svg { transform: rotate(180deg); }
.layout.railless .side { width: 62px; padding-left: 8px; padding-right: 8px; }
.layout.railless .side .s-label, .layout.railless .s-org, .layout.railless .s-group,
.layout.railless .s-who .grow, .layout.railless .s-brand .s-label,
.layout.railless .s-powered, .layout.railless .s-signout { display: none; }
.layout.railless .side .s-item { justify-content: center; }
.content { flex: 1; min-width: 0; }
.main.wide { max-width: 1180px; }
.card li form { display: inline; }

/* ── schedule creator ─────────────────────────────────── */
.sched-seg { display: inline-flex; background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 18px; }
.sched-seg a { border: none; border-radius: 999px; padding: 8px 16px; font-size: 0.82rem; color: var(--ink-soft); text-decoration: none; }
.sched-seg a.on { background: var(--ink); color: #fff; }
.plan-grid { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.plan-grid th { text-align: left; padding: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.plan-grid td { border-top: 1px solid var(--line); padding: 4px; }
.plan-grid .cellbtn { width: 100%; min-width: 86px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 6px; font-size: 0.72rem; font-family: inherit; cursor: pointer; color: var(--ink); }
.plan-grid .cellbtn.off { color: var(--muted); background: var(--app-bg); }
.plan-grid .cellbtn.published { cursor: default; border-color: transparent; background: var(--accent-soft); color: var(--accent-deep); }
.plan-alert { background: #FBF0EE; border: 1px solid rgba(160,70,50,0.3); color: #7A3B2C; border-radius: 11px; padding: 11px 14px; font-size: 0.82rem; margin-bottom: 14px; line-height: 1.5; }

/* ── the dark pop-out: expanded vendor/staff/construction lists stand
   out from the page — the ink card, platform-wide ─────── */
/* the pill entry standard: typed entries become pills; typing suggests what
   already exists so one organization never lives under two spellings */
.pillbox { position: relative; border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 8px; background: var(--card); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; cursor: text; }
.pb-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--sand-soft); color: var(--sand-deep); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 0.78rem; }
.pb-x { border: none; background: none; color: inherit; cursor: pointer; font-size: 0.9rem; line-height: 1; padding: 0 4px; }
.pb-in { border: none; outline: none; flex: 1; min-width: 130px; font-family: inherit; font-size: 0.84rem; padding: 4px 2px; background: none; color: var(--ink); }
.pb-sug { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 14px 30px -12px rgba(22,38,47,0.35); z-index: 50; overflow: hidden; }
.pb-opt { display: block; width: 100%; text-align: left; padding: 9px 12px; border: none; background: none; font-family: inherit; font-size: 0.82rem; cursor: pointer; color: var(--ink); }
.pb-opt:hover { background: var(--app-bg); }

/* the info popover standard: help lives behind an "i", never in a grey paragraph */
.ibtn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); font-size: 0.7rem; font-style: italic; font-family: var(--font-head); cursor: pointer; flex-shrink: 0; }
.ipop { position: absolute; top: 28px; right: 0; z-index: 40; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 0.78rem; line-height: 1.55; width: 260px; box-shadow: 0 14px 34px -10px rgba(22,38,47,0.45); font-weight: 400; text-transform: none; letter-spacing: 0; }
.ipop a { color: var(--sand); }

.popdark { background: var(--ink); color: #fff; border: none; }
.popdark .det-row { border-color: rgba(255,255,255,0.12); }
.popdark .det-row .dk { color: rgba(255,255,255,0.65); }
.popdark .det-row .dv { color: #fff; }
.popdark .cap { color: rgba(255,255,255,0.6); }

/* the round + : the one add button, app-wide */
.addbtn { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.addbtn:hover { background: var(--accent-deep); }
/* event tones */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.k { background: var(--accent-deep); }
.dot.f { background: var(--sand); }
.dot.h { background: var(--line-2); }

/* ── development panel, removed at hosting ───────────── */
.devpanel { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); color: #E7EEEC; font-size: 0.74rem; padding: 9px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; z-index: 50; }
.devpanel .tag { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.62rem; color: #9FB4AE; }
.devpanel button { background: rgba(255,255,255,0.08); color: #E7EEEC; border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 4px 11px; font-size: 0.72rem; }
.devpanel button:hover { background: rgba(255,255,255,0.16); }
.devpanel .code { font-family: ui-monospace, Consolas, monospace; color: #F5EDE0; }

/* ── the document page: one look wherever a document reads or is
   written (the repository screens and the writing room, Sep 7) ── */
.docpage { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
           padding: 26px 30px; margin: 14px 0; box-shadow: 0 1px 3px rgba(22,38,47,0.05); }
.dp-head { border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 16px; }
.dp-org { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
          color: var(--muted); font-weight: 600; }
.dp-kind { font-size: 0.74rem; color: var(--sand-deep); margin-top: 4px; }
.dp-title { font-family: var(--font-head); font-size: 1.35rem; margin-top: 6px; color: var(--ink); }
.dp-meta { font-size: 0.72rem; color: var(--muted); margin-top: 5px; }
.dp-sec { font-family: var(--font-head); font-size: 0.98rem; font-weight: 500;
          margin: 16px 0 6px; color: var(--ink); }
.dp-p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.75; margin: 8px 0; }
.dp-num { display: flex; gap: 10px; font-size: 0.9rem; color: var(--ink-soft);
          line-height: 1.7; margin: 6px 0 6px 4px; }
.dp-num span:first-child { color: var(--sand-deep); flex-shrink: 0; min-width: 16px; }
.dp-sign { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px;
           font-size: 0.76rem; color: var(--muted); font-style: italic; }
.doc-back { display: inline-flex; gap: 6px; align-items: center; font-size: 0.8rem;
            color: var(--ink-soft); text-decoration: none; margin-bottom: 12px;
            padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px;
            background: var(--card); }
.doc-back:hover { border-color: var(--sand-deep); color: var(--ink); }
.doc-stage { max-width: 860px; }
.doc-stage .docpage { padding: 34px 44px; }
/* The in-app camera (tmcam.js) + photo chips and bubbles. */
.tmcam-veil { position: fixed; inset: 0; z-index: 400; background: #0d1518;
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tmcam-video { max-width: 100%; max-height: 74vh; border-radius: 10px; }
.tmcam-msg { color: #f4f2ec; font-size: 0.84rem; padding: 10px 22px; text-align: center; }
.tmcam-bar { position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 34px;
  padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); }
.tmcam-shot { width: 64px; height: 64px; border-radius: 50%; border: 4px solid #f4f2ec;
  background: rgba(244, 242, 236, 0.25); cursor: pointer; }
.tmcam-quiet, .tmcam-use { border: 1px solid rgba(244, 242, 236, 0.55); background: none;
  color: #f4f2ec; border-radius: 9px; padding: 10px 18px; min-height: 40px;
  font-family: inherit; font-size: 0.86rem; cursor: pointer; }
.tmcam-use { background: #f4f2ec; color: #16262f; font-weight: 500; }
.cam-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 40px; min-height: 40px; border: 1px solid var(--line-2, #d8ddda);
  border-radius: 9px; background: var(--card, #fff); color: var(--sand-deep, #8a6a44);
  cursor: pointer; padding: 8px 10px; font-family: inherit; font-size: 0.82rem; }
.cam-chip { font-size: 0.74rem; color: var(--accent-deep, #3c564f); }
.ib-photo { display: block; max-width: 240px; max-height: 240px; border-radius: 9px;
  margin: 4px 0 2px; }
