/* ==========================================================================
   components.css — the shared component vocabulary. Tokens only (see tokens.css).
   Every v2 screen composes from these; nothing here hard-codes a color.
   ========================================================================== */

/* buttons */
.btn { border: 1px solid transparent; border-radius: var(--radius-1); padding: 7px 13px; font: inherit; font-size: var(--fs-200); font-weight: var(--fw-medium); cursor: pointer; color: inherit; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.btn--accent { background: var(--green); color: var(--on-accent); }
.btn--accent:hover { background: var(--green-deep); }
.btn--ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-faint); }
.btn--danger { background: transparent; color: var(--red); border-color: var(--line); }
.btn--danger:hover, .btn--danger.is-armed { background: var(--red); color: #fff; border-color: var(--red); }
.btn--sm { padding: 4px 9px; font-size: var(--fs-100); }

/* split / combo button */
.split { position: relative; display: inline-flex; }
.split__main { background: var(--green); color: var(--on-accent); border: 0; border-radius: var(--radius-1) 0 0 var(--radius-1); padding: 7px 12px; font: inherit; font-size: var(--fs-200); font-weight: var(--fw-medium); cursor: pointer; }
.split__toggle { background: var(--green-deep); color: var(--on-accent); border: 0; border-left: 1px solid rgba(255,255,255,.25); border-radius: 0 var(--radius-1) var(--radius-1) 0; padding: 7px 8px; font-size: var(--fs-100); cursor: pointer; }
.split__main:hover, .split__toggle:hover { filter: brightness(1.06); }
.menu { position: absolute; top: calc(100% + 4px); right: 0; min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2); box-shadow: var(--shadow-2); padding: 4px; z-index: 50; }
.menu[hidden] { display: none; }
.menu button { display: flex; width: 100%; gap: 8px; align-items: center; text-align: left; background: none; border: 0; border-radius: var(--radius-1); padding: 7px 9px; font: inherit; font-size: var(--fs-200); color: var(--ink); cursor: pointer; }
.menu button:hover { background: var(--row-hover); }
.menu__sep { height: 1px; background: var(--line-2); margin: 4px 2px; }
.menu__danger { color: var(--red) !important; }
.menu__danger:hover { background: var(--red-tint) !important; }
.wipe-opts { margin: .6rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .5rem; color: var(--ink-soft); font-size: var(--fs-200); line-height: 1.5; }
.wipe-opts strong { color: var(--ink); }
.menu__label { color: var(--ink-faint); font-size: var(--fs-100); padding: 4px 9px 2px; text-transform: uppercase; letter-spacing: var(--ls-wide); }

/* fields */
.field { display: flex; flex-direction: column; gap: 3px; }
.field > span { font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-1); padding: 7px 9px; font: inherit; font-size: var(--fs-200); line-height: 1.4; color: var(--ink); width: 100%; height: 36px; }
.field textarea { height: auto; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.field textarea { resize: none; overflow: hidden; line-height: 1.4; }

/* status chips */
.chip { display: inline-block; font-size: var(--fs-100); font-weight: var(--fw-semibold); padding: 2px 9px; border-radius: var(--radius-pill); white-space: nowrap; background: var(--line-2); color: var(--ink-soft); }
.chip--active { background: var(--green-tint); color: var(--green-deep); }
.chip--pending { background: var(--amber-bg); color: var(--amber); }
.chip--inactive { background: var(--line-2); color: var(--ink-faint); }
:root[data-theme="dark"] .chip--active, :root:not([data-theme="light"]) .chip--active { color: var(--green); }

/* data table */
.tbl-wrap { border: 1px solid var(--line); border-radius: var(--radius-2); overflow: hidden; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-200); }
.tbl th { text-align: left; font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-soft); padding: 8px 10px; background: var(--thead); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.is-sortable { cursor: pointer; user-select: none; }
.tbl th .tbl__ar { font-size: 9px; }
.tbl th.tbl__cbx { width: 1px; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.tbl--clickable tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: var(--row-hover); }
.tbl tbody tr.is-selected { background: var(--row-sel); }
.tbl__bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: var(--fs-100); color: var(--ink-faint); }
.tbl__empty { text-align: center; color: var(--ink-faint); padding: var(--space-5); }

/* list-detail */
.listdetail { display: grid; grid-template-columns: minmax(11rem, 15rem) 1fr; gap: var(--space-3); align-items: start; }
.ld-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); overflow: hidden; }
.ld-item { display: flex; align-items: center; gap: var(--space-2); padding: 8px 12px; cursor: pointer; border-top: 1px solid var(--line-2); font-size: var(--fs-200); }
.ld-item:first-child { border-top: 0; }
.ld-item:hover { background: var(--surface-2); }
.ld-item.is-selected { background: var(--surface-2); font-weight: var(--fw-medium); }
.ld-item__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-detail { border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); padding: var(--space-4); }
@media (max-width: 48rem) { .listdetail { grid-template-columns: 1fr; } }

/* day-tab strip */
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.day { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-pill); padding: 4px 11px; font: inherit; font-size: var(--fs-200); color: var(--ink-soft); cursor: pointer; }
.day.is-active { background: var(--green-tint); border-color: var(--green); color: var(--green-deep); font-weight: var(--fw-semibold); }
:root[data-theme="dark"] .day.is-active, :root:not([data-theme="light"]) .day.is-active { color: var(--green); }

/* search / filter bar */
.filter { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.filter__in { flex: 1; min-width: 140px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-1); padding: 6px 9px; }
.filter__in input { border: 0; background: none; font: inherit; font-size: var(--fs-200); color: var(--ink); width: 100%; outline: none; }
.filter__chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-1); padding: 6px 9px; font: inherit; font-size: var(--fs-200); color: var(--ink-soft); cursor: pointer; white-space: nowrap; }

/* pagination */
.pg { display: flex; align-items: center; gap: 4px; margin: 0 0 .8rem; }
.pg button { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-1); min-width: 28px; height: 28px; font: inherit; font-size: var(--fs-200); color: var(--ink); cursor: pointer; }
.pg button.is-active { background: var(--navy); color: var(--navy-fg); border-color: var(--navy); }
.pg__rng { margin-left: auto; font-size: var(--fs-100); color: var(--ink-faint); }

/* KPI stat tile */
.kpi { display: flex; align-items: flex-end; gap: 10px; }
.kpi__v { font-family: var(--font-display); font-size: var(--fs-600); font-weight: var(--fw-bold); line-height: 1; font-variant-numeric: tabular-nums; }
.kpi__l { font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.kpi__d { font-size: var(--fs-100); font-weight: var(--fw-semibold); color: var(--green-deep); }
:root[data-theme="dark"] .kpi__d, :root:not([data-theme="light"]) .kpi__d { color: var(--green); }

/* dropzone */
.dropzone__file { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-1); padding: 4px 8px; font-size: var(--fs-100); color: var(--ink); margin-top: 8px; }

/* tooltip (JS-driven) */
.ibadge { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: var(--green); color: #fff; font-size: 10.5px; font-weight: 700; font-family: Georgia, serif; font-style: italic; cursor: help; }
.qtip { position: fixed; z-index: 9999; max-width: 16rem; background: #12303f; color: #fff; font-size: var(--fs-100); line-height: 1.35; padding: 6px 9px; border-radius: var(--radius-2); box-shadow: var(--shadow-2); pointer-events: none; }
.qtip[hidden] { display: none; }

/* reorderable list */
.reorder { display: flex; flex-direction: column; gap: 5px; }
.reorder__item { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-1); padding: 7px 9px; font-size: var(--fs-200); cursor: grab; }
.reorder__item.is-dragging { opacity: .4; }
.reorder__grip { color: var(--ink-faint); letter-spacing: -2px; }

/* modal + toast */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,30,40,.42); z-index: 1000; }
.modal-overlay[hidden] { display: none; }
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(30rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2); box-shadow: var(--shadow-2); padding: 1.2rem; }
.modal__title { font-family: var(--font-display); margin: 0 0 .4rem; font-size: var(--fs-500); }
.modal__body { margin: 0 0 1rem; color: var(--ink-soft); font-size: var(--fs-200); }
.modal__actions { display: flex; gap: .5rem; justify-content: flex-end; }
.toasts { position: fixed; right: 1rem; top: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 1100; }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: var(--radius-2); box-shadow: var(--shadow-2); padding: .6rem .85rem; font-size: var(--fs-200); min-width: 12rem; animation: toast-in var(--dur) var(--ease); }
.toast--error { border-left-color: var(--red); }
.toast--warn { border-left-color: var(--amber); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ==========================================================================
   page scaffolding + role admin pages (System Roles, Venue Roles)
   ========================================================================== */
.page__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.page__actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.inline-field { display: inline-flex; align-items: center; gap: .5rem; }
.inline-field > span { font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.field__input { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-1); padding: 7px 9px; font: inherit; font-size: var(--fs-200); line-height: 1.4; color: var(--ink); }
input.field__input, select.field__input { height: 36px; }
.field__input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.field__input:disabled { color: var(--ink-faint); }

.row-actions { display: inline-flex; gap: 5px; justify-content: flex-end; }

.hint { font-size: var(--fs-100); color: var(--ink-soft); line-height: 1.45; margin: .6rem 0 0; }
.hint--warn { color: var(--amber); }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: var(--fs-100); }

.chip--sys { background: var(--row-sel); color: var(--ink); }
.chip--muted { background: var(--line-2); color: var(--ink-faint); }

.tbl__num { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.tbl__muted { color: var(--ink-faint); }

/* venue roles: drag-to-reorder rows (built on the kit .reorder pattern) */
.reorder { counter-reset: vr; }
.reorder__item { counter-increment: vr; }
.vr-num { min-width: 1.5rem; text-align: right; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.vr-num::before { content: counter(vr); }
.vr-name { flex: 1; min-width: 0; }
.vr-end { display: inline-flex; gap: 6px; margin-left: auto; }
.reorder__item.is-off .vr-name { opacity: .5; }
/* venues: reorder list laid out in columns with a matching header row */
.v-head { display: flex; align-items: center; gap: 8px; padding: 0 9px 6px; font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.v-loc { width: 11rem; flex: none; }
.v-cost, .v-flat { width: 8rem; flex: none; }
.v-col { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.v-act { width: 12rem; flex: none; display: inline-flex; justify-content: flex-end; gap: 6px; }

/* ===== Staff Files (eventFiles.js): list + one-file editor ===== */
.ef-layout { display: grid; grid-template-columns: 16rem 1fr; gap: 1rem; align-items: start; margin-top: .8rem; }
@media (max-width: 52rem) { .ef-layout { grid-template-columns: 1fr; } }
.ef-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.ef-item { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-1); background: var(--surface-2); cursor: pointer; }
.ef-item:hover { border-color: var(--ink-faint); }
.ef-item.is-selected { border-color: var(--green); background: var(--green-tint); }
.ef-item--empty { cursor: default; color: var(--ink-faint); justify-content: center; }
.ef-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-item__tag { font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.ef-item__tag--warn { color: var(--amber, #b45309); }
.ef-detail { border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); padding: 1.1rem 1.2rem; min-width: 0; }
.ef-detail__head { display: flex; align-items: center; gap: .8rem; }
.ef-detail__head .ef-name { flex: 1; min-width: 0; font-weight: var(--fw-semibold); }
.ef-share { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: var(--fs-200); }
.ef-desc-wrap { display: block; margin-top: .8rem; }
.ef-latest { margin: .8rem 0 .2rem; font-size: var(--fs-200); }
.ef-lib-wrap { display: inline-flex; align-items: center; gap: .5rem; margin: .6rem 0; font-size: var(--fs-200); color: var(--ink-2); }
.ef-vers-label { margin: 1rem 0 .3rem; font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.doc-revs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.doc-rev { display: flex; align-items: center; gap: .8rem; padding: 6px 2px; border-top: 1px solid var(--line-2); font-size: var(--fs-200); }
.doc-rev__n { font-weight: var(--fw-semibold); min-width: 3rem; }
.doc-rev__file { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-rev__date { color: var(--ink-faint); }
.doc-rev__open { color: var(--green); }
.doc-rev__del { border: 0; background: none; color: var(--ink-faint); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.doc-rev__del:hover { color: var(--red, #dc2626); }

/* ===== Dashboard (dashboard.js) ===== */
.db-hero { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 1.1rem 1.3rem; }
.db-hero__eyebrow { font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.db-hero__title { margin: .2rem 0 0; font-size: 1.6rem; line-height: 1.1; }
.db-hero__sub { color: var(--ink-2); margin-top: .25rem; }
.db-hero__side { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.db-hero__counts { color: var(--ink-2); font-size: var(--fs-200); }
.db-hero__actions { display: inline-flex; gap: 6px; }
.db-cd { padding: 3px 10px; border-radius: 999px; font-size: var(--fs-100); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--ls-wide); background: var(--surface-2); color: var(--ink-2); }
.db-cd--soon { background: var(--green-tint); color: var(--green-deep); }
.db-cd--now { background: var(--green); color: #fff; }
.db-cd--muted { background: var(--line-2); color: var(--ink-faint); }
.db-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .7rem; margin: 1rem 0; }
.db-tile { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: .8rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2); cursor: pointer; transition: border-color .12s, transform .12s; }
.db-tile:hover { border-color: var(--ink-faint); transform: translateY(-1px); }
.db-tile__val { font-size: 1.7rem; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.db-tile__of { color: var(--ink-faint); font-size: 1rem; font-weight: 400; }
.db-tile__label { font-weight: var(--fw-medium); }
.db-tile__sub { font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.db-tile--ok { border-color: var(--green); }
.db-tile--ok .db-tile__val { color: var(--green-deep); }
.db-tile--warn { border-color: var(--amber, #d19a1a); }
.db-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 1rem 1.2rem; }
.db-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.db-issue { display: flex; align-items: center; gap: .6rem; padding: .5rem 2px; border-top: 1px solid var(--line-2); cursor: pointer; }
.db-issue:first-child { border-top: 0; }
.db-issue__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber, #d19a1a); flex: none; }
.db-issue__go { margin-left: auto; color: var(--ink-faint); }
.db-issue:hover .db-issue__go { color: var(--ink); }
.db-allgood { margin: 0; color: var(--green-deep); }
.db-seclabel { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 1.4rem 0 .5rem; font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.db-seclabel > span:last-child { display: inline-flex; gap: 6px; }
.db-comm { display: flex; flex-direction: column; }
.db-comm__row { display: flex; align-items: baseline; gap: .8rem; padding: .4rem 2px; border-top: 1px solid var(--line-2); }
.db-comm__row:first-child { border-top: 0; }
.db-comm__date { width: 6rem; flex: none; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.db-comm__who { width: 10rem; flex: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.db-comm__item { flex: 1; min-width: 0; }
.db-mlist { display: flex; flex-direction: column; gap: 6px; }
.db-mrow { display: flex; align-items: center; gap: .7rem; }
.db-mrow__name { width: 8rem; flex: none; font-weight: var(--fw-medium); }
.db-min { flex: 1; min-width: 0; }

/* users & access */
.ua-email { font-size: var(--fs-100); color: var(--ink-faint); margin-top: 1px; }
.ua-vcell { display: flex; align-items: center; gap: .6rem; }
.ua-vsum { font-size: var(--fs-100); color: var(--ink-soft); }
.ua-vpick { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.ua-ven { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-200); }
.ua-act { text-align: right; white-space: nowrap; }
.tbl tbody tr.ua-off td { opacity: .6; }
.tbl tbody tr.ua-off .ua-act, .tbl tbody tr.ua-off td:first-child { opacity: 1; }
.ua-tier { width: auto; min-width: 8.5rem; }

/* style-guide embed */
.sg-frame { border: 1px solid var(--line); border-radius: var(--radius-2); overflow: hidden; background: var(--surface); }
.sg-frame iframe { display: block; width: 100%; height: calc(100vh - 220px); min-height: 30rem; border: 0; }

/* roles & permissions matrix (read-only reference) */
.section-h { font-family: var(--font-display); font-size: var(--fs-400); font-weight: var(--fw-bold); margin: 1.8rem 0 .2rem; }
.matrix-scroll { overflow-x: auto; }
.matrix { min-width: 44rem; }
.matrix th, .matrix td { text-align: center; }
.matrix thead th:first-child, .matrix tbody th { text-align: left; white-space: nowrap; }
.matrix tbody th { background: var(--surface); color: var(--ink); font-weight: var(--fw-semibold); }
.matrix tbody tr:hover td, .matrix tbody tr:hover th { background: var(--surface); }
.cap-yes { color: var(--green-deep); font-weight: var(--fw-bold); }
:root[data-theme="dark"] .cap-yes, :root:not([data-theme="light"]) .cap-yes { color: var(--green); }
.cap-scoped { color: var(--amber); font-weight: var(--fw-semibold); font-size: var(--fs-100); }
.cap-view { color: var(--ink-soft); font-size: var(--fs-100); }
.cap-no { color: var(--ink-faint); }

/* two-column form row (modals) */
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; align-items: start; }
.modal .field + .field, .modal .field + .form-2, .modal .form-2 + .field, .modal .form-2 + .form-2 { margin-top: .7rem; }
/* the grid handles spacing between the two columns — cancel the sibling margin
   that would otherwise push the second column down */
.modal .form-2 > .field { margin-top: 0; }

/* checkbox rows in modals */
.chk-row { display: flex; flex-direction: column; gap: 8px; margin-top: .8rem; }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-200); }

/* alumni: link, duplicates modal (filter/pager spacing is on .filter/.pg) */
.lnk { color: var(--green-deep); text-decoration: none; }
.lnk:hover { text-decoration: underline; }
:root[data-theme="dark"] .lnk, :root:not([data-theme="light"]) .lnk { color: var(--green); }
.dupe-wrap { max-height: 55vh; overflow: auto; }
.dupe__h { font-family: var(--font-display); font-size: var(--fs-300); margin: .8rem 0 .4rem; }
.dupe { border: 1px solid var(--line); border-radius: var(--radius-1); padding: .5rem .7rem; margin-bottom: .5rem; background: var(--surface-2); }
.dupe__row { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-200); padding: 2px 0; }

/* inventory table */
.inv-tbl td { vertical-align: middle; }
.inv-name { width: 100%; min-width: 9rem; }
.inv-num { width: 6rem; text-align: right; }
.inv-tbl th:nth-child(2), .inv-tbl th:nth-child(3), .inv-tbl th:nth-child(4) { width: 7rem; }
.inv-total { font-variant-numeric: tabular-nums; }

/* communication template table */
.ct-day { white-space: nowrap; width: 1%; }
.ct-who { white-space: nowrap; width: 1%; color: var(--ink-soft); }
.ct-item { white-space: pre-wrap; }

/* activity log table */
.ac-when, .ac-who, .ac-entity { white-space: nowrap; }
.ac-when { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* role/daily template item bits (rt-empty, rt-i) */
.rt-empty { color: var(--ink-faint); font-size: var(--fs-100); padding: 6px 4px; }
.rt-i { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--green); color: #fff; font-size: 10px; font-weight: var(--fw-bold); font-style: italic; cursor: help; }

/* daily template item time */
.dt-time { display: inline-block; min-width: 3.2rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* todo template table */
.td-tbl .td-type, .td-tbl .td-who { white-space: nowrap; width: 1%; }
.td-tbl .td-who { color: var(--ink-soft); }
#tdTabs { margin-bottom: .8rem; }

/* template list-detail (section rail + selected section's items) — Role & Daily */
.tpl-ld { display: grid; grid-template-columns: minmax(11rem, 15rem) 1fr; gap: 1rem; align-items: start; }
.tpl-rail .reorder { gap: 5px; }
.tpl-chip { cursor: pointer; }
.tpl-chip.is-active { border-color: var(--green); background: var(--green-tint); }
.tpl-chip__name { flex: 1; min-width: 0; font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-chip__edit { background: none; border: 0; color: var(--ink-faint); cursor: pointer; font-size: 13px; padding: 2px 4px; line-height: 1; }
.tpl-chip__edit:hover { color: var(--ink); }
.tpl-detail { border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); padding: .9rem; min-width: 0; }
.tpl-detail__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.tpl-items { gap: 6px; }
@media (max-width: 46rem) { .tpl-ld { grid-template-columns: 1fr; } }

/* clone tool card */
.cl-card { max-width: 40rem; }

/* docs viewer (rail Docs panel) */
.dv-sec { margin-bottom: 1.6rem; }
.dv-h { font-size: var(--fs-300); margin: 0 0 .3rem; }
.dv-grp { margin: .9rem 0 .35rem; font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-faint); }
.dv-list { border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); overflow: hidden; }
.dv-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; }
.dv-row + .dv-row { border-top: 1px solid var(--line); }
.dv-ico { flex: none; font-size: 1.1rem; line-height: 1; }
.dv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-act { flex: none; display: flex; gap: .4rem; }
.lk-url a { word-break: break-all; }

/* event Roles sheet — compact section cards in two ordered columns */
.er-2col { display: flex; align-items: flex-start; gap: .9rem; }
.er-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .9rem; }
@media (max-width: 52rem) { .er-2col { flex-direction: column; } }
.er-card { break-inside: avoid; border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); overflow: hidden; }
.er-card--wide { margin-top: .9rem; }
.er-card__h { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .2rem .6rem; background: var(--thead, var(--surface-2)); border-bottom: 1px solid var(--line); }
.er-card__t { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-200); }
.er-rows { display: flex; flex-direction: column; }
.er-row { display: flex; align-items: center; gap: .6rem; padding: 0 .6rem; min-height: 1.5rem; font-size: var(--fs-200); }
.er-row + .er-row { border-top: 1px solid var(--line-2); }
.er-row__label { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: .3rem; }
.er-row__name { font-weight: var(--fw-medium); }
.er-row__ctrl { flex: none; display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; max-width: 62%; }
.er-sel { min-width: 8.5rem; max-width: 12rem; height: 23px; min-height: 23px; font-size: var(--fs-100); padding: 0 4px; line-height: 1.1; margin: 2px 0; }
.er-name { white-space: nowrap; }
.er-mini { border: 0; background: none; color: var(--ink-faint); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; border-radius: var(--radius-1); }
.er-mini:hover { background: var(--row-hover); color: var(--ink); }
.er-i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--green); color: #fff; font-size: 9px; font-weight: var(--fw-bold); font-style: italic; cursor: help; }
/* daily run sheet rows (Time | Item | Who | Notes) */
.dy-row { align-items: flex-start; cursor: pointer; }
.dy-row .er-row__label { flex: 0 0 19rem; }
.dy-row .er-row__ctrl { flex: 0 0 12rem; max-width: 12rem; justify-content: flex-start; }
.dy-time { display: inline-block; min-width: 3.4rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.dy-notes { flex: 1; min-width: 8rem; color: var(--ink-soft); line-height: 1.4; white-space: pre-wrap; }
@media (max-width: 46rem) { .dy-row { flex-wrap: wrap; } .dy-row .er-row__label, .dy-row .er-row__ctrl { flex-basis: 100%; max-width: none; } .dy-notes { flex-basis: 100%; } }

/* event Todo checklist (reorder list with columns) */
.td-head { display: flex; gap: .6rem; padding: .2rem .7rem .3rem 2.1rem; font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-soft); }
.td-list .reorder__item { align-items: flex-start; cursor: pointer; }
.td-c-done { flex: 0 0 3rem; text-align: center; }
.td-c-done input { cursor: pointer; }
.td-c-who { flex: 0 0 11rem; min-width: 0; }
.td-c-item { flex: 1; min-width: 8rem; }
.td-c-notes { flex: 1; min-width: 8rem; white-space: pre-wrap; color: var(--ink-soft); }
.td-strike { text-decoration: line-through; color: var(--ink-faint); }
.td-head .td-c-done { text-align: left; }

/* event Communication schedule */
.cm-tbl tbody tr { cursor: pointer; }
.cm-days, .cm-date, .cm-day { white-space: nowrap; width: 1%; }
.cm-who { white-space: nowrap; }
.cm-item { white-space: pre-wrap; }

/* event Financials */
.fin-layout { display: grid; grid-template-columns: 17rem 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 52rem) { .fin-layout { grid-template-columns: 1fr; } }
.fin-side { display: flex; flex-direction: column; gap: 1rem; }
.fin-group { border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); overflow: hidden; }
.fin-group__title { padding: .4rem .7rem; background: var(--thead, var(--surface-2)); border-bottom: 1px solid var(--line); font-weight: var(--fw-bold); font-size: var(--fs-200); }
.fin-var { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .3rem .7rem; font-size: var(--fs-200); }
.fin-var + .fin-var { border-top: 1px solid var(--line-2); }
.fin-var__label { color: var(--ink-soft); }
.fin-var__val { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.fin-in { width: 6.5rem; text-align: right; border: 1px solid var(--line); border-radius: var(--radius-1); background: var(--surface-2); padding: 3px 6px; font: inherit; font-size: var(--fs-200); color: var(--ink); font-variant-numeric: tabular-nums; }
.fin-slider { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.fin-slider input[type=range] { flex: 1; max-width: 30rem; }
.fin-slider__hint { color: var(--ink-faint); font-size: var(--fs-100); }
.fin-matrix { width: 100%; border-collapse: collapse; font-size: var(--fs-200); }
.fin-matrix th, .fin-matrix td { padding: 4px 10px; }
.fin-matrix thead th { text-align: right; font-weight: var(--fw-bold); border-bottom: 2px solid var(--line); }
.fin-matrix thead th:first-child { text-align: left; }
.fin-num { text-align: right; font-variant-numeric: tabular-nums; }
.fin-num--strong { font-weight: var(--fw-bold); }
.fin-rowlabel { color: var(--ink); white-space: nowrap; }
.fin-rowlabel--strong { font-weight: var(--fw-bold); }
.fin-indent { padding-left: 1.4rem; color: var(--ink-soft); }
.fin-head td { font-weight: var(--fw-bold); padding-top: .6rem; }
.fin-sep td { border-bottom: 1px solid var(--line); padding: 0; height: 4px; }
.fin-neg { color: var(--red); }
.fin-pos { color: var(--green-deep); }
:root[data-theme="dark"] .fin-pos, :root:not([data-theme="light"]) .fin-pos { color: var(--green); }
.fin-col--actual { background: var(--green-tint); }

/* event Seats / Cleaning — pool + drop-target cards */
.seat-layout { display: grid; grid-template-columns: 26rem 1fr; gap: 1rem; align-items: start; }
@media (max-width: 60rem) { .seat-layout { grid-template-columns: 1fr; } }
.seat-pool__cols { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.seat-pool__col { min-width: 0; border-right: 1px solid var(--line-2); }
.seat-pool__col:last-child { border-right: 0; }
.seat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; align-items: start; }
.seat-grid--areas { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
@media (max-width: 40rem) { .seat-grid { grid-template-columns: 1fr; } }
.seat-pool { border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); overflow: hidden; }
.seat-pool__grp { padding: .35rem .7rem; font-size: var(--fs-100); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-soft); border-top: 1px solid var(--line-2); }
.seat-card { border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--surface); overflow: hidden; }
.seat-card__h { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem .7rem; background: var(--thead, var(--surface-2)); border-bottom: 1px solid var(--line); font-weight: var(--fw-bold); font-size: var(--fs-200); }
.seat-card__n { font-weight: var(--fw-semibold); color: var(--ink-faint); }
.seat-list { display: flex; flex-direction: column; gap: 4px; padding: .5rem; min-height: 2.2rem; }
.seat-chip { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-1); padding: .3rem .55rem; font-size: var(--fs-200); cursor: grab; }
.seat-chip.is-dragging { opacity: .5; }
.seat-chip__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-role { color: var(--green-deep); font-size: var(--fs-100); }
:root[data-theme="dark"] .seat-role, :root:not([data-theme="light"]) .seat-role { color: var(--green); }
.seat-ref { color: var(--ink-faint); font-size: var(--fs-100); font-weight: 400; }
.seat-x { border: 0; background: none; color: var(--ink-faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.seat-x:hover { color: var(--red); }
.seat-card.is-over, .seat-pool.is-over { outline: 2px dashed var(--green); outline-offset: -3px; }

.er-count { max-height: 55vh; overflow: auto; }
.er-count__row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem .2rem; border-bottom: 1px solid var(--line-2); font-size: var(--fs-200); }
/* wide card (Daily Responsibilities): label + inline row of selects */
.er-card--wide .er-row__label { flex: 0 0 14rem; }
.er-card--wide .er-row__ctrl { flex: 1; max-width: none; flex-wrap: nowrap; justify-content: flex-start; }
.er-card--wide .er-sel { flex: 1; min-width: 7rem; max-width: none; }
@media (max-width: 40rem) { .er-card--wide .er-row { flex-wrap: wrap; } .er-card--wide .er-row__label { flex-basis: 100%; } .er-card--wide .er-row__ctrl { flex-wrap: wrap; } }

/* event chooser (top-nav picker modal) */
.ec-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: .4rem; max-height: 50vh; overflow-y: auto; }
.ec-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-1); padding: .5rem .7rem; font: inherit; cursor: pointer; }
.ec-item:hover { border-color: var(--green); }
.ec-item.is-active { border-color: var(--green); background: var(--green-tint); }
.ec-item__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-semibold); }
.ec-item__date { flex: none; color: var(--ink-faint); font-size: var(--fs-100); }

/* upload dropzone (document versions) */
.dropzone { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; padding: 1.1rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius-2); background: var(--surface-2, var(--surface)); color: var(--ink-faint); cursor: pointer; text-align: left; transition: border-color .12s, background .12s, color .12s; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--green); color: var(--ink); outline: none; }
.dropzone.is-over { border-color: var(--green); background: var(--green-tint); color: var(--ink); }
.dropzone.is-busy { opacity: .6; pointer-events: none; }
.dropzone__ico { font-size: 1.4rem; line-height: 1; color: var(--green); }
.dropzone__link { color: var(--green); font-weight: var(--fw-semibold); }

.chk-row { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.rule { border: 0; border-top: 1px solid var(--line-2); margin: 1rem 0 .2rem; }

/* ===== Print reports (eventPrint.js) — white "paper" sheets, print-safe ===== */
.print-area { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.print-sheet { background: #fff; color: #1a1a1a; border: .5px solid #d9d9d9; border-radius: 4px; padding: 40px 44px; width: 46rem; max-width: 100%; }
.print-sheet__head { text-align: center; border-bottom: 2px solid #1a1a1a; padding-bottom: 12px; margin-bottom: 18px; }
.print-sheet__title { font-size: 18px; font-weight: 600; }
.print-sheet__sub { font-size: 13px; color: #555; margin-top: 2px; }
.print-sheet__foot { text-align: right; font-size: 11px; color: #999; margin-top: 20px; }
.print-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-table th { text-align: left; padding: 6px 8px; font-weight: 600; border-bottom: 1px solid #999; }
.print-table td { padding: 6px 8px; border-bottom: .5px solid #ddd; vertical-align: top; }
.print-table th.print-num, .print-table td.print-num { width: 2.5rem; text-align: right; color: #666; }
.print-table th.inv-cell, .print-table td.inv-cell { width: 6rem; }
.print-empty { color: #999; text-align: center; }
/* Roles: non-daily 3-column list */
.pr-cols { columns: 3; column-gap: 16px; font-size: 11px; line-height: 1.45; }
.pr-sec { break-inside: avoid; margin-bottom: 12px; }
.pr-sec__head { background: #eee; color: #1a1a1a; font-weight: 600; padding: 2px 5px; border: .5px solid #ccc; }
.pr-row { display: flex; justify-content: space-between; gap: 8px; padding: 1px 2px; }
.pr-row b { text-align: right; }
/* Roles: daily matrix */
.pr-daily { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 14px; }
.pr-daily th, .pr-daily td { border-bottom: .5px solid #ddd; padding: 3px 6px; text-align: left; }
.pr-daily thead th { border-bottom: 1px solid #999; font-weight: 600; }
.pr-daily__p { width: 14%; }
/* Staff Notes worksheet */
.sn-bar { background: #1f2d4d; color: #fff; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 6px 12px; margin-bottom: 12px; }
.sn-row { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; font-size: 13px; }
.sn-lbl { font-weight: 600; width: 80px; flex: none; }
.sn-lbl--m { width: auto; }
.sn-val { flex: 1; background: #f0f0f0; border-bottom: 1px solid #1a1a1a; padding: 1px 5px; min-height: 16px; }
.sn-name { font-weight: 600; font-size: 15px; }
.sn-prompt { flex: 1; }
.sn-nameline { gap: 8px; }
.sn-lines { margin-top: 6px; }
.sn-line { border-bottom: 1.5px solid #1a1a1a; height: 26px; }
/* Daily schedule */
.pd-date { font-size: 13px; color: #555; margin: -8px 0 12px; }
.pd-table th.pd-time, .pd-table td.pd-time { width: 4rem; }
.pd-table th.pd-who, .pd-table td.pd-who { width: 9rem; }
.pd-table td.pd-notes { color: #333; }
/* Seats / Cleaning cards */
.ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ps-seat { break-inside: avoid; border: .5px solid #999; border-radius: 4px; padding: 8px 10px; font-size: 12px; }
.ps-seat__num { font-weight: 600; border-bottom: 1px solid #999; margin-bottom: 4px; padding-bottom: 2px; }
.ps-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-col__head { font-weight: 600; color: #555; font-size: 11px; }
.ps-name { padding: 1px 0; border-bottom: .5px solid #eee; }
.print-break { break-before: page; }

@media print {
  .hdr, .rail, .subnav, .no-print { display: none !important; }
  /* let the normally fixed-height, overflow-hidden shell grow & paginate */
  .shell, .main, .work, .view, #eventroot { display: block !important; height: auto !important; max-height: none !important; min-height: 0 !important; overflow: visible !important; position: static !important; }
  .view { padding: 0 !important; }
  .print-area { display: block; }
  .print-sheet { border: 0; border-radius: 0; padding: 0 6px; width: auto; max-width: none; }
  .print-table tr, .pr-daily tr { break-inside: avoid; }
}
