/* Stadium Events — Luton Town FC
   Navy / orange, drawn from the club's palette. Light and dark. */

:root {
  --navy-900: #0b1a33;
  --navy-800: #14284b;
  --navy-700: #1d3763;
  --orange:   #f5851f;
  --orange-d: #d96f0c;

  --bg:        #f4f6fa;
  --surface:   #ffffff;
  --surface-2: #eef1f7;
  --border:    #d7dde9;
  --border-2:  #c3ccdd;
  --text:      #16203a;
  --text-dim:  #5b6780;
  --text-mute: #8792a8;

  --green:  #1f8a4c;  --green-bg:  #e4f4ea;
  --amber:  #b06a00;  --amber-bg:  #fdf1dd;
  --red:    #c02627;  --red-bg:    #fce8e8;
  --blue:   #1c5fbe;  --blue-bg:   #e5eefb;
  --violet: #6b3fa0;  --violet-bg: #efe8f8;
  --slate:  #5b6780;  --slate-bg:  #eaeef5;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(11,26,51,.06), 0 4px 14px rgba(11,26,51,.06);
  --focus: 0 0 0 3px rgba(245,133,31,.45);
  --max: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0d1524;
    --surface:   #141d30;
    --surface-2: #1b2640;
    --border:    #26334f;
    --border-2:  #35446a;
    --text:      #e6ecf7;
    --text-dim:  #9fadc7;
    --text-mute: #74829d;

    --green:  #4ecb84;  --green-bg:  #12291d;
    --amber:  #e8a33c;  --amber-bg:  #2c2008;
    --red:    #f0736f;  --red-bg:    #2e1414;
    --blue:   #6aa5f5;  --blue-bg:   #10203a;
    --violet: #b28df0;  --violet-bg: #201634;
    --slate:  #9fadc7;  --slate-bg:  #1b2440;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  }
}

:root[data-theme="dark"] {
  --bg: #0d1524; --surface: #141d30; --surface-2: #1b2640;
  --border: #26334f; --border-2: #35446a;
  --text: #e6ecf7; --text-dim: #9fadc7; --text-mute: #74829d;
  --green: #4ecb84; --green-bg: #12291d;
  --amber: #e8a33c; --amber-bg: #2c2008;
  --red: #f0736f; --red-bg: #2e1414;
  --blue: #6aa5f5; --blue-bg: #10203a;
  --violet: #b28df0; --violet-bg: #201634;
  --slate: #9fadc7; --slate-bg: #1b2440;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--orange);
  color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

/* ---------- Top bar ---------- */

.topbar {
  background: var(--navy-800);
  border-bottom: 3px solid var(--orange);
  position: sticky; top: 0; z-index: 30;
}
.topbar-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 24px; min-height: 58px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 6px; flex: none;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
}
.brand strong { display: block; font-size: 15px; letter-spacing: .01em; }
.brand small { display: block; font-size: 11px; color: rgba(255,255,255,.62); }

.topbar nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  color: rgba(255,255,255,.78); padding: 7px 12px; border-radius: var(--radius-sm);
  font-size: 14px; white-space: nowrap;
}
.topbar nav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.topbar nav a.on { background: var(--orange); color: #fff; font-weight: 600; }

.whobox { display: flex; align-items: center; gap: 8px; }
.who {
  color: rgba(255,255,255,.82); font-size: 13px; padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.who:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.who-role {
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  background: rgba(255,255,255,.16); padding: 1px 6px; border-radius: 999px;
}
.who-out { color: rgba(255,255,255,.6); font-size: 12.5px; white-space: nowrap; }
.who-out:hover { color: #fff; }

/* Sign-in page: no chrome, just the form */
body.plain .topbar nav, body.plain .whobox { display: none; }
.login-card { margin-top: 8vh; text-align: center; }
.login-card .login-mark {
  width: 46px; height: 46px; border-radius: 12px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
}
.login-card h1 { margin: 0 0 2px; font-size: 22px; }
.login-card .form, .login-card .flash { text-align: left; }
.login-card .field { margin-bottom: 12px; }
.login-card .flash pre { margin: 6px 0; }

.sso-btn { gap: 10px; padding: 11px 16px; font-size: 15px; }
.ms-logo {
  width: 17px; height: 17px; flex: none;
  background:
    linear-gradient(to bottom right, #f25022 0 50%, transparent 50%) 0 0 / 51% 51% no-repeat,
    linear-gradient(to bottom left,  #7fba00 0 50%, transparent 50%) 100% 0 / 51% 51% no-repeat,
    linear-gradient(to top right,    #00a4ef 0 50%, transparent 50%) 0 100% / 51% 51% no-repeat,
    linear-gradient(to top left,     #ffb900 0 50%, transparent 50%) 100% 100% / 51% 51% no-repeat;
}

.or-rule {
  display: flex; align-items: center; gap: 12px; margin: 18px 0;
  color: var(--text-mute); font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
}
.or-rule::before, .or-rule::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ---------- Layout ---------- */

main { max-width: 860px; margin: 0 auto; padding: 24px 20px 60px; }
main.wide { max-width: var(--max); }

.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.015em; }
.lede { margin: 4px 0 0; color: var(--text-dim); font-size: 14px; }
.crumb { font-size: 12px; color: var(--text-mute); margin-bottom: 4px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 18px 20px 30px;
  display: flex; justify-content: space-between; gap: 12px;
  color: var(--text-mute); font-size: 12px; flex-wrap: wrap;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 620px; margin-inline: auto; }
.card.accent { border-left: 4px solid var(--orange); }
.card.danger { border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.card > h2 {
  margin: 0 0 14px; font-size: 15px; letter-spacing: .01em;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.card > h2 .card-action { font-size: 13px; font-weight: 400; }
.card h3 { font-size: 15px; margin: 18px 0 6px; }
.card h4 { font-size: 13px; margin: 14px 0 4px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .05em; }
.card h4:first-child { margin-top: 0; }

.hint { color: var(--text-dim); font-size: 13px; margin: 0 0 12px; }
.empty { color: var(--text-mute); padding: 22px; text-align: center; font-size: 14px; margin: 0; }
.muted { color: var(--text-mute); }
.strike { text-decoration: line-through; }
.warn-text { color: var(--amber); }
.danger-text { color: var(--red) !important; }

/* ---------- Stats ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; display: block; color: var(--text); box-shadow: var(--shadow);
  border-top: 3px solid var(--border-2);
}
a.stat:hover { border-color: var(--orange); text-decoration: none; transform: translateY(-1px); }
.stat { transition: transform .12s, border-color .12s; }
.stat b { display: block; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--text-dim); }
.stat.amber { border-top-color: var(--amber); }
.stat.green { border-top-color: var(--green); }

/* ---------- Badges & chips ---------- */

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5;
}
.badge.sm { font-size: 11px; padding: 1px 7px; }
.badge.green  { background: var(--green-bg);  color: var(--green); }
.badge.amber  { background: var(--amber-bg);  color: var(--amber); }
.badge.red    { background: var(--red-bg);    color: var(--red); }
.badge.blue   { background: var(--blue-bg);   color: var(--blue); }
.badge.violet { background: var(--violet-bg); color: var(--violet); }
.badge.slate  { background: var(--slate-bg);  color: var(--slate); }

.tag {
  display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  background: var(--surface-2); color: var(--text-dim); padding: 1px 6px;
  border-radius: 3px; margin-left: 6px; vertical-align: middle;
}

.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.chips-label { font-size: 12px; color: var(--text-mute); margin-right: 4px; min-width: 48px; }
.chip {
  padding: 3px 11px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--border-2); color: var(--text-dim); background: var(--surface);
}
.chip:hover { border-color: var(--orange); text-decoration: none; }
.chip.on { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot.green { background: var(--green); } .dot.amber { background: var(--amber); }
.dot.blue { background: var(--blue); } .dot.violet { background: var(--violet); }
.dot.slate { background: var(--slate); } .dot.red { background: var(--red); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text-dim); }
.legend-item { display: inline-flex; align-items: center; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td {
  padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top;
}
table.grid thead th {
  background: var(--surface-2); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-dim); font-weight: 700; white-space: nowrap;
  position: sticky; top: 0;
}
table.grid tbody tr:hover { background: var(--surface-2); }
table.grid tfoot th { background: var(--surface-2); font-size: 13px; padding: 10px 12px; }
table.grid .num, .num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid .right { text-align: right; }
.nowrap { white-space: nowrap; }
.ref { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.strong { font-weight: 600; color: var(--text); }
.sub { font-size: 12px; color: var(--text-mute); margin-top: 1px; }
tr.fixture-row { background: color-mix(in srgb, var(--violet-bg) 50%, transparent); }

table.grid input, table.grid select {
  width: 100%; padding: 4px 7px; font-size: 13px; border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
table.grid input.n { max-width: 72px; text-align: right; }
table.grid input[type="checkbox"] { width: auto; }

/* Car park load bar */
.meter {
  width: 100%; min-width: 70px; height: 7px; border-radius: 999px;
  background: var(--surface-2); overflow: hidden; margin-top: 5px;
}
.meter span { display: block; height: 100%; border-radius: 999px; }
.meter span.green { background: var(--green); }
.meter span.amber { background: var(--amber); }
.meter span.red   { background: var(--red); }

.meter.lg { height: 10px; }

/* ---------- Checklists ---------- */

.progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.progress-row .meter { flex: 1; min-width: 140px; margin-top: 0; }
.progress-text { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }

.phase-head {
  display: flex; align-items: baseline; gap: 6px; margin: 16px 0 6px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim);
}
.phase-head:first-of-type { margin-top: 4px; }

table.checklist td { padding: 6px 10px; vertical-align: middle; }
table.checklist td.check-cell { width: 40px; padding-right: 0; }
table.checklist tr.item-done .item-label { color: var(--text-mute); text-decoration: line-through; }
.item-label { font-size: 13.5px; }

.tick {
  width: 22px; height: 22px; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--border-2); background: var(--surface);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  color: transparent; padding: 0; line-height: 1;
}
.tick:hover { border-color: var(--green); }
.tick.done { background: var(--green); border-color: var(--green); color: #fff; }
.tick.na { background: var(--surface-2); border-color: var(--border-2); color: var(--text-mute); }

.note-input {
  width: 150px; padding: 3px 8px !important; font-size: 12px !important;
  display: inline-block; vertical-align: middle;
}
.mt { margin-top: 12px; }

/* ---------- Comms outbox ---------- */

.msg {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; background: var(--surface);
}
.msg.pending { border-left: 4px solid var(--orange); }
.msg.sent { opacity: .75; }
.msg.dismissed { opacity: .55; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.msg-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.msg-subject { font-weight: 600; font-size: 13.5px; margin: 8px 0 4px; }
.msg-body {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; margin: 6px 0 0;
  font-family: inherit; max-height: 320px; overflow: auto;
}
.msg details summary { cursor: pointer; font-size: 12.5px; color: var(--text-dim); margin-top: 6px; }

.distribute { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }

/* Vehicle registrations read better in a fixed-width face */
.reg {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase;
}

table.grid th.pick, table.grid td.pick { width: 34px; padding-right: 0; }
table.grid td.pick input, table.grid th.pick input { width: auto; }

.bulk-bar {
  position: sticky; bottom: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--navy-800); color: #fff; padding: 10px 14px;
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px;
}
.bulk-bar[hidden] { display: none; }
.bulk-bar input[type="text"] {
  flex: 1; min-width: 160px; background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.25); color: #fff;
}
.bulk-bar input::placeholder { color: rgba(255,255,255,.5); }
.bulk-bar .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.bulk-bar .btn:hover { background: rgba(255,255,255,.22); }
.bulk-bar .btn.primary { background: var(--orange); border-color: var(--orange); }
.bulk-bar .btn.danger { background: transparent; border-color: rgba(255,160,160,.55); color: #ffbdbd; }

table.totals, table.rates { width: 100%; border-collapse: collapse; font-size: 14px; }
table.totals td, table.rates td { padding: 5px 0; }
table.totals tr.rule td { border-top: 1px solid var(--border); padding-top: 9px; }
table.totals tr.grand td { border-top: 2px solid var(--navy-700); font-weight: 700; font-size: 16px; padding-top: 9px; }
table.rates td small { display: block; color: var(--text-mute); font-size: 11px; }
table.compare td { font-size: 13.5px; }

/* ---------- Forms ---------- */

.form { margin: 0; }
fieldset {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin: 0 0 16px; background: var(--surface);
}
legend {
  padding: 2px 10px; font-weight: 700; font-size: 13px; color: var(--navy-700);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) legend { color: var(--orange); } }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full, .fields > .full { grid-column: 1 / -1; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.field .req { color: var(--orange); }
.field small { font-size: 11.5px; color: var(--text-mute); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="time"], input[type="number"], input[type="search"], input:not([type]),
select, textarea {
  width: 100%; padding: 8px 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); min-width: 0;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: none; box-shadow: var(--focus); border-color: var(--orange);
}
input[readonly] { background: var(--surface-2); color: var(--text-dim); }

.check { display: flex; align-items: flex-start; gap: 8px; }
.check input { margin-top: 3px; flex: none; }
.check label { font-size: 14px; cursor: pointer; }
.check label small { display: block; color: var(--text-mute); font-size: 11.5px; }
.check-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px 12px; }

.conditional { display: none; }
.conditional.show { display: block; }
.conditional > .fields {
  border-left: 3px solid var(--orange); padding: 12px 0 4px 14px; margin-top: 4px;
}

.actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.actions-inline { justify-content: flex-end; flex-direction: row; align-items: flex-end; gap: 8px; }
.sticky-actions {
  position: sticky; bottom: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; box-shadow: 0 -4px 14px rgba(11,26,51,.08);
  z-index: 10;
}

.inline { display: inline-flex; gap: 4px; align-items: center; }
.inline-form { border-top: 1px dashed var(--border); padding-top: 14px; margin-top: 14px; }
.add-row { display: flex; gap: 6px; margin-top: 10px; padding: 0 18px 16px; flex-wrap: wrap; }
.card:not(.flush) .add-row { padding: 0; }
.add-row input, .add-row select { flex: 1; min-width: 120px; }

.filters .filter-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; align-items: end;
}
.filters.compact .filter-form { grid-template-columns: repeat(auto-fit, minmax(150px, 220px)); }

.danger-form input { margin-bottom: 8px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--radius-sm); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-mute); text-decoration: none; }
.btn.primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn.primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.block { display: flex; width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Flash & panels ---------- */

.flash {
  padding: 11px 15px; border-radius: var(--radius); margin-bottom: 14px;
  font-size: 14px; border: 1px solid; line-height: 1.5;
}
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.flash li + li { margin-top: 3px; }
.flash.info    { background: var(--blue-bg);  border-color: color-mix(in srgb, var(--blue) 35%, transparent);  color: var(--blue); }
.flash.success { background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 35%, transparent); color: var(--green); }
.flash.warn    { background: var(--amber-bg); border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: var(--amber); }
.flash.error   { background: var(--red-bg);   border-color: color-mix(in srgb, var(--red) 35%, transparent);   color: var(--red); }
.flash a { color: inherit; text-decoration: underline; }

/* ---------- Decision bar ---------- */

.decision-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--navy-800); color: #fff; padding: 12px 16px;
  border-radius: var(--radius); margin-bottom: 14px;
}
.decision-bar.closed { background: var(--surface-2); color: var(--text-dim); }
.decision-what { display: flex; flex-direction: column; min-width: 160px; }
.decision-what small { font-size: 11.5px; color: rgba(255,255,255,.65); }
.decision-what small.warn { color: #ffd08a; }
.decision-note { flex: 1; min-width: 180px; background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.25); color: #fff; }
.decision-note::placeholder { color: rgba(255,255,255,.5); }
.decision-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.decision-bar .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.decision-bar .btn:hover { background: rgba(255,255,255,.22); }
.decision-bar .btn.primary { background: var(--orange); border-color: var(--orange); }
.decision-bar .btn.primary:hover { background: var(--orange-d); }
.decision-bar .btn.danger { background: transparent; border-color: rgba(255,160,160,.55); color: #ffbdbd; }
.decision-bar .btn:disabled { opacity: .35; }

/* ---------- Tabs ---------- */

.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a {
  padding: 9px 15px; color: var(--text-dim); font-size: 14px; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--navy-800); border-bottom-color: var(--orange); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs a.on { color: var(--orange); } }

/* ---------- Room picker ---------- */

.room-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.room-picker.compact { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px; }
.room-group h4 { margin: 0 0 6px; }
.room-option {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; margin-bottom: 5px; background: var(--surface);
}
.room-option:hover { border-color: var(--border-2); background: var(--surface-2); }
.room-option.on { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 8%, var(--surface)); }
.room-option input { margin-top: 3px; flex: none; }
.room-option strong { display: block; font-size: 13.5px; font-weight: 600; }
.room-option small { display: block; font-size: 11px; color: var(--text-mute); }
.room-option.clash { border-color: var(--red); background: var(--red-bg); }
.room-option.soft-clash { border-color: var(--amber); background: var(--amber-bg); }

/* ---------- Checklist & lists ---------- */

.checklist { list-style: none; margin: 0 0 10px; padding: 0; }
.checklist li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.checklist li:last-child { border-bottom: 0; }

.editable-list { list-style: none; margin: 0; padding: 0; }
.editable-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}

.dl { margin: 0; }
.dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0;
  border-bottom: 1px solid var(--border); font-size: 13.5px; }
.dl > div:last-child { border-bottom: 0; }
.dl dt { color: var(--text-dim); flex: none; }
.dl dd { margin: 0; text-align: right; }
.dl.tight > div { padding: 4px 0; }

.note-block {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 9px 11px;
  font-size: 13px; line-height: 1.55; margin-bottom: 10px; white-space: normal;
}

.steps, .flow { padding-left: 20px; }
.steps li, .flow li { margin-bottom: 7px; }
.feed-opts { list-style: none; padding: 0; margin: 8px 0; }
.feed-opts li { padding: 4px 0; font-size: 13px; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px;
  background: var(--surface-2); padding: 1px 5px; border-radius: 3px;
}

.copy-row { display: flex; gap: 6px; margin: 10px 0; }
.copy-row input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 130px 1fr; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--text-mute); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

table.signoff td { vertical-align: middle; }

/* ---------- Calendar ---------- */

table.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.calendar th {
  background: var(--navy-800); color: #fff; padding: 7px; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .06em;
}
table.calendar td {
  border: 1px solid var(--border); vertical-align: top; height: 108px;
  padding: 4px; width: 14.28%;
}
table.calendar td.pad { background: var(--surface-2); }
table.calendar td.weekend { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
table.calendar td.today { box-shadow: inset 0 0 0 2px var(--orange); }
.daynum { display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-dim); font-weight: 700; padding: 1px 3px 3px; }
.daynum em { font-style: normal; font-size: 10px; background: var(--surface-2);
  color: var(--text-mute); padding: 0 5px; border-radius: 999px; }
.day-events { display: flex; flex-direction: column; gap: 2px; }
.ev {
  display: block; padding: 3px 5px; border-radius: 4px; font-size: 11px;
  line-height: 1.3; border-left: 3px solid var(--slate);
  background: var(--surface-2); color: var(--text); overflow: hidden;
}
.ev:hover { text-decoration: none; filter: brightness(.97); }
.ev-time { font-weight: 700; margin-right: 3px; font-variant-numeric: tabular-nums; }
.ev-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-room { display: block; color: var(--text-mute); font-size: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.green  { border-left-color: var(--green);  background: var(--green-bg); }
.ev.amber  { border-left-color: var(--amber);  background: var(--amber-bg); }
.ev.blue   { border-left-color: var(--blue);   background: var(--blue-bg); }
.ev.violet { border-left-color: var(--violet); background: var(--violet-bg); }
.ev.slate  { border-left-color: var(--slate);  background: var(--slate-bg); }
.ev.fixture { font-weight: 700; }
@media (max-width: 760px) { table.calendar td { height: auto; min-height: 60px; } .ev-room { display: none; } }

/* ---------- Success page ---------- */

.success-card { text-align: center; }
.success-card .tick {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green-bg); color: var(--green);
  display: grid; place-items: center; font-size: 27px; margin: 0 auto 12px; font-weight: 700;
}
.success-card .dl, .success-card .steps { text-align: left; }
.success-card h2 { font-size: 14px; margin: 20px 0 6px; text-align: left; }
.success-card .actions { justify-content: center; }

.error-card h1 { font-size: 52px; margin: 0; color: var(--text-mute); }
pre.err { background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm);
  overflow: auto; font-size: 12px; text-align: left; }

/* ---------- Clash panel (built by app.js) ---------- */

.clash-panel { border-radius: var(--radius); padding: 12px 14px; font-size: 13.5px; border: 1px solid; }
.clash-panel.ok    { background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 30%, transparent); color: var(--green); }
.clash-panel.soft  { background: var(--amber-bg); border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: var(--amber); }
.clash-panel.hard  { background: var(--red-bg);   border-color: color-mix(in srgb, var(--red) 35%, transparent);   color: var(--red); }
.clash-panel.info  { background: var(--blue-bg);  border-color: color-mix(in srgb, var(--blue) 30%, transparent);  color: var(--blue); }
.clash-panel ul { margin: 6px 0 0; padding-left: 20px; }
.clash-panel a { color: inherit; text-decoration: underline; }
.clash-panel .alts { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.clash-panel .alt {
  background: var(--surface); border: 1px solid currentColor; border-radius: 999px;
  padding: 2px 10px; font-size: 12px; cursor: pointer; color: inherit; font: inherit;
  font-size: 12px; line-height: 1.6;
}
.clash-panel .alt:hover { filter: brightness(.96); }
.clash-panel .spin { opacity: .6; }

@media print {
  .topbar, .foot, .tabs, .decision-bar, .head-actions, .skip { display: none !important; }
  body { background: #fff; }
  .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
}
