:root {
    --bg: #f5f6f8; --card: #ffffff; --text: #1d2330; --muted: #5d6677; --line: #dde1e8;
    --accent: #2457d6; --accent-soft: #e8eefc;
    --need: #fff4d6; --need-line: #e8a400; --need-text: #7a5600;
    --ok: #1f8a4c; --ok-soft: #e3f5ea; --err: #a32020; --err-soft: #fde8e8;
    --soft: #fafbfc; --on-accent: #ffffff;
    --warn: #7a5600; --warn-soft: #fff4d6; --warn-line: #e8a400; --radius: 14px;
    color-scheme: light dark;
}
/* Review 4: dark mode like evals.css / scans.css (the event admin's header bar is otherwise dark on a light page) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12151c; --card: #1c212b; --text: #e8ebf1; --muted: #9aa3b4; --line: #2e3542;
        --accent: #6d95ff; --accent-soft: #233257; --on-accent: #0d1530;
        --need: #3a2f12; --need-line: #c08a00; --need-text: #ffd27a;
        --ok: #5fd08f; --ok-soft: #173826; --err: #ff8b8b; --err-soft: #3d1c1c;
        --soft: #232936;
        --warn: #ffd27a; --warn-soft: #3a2f12; --warn-line: #c08a00;
    }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.25rem; margin: 36px 0 12px; }
h2.day { font-size: 1.05rem; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.sub { color: var(--muted); margin: 0 0 16px; }
a { color: var(--accent); }
/* Review 4, C8: messages ok / err / warn / info like in evals.css and scans.css */
.msg { padding: 12px 16px; border-radius: 10px; margin: 0 0 14px; overflow-wrap: anywhere; }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.err { background: var(--err-soft); color: var(--err); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.info { background: var(--accent-soft); color: var(--text); }
.msg.warn a { margin-right: 4px; color: inherit; }
/* Room as a second line below the title, only on the phone (the room column is hidden there) */
small.room-m { display: none; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.guide { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.guide p { margin: 6px 0; }
.guide .warn { font-weight: 600; }
.foot { color: var(--muted); font-size: .88rem; margin-top: 24px; }

.bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; }
.bar label { font-weight: 600; margin-right: 6px; }
.bar select { padding: 7px 10px; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px; min-width: 220px; }
.stat { color: var(--muted); }
.stat strong { color: var(--text); }
.stat.low strong { color: var(--need-text); }
.filter { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }
/* Review 4, I13: filters of the volunteer page as links (on/off) */
.toggles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.toggles a.toggle { display: inline-block; padding: 5px 12px; border: 1px solid var(--accent); border-radius: 999px; text-decoration: none; font-size: .9rem; }
.toggles a.toggle.on { background: var(--accent); color: var(--on-accent); }
/* Review 4, I15: privacy notice below the self sign-up */
p.privacy { font-size: .85rem; margin: -8px 0 16px; }
/* Review 4, I12: "Copy all e-mails" in the event admin (fallback field when the clipboard does not work) */
textarea.copy-fallback { width: 100%; margin-top: 8px; font: inherit; font-size: .85rem; }

.slot { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.slot h3 { font-size: 1rem; margin: 0; padding: 10px 14px; background: var(--soft); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.slot h3 span { color: var(--muted); font-weight: 400; font-size: .9rem; }
table.rows { width: 100%; border-collapse: collapse; }
table.rows td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.rows tr:first-child td { border-top: 0; }
table.rows tr.need td { background: var(--need); }
table.rows tr.mine td { background: var(--accent-soft); }
td.room { width: 14%; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
td.title .t { font-weight: 600; display: block; }
td.title small { color: var(--muted); display: block; margin-top: 2px; }
td.monitor { width: 34%; }
td.monitor .line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tag { font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.tag.fixed { background: var(--ok-soft); color: var(--ok); }
.tag.need { background: var(--need-line); color: var(--card); }
.tag.busy { background: var(--err-soft); color: var(--err); }
.name { font-weight: 600; text-decoration: none; color: var(--text); border-bottom: 1px dotted var(--muted); }
.name:hover { color: var(--accent); }
.att { margin-top: 6px; display: flex; gap: 6px; align-items: center; font-size: .88rem; color: var(--muted); }
.att input { width: 76px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; }
/* Issue #89: messages of the room monitoring ("Report a problem") */
.flags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: .88rem; }
.tag.flagopen { background: var(--err-soft); color: var(--err); }
.flagform { width: 100%; }
.flagform summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.flagform .line { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin: 6px 0; }
.flagform select, .flagform input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: .95rem; max-width: 100%; }
.flagform input { flex: 1; min-width: 160px; }
.flagform .stat { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }

/* Review 4, C13: buttons like evals.css (same sizes, borders, rounding) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--on-accent);
       border: 1px solid var(--accent); border-radius: 10px; padding: 10px 18px; font: inherit; font-size: 1rem; font-weight: 600;
       line-height: 1.45; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn.sm { padding: 4px 10px; font-size: .85rem; border-radius: 8px; }
.btn.big { width: 100%; padding: 15px; font-size: 1.1rem; border-radius: 12px; }
select.sm { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: .88rem; }

table.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.grid th { text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 8px 12px; background: var(--soft); border-bottom: 1px solid var(--line); }
table.grid td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: top; }
table.grid tr.need td { background: var(--need); }
table.grid tr.mine td { background: var(--accent-soft); }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); border-radius: 999px; padding: 1px 4px 1px 10px; margin: 2px 4px 2px 0; }
.chip button { border: 0; background: transparent; color: var(--err); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; }
ul.issues { margin: 0; padding-left: 20px; }
ul.issues li { margin: 4px 0; }
.nav.tabs { align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.nav.tabs a.active { font-weight: 700; color: var(--text); text-decoration: none; border-bottom: 2px solid var(--accent); }
form.inline { display: inline; margin: 0; }
table.report td.picks { width: 38%; vertical-align: middle; }
table.report td.attended { width: 10%; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; vertical-align: middle; }
table.report tr.none td { color: var(--muted); font-style: italic; }
.pickbar { display: flex; align-items: center; gap: 8px; }
.pickbar b { font-variant-numeric: tabular-nums; min-width: 2.5em; text-align: right; }
.pickbar i { display: block; height: 10px; background: var(--accent); border-radius: 5px; min-width: 2px; }
.logo { float: right; margin: 0 0 12px 16px; }
.logo img { display: block; max-height: 56px; max-width: 180px; }
.site-foot { clear: both; margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: .92rem; }
.ask { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; max-width: 420px; }
.ask label { display: block; font-weight: 600; margin-bottom: 8px; }
.ask .row { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.ask .btn { padding: 9px 20px; font-size: 1rem; }
.name-input { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: .92rem; min-width: 160px; }
.chip.fixed { background: var(--ok-soft); }
.chip button.lock { color: inherit; padding: 0 2px 0 0; font-size: .85rem; }
.tag.warn { background: var(--need); color: var(--need-text); border: 1px solid var(--need-line); }
.tag.now { background: var(--ok); color: var(--card); }
.tag.next { background: var(--accent); color: var(--on-accent); }
a.btn { text-decoration: none; display: inline-flex; }

/* "My duties" – for the phone */
.mine-view { max-width: 640px; }
.duty { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.duty .when { flex: none; width: 52px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.35; }
.duty .what { flex: 1; min-width: 0; }
.duty .t { font-weight: 600; display: block; font-size: 1.02rem; }
.duty small { display: block; color: var(--muted); margin: 2px 0 6px; }
.duty.next { border: 2px solid var(--accent); }
.duty.now { border: 2px solid var(--ok); background: var(--ok-soft); }
.duty.past { opacity: .55; }
.duty .att input { width: 90px; padding: 8px; font-size: 1.05rem; }
.duty .att .btn { padding: 7px 16px; font-size: .95rem; }

.sink { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; font-size: .92rem; }

@media (max-width: 720px) {
    table.rows td.room { display: none; }
    small.room-m { display: block; }
    td.monitor { width: 45%; }
}

/* B6.14: larger buttons on touch devices */
@media (pointer: coarse) {
    .btn.sm { padding: 6px 12px; min-height: 36px; }
    select.sm { padding: 7px 8px; }
    .chip button { padding: 4px 8px; }
}
/* Time of a session has changed since it was taken over */
.tag.moved { background: var(--need); color: var(--need-text); border: 1px solid var(--need-line); }
/* /eventadmin/ Picker: monitor selected but not saved yet */
.unsaved-row td { outline: 2px dashed var(--need-line); outline-offset: -2px; }
/* /eventadmin/ Picker: view "Now" (event day, for the phone) */
table.now td.when { white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
table.now td small { display: block; color: var(--muted); }
table.now td.cur { width: 44%; }
/* Review 4, C10: table within the wrapper's frame (horizontally scrollable), like evals.css / scans.css */
.tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin: 0 0 12px; }
.tablewrap > table.grid { margin: 0; border: 0; border-radius: 0; }
table.grid tbody tr:first-child td { border-top: 0; }
table.grid td.empty { text-align: center; color: var(--muted); }
form.signout { float: right; margin: 4px 0 8px 12px; }

/* Review 4, C2: sign-in as a card (like /admin/, /eventadmin/, /badgescans/) */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 14px; }
.card.login { max-width: 440px; margin: 32px auto; clear: both; }
.card.login h1 { margin-bottom: 8px; }
.card.login div.field { margin: 14px 0 0; }
.card.login label { display: block; font-weight: 600; margin: 0 0 6px; }
.card.login input[type=password] { width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
    border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.card.login input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.card.login .btn.big { margin-top: 18px; }
.card.login .note { color: var(--muted); font-size: .88rem; margin: 10px 0 0; }
/* Review 4, C9: empty = muted text in the section */
p.empty { color: var(--muted); margin: 8px 0 14px; }
/* Review 4: footer of all pages "Community Event Tools by … · Version …" (below the link to the conference) */
.credit { margin: 6px 0 0; text-align: center; font-size: .78rem; color: var(--muted); }
.credit a { color: inherit; }

/* Review 5, C9: logo on a white, rounded background (otherwise invisible in dark mode), like evals.css header.top .logo */
.logo { background: #fff; border-radius: 10px; padding: 6px; }
/* Review 5, C8: neutral page "not open right now" like /evals/ (card, logo and name of the conference, no red message) */
.card.empty { max-width: 640px; margin: 32px auto 14px; text-align: center; padding: 32px 20px; color: var(--muted); clear: both; }
.card.empty h1 { color: var(--text); margin-bottom: 8px; }
.card.empty .logo { float: none; display: inline-block; margin: 0 0 14px; }
.card.empty p { margin: 0; }
/* Review 5, C12: input fields of the self sign-up like the selection in .bar */
.bar input[type=text], .bar input[type=email] { padding: 7px 10px; font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px;
    min-width: 220px; max-width: 100%; }
.bar input:focus, .bar select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.bar input[aria-invalid=true] { border-color: var(--err); }
/* Review 5, B13: two-button confirmation instead of confirm() (volunteers.js), like evals.css */
.choice { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--text); border: 1px solid var(--warn-line); }
.choice[hidden] { display: none; }
.choice p { margin: 0 0 8px; font-weight: 600; }
.choice .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Issue #54: "needs a monitor" / "n open" with dark text on yellow (white on #e8a400 had only ~2.1:1; dark 7.6:1 or
   in dark mode 5.4:1 on #c08a00 – WCAG AA) */
:root { --on-need-line: #1d2330; }
.tag.need { color: var(--on-need-line); }
/* Issue #54: attendee count at 16 px (iOS zooms the page for smaller input fields); filter links large enough to tap */
.att input { font-size: 1rem; }
@media (pointer: coarse) {
    .toggles a.toggle { display: inline-flex; align-items: center; min-height: 36px; }
}
/* Issue #54: "optional" like in /evals/ and /badgescans/; text for screen readers only (state of the filters) */
.opt { font-weight: 400; font-size: .85rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Issue #77: categories as small tags and the abstract behind "Details" (native <details>, no script) */
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag-cat { font-size: .72rem; line-height: 1.4; padding: 1px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
details.abstract { margin-top: 4px; }
details.abstract summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .85rem; }
details.abstract summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.abstract-text { margin-top: 4px; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; color: var(--text); }
.abstract-text p { margin: 0 0 8px; }

/* Issue #71: language switch EN | DE (top right, small) */
.lang-switch { text-align: right; font-size: .85rem; color: var(--muted); margin: 0 0 8px; }
.lang-switch a { color: var(--accent); font-weight: 600; text-decoration: none; padding: 4px 2px; }
.lang-switch a:hover, .lang-switch a:focus-visible { text-decoration: underline; }
.lang-switch strong { color: var(--text); }

/* Issue #151: live notices (schedule changes and the organizer's notice) at the top of the page */
.live-notices { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; border-left: 4px solid var(--accent); background: var(--accent-soft); color: var(--text); overflow-wrap: anywhere; }
.live-notices .ln-title { margin: 0 0 4px; font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.live-notices .ln-own { margin: 0 0 6px; font-weight: 600; }
.live-notices ul { margin: 0; padding-left: 18px; }
.live-notices li { margin: 2px 0; }
.live-notices .ln-more { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }

/* Issue #153: shift swaps */
.duty .swap { margin-top: 6px; }
.duty details.swap summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.duty details.swap label { display: block; font-size: .85rem; margin: 6px 0 2px; }
.duty details.swap input[type=text] { width: 100%; max-width: 24rem; box-sizing: border-box; font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); }
.swaps { margin-top: 24px; }
.swaps .duty .btn { margin-top: 6px; }
