:root {
  --ink:#16181d; --muted:#5b6170; --bg:#f3f4f7; --card:#ffffff; --line:#e1e4ea; --line2:#cfd4dd;
  --accent:#1a4ae6; --accent-ink:#ffffff; --danger:#b42318; --warn:#b54708; --ok:#1b7a3a;
  --m:#dbe7ff; --n:#ffe6c9; --v:#f3b3b3; --s:#fff1a8; --wh:#eceef3; --side:#081030; --side-ink:#dfe6f5;
  --r:14px; --shadow:0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font:17px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); display:flex; min-height:100vh; }
a { color:var(--accent); }
h1 { font-size:28px; letter-spacing:-.01em; margin:0 0 4px; font-weight:700; }
h2 { font-size:18px; margin:0 0 12px; font-weight:700; }
.muted { color:var(--muted); }
.small { font-size:14px; }
.error { color:var(--danger); font-weight:600; }
.ok { color:var(--ok); font-weight:600; }

/* sidebar */
.side { width:232px; flex:0 0 232px; color:var(--side-ink); display:flex; flex-direction:column; padding:18px 14px; position:sticky; top:0; height:100vh; z-index:5;
  background:linear-gradient(180deg, rgba(12,24,64,.72) 0%, rgba(8,16,48,.80) 100%);
  -webkit-backdrop-filter:blur(16px) saturate(120%); backdrop-filter:blur(16px) saturate(120%);
  border-right:1px solid rgba(255,255,255,.12); box-shadow:4px 0 24px rgba(0,0,0,.30); }
.side .brand { display:flex; align-items:center; padding:4px 8px 20px; }
.side .brand img { height:36px; width:auto; max-width:100%; display:block; }
.side img, .login img { max-width:100%; }
.side .logo { display:inline-grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--accent); color:#fff; font-size:14px; font-weight:800; }
.side nav { display:flex; flex-direction:column; gap:2px; }
.side nav a { display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:10px; color:var(--side-ink); text-decoration:none; font-weight:600; font-size:15.5px; }
.side nav a i { font-style:normal; width:20px; text-align:center; opacity:.8; }
.side nav a.on { background:rgba(255,255,255,.16); color:#fff; box-shadow:inset 0 0 0 1px rgba(255,255,255,.12); }
.side nav a:hover { background:rgba(255,255,255,.08); }
.side .who { margin-top:auto; padding:12px 8px 0; border-top:1px solid rgba(255,255,255,.12); font-size:14px; display:flex; flex-direction:column; gap:2px; }
.side .who small { color:#9fb0d4; }
.side .who .link { color:#cfd9f0; padding:6px 0; text-align:left; }
.badge { display:inline-grid; place-items:center; min-width:22px; height:22px; padding:0 7px; border-radius:11px; background:var(--accent); color:#fff; font-size:12.5px; font-weight:700; margin-left:auto; }
.badge.urgent { background:var(--danger); }

main { flex:1; padding:28px 32px 48px; min-width:0; }
main > * { max-width:1216px; }
main.solo { max-width:none; display:grid; place-items:center; }
header.page { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:20px; flex-wrap:wrap; }

/* cards & tiles */
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:20px; margin-bottom:18px; box-shadow:var(--shadow); }
.card.narrow { max-width:520px; }
.card.alert { border-color:#f0b4ae; background:#fff7f6; }
.tiles { display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; margin-bottom:18px; }
.tile { background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:18px 20px; text-decoration:none; color:var(--ink); display:flex; flex-direction:column; gap:2px; box-shadow:var(--shadow); }
.tile .num { font-size:34px; font-weight:800; line-height:1.1; letter-spacing:-.02em; }
.tile .lbl { color:var(--muted); font-size:14px; font-weight:600; }
.tile.urgent { border-color:var(--danger); background:#fff6f5; } .tile.urgent .num { color:var(--danger); }
.tile.warn { border-color:#f3c88b; background:#fffaf2; } .tile.warn .num { color:var(--warn); }
.two { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; }
.two .card { margin:0; }
dl.kv { display:grid; grid-template-columns:110px 1fr; gap:8px 12px; margin:0; }
dl.kv dt { color:var(--muted); font-weight:600; } dl.kv dd { margin:0; }
.up { display:flex; gap:14px; padding:10px 0; border-top:1px solid var(--line); }
.up:first-of-type { border-top:none; padding-top:0; }
.upd { width:64px; display:flex; flex-direction:column; line-height:1.2; } .upd b { font-size:18px; } .upd span { color:var(--muted); font-size:13px; } .upd em { color:var(--danger); font-style:normal; font-size:12px; }
.upb { flex:1; display:flex; flex-direction:column; gap:4px; }

/* forms & buttons */
label { display:block; margin:10px 0; font-weight:600; }
input, select { font:inherit; padding:11px 12px; border:1px solid var(--line2); border-radius:10px; width:100%; max-width:440px; background:#fff; color:var(--ink); }
input:focus, select:focus { outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
button, .btn { font:inherit; font-weight:600; padding:10px 16px; border-radius:10px; border:1px solid var(--line2); background:#fff; color:var(--ink); cursor:pointer; min-height:44px; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
button.primary, .btn { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
button.danger { background:var(--danger); color:#fff; border-color:var(--danger); }
button.big { width:100%; font-size:19px; margin-top:8px; }
button.small, .btn.small { padding:6px 12px; min-height:36px; font-size:14.5px; }
button.link { background:none; border:none; color:var(--accent); text-decoration:underline; padding:8px; min-height:0; }
.row { display:flex; align-items:center; gap:8px; } .row.between { justify-content:space-between; } .row.gap { gap:10px; } .wrap { flex-wrap:wrap; } .inline { display:inline; }
.pill { display:inline-block; font-size:12.5px; font-weight:700; padding:3px 9px; border-radius:10px; background:#e8eaf0; vertical-align:middle; text-transform:capitalize; }
.pill.draft, .pill.pending { background:#fff1c9; color:#7a4b00; }
.pill.live, .pill.published, .pill.approved { background:#dcf2dd; color:#135c2a; }
.pill.denied { background:#fde0de; color:#8a1d14; }
.list { list-style:none; padding:0; margin:0; } .list li { padding:12px 0; border-top:1px solid var(--line); } .list li:first-child { border-top:none; padding-top:0; }
table.plain { width:100%; border-collapse:collapse; font-size:15px; }
table.plain th, table.plain td { border-bottom:1px solid var(--line); padding:10px 6px; text-align:left; vertical-align:middle; }
table.plain th { color:var(--muted); font-size:13px; text-transform:uppercase; letter-spacing:.04em; }
table.plain input, table.plain select { padding:7px 9px; width:auto; }
table.months td.actions { display:flex; gap:8px; flex-wrap:wrap; }
pre.msg { white-space:pre-wrap; background:var(--bg); padding:12px; border-radius:10px; }

/* employee day list */
.days { list-style:none; padding:0; margin:0; }
.day { display:flex; justify-content:space-between; align-items:center; padding:11px 10px; border-top:1px solid var(--line); min-height:50px; }
.day.wh { background:var(--wh); } .day .date { width:130px; } .day .date em { font-style:normal; font-size:13px; color:var(--danger); }
.mark { display:inline-block; padding:3px 10px; border-radius:8px; font-weight:700; margin-right:4px; }
.m-M { background:var(--m); } .m-N { background:var(--n); } .m-V { background:var(--v); } .m-S { background:var(--s); } .mark.duty { background:#ede7ff; }
.m-CD { background:#e4d9ff; } table.grid td.cell.m-CD { background:#e4d9ff; } .cd.m-CD { background:#e4d9ff; }
table.annuals select[multiple] { min-width:140px; }
.manual-key { background:#fff; box-shadow: inset 0 0 0 2px var(--accent); }

/* month grid */
.toolbar { margin:6px 0 14px; } .cmd { display:flex; gap:8px; margin:10px 0; } .cmd input { max-width:none; }
.gridwrap { overflow:auto; max-height:72vh; border:1px solid var(--line); border-radius:10px; }
table.grid { border-collapse:separate; border-spacing:0; font-size:14px; }
table.grid th, table.grid td { border-bottom:1px solid var(--line); border-right:1px solid var(--line); padding:5px 4px; text-align:center; min-width:40px; white-space:nowrap; background:#fff; }
table.grid th { position:sticky; top:0; z-index:3; background:#f8f9fb; font-size:12.5px; }
table.grid .sticky { position:sticky; left:0; z-index:2; text-align:left; background:#f8f9fb; font-weight:600; }
table.grid th.sticky { z-index:4; }
table.grid .wh { background:var(--wh); }
table.grid tr.sec td { background:#e8eaf0; font-weight:700; text-align:left; }
table.grid td.cell.m-M { background:var(--m); } table.grid td.cell.m-N { background:var(--n); } table.grid td.cell.m-V { background:var(--v); } table.grid td.cell.m-S { background:var(--s); }
table.grid td.manual { box-shadow: inset 0 0 0 2px var(--accent); }
table.grid td.ed { cursor:pointer; } table.grid td.ed:hover { outline:2px solid var(--accent); outline-offset:-2px; }
table.grid tr.me td { font-weight:700; } table.grid tr.me td.sticky { background:#fff6d6; }
table.grid tr.outrot td.sticky { color:var(--muted); font-style:italic; }
table.grid td.duty { font-size:12px; min-width:72px; }
.legend { font-size:14px; margin-top:10px; }
.fairwrap { display:flex; gap:16px; flex-wrap:wrap; align-items:flex-start; }
table.fair { width:auto; min-width:280px; } table.fair td, table.fair th { text-align:center; } table.fair td:first-child, table.fair th:first-child { text-align:left; }
table.fair tr.low td { background:var(--s); } table.fair tr.high td { background:var(--n); }

/* employee dashboard */
.tile.hero { grid-column: span 1; background:var(--side); color:#fff; border-color:var(--side); }
.tile.hero .lbl { color:#aab8d8; } .tile.hero .num { font-size:26px; } .tile.hero .sub { margin-top:6px; }
.calgrid { display:grid; grid-template-columns:repeat(7, 1fr); gap:6px; }
.calgrid .dow { text-align:center; font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; padding-bottom:2px; }
.cd { position:relative; min-height:64px; border:1px solid var(--line); border-radius:10px; padding:6px; background:#fff; display:flex; flex-direction:column; gap:2px; }
.cd.empty { border:none; background:transparent; }
.cd.wh { background:var(--wh); }
.cd.today { outline:2px solid var(--accent); outline-offset:-2px; }
.cd .dn { font-size:13px; font-weight:700; color:var(--muted); }
.cd.has .dn { color:var(--ink); }
.cd.m-M { background:var(--m); } .cd.m-N { background:var(--n); } .cd.m-V { background:var(--v); } .cd.m-S { background:var(--s); }
.cd .cm { font-size:20px; font-weight:800; line-height:1; }
.cd .cduty { font-size:11px; font-weight:700; background:#ede7ff; border-radius:6px; padding:1px 5px; align-self:flex-start; }
.cd .chol { position:absolute; top:6px; right:6px; font-size:10px; color:var(--danger); font-weight:700; }
.list li .right { float:right; } .hol { color:var(--danger); font-style:normal; font-size:13px; }
.actions-col { display:flex; flex-direction:column; gap:10px; }
.actions-col .btn { width:100%; } .btn.danger { background:var(--danger); border-color:var(--danger); }
.btn.ghost { background:#fff; color:var(--ink); border-color:var(--line2); }
.emp-add { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:10px; align-items:end; }
.emp-add label { margin:0; font-size:14px; } .emp-add input, .emp-add select { max-width:none; }
tr.inactive td { color:var(--muted); } tr.left td { color:var(--muted); font-style:italic; }
.row-actions { display:flex; gap:6px; flex-wrap:wrap; }
.reorder { display:none; max-width:520px; margin:8px 0 14px; }
.reorder.open { display:block; }
button.ghost { background:#fff; color:var(--ink); border-color:var(--line2); }
@media (max-width: 860px) { .cd { min-height:52px; padding:4px; } .cd .cm { font-size:16px; } }

/* sortable lists */
.three { display:grid; grid-template-columns:repeat(3, 1fr); gap:18px; margin-bottom:18px; }
.three .card { margin:0; }
ol.sortable { list-style:none; padding:0; margin:0 0 12px; counter-reset:n; }
ol.sortable li { display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; margin-bottom:6px; cursor:grab; counter-increment:n; }
ol.sortable li::before { content:counter(n); width:22px; color:var(--muted); font-weight:700; font-size:13px; }
ol.sortable li .grip { color:var(--muted); letter-spacing:-2px; cursor:grab; }
ol.sortable li .nm { flex:1; font-weight:600; }
ol.sortable li .mv button { padding:2px 8px; min-height:30px; font-size:13px; margin-left:4px; }
ol.sortable li.dragging { opacity:.5; }
@media (max-width: 860px) { .three { grid-template-columns:1fr; } }

/* working pages: the elevator shaft fills the whole screen behind the cards, fixed in place */
main { position:relative; }
body:not(.solo-page)::before { content:""; position:fixed; inset:0; z-index:-2;
  background:#081030 url('/static/bg.jpg') center / cover no-repeat; }
body:not(.solo-page)::after { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(90deg, rgba(8,16,48,.78) 0%, rgba(8,16,48,.55) 50%, rgba(8,16,48,.35) 100%); }
main > * { position:relative; z-index:1; }
body { background:#081030; }
header.page { min-height:96px; padding:6px 4px 0; }
header.page h1, header.page b { color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.4); }
header.page .muted { color:#d5ddf0; }
header.page select { background:rgba(255,255,255,.95); }
main > p.muted, main > p.ok, main > p.error { background:rgba(255,255,255,.92); color:var(--ink); padding:8px 12px; border-radius:10px; display:inline-block; }
main > p.ok { color:var(--ok); } main > p.error { color:var(--danger); }
/* frosted cards: faint blue-grey gradient, a little translucent, image blurred behind them */
.card, .tile { background:linear-gradient(160deg, rgba(246,248,253,.94) 0%, rgba(228,234,246,.90) 100%);
  border:1px solid rgba(255,255,255,.55); box-shadow:0 10px 30px rgba(3,10,35,.35), inset 0 1px 0 rgba(255,255,255,.7);
  -webkit-backdrop-filter:blur(14px) saturate(120%); backdrop-filter:blur(14px) saturate(120%); }
.card.alert { background:linear-gradient(160deg, rgba(255,243,241,.95), rgba(251,226,222,.92)); border-color:rgba(255,255,255,.6); }
.tile .num { color:var(--accent); }
.tile.urgent .num { color:var(--danger); } .tile.warn .num { color:var(--warn); }
.tile.hero { background:linear-gradient(160deg, rgba(10,22,58,.92), rgba(8,16,48,.88)); border-color:rgba(255,255,255,.18); }
.tile.hero .num, .tile.hero .lbl, .tile.hero .sub { color:#fff; } .tile.hero .lbl { color:#aab8d8; }
table.plain th { background:transparent; }
table.grid th, table.grid td, table.grid .sticky { background:rgba(255,255,255,.92); }
table.grid th, table.grid .sticky { background:rgba(240,243,250,.96); }
table.grid tr.sec td { background:rgba(226,231,242,.96); }
.gridwrap { background:rgba(255,255,255,.6); }
.list li { border-top-color:rgba(10,20,50,.1); }
dl.kv dt { color:#4b5366; }
ol.sortable li, .cd { background:rgba(255,255,255,.75); }
input, select { background:rgba(255,255,255,.9); }

/* login: full-bleed hero */
main.solo { background:#081030 url('/static/hero.jpg') center / cover no-repeat; padding:24px; min-height:100vh; }
main.solo::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg, rgba(8,18,44,.55), rgba(8,18,44,.25)); }
.login { width:min(420px, 92vw); position:relative; z-index:1; box-shadow:0 20px 60px rgba(0,0,0,.45); }
.login .logo { display:block; height:44px; width:auto; margin-bottom:16px; }
.login-tag { position:fixed; left:28px; bottom:24px; color:#fff; z-index:1; max-width:420px; }
.login-tag img { height:54px; width:auto; display:block; margin-bottom:10px; }
.login-tag h2 { font-size:30px; margin:0 0 6px; letter-spacing:-.01em; } .login-tag p { margin:0; color:#c6d0e6; }
@media (max-width: 860px) { .login-tag { display:none; } main.solo { background-image:url('/static/hero-small.jpg'); } body:not(.solo-page)::before { background-image:url('/static/bg-small.jpg'); } }

@media (max-width: 860px) {
  body { flex-direction:column; }
  /* phones and tablets: a bar along the bottom. top:auto matters: the desktop rule pins top:0, and with bottom:0 as
     well the bar stretched over the whole screen and its blur covered every page. */
  .side { width:auto; flex:none; height:auto; position:fixed; top:auto; bottom:0; left:0; right:0; padding:6px 8px calc(6px + env(safe-area-inset-bottom)); flex-direction:row; align-items:center; z-index:10; border-right:none; border-top:1px solid rgba(255,255,255,.12); box-shadow:0 -4px 24px rgba(0,0,0,.30); }
  .side .brand, .side .who { display:none; }
  .side nav { flex-direction:row; width:100%; justify-content:space-around; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .side nav::-webkit-scrollbar { display:none; }
  .side nav a { flex:0 0 auto; min-width:58px; flex-direction:column; gap:2px; padding:6px 4px; font-size:12px; border-radius:8px; white-space:nowrap; }
  .side nav a i { font-size:18px; }
  .badge { position:absolute; margin:0; transform:translate(14px,-10px); }
  main { padding:16px 14px 92px; }
  .tiles { grid-template-columns:1fr 1fr; }
  .two { grid-template-columns:1fr; }
  h1 { font-size:24px; }
  .day .date { width:100px; }
}

/* month grid: zebra rows + whole-row highlight so a name can be followed across the month */
table.grid tbody tr:nth-child(even) td { background:rgba(236,240,248,.96); }
table.grid tbody tr:nth-child(even) td.sticky { background:rgba(230,235,246,.98); }
table.grid tbody tr:nth-child(even) td.wh { background:rgba(222,227,240,.96); }
table.grid tbody tr td.cell.m-M { background:var(--m); } table.grid tbody tr td.cell.m-N { background:var(--n); }
table.grid tbody tr td.cell.m-CD { background:#e4d9ff; } table.grid tbody tr td.cell.m-V { background:var(--v); } table.grid tbody tr td.cell.m-S { background:var(--s); }
table.grid tbody tr.sec td { background:rgba(226,231,242,.96); }
table.grid tbody tr:not(.sec):hover td { box-shadow:inset 0 0 0 999px rgba(26,74,230,.10); }
table.grid tbody tr:not(.sec):hover td.sticky { box-shadow:inset 0 0 0 999px rgba(26,74,230,.14); font-weight:700; }
table.grid tbody tr td.manual { box-shadow:inset 0 0 0 2px var(--accent); }
table.grid tbody tr:not(.sec):hover td.manual { box-shadow:inset 0 0 0 2px var(--accent), inset 0 0 0 999px rgba(26,74,230,.10); }
/* sticky header and name column must be opaque or scrolled rows ghost through them */
table.grid thead th { background:#f0f3fa; }
table.grid thead th.sticky { background:#eef1f8; }
table.grid tbody td.sticky { background:#f4f6fb; }
table.grid tbody tr:nth-child(even) td.sticky { background:#e8ecf5; }
table.grid tbody tr.sec td { background:#e2e7f2; }

/* employees table: one line per person */
table.plain.compact td, table.plain.compact th { padding:6px 4px; white-space:nowrap; }
table.plain.compact input, table.plain.compact select { padding:6px 8px; font-size:14.5px; min-height:34px; }
table.plain.compact td.nowrap { display:flex; gap:6px; align-items:center; border-bottom:none; }
details.menu { position:relative; display:inline-block; }
details.menu summary { list-style:none; cursor:pointer; padding:4px 10px; border:1px solid var(--line2); border-radius:8px; background:#fff; font-weight:700; line-height:1; min-height:34px; display:inline-flex; align-items:center; }
details.menu summary::-webkit-details-marker { display:none; }
details.menu > div { position:absolute; right:0; top:38px; z-index:20; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 10px 30px rgba(3,10,35,.25); padding:8px; display:flex; flex-direction:column; gap:6px; min-width:180px; }
details.menu > div button { width:100%; }
/* wide admin tables scroll inside their card instead of spilling over the edge */
.card.wide { overflow-x:auto; }
table.plain.compact select[name=emp_type] { max-width:150px; } table.plain.compact select[name=section] { max-width:130px; }
table.plain.compact select[name=app_role] { max-width:118px; } table.plain.compact input[name=phone] { width:110px; }
table.plain.compact input[name=username] { width:96px; } table.plain.compact input[name=new_pin] { width:84px; }
table.plain.compact input[name=label] { width:76px; } table.plain.compact select[name=weekend_days] { max-width:80px; }
.card.wide { max-width:none; }

/* month workspace switcher: Crew schedule · Annuals · Units */
.subnav { display:inline-flex; align-items:center; gap:4px; padding:4px; border-radius:12px; background:rgba(255,255,255,.14); backdrop-filter:blur(8px); margin-bottom:10px; }
.subnav a { padding:6px 12px; border-radius:9px; color:#fff; text-decoration:none; font-weight:600; font-size:14.5px; }
.subnav a.on { background:#fff; color:var(--ink); }
.subnav a:not(.on):hover { background:rgba(255,255,255,.14); }
.subnav .muted { color:#c6d0e6; padding:0 10px 0 6px; font-size:14px; }
.filterbar { margin-bottom:10px; } .filterbar input { max-width:520px; }

/* Employees page: crew section titles must stand apart from the names under them */
.group-title { font-size:26px; line-height:1.15; margin:0 0 14px; padding-bottom:8px; border-bottom:3px solid var(--accent); letter-spacing:-.01em; }
.group-title small { font-size:15px; font-weight:600; color:#4b5a78; margin-left:6px; vertical-align:middle; }
@media (max-width:640px) { .group-title { font-size:22px; } }

/* Schedule grid: the Night / Day / Helper shift divider rows must read as headings, not as names */
table.grid tbody tr.sec td { font-size:17px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; color:#0e2a8a; padding-top:9px; padding-bottom:9px; border-left:5px solid var(--accent); }

/* Employees table: the Save column stays visible while the wide table scrolls; a changed row shouts */
table.emp th.stick, table.emp td.stick { position:sticky; right:0; z-index:6; background:#e9eef9; box-shadow:-10px 0 12px -10px rgba(3,10,35,.45); }
table.emp th.stick { background:#dfe6f5; }
table.emp .acts { display:flex; gap:6px; align-items:center; }
button.save.dirty { background:#d9480f; border-color:#d9480f; color:#fff; animation:savepulse 1.1s ease-in-out 3; }
@keyframes savepulse { 0%,100% { box-shadow:0 0 0 0 rgba(217,72,15,.6); } 50% { box-shadow:0 0 0 8px rgba(217,72,15,0); } }

/* M/N = double shift (morning and night the same day): half morning colour, half night colour */
.m-MN, table.grid td.cell.m-MN, table.grid tbody tr td.cell.m-MN, .cd.m-MN { background:linear-gradient(135deg, var(--m) 0 50%, var(--n) 50% 100%); }

/* V = vacation reads red, like the red checks on Leo's board; S = sick is yellow so the two never blur */
table.grid td.cell.m-V, .mark.m-V, .cd.m-V .cm { color:#8a1414; font-weight:800; }
table.grid td.cell.m-S, .mark.m-S { color:#6b4e00; font-weight:700; }

.pill.awaiting { background:#e3ecff; color:#173a9a; }
.pill.declined, .pill.expired, .pill.denied { background:#f8d7d7; color:#8a1414; }

/* crew directory */
ul.dir { list-style:none; padding:0; margin:0 0 18px; }
li.dir-row { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 6px; border-bottom:1px solid var(--line); }
li.dir-row.me { background:rgba(26,74,230,.07); border-radius:8px; }
li.dir-row.flash { animation:dirflash 1.6s ease-out 1; }
@keyframes dirflash { 0% { background:#fff1b8; } 100% { background:transparent; } }
.dir-contact { display:flex; gap:6px; flex-wrap:wrap; }
table.grid td.name a.namelink, .board a.namelink { color:inherit; text-decoration:none; border-bottom:1px dotted rgba(26,74,230,.5); }
table.grid td.name a.namelink:hover, .board a.namelink:hover { color:var(--accent); }

/* swapped shifts carry their own story: who asked, who accepted, who approved */
table.grid td.cell.swapped, .cd.swapped { position:relative; }
table.grid td.cell.swapped::after, .cd.swapped::after { content:"\21C4"; position:absolute; top:0; right:2px; font-size:10px; line-height:1.2; color:var(--accent); font-weight:700; }
.mark.swapped-key { background:#fff; color:var(--accent); border:1px solid var(--line2); }

/* on call: own band at the top of the grid, phone mark on the holder's shift cell */
table.grid tbody tr.sec.oncall td { background:#0e2a8a; color:#fff; border-left-color:#0e2a8a; }
table.grid tbody tr.sec.oncall td small { text-transform:none; letter-spacing:0; font-size:12px; font-weight:500; opacity:.92; margin-left:10px; }
table.grid td.duty.noduty { color:#9aa3b5; background:#eef1f7; cursor:default; }
table.grid td.cell.oncall { position:relative; }
table.grid td.cell.oncall::before { content:"\260E"; position:absolute; top:0; left:2px; font-size:10px; line-height:1.2; color:#0e2a8a; }
.mark.oncall-key { background:#fff; color:#0e2a8a; border:1px solid var(--line2); }
.card.oncall p { margin:4px 0; } .card.oncall .btn.small { margin-left:6px; }

/* day board: on call + on annuals */
.board-cols { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:20px; }
.card.board p { margin:4px 0; } .card.board .btn.small { margin-left:6px; }
ul.list.tight li { padding:6px 0; }

/* in-app help */
details.faq { border-bottom:1px solid var(--line); padding:6px 0; }
details.faq summary { cursor:pointer; font-weight:700; font-size:16px; padding:8px 4px; list-style:none; position:relative; padding-left:26px; }
details.faq summary::-webkit-details-marker { display:none; }
details.faq summary::before { content:"+"; position:absolute; left:4px; top:6px; color:var(--accent); font-weight:800; font-size:18px; }
details.faq[open] summary::before { content:"3"; }
details.faq .faq-a { padding:0 4px 10px 26px; font-size:15.5px; line-height:1.5; color:var(--ink); }
.card h3 { font-size:14px; text-transform:uppercase; letter-spacing:.06em; color:#4b5a78; margin:18px 0 4px; }
.btn.plain { background:#fff; color:var(--ink); border-color:var(--line2); }
ul.problems { margin:0 0 16px; padding-left:20px; line-height:1.6; font-size:16px; } ul.problems li { margin:4px 0; }
