/* ==========================================================
   GLS Dais · control panel, login and Secretariat pages.
   The main site's scheme: ink and oxblood grounds, ivory text,
   parchment for the instrument, wine for actions.
   ========================================================== */
:root {
  --panel: #1a0a0c; --card: #22090d; --card-2: #2c0d12;
  --ok: #8fcaa9; --ok-wash: rgba(143, 202, 169, 0.14);
  --bad: #ec8b7f; --bad-wash: rgba(236, 139, 127, 0.14);
  --warn: #e9b65c; --warn-wash: rgba(233, 182, 92, 0.15);
  --pros: #e6a084; --def: #98bde0; --jury: #d9cab0;
}
html, body { height: 100%; }
body { margin: 0; background: var(--ink); color: var(--ivory); font: 17px/1.45 var(--text); -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; line-height: 1.15; letter-spacing: 0.01em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--parchment); outline-offset: 2px; }
::selection { background: var(--wine-2); color: var(--ivory); }
.booting { padding: 4rem; text-align: center; color: var(--muted); }
.dim { color: var(--muted); }
.small { font-size: 0.85em; }
.hint { color: var(--muted); font-size: 0.95rem; }
.err { color: var(--bad); font-weight: 600; }
.lbl { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--parchment); font-weight: 600; }
.eyebrow { font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--parchment); font-weight: 600; }
kbd { font: 600 0.72em/1 var(--text); padding: 0.15em 0.4em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 3px; color: var(--parchment); background: transparent; }

/* ---------- buttons ---------- */
.btn {
  font: 500 0.98rem/1.2 var(--text); display: inline-flex; align-items: center; gap: 0.4em; text-decoration: none;
  padding: 0.42em 0.85em; border: 1px solid var(--line-strong); border-radius: 2px;
  background: transparent; color: var(--ivory); cursor: pointer; white-space: nowrap;
}
.btn:hover:not(:disabled):not(.on):not(.danger) { border-color: var(--parchment); background: rgba(217, 202, 176, 0.06); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn kbd { margin-left: 0.2em; }
.btn-primary { background: var(--ivory); color: var(--ink); border-color: var(--ivory); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--parchment); border-color: var(--parchment); }
.btn-primary kbd { color: var(--ink); border-color: rgba(13, 6, 6, 0.35); }
.btn-warn { background: var(--warn-wash); border-color: var(--warn); color: var(--warn); }
.btn-ok { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.btn-bad { background: var(--bad-wash); border-color: var(--bad); color: var(--bad); font-weight: 600; }
.btn-quiet { border-color: transparent; color: var(--muted); }
.btn-quiet:hover:not(:disabled) { border-color: var(--line); }
.btn-xs { padding: 0.15em 0.55em; font-size: 0.86rem; }
.btn-big { font-size: 1.2rem; padding: 0.55em 1em; width: 100%; justify-content: center; background: var(--wine-2); border-color: var(--wine-2); font-weight: 600; letter-spacing: 0.04em; }
.btn-big:hover:not(:disabled) { background: #7d1c27; border-color: var(--parchment); }
.btn.on { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.btn.on.danger, .btn.danger { background: var(--bad); color: var(--ink); border-color: var(--bad); }
/* Filled buttons keep their fill on hover (the plain hover wash would leave dark text on a dark ground). */
.btn.on:hover:not(:disabled), .btn.danger:hover:not(:disabled) { filter: brightness(1.08); }
.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; display: flex; gap: 0.6em; align-items: baseline; flex-wrap: wrap; }
.seg-ctl { display: inline-flex; }
.seg-ctl .btn { border-radius: 0; margin-left: -1px; }
.seg-ctl .btn:first-child { border-radius: 2px 0 0 2px; margin-left: 0; }
.seg-ctl .btn:last-child { border-radius: 0 2px 2px 0; }
.seg-ctl.sm .btn { padding: 0.18em 0.6em; font-size: 0.86rem; }

.row { display: flex; gap: 0.5rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.col { display: flex; flex-direction: column; gap: 0.4rem; }
.col.end { align-items: flex-end; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }

input, select, textarea { font: 1rem var(--text); padding: 0.38em 0.55em; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--ink-2); color: var(--ivory); }
input:focus, select:focus, textarea:focus { border-color: var(--parchment); outline: none; }
select option { background: var(--oxblood); color: var(--ivory); }
textarea { resize: vertical; width: 100%; }
label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.95rem; color: var(--muted); }
label input, label select, label textarea { color: var(--ivory); }
.num { width: 5.5em; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.3rem; }
.seg-radio { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.seg-radio legend { width: 100%; }
.seg-radio label { flex-direction: row; align-items: center; gap: 0.35rem; border: 1px solid var(--line-strong); border-radius: 2px; padding: 0.35em 0.75em; color: var(--ivory); cursor: pointer; }
.seg-radio label:has(input:checked) { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.seg-radio input { margin: 0; accent-color: var(--wine-2); }
.seg-radio.big label { font-size: 1.05rem; padding: 0.5em 1em; }

/* ---------- chips & badges ---------- */
.chip { display: inline-block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.12em 0.6em; border-radius: 999px; border: 1px solid currentColor; vertical-align: middle; }
.chip.s-P { color: var(--pros); }
.chip.s-D { color: var(--def); }
.chip.s-J, .chip.s-C { color: var(--jury); }
.chip.st-for { color: var(--ok); }
.chip.st-against { color: var(--bad); }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.12em 0.6em; border-radius: 2px; border: 1px solid var(--line-strong); color: var(--parchment); }
.badge.mob { background: var(--parchment); color: var(--ink); border-color: var(--parchment); }
.badge.out { border-color: var(--bad); color: var(--bad); }
.lock { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bad); margin-left: 0.3em; white-space: nowrap; }
.live-dot { font-size: 0.7rem; font-weight: 700; color: var(--ink); background: var(--bad); padding: 0.05em 0.45em; border-radius: 2px; margin-left: 0.3em; white-space: nowrap; }
.count { display: inline-block; min-width: 1.4em; text-align: center; font-size: 0.72rem; background: var(--ivory); color: var(--ink); border-radius: 999px; padding: 0.05em 0.4em; margin-left: 0.3em; font-weight: 700; }
.count.warn { background: var(--warn); }
.pill { font: 600 0.82rem var(--text); padding: 0.25em 0.75em; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); background: transparent; }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.busy { color: var(--muted); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.bad { color: var(--ink); border-color: var(--bad); background: var(--bad); cursor: pointer; }
.tag { align-self: flex-start; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.1em 0.5em; border-radius: 2px; }
.tag.tv { background: var(--ivory); color: var(--ink); }
.tag.wait { color: var(--warn); border: 1px solid var(--warn); }
.tag.old { color: var(--muted); border: 1px solid var(--line-strong); }
.admin-tag { color: var(--warn); font-weight: 600; }

/* ---------- layout ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
#hdr { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem 1rem; background: var(--oxblood); flex: none; position: relative; }
#hdr::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; background: var(--key) repeat-x; background-size: 12px 12px; opacity: 0.55; pointer-events: none; }
.hdr-l, .hdr-r { display: flex; align-items: center; gap: 0.7rem; }
.hdr-crest { width: 34px; height: 34px; object-fit: contain; }
.logo { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.02em; }
.case { color: var(--muted); font-size: 0.95rem; letter-spacing: 0.12em; }
.sess { font: 600 0.92rem var(--text); color: var(--ink); background: var(--parchment); border: 0; border-radius: 2px; padding: 0.28em 0.75em; cursor: pointer; }
.layout { flex: 1; display: grid; grid-template-columns: 210px minmax(0, 1fr) 380px; min-height: 0; margin-top: 12px; }
#nav { overflow-y: auto; padding: 0.75rem 0.5rem 2rem; border-right: 1px solid var(--line); background: var(--ink-2); }
#main { overflow-y: auto; padding: 1rem 1.25rem 4rem; display: flex; flex-direction: column; gap: 0.9rem; outline: none; }
#side { overflow-y: auto; padding: 0.75rem; border-left: 1px solid var(--line); background: var(--ink-2); display: flex; flex-direction: column; gap: 0.75rem; }

.nav-h { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--parchment); font-weight: 600; padding: 0.9rem 0.6rem 0.3rem; }
.nav-h:first-child { padding-top: 0.2rem; }
.nav-i { display: block; width: 100%; text-align: left; font: 1rem var(--text); padding: 0.36em 0.6em; border: 0; border-radius: 2px; background: transparent; color: var(--ivory); cursor: pointer; }
.nav-i:hover { background: rgba(217, 202, 176, 0.07); }
.nav-i.on { background: var(--wine); box-shadow: inset 2px 0 0 var(--parchment); }

/* ---------- floor ---------- */
.strip { display: flex; align-items: center; gap: 0.5rem; }
.strip ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.3rem; flex-wrap: wrap; flex: 1; }
.stp { font: 0.9rem var(--text); padding: 0.25em 0.7em; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.stp.done { color: rgba(179, 164, 147, 0.6); text-decoration: line-through; }
.stp.on { background: var(--ivory); color: var(--ink); border-color: var(--ivory); font-weight: 600; }
.stage-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.stage-h h1 { font-size: 2.1rem; }
.badges { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }

.card, .clock-card { background: var(--card); border: 1px solid var(--line); border-radius: 2px; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.card.note { background: rgba(217, 202, 176, 0.07); border-color: rgba(217, 202, 176, 0.3); }
.card.danger-zone { border-color: rgba(236, 139, 127, 0.4); }
.clock-card { align-items: center; text-align: center; padding: 1rem 1rem 1.1rem; background: var(--oxblood); border-color: var(--line-strong); }
.clock { font-family: var(--display); font-weight: 500; line-height: 1; transition: color 0.2s; font-variant-numeric: lining-nums tabular-nums; }
.clock.big { font-size: 7.5rem; }
.clock.mid { font-size: 2.6rem; }
.clock.warn { color: var(--warn); }
.clock.over { color: var(--bad); }
.clock.paused { opacity: 0.55; }
.bar { position: relative; width: 100%; height: 6px; border-radius: 3px; background: rgba(239, 230, 214, 0.1); }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--parchment); transition: width 0.2s linear; }
.bar i.over { background: var(--bad); }
.bar .half { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--ivory); }
.ctl { justify-content: center; flex-wrap: wrap; }
.totals { font-size: 1rem; }
.totals b { font-family: var(--display); font-size: 1.15rem; font-weight: 500; }
.topic { font-size: 1.1rem; font-style: italic; }
.big-name { font-family: var(--display); font-size: 1.6rem; }
.wit .col { min-width: 12rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pick { font: 1rem var(--text); padding: 0.35em 0.85em; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ivory); cursor: pointer; }
.pick:hover { border-color: var(--parchment); }
.pick.on.s-P { background: var(--pros); color: var(--ink); border-color: var(--pros); }
.pick.on.s-D { background: var(--def); color: var(--ink); border-color: var(--def); }
.pick.on.s-J { background: var(--jury); color: var(--ink); border-color: var(--jury); }
.tips { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; }

table { border-collapse: collapse; }
.list { width: 100%; }
.list td { padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list .n { color: var(--muted); width: 2rem; }
.list select { width: 100%; max-width: 18rem; }
.list .st { width: 6rem; }
.list .used { width: 4rem; font-variant-numeric: tabular-nums; }
.list .acts { width: 7.5rem; text-align: right; white-space: nowrap; }
.li-current { background: rgba(217, 202, 176, 0.09); }
.li-done { color: rgba(179, 164, 147, 0.6); }

.delib .hint.closed { color: var(--bad); font-weight: 600; }
.motions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.mo { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 2px; }
.mo-failed, .mo-done { opacity: 0.5; }
.mo-passed { border-color: var(--ok); background: var(--ok-wash); }
.motion-form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: flex-end; }
.motion-form label { flex-direction: row; align-items: center; gap: 0.3rem; }
.motion-form input[name="topic"] { flex: 1; min-width: 12rem; }
.subs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.subs li { border-left: 2px solid var(--line-strong); padding: 0.2rem 0.6rem; }
.subs .ok { color: var(--ok); font-weight: 600; font-size: 0.85rem; }
.subs .late { color: var(--bad); font-weight: 600; font-size: 0.85rem; }
.jpick { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; }
.jpick label { flex-direction: row; align-items: center; gap: 0.3rem; color: var(--ivory); }

.rc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.rc-col { display: flex; flex-direction: column; gap: 0.35rem; }
.rc-row { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; padding: 0.2rem 0; border-bottom: 1px solid var(--line); font-size: 0.98rem; }
.btn.on.m-present { background: var(--ok); border-color: var(--ok); color: var(--ink); }
.btn.on.m-late { background: var(--warn); border-color: var(--warn); color: var(--ink); }
.btn.on.m-absent { background: var(--bad); border-color: var(--bad); color: var(--ink); }

/* ---------- votes ---------- */
.vote-h { flex-wrap: wrap; }
.grid th, .grid td { padding: 0.15rem; text-align: center; }
.grid thead th { font-size: 0.8rem; color: var(--muted); font-weight: 600; vertical-align: bottom; }
.grid thead th span { display: block; font-weight: 400; font-size: 0.72rem; max-width: 4.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .rl { text-align: left; font-size: 0.95rem; padding-right: 0.6rem; white-space: nowrap; font-weight: 500; }
.cell { width: 2.4rem; height: 2.1rem; font: 700 1rem var(--text); border: 1px solid var(--line-strong); border-radius: 2px; background: transparent; cursor: pointer; color: var(--ivory); }
.cell.c-Y { background: var(--bad-wash); border-color: var(--bad); color: var(--bad); }
.cell.c-N { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }
.cell.c-A { background: rgba(239, 230, 214, 0.08); color: var(--muted); }
.cell.c-X { border-style: dashed; color: rgba(179, 164, 147, 0.5); }
.cell:disabled { cursor: default; }
.grid .fill { white-space: nowrap; }
.res { text-align: left !important; padding-left: 0.6rem !important; white-space: nowrap; font-weight: 600; }
.r-guilty { color: var(--bad); font-weight: 600; }
.r-not_guilty { color: var(--ok); font-weight: 600; }
.r-tie { color: var(--warn); font-weight: 600; }
.tie-row td { text-align: left !important; background: var(--warn-wash); padding: 0.4rem 0.6rem !important; font-size: 0.95rem; }
.result { font-size: 1.05rem; }
.result.neg b { color: var(--bad); }
.result.pos b { color: var(--ok); }
.vsum { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.2rem 1rem; }
.vsum li { display: flex; gap: 0.6rem; font-size: 0.98rem; }
.vsum li span:first-child { min-width: 5.5rem; }
.sentence { border-radius: 2px; padding: 0.8rem 1rem; background: var(--oxblood); border: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 0.3rem; }
.warn-t { color: var(--warn); font-weight: 600; }

/* ---------- record pages ---------- */
.page-h { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.page-h h1 { font-size: 1.9rem; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 2px; }
.tbl, .att { width: 100%; }
.tbl td, .att td, .att th { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; font-size: 0.98rem; }
.tbl tr.gone { opacity: 0.45; text-decoration: line-through; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.acts { width: 1%; white-space: nowrap; vertical-align: middle; }
.att thead th { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.att td { text-align: center; }
.att th { white-space: nowrap; font-weight: 400; }
.att .m-present { color: var(--ok); font-weight: 700; }
.att .m-late { color: var(--warn); font-weight: 700; }
.att .m-absent { color: var(--bad); }
.att .below { color: var(--bad); font-weight: 600; white-space: nowrap; }
.ledger-form { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ledger-form input { flex: 1; min-width: 14rem; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 1rem; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.setting .tog { grid-column: 2; justify-self: end; }
.tog { flex-direction: row; align-items: center; gap: 0.45rem; color: var(--ivory); }
.tog input { accent-color: var(--wine-2); }
.roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem 1.25rem; }
.roster > div { display: flex; flex-direction: column; gap: 0.35rem; }
.rname { flex-direction: row; align-items: center; gap: 0.4rem; white-space: nowrap; }
.rname input { flex: 1; min-width: 0; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.snaps { max-height: 50vh; overflow-y: auto; }
.snaps li { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: 0.6rem; align-items: center; font-size: 0.95rem; }

/* ---------- side column ---------- */
.preview-box { background: var(--oxblood); border: 1px solid var(--line-strong); border-radius: 2px; padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.preview-head { display: flex; justify-content: space-between; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--parchment); }
#tvstat.ok { color: var(--ok); } #tvstat.warn { color: var(--warn); } #tvstat.bad { color: var(--bad); }
.preview-frame { aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 1px solid var(--line); }
.preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.privacy { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.2rem 0.1rem; }
.privacy .hint { font-size: 0.9rem; }
.privacy .hint b { color: var(--warn); }
.privacy .seg-ctl { align-self: flex-start; }
.privacy.safe .lbl { color: var(--warn); }
.quick { display: flex; flex-direction: column; gap: 0.5rem; }
.quick .row .btn { flex: 1; justify-content: center; }
.obj-pending { background: var(--warn-wash); border: 1px solid var(--warn); border-radius: 2px; padding: 0.7rem; display: flex; flex-direction: column; gap: 0.5rem; }
.obj-pending .row .btn { flex: 1; justify-content: center; }
.obj-pending.old { background: transparent; border-color: var(--line-strong); }
.recent { background: var(--card); border: 1px solid var(--line); border-radius: 2px; padding: 0.6rem 0.75rem; }
.recent ul { list-style: none; margin: 0.3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.95rem; }
.recent li { display: flex; gap: 0.5rem; }
.recent li span:first-child { flex: 1; }
.rul { font-weight: 600; text-transform: capitalize; }
.rul.r-sustained { color: var(--ok); }
.rul.r-overruled { color: var(--bad); }
.rul.r-waived, .rul.r-withdrawn { color: var(--muted); }

/* ---------- dialogs ---------- */
dialog { border: 1px solid var(--line-strong); border-radius: 2px; padding: 1.25rem 1.4rem; width: min(560px, 92vw); max-height: 88vh; overflow-y: auto; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); background: var(--oxblood); color: var(--ivory); }
dialog::backdrop { background: rgba(13, 6, 6, 0.7); }
dialog h2 { font-size: 1.55rem; margin-bottom: 0.6rem; }
dialog > p { margin-bottom: 0.6rem; }
dialog hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.obj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.obj-grid .btn { justify-content: flex-start; padding: 0.6em 0.8em; font-size: 1rem; }
.keys td { padding: 0.3rem 0.8rem 0.3rem 0; }

/* ---------- login & picker ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 2rem 1rem;
  background: linear-gradient(rgba(13, 6, 6, 0.72), rgba(13, 6, 6, 0.86)), url("../img/marble.webp") center / cover; }
.login-card { background: rgba(36, 7, 9, 0.92); border: 1px solid var(--line-strong); border-radius: 2px; padding: 2rem; width: min(400px, 94vw);
  display: flex; flex-direction: column; gap: 0.9rem; position: relative; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.login-card::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.login-card.wide { width: min(980px, 96vw); }
.login-card h1 { font-size: 2.6rem; }
.login-card .crest { width: 96px; height: 96px; object-fit: contain; align-self: center; }
.login-card .eyebrow, .login-card h1, .login-card > .dim { text-align: center; }
.login-card .foot { text-align: center; font-size: 0.95rem; color: var(--muted); }
.lbl.level { margin-top: 0.6rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
.court-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.6rem; }
.court-pick { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.75rem 0.85rem; border: 1px solid var(--line-strong); border-radius: 2px; text-decoration: none; background: rgba(13, 6, 6, 0.4); }
.court-pick:hover { border-color: var(--parchment); background: rgba(106, 23, 32, 0.35); }
.court-pick .code { font-size: 0.74rem; letter-spacing: 0.18em; color: var(--parchment); font-weight: 600; }
.court-pick .nm { font-family: var(--display); font-size: 1.15rem; }
.court-pick .sub { font-size: 0.88rem; color: var(--muted); }
.court-pick.not-ready { opacity: 0.6; }
.court-pick .tag { margin-top: 0.3rem; }

/* ---------- Secretariat ---------- */
.admin-main { overflow-y: auto; padding: 1.5rem 1.5rem 4rem; display: flex; flex-direction: column; gap: 0.8rem; margin-top: 12px; }
.court-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0.75rem; }
.court-card { background: var(--card); border: 1px solid var(--line); border-radius: 2px; padding: 0.8rem 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; }
.court-card.on { border-color: rgba(143, 202, 169, 0.5); }
.court-card header { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.court-card .code { font-size: 0.74rem; letter-spacing: 0.18em; color: var(--parchment); font-weight: 600; }
.court-card .nm { font-family: var(--display); font-size: 1.15rem; flex: 1; }
.court-card .lvl { font-size: 0.8rem; color: var(--muted); }
.court-card .status { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-size: 0.85rem; }
.dot::before { content: "●"; margin-right: 0.3em; }
.dot.ok { color: var(--ok); } .dot.bad { color: var(--bad); } .dot.off { color: var(--muted); }
.court-card .now { min-height: 4.2rem; display: flex; flex-direction: column; gap: 0.1rem; }
.court-card .stage { font-weight: 600; }
.court-card .clk { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; color: var(--muted); }
.court-card .clk.run { color: var(--ivory); }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 0.4rem; z-index: 50; pointer-events: none; }
.toast { background: var(--ivory); color: var(--ink); padding: 0.55rem 1rem; border-radius: 2px; font-size: 1rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.toast.warn { background: var(--warn); }
.toast.bad { background: var(--bad); }

@media (max-width: 1280px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr) 320px; }
  .clock.big { font-size: 6rem; }
}

/* Shift-click on the floor chips adds people; don't let it select text. */
.chips .pick { user-select: none; }

/* Roll call gate: locked procedures and the note above them. */
.nav-i.gated { opacity: 0.42; }
.nav-note { font-size: 0.82rem; line-height: 1.35; margin: 0 0.6rem 0.5rem; padding: 0.45em 0.6em; border-left: 2px solid currentColor; opacity: 0.85; }
/* Sessions dialog: the event flow. */
.sched { width: 100%; border-collapse: collapse; margin: 0.6em 0 0.8em; font-size: 0.95rem; }
.sched td { padding: 0.4em 0.5em; border-bottom: 1px solid rgba(128, 128, 128, 0.25); vertical-align: middle; white-space: nowrap; }
.sched td.acts { text-align: right; }
.sched td.dim { white-space: normal; }
#dlg:has(.sched) { width: min(860px, 94vw); max-width: 94vw; }
.sched tr.now td { font-weight: 600; }
.tag-now { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.15em 0.55em; border: 1px solid currentColor; border-radius: 2px; }
