:root {
  --ev-festival-bg: #4c1d95; --ev-festival-fg: #ede9fe;
  --ev-party-bg: #831843;    --ev-party-fg: #fce7f3;
  --ev-holiday-bg: #164e63;  --ev-holiday-fg: #cffafe;
  --ev-other-bg: #374151;    --ev-other-fg: #e5e7eb;
  --ev-note-bg: #78350f;     --ev-note-fg: #fef3c7;
  /* Dark look (default). The light look below is switched on with the
     "Light/Dark" button in the top menu and remembered per browser. */
  color-scheme: dark;
  --navy: #0a0f1c;
  --navy-light: #1f2b45;
  --bg: #0e131f;
  --surface: #171e2d;
  --surface-2: #1d2638;
  --border: #2a3448;
  --text: #e7ebf3;
  --muted: #9aa5b8;
  --accent: #6ea8ff;
  --accent-btn: #2f6fe4;
  --accent-btn-hover: #2559bd;
  --ok: #4ade80;
  --ok-btn: #16a34a;
  --ok-btn-hover: #15803d;
  --warn: #fbbf24;
  --danger: #f87171;
  --input-bg: #0f1522;
  --nav-link: #c3cde0;
  --sel-bg: rgba(110, 168, 255, 0.14);
  --ok-soft-bg: rgba(74, 222, 128, 0.12);
  --ok-soft-fg: #86efac;
  --ok-soft-border: rgba(74, 222, 128, 0.35);
  --err-soft-bg: rgba(248, 113, 113, 0.13);
  --err-soft-fg: #fca5a5;
  --err-soft-border: rgba(248, 113, 113, 0.4);
  --pending-bg: rgba(251, 191, 36, 0.15);
  --inactive-bg: #263044;
  --row-hover: rgba(255, 255, 255, 0.03);
  --checked-row-bg: rgba(74, 222, 128, 0.07);
  --today-row-bg: rgba(251, 146, 60, 0.12);
  --modal-backdrop: rgba(3, 6, 14, 0.7);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  --away-a: #4a3a12;
  --away-b: #5a4614;
  --away-fg: #fde68a;
  --chip-bg: #5a4614;
  --chip-fg: #fde68a;
  --req-row-bg: rgba(255, 255, 255, 0.82);
  --banner-in-bg: rgba(74, 222, 128, 0.14);
  --banner-in-fg: #86efac;
  --banner-out-bg: rgba(251, 146, 60, 0.15);
  --banner-out-fg: #fdba74;
  --banner-err-bg: rgba(248, 113, 113, 0.15);
  --banner-err-fg: #fca5a5;
  --banner-stamp: #cbd5e1;
  --request-btn-bg: #1d2638;
  --request-btn-fg: #cfe0ff;
  --request-btn-hover: #263250;
}
:root[data-theme="light"] {
  --ev-festival-bg: #ddd6fe; --ev-festival-fg: #4c1d95;
  --ev-party-bg: #fbcfe8;    --ev-party-fg: #831843;
  --ev-holiday-bg: #a5f3fc;  --ev-holiday-fg: #164e63;
  --ev-other-bg: #e5e7eb;    --ev-other-fg: #374151;
  --ev-note-bg: #fde68a;     --ev-note-fg: #78350f;
  color-scheme: light;
  --navy: #1b2a4a;
  --navy-light: #2c4270;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #d9dee6;
  --text: #1c2430;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-btn: #2563eb;
  --accent-btn-hover: #1d4fc4;
  --ok: #16a34a;
  --ok-btn: #16a34a;
  --ok-btn-hover: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --input-bg: #ffffff;
  --nav-link: #dbe3f3;
  --sel-bg: #eff6ff;
  --ok-soft-bg: #dcfce7;
  --ok-soft-fg: #14532d;
  --ok-soft-border: #86efac;
  --err-soft-bg: #fee2e2;
  --err-soft-fg: #7f1d1d;
  --err-soft-border: #fca5a5;
  --pending-bg: #fef3c7;
  --inactive-bg: #f3f4f6;
  --row-hover: rgba(0, 0, 0, 0.02);
  --checked-row-bg: #f0fdf4;
  --today-row-bg: #fff7ed;
  --modal-backdrop: rgba(15, 23, 42, 0.45);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --away-a: #fef3c7;
  --away-b: #fde68a;
  --away-fg: #78350f;
  --chip-bg: #fde68a;
  --chip-fg: #78350f;
  --req-row-bg: rgba(255, 255, 255, 0.75);
  --banner-in-bg: #dcfce7;
  --banner-in-fg: #15803d;
  --banner-out-bg: #ffedd5;
  --banner-out-fg: #c2410c;
  --banner-err-bg: #fee2e2;
  --banner-err-fg: #7f1d1d;
  --banner-stamp: #374151;
  --request-btn-bg: #ffffff;
  --request-btn-fg: #1b2a4a;
  --request-btn-hover: #eef2ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--navy);
  color: white;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.topnav a {
  color: var(--nav-link);
  text-decoration: none;
  font-size: 0.95rem;
}
.topnav a:hover { color: white; }
.topnav-brand { font-weight: 700; margin-right: 1rem; }
.topnav-logout, .topnav-right { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.topnav-right form { margin: 0; }
.topnav-logout button, .topnav-right button {
  background: var(--navy-light);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
}
.topnav-right button:hover { filter: brightness(1.2); }
.topnav-right .theme-toggle { background: transparent; border: 1px solid rgba(255,255,255,0.25); color: var(--nav-link); }

.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.5rem; margin-top: 0; }
h2 { font-size: 1.15rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
th { color: var(--muted); font-weight: 600; }

form.inline { display: inline; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=file], input[type=number], input[type=time], select, textarea {
  background: var(--input-bg);
  color: var(--text);
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
}

label { display: block; margin: 0.75rem 0 0.25rem; font-size: 0.9rem; color: var(--muted); }

button, .btn {
  background: var(--accent-btn);
  color: white;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.secondary, .btn.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.badge { padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.78rem; }
.badge.active { background: var(--ok-soft-bg); color: var(--ok); }
.badge.inactive { background: var(--inactive-bg); color: var(--muted); }

.unconfirmed { color: var(--muted); font-style: italic; }
.confirmed { color: var(--text); }

.error { color: var(--danger); margin: 0.75rem 0; }

/* ---- Kiosk mode ---- */
.kiosk-body {
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.kiosk-card {
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow);
}
.kiosk-card h1 { font-size: 1.4rem; }
.kiosk-card input[type=password] {
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.5rem;
  padding: 0.75rem;
}
.kiosk-card button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem;
  font-size: 1.1rem;
}
.kiosk-result {
  font-size: 1.3rem;
  margin: 1rem 0;
}
.kiosk-result.in { color: var(--ok); }
.kiosk-result.out { color: var(--warn); }
.kiosk-timestamp { color: var(--muted); font-size: 0.95rem; margin-top: -0.5rem; }
.kiosk-lock {
  margin-top: 1.5rem;
  font-size: 0.8rem;
}
.kiosk-lock button {
  background: none;
  color: var(--muted);
  width: auto;
}

/* ---- Calendar ---- */
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.calendar-nav { display: flex; gap: 0.5rem; }
.calendar-jump { display: flex; gap: 0.5rem; align-items: center; font-size: 0.9rem; color: var(--muted); }
.calendar-jump input[type=date] { width: auto; padding: 0.4rem 0.5rem; }
.calendar-switch { margin-left: auto; font-size: 0.92rem; }
.calendar-switch a { color: var(--accent); text-decoration: none; }

.calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar-table th, .calendar-table td {
  border: 1px solid var(--border);
  padding: 0.4rem;
  vertical-align: top;
  font-size: 0.85rem;
}
.calendar-table th { background: var(--surface-2); color: var(--muted); font-weight: 600; text-align: left; }
.calendar-rowhead { width: 140px; font-weight: 600; }

.season-cell { text-align: center; font-weight: 600; font-size: 0.78rem; letter-spacing: 0.02em; }

.calendar-cell { height: 1%; cursor: default; }
.calendar-cell.cell-selected {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--sel-bg);
}
.shift-block {
  display: block;
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  margin-bottom: 0.3rem;
  line-height: 1.25;
  position: relative;
}
.shift-block-unassigned { opacity: 0.6; border: 1px dashed currentColor; }
.shift-note { display: block; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.15rem; }

.shift-row, .staff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
}
.shift-time {
  font-weight: 700;
  font-size: 0.8rem;
  color: inherit;
  text-decoration: none;
}
.shift-time:hover { text-decoration: underline; }
.shift-who { font-size: 0.78rem; }

.badge-x {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 0.1rem;
  flex-shrink: 0;
}
.badge-x:hover { opacity: 1; }

.shift-block.shift-selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.staff-row.staff-selected {
  outline: 1px dashed var(--accent);
  outline-offset: 1px;
  border-radius: 4px;
}
.shift-block.flash-copy {
  outline: 2px solid var(--ok);
  outline-offset: 1px;
}

.shift-note-preview {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
}

input[type=color] {
  padding: 0.15rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 3.5rem;
  height: 2.3rem;
  cursor: pointer;
}

.cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.15rem;
}
.add-shift-link, .cell-copy, .cell-paste {
  font-size: 0.74rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.add-shift-link:hover, .cell-copy:hover, .cell-paste:hover { color: var(--accent); }

/* ---- Shift pop-up (window-in-window over the calendar) ---- */
.shift-block, .staff-row { user-select: none; }

.lg-modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 1rem 1rem;
  z-index: 1000;
  overflow: auto;
}
.lg-modal {
  position: relative;
  background: var(--surface);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.lg-modal iframe {
  display: block;
  width: 100%;
  height: 120px;
  border: 0;
}
.lg-modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  z-index: 2;
  background: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}
.lg-modal-close:hover { background: var(--bg); color: var(--text); }

/* The same form page, shown inside the pop-up: no top menu, no card chrome. */
body.embed { background: var(--surface); }
body.embed main.container { margin: 0; padding: 1.25rem 1.5rem 1.5rem; max-width: none; }
body.embed h1 { font-size: 1.2rem; margin-bottom: 0.25rem; padding-right: 2.5rem; }
body.embed .card { border: none; padding: 0; margin-bottom: 1rem; }

/* ---- v1.14: staff logins, shift requests, availability ---- */
.nav-badge {
  display: inline-block;
  min-width: 1.15rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #1c2430;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2rem;
}
.flash {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.flash-ok { background: var(--ok-soft-bg); color: var(--ok-soft-fg); border-color: var(--ok-soft-border); }
.flash-error { background: var(--err-soft-bg); color: var(--err-soft-fg); border-color: var(--err-soft-border); }
.badge.pending { background: var(--pending-bg); color: var(--warn); }

.table-scroll { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.plain-list, .plain-ul { list-style: none; margin: 0; padding: 0; }
.plain-ul li, .plain-list li { padding: 0.25rem 0; }
button.small, .small { font-size: 0.8rem; padding: 0.25rem 0.55rem; }
button.big { font-size: 1rem; padding: 0.6rem 1.1rem; }
button.danger, .danger { color: var(--danger); }

/* Manager calendar: open shift requests inside a shift badge */
.shift-block.has-requests { box-shadow: 0 0 0 2px #f59e0b; }
.req-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.2rem;
  padding: 0.1rem 0.25rem;
  background: var(--req-row-bg);
  color: #1c2430;
  border-radius: 4px;
  font-size: 0.76rem;
}
.req-row .req-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-row .badge-x { color: #b91c1c; opacity: 0.8; font-size: 1rem; }
.req-ok {
  background: var(--ok-btn);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
}
.req-ok:hover { background: var(--ok-btn-hover); }
.req-ok.big { font-size: 1rem; padding: 0.6rem 1.1rem; }

/* Away (holiday / not available) markers */
.away-chips { display: flex; flex-direction: column; gap: 0.1rem; margin-top: 0.2rem; text-decoration: none; }
.away-chip {
  display: block;
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.away-chip.mine { display: inline-block; }
.cell-away {
  background: repeating-linear-gradient(45deg, var(--away-a), var(--away-a) 6px, var(--away-b) 6px, var(--away-b) 12px);
}
.away-tag { display: block; font-size: 0.72rem; font-weight: 600; color: var(--away-fg); margin-bottom: 0.2rem; }
.away-tag small { display: block; font-weight: 400; }

/* Staff portal */
.staff-nav a.on { color: white; font-weight: 700; border-bottom: 2px solid #f59e0b; }
.staff-nav .who { color: var(--nav-link); font-size: 0.85rem; margin-right: 0.6rem; }
.staff-nav { flex-wrap: wrap; row-gap: 0.4rem; }
.shift-mine { box-shadow: 0 0 0 2px #16a34a; }
.row-me { font-weight: 800; }
.btn-request {
  background: var(--request-btn-bg);
  color: var(--request-btn-fg);
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  cursor: pointer;
}
.btn-request:hover { background: var(--request-btn-hover); }
.req-self { display: flex; align-items: center; gap: 0.25rem; margin-top: 0.2rem; font-size: 0.72rem; font-weight: 600; }
.req-declined { color: var(--danger); }
.avail-form { display: grid; grid-template-columns: 9rem 10rem 10rem 1fr auto; gap: 0.5rem; align-items: end; }
.avail-form label { margin: 0 0 0.2rem; }
.avail-row { align-items: center; padding: 0.4rem 0; border-top: 1px solid var(--border); }
.avail-actions { display: flex; gap: 0.4rem; }
@media (max-width: 760px) {
  .container { padding: 0 1rem; margin: 1rem auto; }
  .avail-form { grid-template-columns: 1fr 1fr; }
  .avail-form .avail-note { grid-column: 1 / -1; }
  .avail-form .avail-actions { grid-column: 1 / -1; }
  .topnav { padding: 0.6rem 1rem; gap: 0.8rem; }
}
body.staff-portal main a { color: var(--accent); }
body.staff-portal main a.btn { color: inherit; }
@media (max-width: 760px) {
  table.plain-list, table.plain-list tbody { display: block; width: 100%; }
  table.plain-list tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
  table.plain-list td { border: 0; padding: 0; }
}

/* ---- v1.15: the kiosk's last answer stays on screen ---- */
.kiosk-banner {
  border-radius: 12px;
  padding: 0.9rem 1rem 0.6rem;
  margin: 1rem 0 0.5rem;
  border: 2px solid transparent;
}
.kiosk-banner.in { background: var(--banner-in-bg); border-color: #16a34a; }
.kiosk-banner.out { background: var(--banner-out-bg); border-color: #ea580c; }
.kiosk-banner.error-banner { background: var(--banner-err-bg); border-color: #dc2626; color: var(--banner-err-fg); }
.kiosk-banner-title { font-weight: 800; letter-spacing: 0.08em; font-size: 1.5rem; }
.kiosk-banner.in .kiosk-banner-title { color: var(--banner-in-fg); }
.kiosk-banner.out .kiosk-banner-title { color: var(--banner-out-fg); }
.kiosk-banner .kiosk-result { font-size: 1.1rem; margin: 0.4rem 0; }
.kiosk-banner .kiosk-timestamp { margin: 0 0 0.3rem; color: var(--banner-stamp); font-weight: 600; }
.kiosk-hint { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0; }
.kiosk-card button:disabled { opacity: 0.6; cursor: wait; }

/* ---- v1.16: timesheet check / delete ---- */
.ts-summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ts-summary .ts-note { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.ts-summary .ts-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.ts-summary form { margin: 0; }
.ts-card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ts-card-head h2 { margin: 0.2rem 0; }
.ts-card-head form { margin: 0; }
.ts-table td { vertical-align: middle; }
.ts-actions-cell { white-space: nowrap; }
.ts-actions-cell button { margin-right: 0.3rem; }
.ts-row.ts-checked { background: var(--checked-row-bg); }
.ts-row.ts-progress { color: var(--muted); font-style: italic; }
.ts-check { background: var(--ok-btn); color: white; border: none; }
.ts-check:hover { background: var(--ok-btn-hover); }
.ts-warn { white-space: normal; background: var(--err-soft-bg); border: 1px solid var(--err-soft-border); color: var(--err-soft-fg); border-radius: 8px; padding: 0.5rem 0.7rem; min-width: 260px; font-size: 0.85rem; font-style: normal; }
.ts-warn-btns { margin-top: 0.4rem; }
.ts-yes { background: #b91c1c; color: white; border: none; }
.ts-yes:hover { background: #991b1b; }

/* ---- v1.17: dark look, tidy staff list ---- */
body { transition: background-color .15s; }
h1, h2 { color: var(--text); }
a { color: var(--accent); }
.topnav a, .topnav a:hover { color: var(--nav-link); }
.topnav a:hover { color: white; }
::placeholder { color: var(--muted); opacity: 0.7; }
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
code { background: var(--surface-2); padding: 0.05rem 0.35rem; border-radius: 4px; font-size: 0.88em; }
tr:hover > td { background: var(--row-hover); }
.calendar-table tr:hover > td { background: transparent; }
input[type=checkbox] { accent-color: var(--accent-btn); width: 1rem; height: 1rem; }
button.secondary:hover, .btn.secondary:hover { border-color: var(--accent); }
button:hover:not(.secondary):not(.badge-x):not(.req-ok):not(.ts-check):not(.ts-yes):not(.lg-modal-close) { background: var(--accent-btn-hover); }
.shift-block { box-shadow: 0 0 0 1px rgba(0,0,0,0.25); }
:root[data-theme="light"] .shift-block { box-shadow: none; }

.staff-page { max-width: 1180px; }
.staff-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.staff-toolbar h2 { margin: 0; }
.staff-toolbar .staff-count { color: var(--muted); font-size: 0.85rem; margin-left: 0.5rem; font-weight: 400; }
.staff-filter { width: 260px; max-width: 100%; }

.staff-grid { display: grid; gap: 0; }
.staff-head, .staff-form {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(180px, 1.6fr) 8rem minmax(120px, 0.8fr) 5.5rem 5rem;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.25rem;
}
.staff-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.staff-form { margin: 0; border-bottom: 1px solid var(--border); }
.staff-form:hover { background: var(--row-hover); }
.staff-form input[type=text], .staff-form input[type=email] { padding: 0.4rem 0.55rem; font-size: 0.92rem; min-width: 0; }
.staff-form .staff-active { display: flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--text); font-size: 0.88rem; }
.staff-form .staff-active input { width: 1rem; margin: 0; }
.staff-form button { width: 100%; padding: 0.4rem 0.6rem; font-size: 0.88rem; }
.staff-form.is-inactive input[type=text], .staff-form.is-inactive input[type=email] { opacity: 0.55; }
.staff-pin-set { color: var(--muted); font-size: 0.82rem; display: flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.staff-pin-set::before { content: "✓"; color: var(--ok); font-weight: 700; }
.staff-noemail { outline: 1px solid var(--warn); }
.staff-tools { display: grid; gap: 0.75rem; }
details.card > summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
details.card > summary::before { content: "▸"; color: var(--muted); transition: transform .12s; }
details.card[open] > summary::before { transform: rotate(90deg); }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: 0.75rem; }
details.card .hint { color: var(--muted); font-size: 0.88rem; margin-top: 0; }
.add-staff-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0.75rem; align-items: end; }
.add-staff-form label { margin: 0 0 0.25rem; }
.staff-no-match { color: var(--muted); padding: 0.8rem 0.25rem; display: none; }
@media (max-width: 900px) {
  .staff-head { display: none; }
  .staff-form { grid-template-columns: 1fr 1fr; padding: 0.7rem 0.25rem; }
  .staff-form > input[name=name], .staff-form > input[name=email], .staff-form > button { grid-column: 1 / -1; }
  .add-staff-form { grid-template-columns: 1fr; }
}
/* Soften the bright label colours a little on the dark background */
:root:not([data-theme="light"]) .shift-block,
:root:not([data-theme="light"]) .season-cell,
:root:not([data-theme="light"]) .calendar-rowhead,
:root:not([data-theme="light"]) .shift-note-preview { filter: brightness(0.86) saturate(0.9); }
.badge { white-space: nowrap; display: inline-block; }

.topnav { flex-wrap: wrap; row-gap: 0.4rem; }

/* ---- v1.18: spreadsheet-style selection / copy feedback ---- */
.calendar-cell.cell-selected { box-shadow: inset 0 0 0 2px var(--accent); }
/* v1.50: several cells selected at once, and the frame while dragging */
.calendar-cell.cell-multi { box-shadow: inset 0 0 0 2px var(--accent); background-image: linear-gradient(rgba(80, 130, 255, 0.18), rgba(80, 130, 255, 0.18)); }
#lg-rubber { position: fixed; z-index: 60; pointer-events: none; border: 1px solid var(--accent); background: rgba(80, 130, 255, 0.12); }
body.lg-dragging { user-select: none; -webkit-user-select: none; cursor: crosshair; }
.shift-block.shift-selected { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 1; }
.staff-row.staff-selected { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.lg-copied { outline: 2px dashed var(--ok) !important; outline-offset: 1px; }
.calendar-cell.lg-copied { outline-offset: -3px; }
.calendar-cell, .shift-block { cursor: cell; }
.shift-time { cursor: pointer; }
.lg-toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 12px);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  padding: 0.55rem 1rem; border-radius: 8px; font-size: 0.9rem; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 1100; max-width: 90vw;
}
.lg-toast.show { opacity: 1; transform: translate(-50%, 0); }
.lg-toast-warn { border-color: var(--warn); color: var(--warn); }
.kbd-help summary { font-size: 1rem; }
.kbd-table { width: auto; max-width: 100%; margin: 0.4rem 0 0.8rem; }
.kbd-table td { border-bottom: 1px solid var(--border); vertical-align: top; padding: 0.4rem 0.8rem 0.4rem 0; }
.kbd-table td:first-child { white-space: nowrap; color: var(--muted); }
kbd { background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35rem; font-size: 0.82em; font-family: inherit; }

.staff-curpin { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
code.staff-curpin { background: var(--surface-2); padding: 0.3rem 0.5rem; border-radius: 6px; text-align: center; display: block; }
.staff-pin-unknown { color: var(--muted); font-weight: 400; font-size: 0.82rem; letter-spacing: 0; cursor: help; }
.staff-pin-set::before { content: none; }
.staff-pin-set { font-weight: 400; font-size: 0.82rem; letter-spacing: 0; color: var(--muted); }

.staff-curpin-wrap { display: flex; flex-direction: column; gap: 0.15rem; align-items: stretch; min-width: 0; }
.pin-tag { font-size: 0.7rem; color: var(--muted); text-align: center; line-height: 1.1; }
.pin-dup { color: #fff; background: var(--danger); border-radius: 4px; padding: 0.1rem 0.3rem; font-weight: 700; }

/* ---- v1.22: weather-dependent shifts and multi-person shifts ---- */
/* Weather-dependent: diagonal stripes over the normal colour + a cloud. Kept
   apart from "unassigned" (faded + dashed) so the two never look alike. */
.shift-weather::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.7) 0 4px, rgba(255,255,255,0) 4px 9px);
  pointer-events: none;
}
:root:not([data-theme="light"]) .shift-weather::before {
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.45) 0 4px, rgba(255,255,255,0) 4px 9px);
}
.shift-weather { border: 1px dotted currentColor; }
.weather-icon { font-size: 0.85rem; margin-left: 0.1rem; opacity: 0.95; line-height: 1; }
.shift-row .shift-time { white-space: nowrap; }
.shift-row { gap: 0.15rem; }
.shift-row { position: relative; }
.shift-row .weather-icon { margin-right: auto; }

/* One outline per place on a shift. Filled = the name; empty = dashed
   outline; not needed yet (greyed) = faint dotted outline with "open". */
.slot-row { border-radius: 4px; padding: 0.05rem 0.2rem; position: relative; }
.slot-row + .slot-row { margin-top: 0.15rem; }
.slot-row.slot-empty { border: 1px dashed currentColor; opacity: 0.85; }
.slot-row.slot-off { border: 1px dotted currentColor; opacity: 0.7; font-style: italic; }
.shift-block-unassigned .slot-row.slot-empty { border-style: dashed; }
.slot-toggle { cursor: pointer; }
button.slot-open {
  background: none; color: inherit; border: 1px solid currentColor; border-radius: 4px;
  font-size: 0.68rem; padding: 0 0.3rem; line-height: 1.3; opacity: 0.85;
}
button.slot-open:hover { opacity: 1; background: rgba(255,255,255,0.25) !important; }
.shift-weather > * { position: relative; }
.slot-row .shift-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
button.slot-open { font-size: 0.8rem; font-weight: 700; padding: 0 0.35rem; }

/* ---- v1.23: on-call applications ---- */
.oncall-table .oncall-cell, .calendar-table .oncall-cell { vertical-align: top; padding: 0.3rem 0.4rem; min-width: 4.5rem; }
.oncall-divider td { background: var(--surface-2); color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; padding: 0.3rem 0.5rem; }
.oncall-row { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; padding: 0.1rem 0.25rem; border-radius: 4px; margin-bottom: 0.15rem; }
.oncall-row:first-of-type { font-weight: 700; }
.oncall-pos { font-size: 0.7rem; opacity: 0.7; font-variant-numeric: tabular-nums; }
.oncall-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oncall-row { background: rgba(37, 99, 235, 0.14); }
.oncall-row.oncall-me { background: rgba(22, 163, 74, 0.22); outline: 1px solid #16a34a; }
.oncall-row.oncall-declined { background: none; text-decoration: line-through; opacity: 0.5; }
.oncall-row.oncall-declined .badge-x { text-decoration: none; }
.oncall-none { color: var(--muted); opacity: 0.6; }
.oncall-withdraw { opacity: 0.85; }


/* ---- v1.24: event markers (festivals, local parties, public holidays) ---- */
.ev-chips { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.25rem; }
.ev-chips.in-head { margin-top: 0.25rem; margin-bottom: 0; }
.ev-chip {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
  border: 0;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--ev-other-bg);
  color: var(--ev-other-fg);
}
.ev-chip:hover { filter: brightness(1.12); }
.ev-festival { background: var(--ev-festival-bg); color: var(--ev-festival-fg); }
.ev-party    { background: var(--ev-party-bg);    color: var(--ev-party-fg); }
.ev-holiday  { background: var(--ev-holiday-bg);  color: var(--ev-holiday-fg); }
.ev-other    { background: var(--ev-other-bg);    color: var(--ev-other-fg); }
.ev-note     { background: var(--ev-note-bg);     color: var(--ev-note-fg); }
/* A comment is a sentence for the staff: let it wrap instead of cutting it off. */
.ev-chip.ev-note { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; font-weight: 600; }
/* In the manager's grid a long comment is cut to 3 lines (click it to read/edit all);
   staff and shop screens always show the whole message. */
.ev-chip.ev-note:not(.readonly) { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* The single "+" in a calendar cell and its menu (v1.36) */
.cell-plus {
  background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer;
  font: inherit; font-size: 1rem; line-height: 1; font-weight: 600;
  width: 1.5rem; height: 1.5rem; padding: 0; color: var(--muted);
}
.cell-plus:hover, .cell-plus:focus-visible { color: var(--accent); border-color: var(--border, currentColor); background: none; }
.cell-menu {
  position: absolute; z-index: 60; min-width: 15rem;
  background: var(--surface, var(--card, #1f2937)); color: var(--text, inherit);
  border: 1px solid var(--border, #4b5563); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35); padding: 0.3rem;
}
.cell-menu-item {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
  background: none; border: 0; border-radius: 6px; padding: 0.45rem 0.6rem; cursor: pointer;
  color: inherit; font: inherit;
}
.cell-menu-item:hover, .cell-menu-item:focus-visible { background: var(--surface-2); outline: none; }
.cell-menu-item .cm-icon { font-size: 1.15rem; width: 1.5rem; text-align: center; }
.cell-menu-item small { display: block; font-size: 0.74rem; color: var(--muted); font-weight: 400; }
.ev-dialog textarea { width: 100%; box-sizing: border-box; font: inherit; resize: vertical; }
.ev-chip.readonly { cursor: default; }
.ev-chip.readonly:hover { filter: none; }
.ev-chip .ev-cont { opacity: 0.7; font-weight: 400; }
.ev-add { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 0.74rem; color: var(--muted); }
.ev-add:hover { color: var(--accent); background: none; }

.ev-dialog { max-width: 440px; padding: 1.25rem 1.5rem 1.4rem; }
.ev-dialog h2 { margin: 0 0 0.6rem; font-size: 1.1rem; padding-right: 2rem; }
.ev-dialog .ev-row { display: flex; gap: 0.75rem; }
.ev-dialog .ev-row > div { flex: 1; min-width: 0; }
.ev-dialog input, .ev-dialog select { width: 100%; box-sizing: border-box; }
.ev-dialog .ev-error { color: var(--danger, #f87171); font-size: 0.85rem; margin-top: 0.6rem; min-height: 1.1rem; }
.ev-dialog .ev-actions { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.9rem; }
.ev-dialog .ev-actions .spacer { flex: 1; }
.ev-table td.ev-title { font-weight: 600; }
.ev-legend { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; vertical-align: middle; }
.ev-legend .ev-chip { width: auto; cursor: default; display: inline-block; }

.tt-panel { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.tt-panel .tt-warn { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.9rem; }
.tt-panel .tt-warn li.bad { color: #c0392b; }

/* v1.26: public holiday footnote (quiet; not an event) */
.hol-note { font-size: 0.72rem; line-height: 1.25; color: var(--muted); margin: 0 0 0.2rem; font-weight: normal; }
.hol-note.hol-similar { font-style: italic; opacity: 0.75; }
.hol-note .hol-cantons { opacity: 0.8; }

/* v1.27: payroll sheet */
.pay-table td, .pay-table th { vertical-align: top; }
.pay-table .pay-in { width: 4.6rem; padding: 0.25rem 0.35rem; }
.pay-table .pay-note { width: 9.5rem; padding: 0.25rem 0.35rem; }
.pay-table .pay-text-cell { min-width: 16rem; max-width: 26rem; }
.pay-table button.cp { border-color: transparent; background: transparent; color: var(--muted); padding: 0 0.3rem; margin-left: 0.2rem; font-size: 0.85rem; line-height: 1.4; vertical-align: baseline; }
.pay-table button.cp:hover { color: var(--accent); }
.pay-table .pay-text { display: block; font-size: 0.78rem; color: var(--muted); max-height: 3.6em; overflow: hidden; margin-top: 0.25rem; }
.pay-table tr.pay-warn td:first-child { border-left: 3px solid #c0392b; }
.pay-table tr.pay-total td { font-weight: 600; border-top: 2px solid var(--border, #444); }
.container.pay-page { max-width: min(1800px, 98vw); }
.pay-table .pay-text-cell { min-width: 14rem; max-width: 22rem; }
/* v1.47: the header row stays visible while scrolling. On wide screens the page itself scrolls;
   on narrow ones the table scrolls inside its box (a horizontal scroller cannot also be sticky). */
.pay-table th { vertical-align: bottom; }
.pay-table .pay-grp { display: block; min-height: 1.1em; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.pay-table .pay-sub { display: block; font-size: 0.72rem; font-weight: 400; color: var(--muted); }
.pay-table .g-start { border-left: 1px solid var(--border); }
.pay-table th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: 0 1px 0 var(--border); }
.pay-page .table-scroll { overflow: auto; max-height: 85vh; }
@media (min-width: 1750px) { .pay-page .table-scroll { overflow: visible; max-height: none; } }
.pay-table th, .pay-table td { padding-left: 0.4rem; padding-right: 0.4rem; }
.pay-table .pay-grp { white-space: normal; }

/* v1.28: shop screens */
.shop-day { width: 100%; border-collapse: collapse; }
.shop-day td { vertical-align: top; padding: 0.4rem 0.5rem; border-top: 1px solid var(--border, rgba(128,128,128,0.25)); }
.shop-day td.calendar-rowhead { width: 9rem; white-space: nowrap; }
.shop-day tr.shop-own td:not(.calendar-rowhead) { background: rgba(120,120,255,0.06); }
.shop-shifts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.shop-shifts .shift-block { min-width: 9rem; margin: 0; }
.shop-now div { margin: 0.15rem 0; }

/* ---- v1.30: Shiftly brand ---- */
.topnav-brand { display: flex; align-items: center; gap: 0.5rem; }
.topnav-brand .brand-mark { width: 28px; height: 28px; display: block; }
.topnav-brand .brand-name { font-weight: 800; letter-spacing: 0.01em; font-size: 1.1rem; color: white; }
.topnav-brand .brand-by { font-size: 0.7rem; color: var(--nav-link); opacity: 0.75; align-self: flex-end; margin-bottom: 0.1rem; }
@media (max-width: 900px) { .topnav-brand .brand-by { display: none; } }
.login-brand { text-align: center; margin-bottom: 0.75rem; }
.login-brand img { width: 64px; height: 64px; display: block; margin: 0 auto 0.6rem; filter: drop-shadow(0 6px 14px rgba(47, 111, 228, 0.35)); }
.login-brand h1 { margin: 0; font-size: 1.9rem; letter-spacing: 0.01em; }
.login-brand .powered { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem; }
.brand-foot { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.6rem; color: var(--muted); font-size: 0.8rem; }
.brand-foot img { width: 20px; height: 20px; }
.brand-foot strong { color: var(--text); }

/* ---- v1.31: start page ---- */
.start-body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); display: flex; align-items: center; justify-content: center; }
.start-wrap { width: 100%; max-width: 640px; padding: 2rem 1rem; text-align: center; }
.start-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.start-list { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.start-tile { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 1.75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform 0.12s, border-color 0.12s; }
.start-tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.start-tile.small { padding: 1.1rem 1rem; }
.start-icon { font-size: 2.2rem; line-height: 1; }
.start-title { font-weight: 700; font-size: 1.25rem; }
.start-sub { color: var(--muted); font-size: 0.88rem; }
.start-links { margin-top: 1.5rem; color: var(--muted); font-size: 0.9rem; }
.start-links a { color: var(--accent); }
a.brand-foot { text-decoration: none; }
a.brand-foot:hover strong { color: var(--accent); }
@media (max-width: 560px) { .start-tiles { grid-template-columns: 1fr; } }

/* ---- v1.32 ---- */
.kiosk-cal { margin: 1rem 0 0; font-size: 0.95rem; }
.kiosk-cal a { color: var(--accent); text-decoration: none; }
.kiosk-cal a:hover { text-decoration: underline; }

/* ---- v1.35: today's column, weekends, shift-length shades ---- */
:root {
  --today-line: rgba(110, 168, 255, 0.7);
  --today-tint: rgba(110, 168, 255, 0.10);
  --weekend-tint: rgba(255, 255, 255, 0.035);
  --weekend-head: #f0b866;
  --nat-bg: #b3261e; --nat-fg: #ffffff; --nat-tint: rgba(220, 60, 50, 0.13); --nat-line: #e5483d;
}
:root[data-theme="light"] {
  --today-line: rgba(37, 89, 189, 0.75);
  --today-tint: rgba(47, 111, 228, 0.09);
  --weekend-tint: rgba(0, 0, 0, 0.045);
  --weekend-head: #b45309;
  --nat-bg: #c62828; --nat-fg: #ffffff; --nat-tint: rgba(198, 40, 40, 0.10); --nat-line: #c62828;
}
/* today: bold header with a bar on top, a faint tint and a line on both sides of the whole column */
.calendar-table th.is-today { color: var(--text); font-weight: 800; box-shadow: inset 0 3px 0 var(--accent); }
.calendar-table th.is-today,
.calendar-table td.is-today { border-left: 2px solid var(--today-line); border-right: 2px solid var(--today-line); }
.calendar-table td.calendar-cell.is-today:not(.cell-selected):not(.cell-away),
.calendar-table td.oncall-cell.is-today { background-color: var(--today-tint); }
/* weekend: Sat/Sun header in a warm colour and a slightly different background */
.calendar-table th.is-weekend { color: var(--weekend-head); }
.calendar-table td.calendar-cell.is-weekend:not(.is-today):not(.cell-selected):not(.cell-away),
.calendar-table td.oncall-cell.is-weekend:not(.is-today) { background-color: var(--weekend-tint); }
.calendar-table th.is-today.is-weekend { color: var(--weekend-head); }

.shade-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.4rem; margin: 0 0 0.9rem; font-size: 0.8rem; color: var(--muted); }
.shade-chip { padding: 0.1rem 0.5rem; border-radius: 5px; font-weight: 600; font-size: 0.75rem; }
.shade-legend-note { margin-left: 0.4rem; }

/* ---- v1.37: a public holiday that hits every shop (1 August, Christmas...) is marked boldly ---- */
.calendar-table th.is-national { background: var(--nat-bg); color: var(--nat-fg); }
.calendar-table th.is-national.is-today, .calendar-table th.is-national.is-weekend { color: var(--nat-fg); }
.nat-holiday {
  margin: 0.2rem -0.3rem -0.1rem; padding: 0.15rem 0.3rem;
  background: rgba(0, 0, 0, 0.22); border-radius: 3px;
  font-size: 0.8rem; font-weight: 800; line-height: 1.2;
  white-space: normal; overflow-wrap: break-word; hyphens: auto;
}
.nat-holiday::before { content: "\2605  "; }
.calendar-table td.season-cell.is-national { box-shadow: inset 0 0 0 2px var(--nat-line); }
.calendar-table td.calendar-cell.is-national.is-national:not(.cell-selected):not(.cell-away),
.calendar-table td.oncall-cell.is-national.is-national { background-color: var(--nat-tint); }
.calendar-table td.is-national { border-left: 1px solid var(--nat-line); border-right: 1px solid var(--nat-line); }
.nat-banner {
  background: var(--nat-bg); color: var(--nat-fg); border-radius: 6px;
  padding: 0.45rem 0.7rem; margin: 0 0 0.6rem; font-weight: 800; font-size: 1rem; text-transform: uppercase;
}
.nat-banner::before { content: "\2605  "; }
.nat-banner span { font-weight: 500; font-size: 0.8rem; text-transform: none; opacity: 0.9; margin-left: 0.4rem; }
/* an "All locations" public-holiday marker (typed in by hand) in the day header: solid, bigger */
.ev-chips.in-head .ev-chip.ev-holiday { background: var(--nat-bg); color: var(--nat-fg); font-size: 0.8rem; font-weight: 800; white-space: normal; overflow-wrap: break-word; }

/* v1.40: send staff time reports */
#steps h3 { margin: 1.4rem 0 0.4rem; font-size: 1rem; }
#steps .tt-warn { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.9rem; }
#steps .tt-warn li.bad, #steps .bad { color: #c0392b; }
#steps .ts-note { color: var(--muted); font-size: 0.85rem; margin-top: 0.4rem; }
.tt-mail { max-width: 38rem; padding: 0.6rem 0.8rem; margin-top: 0.4rem; border: 1px solid var(--border, #444); border-radius: 6px; font-size: 0.85rem; white-space: normal; }
.tt-mail table { font-size: 0.8rem; }

/* v1.42: shorter main menu with a second row of tabs for the grouped pages */
.topnav a.active { color: white; font-weight: 600; border-bottom: 2px solid var(--nav-link); padding-bottom: 2px; }
.subnav { display: flex; flex-wrap: wrap; gap: 1.1rem; padding: 0.5rem 1.5rem; background: var(--navy-light); border-bottom: 1px solid var(--border); }
.subnav a { color: var(--nav-link); text-decoration: none; font-size: 0.9rem; padding-bottom: 2px; }
.subnav a:hover { color: white; }
.subnav a.active { color: white; font-weight: 600; border-bottom: 2px solid var(--nav-link); }
@media (max-width: 700px) { .subnav { padding: 0.5rem 1rem; gap: 0.8rem; } }
