:root {
  --brand: #B5123E; --brand-dark: #8E0E31; --ink: #1d2330; --muted: #667085; --line: #e3e6ec;
  --bg: #f5f6f8; --card: #ffffff; --ok: #1f7a3f; --ok-bg: #e3f4e8; --warn: #8a5a00; --warn-bg: #fff3d6;
  --bad: #b42318; --bad-bg: #fde8e7; --nav-w: 220px; --radius: 10px;
  font-family: "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg);
}
:root {
  --soft: #f4f5f7; --line-strong: #cfd4dc; --grid: #2b2b2b; --ink2: #475467; --input: #ffffff;
  --brand-soft: #fbe9ee; --brand-soft2: #fff6f8; --warn-soft: #fffaf0; --warn-line: #f5c46b; --bad-line: #f2c4c0;
  --rh-date: #fbe4d5; --rh-dow: #deebf7; --intl-bg: #e0ecff; --intl-ink: #1d4ed8; --dom-bg: #f2e8eb; --info-bg: #eef6ff;
  --focus: #f3b6c6; --auth-tint: #f8e7ec; --shadow: rgba(16,24,40,.12); color-scheme: light;
}
/* Dark theme: deep slate, never pure black */
:root[data-theme="dark"] {
  --bg: #1a1e26; --card: #232934; --soft: #2b3240; --line: #363e4d; --line-strong: #46505f; --grid: #5b6575;
  --ink: #e6e9ef; --ink2: #c3c9d4; --muted: #9aa4b2; --input: #1e232c;
  --brand: #d4335f; --brand-dark: #b5123e; --brand-soft: #3a2530; --brand-soft2: #33242c;
  --ok: #6fd394; --ok-bg: #1f3a2a; --warn: #f2c063; --warn-bg: #3d3220; --warn-soft: #302a1f; --warn-line: #6b5527;
  --bad: #ff8a80; --bad-bg: #432528; --bad-line: #6b3238;
  --rh-date: #4a3a32; --rh-dow: #2e3d4f; --intl-bg: #22324d; --intl-ink: #8fb4ff; --dom-bg: #3a2530; --info-bg: #22324d;
  --focus: #7a2d45; --auth-tint: #3a2530; --shadow: rgba(0,0,0,.45); color-scheme: dark;
}
:root[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--input); color: var(--ink); }
:root[data-theme="dark"] .chip { background: var(--soft); color: var(--ink2); }
:root[data-theme="dark"] .chip.ok { background: var(--ok-bg); color: var(--ok); }
:root[data-theme="dark"] .chip.warn { background: var(--warn-bg); color: var(--warn); }
:root[data-theme="dark"] .chip.bad { background: var(--bad-bg); color: var(--bad); }
:root[data-theme="dark"] .chip.intl { background: var(--intl-bg); color: var(--intl-ink); }
:root[data-theme="dark"] .chip.dom { color: #ff9fb8; }
:root[data-theme="dark"] .toast { background: #39414f; }
:root[data-theme="dark"] td.cell.off, :root[data-theme="dark"] .my-day[style*="#000000"] { outline: 1px solid #4a5363; outline-offset: -1px; }
:root[data-theme="dark"] .roster-logo { filter: brightness(1.25); }
:root[data-theme="dark"] .chart .bar { fill: #7a3550; } :root[data-theme="dark"] .lg-bar { background: #7a3550; }
:root[data-theme="dark"] .chart .on { stroke: #6fd394; } :root[data-theme="dark"] .chart .need { stroke: #ff8a80; }
.theme-btn svg { display: block; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 14px; line-height: 1.45; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; }
a { color: var(--brand); }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; } .pad { padding: 12px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* buttons & inputs */
.btn { appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 7px 13px; border-radius: 8px; font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); } .btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); } .btn.ghost { background: transparent; }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.icon-btn { background: none; border: 0; font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 6px; color: inherit; }
.icon-btn.sm { font-size: 11px; padding: 2px 5px; } .icon-btn:disabled { opacity: .3; }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--card); width: 100%; color: inherit; }
input[type=checkbox] { width: auto; } input[type=color] { width: 44px; padding: 2px; height: 30px; vertical-align: middle; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); border-color: var(--brand); }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px; } legend { padding: 0 6px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2, .grid3 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); }
.days { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--card) 0%, var(--auth-tint) 100%); }
.auth-card { background: var(--card); border-radius: 16px; padding: 28px; width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-card h1 { font-size: 1.4rem; margin-top: 12px; }
.brand-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; letter-spacing: .5px; }
.brand-mark.sm { width: 30px; height: 30px; font-size: 11px; border-radius: 8px; }
.notice { background: var(--soft); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.notice.demo { background: var(--info-bg); } .notice.warn { background: var(--warn-bg); }

/* shell */
.demo-bar { background: #1d4ed8; color: #fff; text-align: center; padding: 4px; font-size: 12px; } .demo-bar .link-btn { color: #fff; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user-chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 12px; cursor: pointer; font: inherit; }
.user-chip small { color: var(--muted); margin-left: 4px; }
.bell { position: relative; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; height: 18px; line-height: 18px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; text-align: center; margin-left: 6px; }
.bell .badge { position: absolute; top: -2px; right: -4px; margin: 0; }
.menu-btn { display: none; }
.sidenav { position: fixed; top: 54px; left: 0; bottom: 0; width: var(--nav-w); background: var(--card); border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; z-index: 15; }
.demo-bar ~ .sidenav { top: 76px; }
.sidenav a, .nav-fold { padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.nav-ico { position: relative; display: inline-grid; place-items: center; width: 22px; flex-shrink: 0; color: var(--ink2); }
.sidenav a.active .nav-ico { color: var(--brand); }
.nav-ico .badge.dot { position: absolute; top: -7px; right: -10px; margin: 0; min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; }
.nav-label { overflow: hidden; text-overflow: ellipsis; }
.nav-fold { margin-top: auto; border: 0; background: none; font: inherit; cursor: pointer; color: var(--muted); width: 100%; text-align: left; }
.nav-fold:hover { background: var(--soft); }
.nav-fold .nav-ico svg { transition: transform .2s; }
.sidenav, .view { transition: width .2s, margin-left .2s; }
body.nav-collapsed { --nav-w: 64px; }
body.nav-collapsed .sidenav { padding: 10px 8px; }
body.nav-collapsed .sidenav a, body.nav-collapsed .nav-fold { justify-content: center; padding: 10px 0; }
body.nav-collapsed .nav-label { display: none; }
body.nav-collapsed .nav-fold .nav-ico svg { transform: rotate(180deg); }
.roster-logo { display: block; height: 34px; width: auto; margin-bottom: 6px; }
.lead-warn { margin-top: 4px; font-size: 12px; color: var(--warn); background: var(--warn-bg); border-radius: 6px; padding: 2px 6px; display: inline-block; }
.sidenav a:hover { background: var(--soft); } .sidenav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.view { margin-left: var(--nav-w); padding: 18px; max-width: none; width: auto; min-width: 0; }
.notif-panel { position: fixed; top: 58px; right: 12px; width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 40; }
.np-head { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.np-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: var(--card); padding: 10px 12px; cursor: pointer; font: inherit; }
.np-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--card); }
.np-item.unread { background: var(--brand-soft2); } .np-item span { color: var(--muted); } .np-item small { color: var(--muted); }

/* cards & lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card.error { border-color: var(--bad-line); background: var(--bad-bg); }
.card.attention { border-color: var(--warn-line); background: var(--warn-soft); }
.warn-card { border-color: var(--warn-line); background: var(--warn-soft); } .warn-card ul { margin: 0; padding-left: 18px; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar h2, .toolbar h3 { margin: 0; } .toolbar.tight { margin-bottom: 8px; }
.toolbar .actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.week-nav { display: flex; gap: 6px; align-items: center; } .week-nav input { width: auto; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.roster-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--soft); }
table.list tr.me td { background: var(--brand-soft2); } table.list tr.unassigned td { color: var(--bad); }
table.list tr.inactive td { opacity: .55; } table.staffing tr { cursor: pointer; } table.staffing tr.sel td { background: var(--brand-soft); }
table.types input:not([type=color]):not([type=checkbox]) { min-width: 70px; }
.sample { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; border: 1px solid #0001; }
.row-item { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: 0; } .row-item .actions { display: flex; gap: 6px; flex-shrink: 0; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; background: var(--soft); color: var(--ink2); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.bad { background: var(--bad-bg); color: var(--bad); }
.count { background: var(--soft); border-radius: 99px; padding: 0 8px; font-size: 12px; margin-left: 4px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 6px; border: 1px solid #0002; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .pill { border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; } .pill.me { border-color: var(--brand); }
.rules { margin: 0; padding-left: 18px; } .rules li { margin: 3px 0; }
.file-btn { display: inline-block; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.chip-btn { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 3px 8px; cursor: pointer; font: inherit; font-size: 12px; } .chip-btn.dark { background: #000; color: #fff; }

/* roster */
.roster-card { padding: 18px 18px 12px; }
.roster-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.roster-head h2 { margin: 0; } .roster-head .ed { text-align: right; }
/* fixed grid: names on one line, every day column the same width, every row the same height */
table.roster { border-collapse: collapse; table-layout: fixed; width: calc(var(--name-w, 22ch) + 7 * var(--day-w)); font-size: 14.5px; color: var(--ink); --day-w: 120px; --row-h: 38px; font-variant-numeric: tabular-nums; }
table.roster col.c-name { width: var(--name-w, 22ch); } table.roster col.c-day { width: var(--day-w); } /* every day cell is the same fixed size on every screen */
table.roster th, table.roster td { border: 1px solid var(--grid); padding: 0 8px; text-align: center; height: var(--row-h); max-height: var(--row-h); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
table.roster thead th.date { background: var(--rh-date); font-weight: 500; }
table.roster thead th.dow { background: var(--rh-dow); font-weight: 500; }
table.roster { border: 2px solid var(--grid); }
table.roster thead th.corner { background: var(--card); position: sticky; left: 0; z-index: 2; }
table.roster tbody th.name-col { text-align: left; font-weight: 500; padding: 0 14px; white-space: nowrap; background: var(--card); position: sticky; left: 0; z-index: 1; }
table.roster tbody th.name-col.editable { cursor: pointer; }
table.roster tbody th.name-col.editable:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
table.roster tfoot th.name-col { position: sticky; left: 0; z-index: 1; }
table.roster tr.me th.name-col { font-weight: 700; box-shadow: inset 4px 0 0 var(--brand); }
td.cell { cursor: pointer; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.cell:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
td.cell.coded { font-weight: 700; }
td.cell.pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 6px, rgba(255,255,255,0) 6px 12px) !important; font-style: italic; }
td.cell.pending small { display: none; }
td.cell.bad { box-shadow: inset 0 0 0 3px #e11d48; }
table.roster tfoot td.stat { background: var(--soft); } table.roster tfoot td.short { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
table.roster tfoot th { font-weight: 500; background: var(--soft); text-align: left; }
.roster-notes { margin-top: 8px; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--ink2); }
.legend i { display: inline-block; width: 14px; height: 14px; border: 1px solid #0003; border-radius: 3px; vertical-align: -3px; margin-right: 5px; }
.legend i.hatch { background: repeating-linear-gradient(45deg, #bbb 0 4px, var(--card) 4px 8px); }

/* chart */
.chart { width: 100%; height: auto; max-height: 280px; }
.chart .bar { fill: #f2b8c6; } .chart .need { fill: none; stroke: #b42318; stroke-width: 2; stroke-dasharray: 5 4; }
.chart .on { fill: none; stroke: #1f7a3f; stroke-width: 2.5; } .chart .ax { font-size: 11px; fill: #667085; text-anchor: middle; } .chart .grid { stroke: var(--soft); }
.lg-bar { background: #f2b8c6; } .lg-need { background: repeating-linear-gradient(90deg, #b42318 0 5px, var(--card) 5px 9px); height: 3px !important; } .lg-on { background: #1f7a3f; height: 3px !important; }

/* modal & toast */
.modal-wrap { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: grid; place-items: center; padding: 12px; z-index: 100; }
.modal { background: var(--card); border-radius: 14px; width: 100%; max-width: 520px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); } .modal-head h3 { margin: 0; }
.modal-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-body ul { margin: 0; padding-left: 18px; }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; width: min(92vw, 520px); }
.toast { background: #1d2330; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .4s; }
.toast.err { background: var(--bad); } .toast.warn { background: #8a5a00; } .toast.hide { opacity: 0; }

/* ---------- additions: schedules, name colours, my week, segmented control ---------- */
.chip.intl { background: var(--intl-bg); color: #1d4ed8; } .chip.dom { background: var(--dom-bg); color: var(--brand); }
tr.intl-row td:first-child { box-shadow: inset 3px 0 0 #1d4ed8; }
.sched-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .sched-grid .card { margin-bottom: 14px; }
.sched-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sched-card.int { border-top: 3px solid #1d4ed8; } .sched-card.dom { border-top: 3px solid var(--brand); }
.file-drop { border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 12px; gap: 6px; }
.file-drop input { border: 0; padding: 4px 0; }
.up-block { border-bottom: 1px solid var(--line); padding-bottom: 12px; } .up-block:last-of-type { border-bottom: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--card); padding: 6px 12px; font: inherit; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; } .seg button.on { background: var(--brand); color: #fff; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sw { aspect-ratio: 1; border-radius: 8px; border: 1px solid #0002; cursor: pointer; }
.sw.on { outline: 3px solid var(--brand); outline-offset: 2px; }
.name-preview { border: 1px solid var(--grid); padding: 6px 10px; }
.my-week h3 { margin-bottom: 8px; }
.my-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.my-day { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; min-width: 0; }
.my-day small { font-size: 11px; opacity: .8; white-space: nowrap; } .my-day b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.my-day.today { outline: 2px solid var(--brand); }
.my-day.pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 6px, rgba(255,255,255,0) 6px 12px); }

/* ---------- large PC (≥1600px) ---------- */
@media (min-width: 1600px) {
  :root { --nav-w: 240px; } body.nav-collapsed { --nav-w: 68px; } body { font-size: 15px; }
  .view { padding: 24px 28px; }
}
/* ---------- laptop (1024–1279px) ---------- */
@media (max-width: 1279px) { :root { --nav-w: 196px; } body.nav-collapsed { --nav-w: 64px; } .view { padding: 16px; } }

/* ---------- tablet (≤1023px): menu becomes a drawer ---------- */
@media (max-width: 1023px) {
  .menu-btn { display: inline-block; }
  .sidenav { transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px rgba(0,0,0,.15); width: 260px; }
  .sidenav.open { transform: none; }
  body.nav-collapsed { --nav-w: 196px; }
  body.nav-collapsed .sidenav { padding: 10px; } body.nav-collapsed .nav-label { display: inline; }
  body.nav-collapsed .sidenav a { justify-content: flex-start; padding: 12px; }
  .nav-fold { display: none; }
  .sidenav.open::after { content: ""; position: fixed; top: 0; left: 260px; width: 100vw; bottom: 0; background: rgba(16,24,40,.35); }
  .view { margin-left: 0; padding: 14px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .toolbar .actions { margin-left: 0; }
  .sched-grid { grid-template-columns: 1fr; gap: 0; }
}
@media (pointer: coarse) {
  .btn { min-height: 40px; } .btn.sm { min-height: 32px; } .sidenav a { padding: 12px; }
  input, select, textarea { font-size: 16px; min-height: 40px; }
}

/* ---------- phone (≤767px) ---------- */
@media (max-width: 767px) {
  .brand span:last-child { display: none; }
  .topbar { padding: 0 8px; gap: 4px; }
  .user-chip { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .user-chip small { display: none; }
  .view { padding: 10px; }
  .card { padding: 12px; border-radius: 10px; }
  h2 { font-size: 1.1rem; }
  .toolbar { gap: 8px; } .toolbar > h2 { width: 100%; order: -1; }
  .toolbar .actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .toolbar .actions .btn, .toolbar .actions .file-btn { width: 100%; text-align: center; white-space: normal; line-height: 1.2; }
  .toolbar .actions label.check { grid-column: 1 / -1; }
  .week-nav { width: 100%; } .week-nav input { flex: 1; min-width: 0; }
  .seg { width: 100%; } .seg button { flex: 1; padding: 8px 4px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .row-item { flex-direction: column; align-items: stretch; } .row-item .actions .btn { flex: 1; }
  .roster-logo { height: 26px; }
  .roster-card { padding: 12px 8px; } .roster-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .my-days { grid-template-columns: repeat(4, 1fr); }
  .swatches { grid-template-columns: repeat(4, 1fr); }
  /* list tables become cards */
  table.list:not(.types) thead { display: none; }
  table.list:not(.types), table.list:not(.types) tbody, table.list:not(.types) tr, table.list:not(.types) td { display: block; width: 100%; }
  table.list:not(.types) tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; padding: 6px 10px; background: var(--card); }
  table.list:not(.types) td { border: 0; padding: 4px 0; display: flex; gap: 10px; justify-content: space-between; align-items: center; text-align: right; }
  table.list:not(.types) td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex-shrink: 0; }
  table.list:not(.types) td:not([data-label])::before, table.list:not(.types) td[data-label=""]::before { content: none; }
  table.list:not(.types) td[colspan] { justify-content: center; }
  table.list:not(.types) td select { max-width: 62%; }
  table.list tr.me td { background: transparent; } table.list tr.me { border-color: var(--brand); background: var(--brand-soft2); }
  table.list tr.intl-row td:first-child { box-shadow: none; } table.list tr.intl-row { border-left: 4px solid #1d4ed8; }
  table.staffing tr.sel { border-color: var(--brand); }
  .table-scroll { overflow: visible; }
  .card .table-scroll:has(table.roster), .card .table-scroll:has(table.types) { overflow-x: auto; }
  /* dialogs become bottom sheets */
  .modal-wrap { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { max-width: none; width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .modal-foot { position: sticky; bottom: 0; background: var(--card); }
  .modal-foot .btn { flex: 1 1 40%; }
  .notif-panel { right: 6px; left: 6px; width: auto; }
  .chart { max-height: 220px; }
}
@media (max-width: 380px) { .my-days { grid-template-columns: repeat(3, 1fr); } }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  :root, :root[data-theme="dark"] { --card: #fff; --bg: #fff; --ink: #1d2330; --grid: #2b2b2b; --rh-date: #fbe4d5; --rh-dow: #deebf7; }
  body { background: #fff; color: #1d2330; }
  .topbar, .sidenav, .toolbar, .demo-bar, .warn-card, .my-week, .notif-panel, #toasts, table.roster tfoot { display: none !important; }
  .view { margin: 0 !important; padding: 0; } .card { border: 0; padding: 0; } .roster-logo { height: 30px; }
  td.cell, th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- duty amendments ---------- */
.amd-card { border-left: 4px solid var(--brand); }
.amd-day { padding: 10px 0; border-top: 1px solid var(--line); } .amd-day:first-of-type { border-top: 0; }
.amd-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.amd-list { margin: 4px 0 8px; padding-left: 18px; } .amd-list li { margin: 4px 0; }
.amd-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .amd-row .amd-time { width: 90px; }
.amd-tag { display: block; font-size: 10.5px; font-weight: 700; color: var(--brand); line-height: 1.1; }
td.cell { position: relative; } td.cell .amd-tag { position: absolute; right: 3px; top: 1px; font-size: 9.5px; }
td.cell.has-amd { box-shadow: inset 0 0 0 2px var(--brand); }
:root[data-theme="dark"] .amd-tag { color: #ff9fb8; }

/* ---------- home / dashboard ---------- */
.hero { position: relative; overflow: hidden; border-radius: 16px; padding: 28px 28px 24px; margin-bottom: 16px; color: #fff;
  background: linear-gradient(120deg, #8e0e31 0%, #b5123e 45%, #d4335f 75%, #f08aa4 100%); box-shadow: 0 10px 30px rgba(181,18,62,.25); }
:root[data-theme="dark"] .hero { background: linear-gradient(120deg, #4a0c22 0%, #7a1636 50%, #a3264c 100%); box-shadow: none; }
.hero-text { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { font-size: 1.9rem; margin: 4px 0 8px; letter-spacing: -.01em; }
.hero p { margin: 0 0 14px; font-size: 1.02rem; opacity: .95; } .hero p b { color: #fff; }
.hero .chip { background: rgba(255,255,255,.2); color: #fff; }
.hero-date { font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero .btn.primary { background: #fff; color: #8e0e31; border-color: #fff; font-weight: 600; }
.hero .btn.primary:hover { background: #fde8ee; }
.btn.ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.45); text-decoration: none; }
.btn.ghost-light:hover { background: rgba(255,255,255,.22); }
.hero a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.wave { display: inline-block; animation: wave 2.4s ease-in-out 1; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10%,30% { transform: rotate(14deg); } 20%,40% { transform: rotate(-8deg); } }
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.hero-sky { left: 52%; }
.plane { position: absolute; top: 10%; right: -70px; color: rgba(255,255,255,.9); animation: fly 14s linear infinite; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
/* the plane's nose points left: it starts at the top right and flies forward (left), gently descending */
@keyframes fly { 0% { transform: translate(0, 0) rotate(-4deg); opacity: 0; } 6% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(-42vw, 70px) rotate(-7deg); opacity: 0; } }
@media (max-width: 767px) { .hero-sky { left: 30%; opacity: .6; } }
.cloud { position: absolute; background: rgba(255,255,255,.14); border-radius: 50px; animation: drift 40s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud.c1 { width: 120px; height: 34px; top: 22%; right: 8%; } .cloud.c1::before { width: 56px; height: 56px; top: -26px; left: 18px; } .cloud.c1::after { width: 40px; height: 40px; top: -16px; left: 62px; }
.cloud.c2 { width: 90px; height: 26px; bottom: 18%; right: 26%; animation-duration: 55s; } .cloud.c2::before { width: 40px; height: 40px; top: -18px; left: 14px; }
.cloud.c3 { width: 70px; height: 22px; top: 60%; right: 3%; animation-duration: 70s; } .cloud.c3::before { width: 32px; height: 32px; top: -14px; left: 12px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-30vw); } }
@media (prefers-reduced-motion: reduce) { .plane, .cloud, .wave { animation: none; } .plane { right: 12%; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; transition: transform .15s, box-shadow .15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 18px var(--shadow); }
.kpi-n { font-size: 1.9rem; font-weight: 700; line-height: 1.1; } .kpi-n small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.kpi-l { font-weight: 600; } .kpi small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.warn { border-color: var(--warn-line); background: var(--warn-soft); } .kpi.bad { border-color: var(--bad-line); background: var(--bad-bg); }
.kpi .bar, .progress { display: block; height: 6px; border-radius: 4px; background: var(--soft); margin-top: 6px; overflow: hidden; }
.kpi .bar i, .progress i { display: block; height: 100%; background: var(--ok); border-radius: 4px; transition: width .4s; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.home-grid .card { margin-bottom: 0; }
.mini-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.mini-day { border: 1px solid var(--line); border-radius: 10px; padding: 8px 2px; text-align: center; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
.mini-day small { font-size: 11px; opacity: .8; } .mini-day b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-day.today { outline: 2px solid var(--brand); }
.bal { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.duty-now, .my-flights { list-style: none; margin: 0; padding: 0; }
.duty-now li, .my-flights li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.duty-now li:last-child, .my-flights li:last-child { border-bottom: 0; }
.duty-now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); align-self: center; }
.my-flights li.done { opacity: .6; } .my-flights li.late b { color: var(--bad); }
.tiles-h { margin: 22px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px var(--shadow); border-color: var(--brand); }
.tile-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 4px; }
.tile small { color: var(--muted); }
@media (max-width: 767px) { .hero { padding: 20px 16px; } .hero h1 { font-size: 1.45rem; } .mini-days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; } .mini-day b { font-size: 11px; } .tiles { grid-template-columns: 1fr 1fr; } }

/* ---------- work allocation: progress, status, delays, handover ---------- */
.wa-top { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 18px; }
.progress.big { height: 10px; } .bad-text { color: var(--bad); }
.st-sel { width: auto; min-width: 140px; padding: 4px 6px; font-size: 13px; }
.delay { color: var(--warn); font-weight: 600; }
table.list tr.done-row td { opacity: .62; }
table.list tr.overdue-row td:first-child { box-shadow: inset 4px 0 0 var(--bad); } table.list tr.overdue-row td:first-child b { color: var(--bad); }
table.list tr.soon-row td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
.handover .ho-add { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.ho-list { list-style: none; padding: 0; margin: 0; } .ho-list li { padding: 8px 0; border-top: 1px solid var(--line); } .ho-list li.prev { opacity: .75; }
.ho-meta { font-size: 12.5px; margin-bottom: 2px; }
@media (max-width: 767px) {
  .wa-top { grid-template-columns: 1fr; }
  .handover .ho-add { flex-direction: column; align-items: stretch; }
  table.list tr.overdue-row { border-left: 4px solid var(--bad); } table.list tr.soon-row { border-left: 4px solid var(--warn); }
}

/* ---------- reports / forecast / balances ---------- */
.mbar { position: relative; min-width: 70px; height: 20px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.mbar i { position: absolute; inset: 0 auto 0 0; background: #f2b8c6; } .mbar.hi i { background: #e8797c; } .mbar.lo i { background: #9cc7f0; }
.mbar span { position: relative; padding-left: 6px; font-weight: 600; line-height: 20px; font-size: 12.5px; }
:root[data-theme="dark"] .mbar i { background: #6b2e45; } :root[data-theme="dark"] .mbar.hi i { background: #8a3a3a; } :root[data-theme="dark"] .mbar.lo i { background: #2d4a6b; }
table.report tfoot td, table.report tfoot th { border-top: 2px solid var(--line-strong); font-weight: 600; padding: 7px 9px; }
table.forecast { border-collapse: separate; border-spacing: 4px; }
table.forecast th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; padding: 2px 8px; }
table.forecast td { width: 70px; height: 38px; text-align: center; border-radius: 8px; font-weight: 700; }
table.forecast td small { font-weight: 400; opacity: .75; }
.f-good { background: #d7f0df; color: #1f5f34; } .f-ok { background: #eaf6d9; color: #45631c; } .f-warn { background: #fff0c7; color: #7a5600; } .f-bad { background: #fbd5d2; color: #9a1c12; }
:root[data-theme="dark"] .f-good { background: #1f3a2a; color: #8fe0aa; } :root[data-theme="dark"] .f-ok { background: #2c3a1f; color: #c3e58f; } :root[data-theme="dark"] .f-warn { background: #3d3220; color: #f2c063; } :root[data-theme="dark"] .f-bad { background: #432528; color: #ff8a80; }
.legend i.f-good, .legend i.f-ok, .legend i.f-warn, .legend i.f-bad { border: 0; }
.bal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bal-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.bal-card b { font-size: 1.6rem; line-height: 1.1; }

/* ---------- menus, swap board ---------- */
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; }
.menu-item:hover { border-color: var(--brand); } .menu-item span { color: var(--muted); font-size: 12.5px; }
.menu-item.row { flex-direction: row; justify-content: space-between; align-items: center; cursor: default; } .menu-item.row div:first-child { display: flex; flex-direction: column; }
.swap-list { display: flex; flex-direction: column; gap: 10px; }
.swap { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.swap.mine { border-color: var(--brand); background: var(--brand-soft2); }
.swap-date { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.swap-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.offline-bar { background: #8a5a00; color: #fff; text-align: center; padding: 4px; font-size: 12.5px; position: sticky; top: 0; z-index: 30; }
@media (max-width: 767px) { .swap { flex-wrap: wrap; } .swap-act { width: 100%; } .swap-act .btn { width: 100%; } }

/* roster readability */
table.roster thead th { height: 34px; font-size: 13.5px; }
table.roster thead th.date { font-weight: 600; }
table.roster td.cell { font-weight: 500; letter-spacing: .03em; }
table.roster td.coded { font-weight: 700; letter-spacing: .06em; }
table.roster td.merged { text-align: center; }
table.roster tfoot td, table.roster tfoot th { height: 32px; font-size: 13px; }
@media (max-width: 767px) { table.roster tbody th.name-col { padding: 0 10px; } }
.lic-chip { margin-left: 4px; }
table.roster td.split { font-size: 13px; letter-spacing: 0; }
.bad-text { color: var(--bad); }
.split-help { margin-top: 8px; } .split-help summary { cursor: pointer; color: var(--brand); font-size: 13px; } .split-help ul { margin: 6px 0; padding-left: 18px; }
/* password rules checklist, lock screen, alerts invitation */
.pw-rules { list-style: none; margin: 2px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 2px 12px; font-size: 12.5px; color: var(--muted); }
.pw-rules li::before { content: "○ "; } .pw-rules li.ok { color: var(--ok, #15803d); } .pw-rules li.ok::before { content: "✓ "; } .pw-rules li.bad { color: var(--bad); } .pw-rules li.bad::before { content: "✕ "; }
.lock-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.lock-screen .auth-card { max-width: 380px; }
.alerts-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 8px 16px; background: var(--brand-soft); color: var(--ink); font-size: 14px; border-bottom: 1px solid var(--line); }
.alerts-bar span { flex: 1 1 260px; }
body.signed-in .alerts-bar { margin-left: var(--nav-w); }
@media (max-width: 1023px) { body.signed-in .alerts-bar { margin-left: 0; } }
/* daily flight allocation */
.daily-head { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: flex-start; }
.daily-head h3 { margin: 0 0 4px; } .daily-links { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; max-width: 340px; text-align: right; }
table.list tr.cancelled-row td { color: var(--muted); } table.list tr.cancelled-row td:nth-child(-n+5) { text-decoration: line-through; }
@media (max-width: 767px) { .daily-links { align-items: stretch; text-align: left; max-width: none; } }
.missing-list { display: flex; flex-wrap: wrap; gap: 4px 14px; } .missing-list span { white-space: nowrap; }
.sidenav a .nav-label { white-space: normal; line-height: 1.25; overflow: visible; text-overflow: clip; }
.ok-text { color: var(--ok, #15803d); }

/* ---------- avatars ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; overflow: hidden; flex-shrink: 0; vertical-align: middle; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--card); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { display: inline-flex; align-items: center; gap: 8px; }
table.roster th.name-col .avatar { margin-right: 8px; }

/* ---------- install card (only when the browser offers installing) ---------- */
.install-card { display: none; align-items: center; justify-content: space-between; gap: 12px; }
.install-card > div { display: flex; flex-direction: column; gap: 2px; }
body.can-install .install-card { display: flex; }

/* ---------- my shift ---------- */
.shift-hero { border-radius: 16px; padding: 20px 22px; color: #fff; background: linear-gradient(120deg, #5b6474, #8a93a3); display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.shift-hero.on { background: linear-gradient(120deg, #8f0d31, #c2185b); }
.shift-hero.training { background: linear-gradient(120deg, #0e6ba8, #3aa0d8); }
.shift-hero h2 { margin: 2px 0 4px; color: #fff; } .shift-hero p { margin: 0; opacity: .95; } .shift-hero small { opacity: .85; }
.sh-who { display: flex; gap: 14px; align-items: center; }
.sh-counters { display: flex; gap: 22px; flex-wrap: wrap; }
.sh-counters div { display: flex; flex-direction: column; } .sh-counters b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.shift-list { display: grid; gap: 10px; }
.flight-card { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.flight-card.soon { border-left-color: #d97706; } .flight-card.late { border-left-color: var(--bad); background: var(--bad-bg); } .flight-card.closed { opacity: .6; } .flight-card.intl .fc-main > b { color: #1d4ed8; }
.fc-time { display: flex; flex-direction: column; } .fc-time b { font-size: 1.6rem; font-variant-numeric: tabular-nums; } .fc-time small { color: var(--muted); }
.fc-main > b { font-size: 1.15rem; } .fc-main > span { font-size: 1.05rem; }
.fc-act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.big-tap { min-height: 48px; padding: 0 18px; font-size: 1rem; }
.status-pill { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink2); }
.status-pill.s-prep { background: #fef3c7; color: #92400e; } .status-pill.s-sent { background: #dbeafe; color: #1e40af; } .status-pill.s-closed { background: #dcfce7; color: #166534; }
@media (max-width: 767px) { .flight-card { grid-template-columns: 82px 1fr; } .fc-act { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; } .fc-act .big-tap { flex: 1; } .fc-time b { font-size: 1.35rem; } }

/* ---------- flight board ---------- */
.board { background: #0f1a2b; color: #e8eef7; border-radius: 16px; padding: 18px 20px; min-height: 70vh; }
.board-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.board-head h2 { margin: 0; color: #fff; } .board-head small { color: #9fb0c8; }
.board-stats { display: flex; gap: 18px; } .board-stats span { color: #9fb0c8; } .board-stats b { color: #fff; font-size: 1.3rem; margin-right: 4px; } .board-stats .bad b { color: #ff8a8a; }
.board-clock { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #ffd166; }
.board .btn { background: #1d2a40; color: #e8eef7; border-color: #2e3f5c; }
.board-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.board-table th { text-align: left; color: #9fb0c8; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid #2e3f5c; }
.board-table td { padding: 10px; border-bottom: 1px solid #1d2a40; vertical-align: middle; }
.board-table td small { display: block; color: #9fb0c8; font-size: .78rem; } .board-table .delayed { color: #ffd166; }
.board-table tr.soon td:first-child { box-shadow: inset 4px 0 0 #f59e0b; } .board-table tr.late td { background: rgba(220, 38, 38, .18); } .board-table tr.late td:first-child { box-shadow: inset 4px 0 0 #ef4444; }
.board-table tr.intl td:nth-child(2) b { color: #93c5fd; }
.board-table .status-pill { margin: 0; } .board .avatar { box-shadow: none; }
.board-empty { text-align: center; color: #9fb0c8; padding: 30px; }
body.tv-mode .topbar, body.tv-mode .sidenav, body.tv-mode .alerts-bar, body.tv-mode .demo-bar, body.tv-mode .offline-bar { display: none !important; }
body.tv-mode .view { margin: 0; padding: 0; } body.tv-mode .board { border-radius: 0; min-height: 100vh; font-size: 1.15em; } body.tv-mode .board-table { font-size: 1.35rem; }
@media (max-width: 767px) { .board { padding: 12px; } .board-table thead { display: none; } .board-table tr { display: grid; grid-template-columns: 70px 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid #1d2a40; } .board-table td { border: 0; padding: 2px 4px; } .board-table td:nth-child(3), .board-table td:nth-child(4) { grid-column: 2; } .board-table td:nth-child(5), .board-table td:nth-child(6) { grid-column: 2 / -1; } }

/* ---------- coverage timeline ---------- */
.coverage { display: grid; gap: 4px; overflow-x: auto; }
.cov-row { display: grid; grid-template-columns: 92px minmax(560px, 1fr) 84px; gap: 8px; align-items: center; }
.cov-axis .cov-bar { grid-template-columns: repeat(24, 1fr); } .cov-axis i { font-style: normal; font-size: 11px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 2px; }
.cov-label { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.cov-bar { display: grid; grid-template-columns: repeat(48, 1fr); gap: 1px; }
.cov-bar b { height: 22px; border-radius: 3px; font-size: 10.5px; display: grid; place-items: center; color: #fff; font-weight: 600; cursor: default; }
.c-ok { background: #16a34a; } .c-tight { background: #ca8a04; } .c-short { background: #dc2626; } .c-none { background: var(--soft); color: var(--muted) !important; }
.cov-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; margin-top: 4px; } .cov-legend b { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

/* ---------- roster quick editing ---------- */
table.roster td.cell[draggable="true"] { cursor: grab; }
table.roster td.dragging { opacity: .45; }
table.roster td.drop-target { outline: 3px dashed var(--brand); outline-offset: -3px; }
.qmenu { position: fixed; z-index: 120; width: 300px; max-width: calc(100vw - 12px); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.22); padding: 10px; display: grid; gap: 8px; }
.qm-head { font-size: 12.5px; color: var(--muted); }
.qm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.qm-grid button, .qm-list button { border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 7px; padding: 7px 4px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.qm-grid button:hover, .qm-list button:hover { outline: 2px solid var(--brand); }
.qm-list { display: grid; gap: 5px; } .qm-list button { text-align: left; padding: 8px 10px; font-weight: 500; }
.danger-text { color: var(--bad) !important; }
.photo-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill.who { display: inline-flex; align-items: center; gap: 6px; }
.duty-now li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.amd-time.wide { width: 210px; }

/* ---------- qualifications ---------- */
.qual-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; }
.qual-box legend { font-weight: 600; padding: 0 6px; } .qual-box > p { margin: 0 0 8px; }
.qual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.qual-chip { position: relative; display: flex; cursor: pointer; }
.qual-chip input { position: absolute; opacity: 0; pointer-events: none; }
.qual-chip span { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font-size: 14px; font-weight: 500; transition: background .12s, border-color .12s; }
.qual-chip span::before { content: ""; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--muted); flex-shrink: 0; display: grid; place-items: center; font-size: 12px; color: #fff; }
.qual-chip input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.qual-chip input:checked + span::before { content: "✓"; background: var(--brand); border-color: var(--brand); }
.qual-chip.intl input:checked + span { border-color: #1d4ed8; background: #dbeafe; color: #1e40af; } .qual-chip.intl input:checked + span::before { background: #1d4ed8; border-color: #1d4ed8; }
.qual-chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.qual-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quals-cell .chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.ac-table input { width: 100%; min-width: 0; } .ac-table .ac-code { max-width: 90px; text-transform: uppercase; }
.ac-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; }
.ac-test { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; } .ac-test input { width: 110px; }
:root[data-theme="dark"] .qual-chip.intl input:checked + span { background: #1e3a8a; color: #dbeafe; }
@media (max-width: 767px) { .qual-grid { grid-template-columns: 1fr 1fr; gap: 6px; } .qual-chip span { padding: 8px; font-size: 13px; } }

/* qualification + licence expiry per type */
.qual-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.qual-item { display: flex; flex-direction: column; gap: 4px; }
.qual-exp { display: flex; align-items: center; gap: 6px; padding-left: 4px; }
.qual-exp small { color: var(--muted); white-space: nowrap; font-size: 11.5px; } .qual-exp input { flex: 1; min-width: 0; padding: 4px 6px; font-size: 13px; }
.qual-item:has(input[data-qual]:not(:checked)) .qual-exp { opacity: .35; }
.lic-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 360px; }
.lic { display: inline-flex; flex-direction: column; padding: 3px 8px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); line-height: 1.15; }
.lic b { font-size: 12px; } .lic small { font-size: 11px; color: var(--muted); }
.lic.soon { background: var(--warn-bg); border-color: var(--warn-line); } .lic.soon small { color: var(--warn); }
.lic.expired { background: var(--bad-bg); border-color: var(--bad-line); } .lic.expired small, .lic.expired b { color: var(--bad); }
.lic.intl { background: #dbeafe; border-color: #93c5fd; color: #1e40af; justify-content: center; }
@media (max-width: 767px) { .qual-grid { grid-template-columns: 1fr; } }

/* handover */
.ho-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.ho-check { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 2px; font-size: 14px; } .ho-check li.ok { color: var(--ok, #15803d); } .ho-check li.no { color: var(--bad); }
.ho-open { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .ho-text { margin: 6px 0; }
.ho-ack { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-top: 6px; }
.shift-foot { display: flex; justify-content: center; margin: 14px 0 6px; }
/* fairness */
.fair-list { display: grid; gap: 6px; }
.fair-row { display: grid; grid-template-columns: 220px 1fr 44px; gap: 4px 12px; align-items: center; } .fair-row small { grid-column: 1 / -1; padding-left: 30px; margin-top: -3px; }
.fair-bar { position: relative; height: 12px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.fair-bar i { position: absolute; inset: 0 auto 0 0; background: #16a34a; border-radius: 6px; } .fair-bar i.hi { background: #dc2626; } .fair-bar i.lo { background: #2563eb; }
.fair-bar em { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .5; }
@media (max-width: 767px) { .fair-row { grid-template-columns: 1fr 44px; } .fair-row .fair-bar { grid-column: 1 / -1; grid-row: 2; } .fair-row small { padding-left: 0; } }
.roster-qr { display: none !important; }
@media print { .roster-qr { display: block !important; width: 78px; height: 78px; margin-left: auto; } .roster-head { align-items: center; } }
.roster-notes[dir="auto"] { unicode-bidi: plaintext; }
/* training */
.lm { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lm.ok { background: #dcfce7; color: #166534; } .lm.soon { background: var(--warn-bg); color: var(--warn); } .lm.expired { background: var(--bad-bg); color: var(--bad); }
.lm.none { background: var(--soft); color: var(--muted); } .lm.na { color: var(--muted); font-weight: 400; }

/* board themes */
.board-ctl { display: flex; gap: 8px; align-items: center; }
.board select { background: #1d2a40; color: #e8eef7; border: 1px solid #2e3f5c; border-radius: 8px; padding: 6px 8px; font: inherit; }
.board.theme-brand { background: linear-gradient(160deg, #6d0a26, #b5123e 60%, #d23a63); color: #fff; }
.board.theme-brand .board-head small, .board.theme-brand .board-stats span, .board.theme-brand .board-table th, .board.theme-brand .board-table td small { color: #ffd6e0; }
.board.theme-brand .board-table th { border-color: rgba(255,255,255,.3); } .board.theme-brand .board-table td { border-color: rgba(255,255,255,.15); }
.board.theme-brand .board-clock { color: #fff; } .board.theme-brand .btn, .board.theme-brand select { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); color: #fff; }
.board.theme-brand tr.late td { background: rgba(0,0,0,.25); } .board.theme-brand tr.intl td:nth-child(2) b { color: #ffe08a; }
.board.theme-contrast { background: #fff; color: #000; border: 3px solid #000; }
.board.theme-contrast .board-head h2, .board.theme-contrast .board-stats b { color: #000; } .board.theme-contrast .board-head small, .board.theme-contrast .board-stats span, .board.theme-contrast .board-table th, .board.theme-contrast .board-table td small { color: #333; }
.board.theme-contrast .board-clock { color: #b5123e; } .board.theme-contrast .board-table th { border-bottom: 3px solid #000; } .board.theme-contrast .board-table td { border-bottom: 1px solid #999; font-weight: 600; }
.board.theme-contrast .btn, .board.theme-contrast select { background: #fff; color: #000; border: 2px solid #000; }
.board.theme-contrast tr.late td { background: #ffd4d4; } .board.theme-contrast tr.intl td:nth-child(2) b { color: #0033aa; } .board.theme-contrast .board-stats .bad b { color: #c00; }

/* celebrations */
.celebrations { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cele { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, #fff4d6, #ffe1ec); color: #3b1d2a; overflow: hidden; box-shadow: 0 6px 18px rgba(181,18,62,.12); }
.cele.star { background: linear-gradient(120deg, #fff7cc, #ffe39a); }
.cele b { display: block; } .cele small { color: #6b4b57; }
.cele-emoji { font-size: 30px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-5px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .cele-emoji { animation: none; } }
.som select, .som input { width: 100%; }
/* licence date beside each type */
.qual-grid { grid-template-columns: 1fr !important; gap: 6px; }
.qual-item { display: grid; grid-template-columns: 1fr 190px; gap: 8px; align-items: center; }
.qual-item:has([data-qual="INT"]) { grid-template-columns: 1fr; }
.qual-exp { flex-direction: column; align-items: stretch; gap: 1px; padding: 0; }
.qual-exp small { font-size: 10.5px; line-height: 1; padding-left: 2px; }
@media (max-width: 480px) { .qual-item { grid-template-columns: 1fr 150px; } }
.roster td.cell.fixed, table.roster td.cell.fixed { background-image: linear-gradient(225deg, var(--brand) 7px, transparent 7px); } @media print { table.roster td.cell.fixed { background-image: none; } }

/* ---- automatic flight status (flightstatus.js) ---- */
.fs-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--ink2); white-space: nowrap; line-height: 1.4; }
.fs-pill[data-fs] { cursor: pointer; } .fs-pill[data-fs]:hover { filter: brightness(.95); text-decoration: underline; }
.fs-checkin { background: #fef3c7; color: #92400e; }
.fs-lir { background: #ffedd5; color: #9a3412; }
.fs-ls { background: #dbeafe; color: #1e40af; }
.fs-gd { background: #dcfce7; color: #166534; }
.fs-cell { min-width: 190px; } .fs-cell .chip { margin-top: 3px; }
.fs-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.gd-btn { background: #16a34a; border-color: #16a34a; color: #fff; font-weight: 700; } .gd-btn:hover { background: #15803d; }
.fs-now { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.fs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fs-hist { margin: 4px 0 0; padding-left: 18px; font-size: 13px; max-height: 180px; overflow: auto; }
.ls-text { background: #0f172a; color: #e2e8f0; padding: 10px; border-radius: 8px; font: 12px/1.35 ui-monospace, Consolas, monospace; max-height: 340px; overflow: auto; white-space: pre; }
.board-table .fs-pill { font-size: 1em; padding: 4px 12px; }
.board-table tr.returned td:first-child { box-shadow: inset 4px 0 0 #dc2626; }
.flight-card .fs-pill { margin-top: 4px; }
.helper-state { display: inline-flex; gap: 6px; align-items: center; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.warn-text { color: #b45309; font-weight: 600; }
.ls-fig { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; }
.ls-fig h4 { margin: 0 0 6px; }
.ls-fig table.compact th, .ls-fig table.compact td { padding: 4px 8px; font-size: 13px; }
.ls-kv { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; }
.board-table .fs-cell-extra .chip { font-size: .8em; }
.helper-banner { background: #b91c1c; color: #fff; padding: 8px 16px; font-weight: 600; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.helper-banner a { color: #fff; text-decoration: underline; }
.ho-auto { background: var(--soft); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.ho-auto ul { margin: 4px 0 0; padding-left: 18px; }
/* screen changes: a thin progress bar instead of a blank page */
body.route-busy::before { content: ''; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 9999; background: linear-gradient(90deg, transparent, var(--brand, #B5123E), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: routebar 0.9s linear infinite; }
@keyframes routebar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.view-wait { opacity: .55; transition: opacity .15s; pointer-events: none; }
.row-inputs { display: flex; gap: 6px; } .row-inputs input { min-width: 0; }
.limit-box [hidden] { display: none !important; }
.cell .lim-flag { position: absolute; left: 3px; top: 2px; font-size: 9px; color: #b45309; }
/* flight board: whole day in a scroll box, current flight kept on the 3rd row */
.board-scroll { max-height: calc(100vh - 230px); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: auto; border-radius: 8px; }
body.tv-mode .board-scroll { max-height: calc(100vh - 150px); }
.board-scroll thead th { position: sticky; top: 0; z-index: 2; background: #0f1a2b; }
.board.theme-brand .board-scroll thead th { background: #7d0d2d; }
.board.theme-contrast .board-scroll thead th { background: #fff; }
.board-table tr.gone td { opacity: .5; }
.board-table tr.gone td:nth-child(6) { opacity: .85; }
.board-table tr.focus td:first-child { box-shadow: inset 4px 0 0 #22c55e; }
.board .chip.dom { background: rgba(148, 163, 184, .25); color: inherit; }
@media (max-width: 767px) { .board-scroll { max-height: calc(100vh - 260px); } }
/* smart inbox */
.inbox .ib-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ib-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--soft); border-left: 4px solid #94a3b8; animation: ibIn .25s ease both; }
.ib-item.bad { border-left-color: #dc2626; background: color-mix(in srgb, #dc2626 8%, var(--card)); }
.ib-item.warn { border-left-color: #f59e0b; background: color-mix(in srgb, #f59e0b 9%, var(--card)); }
.ib-item.info { border-left-color: #3b82f6; }
.ib-ico { font-size: 18px; width: 26px; text-align: center; flex: none; }
.ib-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ib-txt small { color: var(--muted); }
.ib-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ib-clear { color: #15803d; font-weight: 600; margin: 4px 0; }
@keyframes ibIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.np-acts { display: flex; gap: 6px; margin-top: 6px; }
.act-card { max-width: 460px; margin: 40px auto; text-align: center; }
.act-card .act-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-size: 32px; font-weight: 800; background: #dcfce7; color: #15803d; }
.act-card.bad .act-icon { background: #fee2e2; color: #b91c1c; }
.act-card .actions { justify-content: center; }
.flash-row > * { animation: flashRow 2.4s ease 1; } @keyframes flashRow { 0%, 40% { background: color-mix(in srgb, #fde047 55%, transparent); } 100% { background: inherit; } }
.sync-chip { margin-left: 8px; font-size: 12px; padding: 3px 10px; border-radius: 99px; background: #fef3c7; color: #92400e; white-space: nowrap; } .sync-chip.done { background: #dcfce7; color: #166534; }
/* my month */
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.mm { background: var(--soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; animation: ibIn .3s ease both; }
.mm b { font-size: 1.6rem; line-height: 1.1; } .mm span { font-weight: 600; font-size: 13px; } .mm small { color: var(--muted); font-size: 11.5px; }
.mm.hi { background: color-mix(in srgb, #f59e0b 14%, var(--card)); }
/* skeleton placeholders */
.skeleton-grid i, .skel { display: block; height: 64px; border-radius: 12px; background: linear-gradient(90deg, var(--soft) 25%, color-mix(in srgb, var(--soft) 60%, var(--card)) 50%, var(--soft) 75%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* status change highlight */
.fs-pill { transition: background-color .4s, color .4s; }
.fs-pill.fs-changed { animation: fsPulse 1.6s ease 2; }
@keyframes fsPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); transform: scale(1); } 40% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); transform: scale(1.06); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); transform: scale(1); } }
/* skeleton page while a screen loads */
.skel-page { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.skel-h { height: 34px; width: 40%; } .skel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .skel-row .skel { height: 84px; }
.skel-card { height: 220px; } .skel-card.short { height: 120px; }
/* command bar */
#cmdBtn { display: inline-grid; place-items: center; }
.cmdk-wrap { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 12px 12px; animation: ibIn .15s ease; backdrop-filter: blur(2px); }
.cmdk { width: min(620px, 100%); background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.3); overflow: hidden; border: 1px solid var(--line); }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 17px; background: transparent; outline: none; border-radius: 0; }
.cmdk ul { list-style: none; margin: 0; padding: 6px; max-height: 55vh; overflow-y: auto; }
.cmdk li { display: flex; align-items: baseline; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.cmdk li.on, .cmdk li:hover { background: var(--brand-soft2, #fde7ee); }
.cmdk li small { color: var(--muted); margin-left: auto; }
.cmdk-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); width: 54px; flex: none; }
.cmdk-foot { display: flex; gap: 16px; padding: 8px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
/* phone bottom tab bar */
.tabbar { display: none; }
@media (max-width: 767px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: var(--muted); text-decoration: none; background: none; border: 0; font-family: inherit; border-radius: 10px; }
  .tabbar a.on { color: var(--brand); background: var(--brand-soft2, #fde7ee); }
  .tabbar svg { width: 22px; height: 22px; }
  body.signed-in .view { padding-bottom: 76px; }
  body.tv-mode .tabbar { display: none; }
  .cmdk-wrap { padding-top: 12px; }
}
/* gentle polish */
.card, .kpi, .tile { transition: box-shadow .2s, transform .2s; }
.tile:hover, .kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.view.view-enter > * { animation: viewIn .22s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.board-table tr.day-sep td { background: rgba(148, 163, 184, .18); color: inherit; font-size: .95rem; padding: 10px; border-top: 2px solid #2e3f5c; }
.board.theme-contrast .board-table tr.day-sep td { background: #e5e7eb; }
.board-table tr.next-day td { opacity: .8; }
@media (max-width: 767px) { .board-table tr.day-sep { display: block; } .board-table tr.day-sep td { display: block; } }
/* leave planner */
table.lp { border-collapse: collapse; font-size: 12px; }
table.lp th, table.lp td { border: 1px solid var(--line); text-align: center; min-width: 26px; height: 26px; padding: 0 2px; }
table.lp thead th { font-weight: 600; } table.lp thead th small { display: block; color: var(--muted); font-size: 10px; }
table.lp thead th.today { background: var(--brand); color: #fff; } table.lp thead th.today small { color: #fff; }
table.lp .lp-name { text-align: left; white-space: nowrap; padding: 0 8px; position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 160px; }
table.lp td.we { background: var(--soft); }
table.lp td.on { font-weight: 700; font-size: 11px; }
table.lp td.pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 4px, transparent 4px 8px); }
table.lp td.lp-av { font-weight: 700; } table.lp td.lp-av.short { background: #fee2e2; color: #b91c1c; } table.lp td.lp-av.tight { background: #fef3c7; color: #92400e; }
/* stations */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.st-head { display: flex; align-items: center; gap: 10px; } .st-head > div { flex: 1; }
.st-code { font-size: 1.4rem; font-weight: 800; color: var(--brand); letter-spacing: .04em; }
.st-contacts { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.st-contacts li span { color: var(--muted); margin-right: 6px; }
.st-notes { background: var(--soft); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
table.roster tr.gap-row td.gap { font-size: 12px; } td.gap.ok { color: #15803d; font-weight: 700; } td.gap.bad { background: #fee2e2; color: #b91c1c; font-weight: 700; } td.gap.bad span { display: block; } td.gap .btn { margin-top: 2px; padding: 1px 8px; }
/* never let one wide cell push the whole page sideways on phones */
html, body { max-width: 100%; overflow-x: clip; }
.m-only { display: none; }
@media (max-width: 767px) {
  /* work allocation: a compact flight card instead of label/value rows */
  table.list.flights td::before { content: none !important; }
  table.list.flights tr { display: grid !important; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 12px; }
  table.list.flights td { display: block !important; width: auto !important; padding: 0 !important; text-align: left !important; min-width: 0; }
  table.list.flights td.c-std { grid-row: 1 / span 2; font-size: 1.15rem; align-self: start; }
  table.list.flights td.c-std .small { font-size: 11px; }
  table.list.flights td.c-flt { grid-column: 2 / -1; font-weight: 600; display: flex !important; flex-wrap: wrap; gap: 4px; align-items: center; }
  table.list.flights td.c-flt .m-only { display: inline; font-weight: 700; }
  table.list.flights td.c-route { display: none !important; }
  table.list.flights tr.overdue-row td:first-child, table.list.flights tr.soon-row td:first-child { box-shadow: none; }
  table.list.flights td.c-flt { justify-content: flex-start; } table.list.flights td.c-flt > .chip:last-child { margin-left: auto; }
  table.list.flights td.c-sta, table.list.flights td.c-type { grid-column: 2; display: inline-block !important; font-size: 13px; color: var(--muted); }
  table.list.flights td.c-sta::before { content: 'STA ' !important; }
  table.list.flights td.c-type { grid-column: 3; text-align: right !important; }
  table.list.flights td.c-lc { grid-column: 1 / -1; display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; }
  table.list.flights td.c-lc select { max-width: none; flex: 1; min-width: 0; }
  table.list.flights td.c-lc .lead-warn { flex-basis: 100%; font-size: 12px; padding: 4px 8px; text-align: left; }
  table.list.flights td.c-st { grid-column: 1 / -1; display: flex !important; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
  table.list.flights td.c-st .fs-btns { margin: 0 0 0 auto; }
  table.list.flights td.c-st .chip, table.list.flights td.c-st .fs-pill { white-space: normal; }
  .fs-cell { min-width: 0; }
}
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.access-grid fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.access-grid legend { font-weight: 700; padding: 0 4px; }
.access-grid label.check { font-size: 14px; }
button.role-chip { cursor: pointer; border: 0; font: inherit; font-size: 12px; }
.roster-tabs { margin: 0 0 10px; max-width: 100%; overflow-x: auto; }
.roster-tabs button { white-space: nowrap; } .roster-tabs button.ghost { color: var(--brand); font-weight: 600; }
/* Help */
.help-hero p { margin: 0 0 10px; } .help-tabs { flex-wrap: wrap; max-width: 100%; }
.help-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.help-toc a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; background: var(--card); }
.help-sec summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.help-sec summary::-webkit-details-marker { display: none; } .help-sec summary h3 { margin: 0; font-size: 16px; }
.help-sec summary::before { content: '▸'; color: var(--muted); } .help-sec details[open] summary::before { content: '▾'; }
.help-body { margin-top: 8px; line-height: 1.55; } .help-body li { margin: 3px 0; }
.faq dt { font-weight: 600; margin-top: 8px; } .faq dd { margin: 2px 0 0 0; color: var(--muted); }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 12px; background: var(--card); }
.lp.lp-edit td.lp-c { cursor: pointer; } .lp.lp-edit td.lp-c:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.pos-split { display: flex; gap: 8px; flex-wrap: wrap; } .pos-split b { font-size: 14px; }
.duty-side { margin: 10px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
/* "Needs you now" target: 3-second blink */
@keyframes hlBlink { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 15%, 50%, 85% { box-shadow: 0 0 0 4px #F5A623, 0 0 18px 4px rgba(245,166,35,.55); } 32%, 68% { box-shadow: 0 0 0 2px rgba(245,166,35,.35); } }
.hl-blink { animation: hlBlink 3s ease-in-out 1; border-radius: 8px; position: relative; z-index: 1; }
tr.hl-blink > td { animation: hlBlinkRow 3s ease-in-out 1; }
@keyframes hlBlinkRow { 0%, 100% { background: inherit; } 15%, 50%, 85% { background: #FFE3A8; } 32%, 68% { background: #FFF4DC; } }
@media (prefers-reduced-motion: reduce) { .hl-blink, tr.hl-blink > td { animation-duration: 3s; animation-timing-function: steps(2); } }
/* Reports tabs + loadsheet report */
.rep-tabs { margin: 0 0 12px; max-width: 100%; overflow-x: auto; }
.ls-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ls-filters select { width: auto; min-width: 0; max-width: 100%; }
.ls-title { margin: 6px 0 10px; }
.ls-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.ls-trend { display: grid; grid-template-columns: repeat(var(--cols), minmax(8px, 1fr)); gap: 3px; height: 170px; align-items: end; overflow-x: auto; }
.ls-col { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 100%; min-width: 0; }
.ls-col small { text-align: center; font-size: 10px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; }
.ls-stack { background: var(--brand); border-radius: 3px 3px 0 0; display: flex; flex-direction: column; justify-content: flex-end; min-height: 1px; opacity: .9; }
.ls-stack i.int { display: block; background: #1F6FB2; border-radius: 0; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin: 0 3px 0 10px; } .lg.dom { background: var(--brand); } .lg.int { background: #1F6FB2; }
.ls-grid { align-items: start; } .ls-tab td:nth-child(2) { min-width: 120px; }
@media (max-width: 700px) { .ls-grid { grid-template-columns: 1fr; } }
tr.hl-blink[style*="animation-duration"] > td { animation-duration: inherit; }
/* Turnaround */
.ta-tabs, .ta-scope { margin: 0 0 12px; max-width: 100%; overflow-x: auto; } .ta-tabs button, .ta-scope button { white-space: nowrap; }
.ta-kpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.ta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ta-card { margin: 0; border-left: 5px solid var(--ok, #16a34a); display: flex; flex-direction: column; gap: 8px; }
.ta-card.warn { border-left-color: var(--warn, #d97706); } .ta-card.bad { border-left-color: var(--bad, #b91c1c); } .ta-card.done { border-left-color: var(--line); opacity: .75; }
.ta-head { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: start; cursor: pointer; }
.ta-std b { font-size: 1.2rem; } .ta-std small { display: block; font-size: 11px; }
.ta-badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #DCFCE7; color: #166534; white-space: nowrap; }
.ta-badge.warn { background: #FEF3C7; color: #92400E; } .ta-badge.bad { background: #FEE2E2; color: #991B1B; } .ta-badge.done { background: var(--line); color: var(--muted); }
.ta-strip { display: flex; gap: 3px; } .ta-strip i { flex: 1; height: 8px; border-radius: 3px; background: var(--line); }
.ta-strip i.done { background: #16a34a; } .ta-strip i.late { background: #d97706; } .ta-strip i.due { background: #FBBF24; } .ta-strip i.overdue { background: #DC2626; animation: taPulse 1.4s ease-in-out infinite; }
@keyframes taPulse { 50% { opacity: .45; } }
.ta-strip.mini { display: inline-flex; width: 64px; vertical-align: middle; } .ta-strip.mini i { height: 6px; }
.ta-line { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; }
.ta-flags { display: flex; flex-wrap: wrap; gap: 4px; } .ta-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ta-mini { font-size: 12px; margin-top: 3px; opacity: .9; } .ta-mini.bad { color: #f87171; } .ta-mini.warn { color: #fbbf24; }
table.ta-ms input { width: 92px; } table.ta-ms tr.overdue td:first-child { color: var(--bad, #b91c1c); font-weight: 600; } table.ta-ms tr.late td:first-child { color: #b45309; }
.ta-gse > div { margin: 2px 0; } .ta-gse label.check { display: inline-flex; margin-right: 8px; }
.ta-dl { margin: 0 0 6px; padding-left: 18px; } .ta-dl-add { display: flex; flex-wrap: wrap; gap: 6px; } .ta-dl-add select { flex: 1 1 260px; min-width: 0; } .ta-dl-add input { flex: 1 1 120px; }
.ta-dl-head { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
/* Gantt (stands / equipment) */
.gantt { overflow-x: auto; } .g-axis, .g-row { display: grid; grid-template-columns: 90px minmax(560px, 1fr); align-items: center; }
.g-axis > div { position: relative; height: 18px; } .g-axis b { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-weight: 500; }
.g-row { border-top: 1px solid var(--line); min-height: 34px; } .g-lab { font-weight: 600; font-size: 13px; padding-right: 8px; }
.g-lane { position: relative; height: 30px; } .g-hr { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.g-axis > div { margin-right: 14px; } .g-lane { margin-right: 14px; }
.g-bar { position: absolute; top: 4px; height: 22px; border: 0; border-radius: 5px; font: 600 11px/22px inherit; color: #fff; background: #2563EB; overflow: hidden; white-space: nowrap; padding: 0 4px; cursor: pointer; min-width: 4px; }
.g-bar.warn { background: #D97706; } .g-bar.bad { background: #B91C1C; } .g-bar.done { background: #9CA3AF; } .g-bar.clash { background: repeating-linear-gradient(45deg, #B91C1C 0 6px, #7F1D1D 6px 12px); }
.g-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand); z-index: 1; }
.rot-chain { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rot-leg { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 3px 7px; font: inherit; font-size: 12px; cursor: pointer; } .rot-leg.done { opacity: .6; }
.rot-gap { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: #DCFCE7; color: #166534; } .rot-gap.warn { background: #FEF3C7; color: #92400E; } .rot-gap.bad { background: #FEE2E2; color: #991B1B; font-weight: 700; }
/* Duty log */
.ta-log-form { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px; } .ta-log-form textarea { grid-column: 1 / -1; } .ta-log-form .check { align-self: center; }
.ta-log { list-style: none; margin: 0; padding: 0; } .ta-log li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.ta-log li.imp { background: #FFFBEB; } .lg-t { font-weight: 700; font-variant-numeric: tabular-nums; }
.ho-ops { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; padding: 8px 12px; margin: 8px 0; } .ho-ops ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 700px) { .ta-grid { grid-template-columns: 1fr; } .ta-log-form { grid-template-columns: 1fr; } .g-axis, .g-row { grid-template-columns: 64px minmax(560px, 1fr); } }
@media print { .ta-log-form, .ta-tabs, .toolbar .actions, [data-lg-del] { display: none !important; } }
:root[data-theme="dark"] .ta-log li.imp, :root[data-theme="dark"] .ho-ops { background: #3a3220; border-color: #6b5a2a; }
:root[data-theme="dark"] .ta-badge { background: #14532d; color: #bbf7d0; } :root[data-theme="dark"] .ta-badge.warn { background: #78350f; color: #fde68a; } :root[data-theme="dark"] .ta-badge.bad { background: #7f1d1d; color: #fecaca; }
:root[data-theme="dark"] .rot-gap { background: #14532d; color: #bbf7d0; } :root[data-theme="dark"] .rot-gap.warn { background: #78350f; color: #fde68a; } :root[data-theme="dark"] .rot-gap.bad { background: #7f1d1d; color: #fecaca; }
.ta-strip i.na { background: repeating-linear-gradient(45deg, #86EFAC 0 3px, transparent 3px 6px); }
/* Modules */
.sidenav .nav-links { display: flex; flex-direction: column; }
.sidenav .mod-head { display: flex; align-items: center; gap: 10px; margin: 2px 8px 8px; padding: 9px 10px; border-radius: 10px; background: var(--brand-soft, #fbe9ee); color: var(--brand); font-weight: 700; text-decoration: none; }
.sidenav .mod-head .nav-label small { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.sidenav a[hidden] { display: none !important; }
.mod-launch { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 16px; }
.mod-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: inherit; box-shadow: 0 1px 2px var(--shadow, rgba(0,0,0,.05)); transition: transform .15s, box-shadow .15s, border-color .15s; }
.mod-card:hover, .mod-card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 22px var(--shadow, rgba(0,0,0,.1)); border-color: var(--brand); }
.mod-card b { font-size: 1.1rem; } .mod-card small { color: var(--muted); line-height: 1.4; }
.mod-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft, #fbe9ee); color: var(--brand); }
.mod-ico svg { width: 24px; height: 24px; }
.mod-ops .mod-ico { background: #E0F2FE; color: #0369A1; } .mod-me .mod-ico { background: #DCFCE7; color: #15803D; } .mod-admin .mod-ico { background: #EDE9FE; color: #6D28D9; }
:root[data-theme="dark"] .mod-ops .mod-ico { background: #0c3a52; color: #7dd3fc; } :root[data-theme="dark"] .mod-me .mod-ico { background: #14532d; color: #86efac; } :root[data-theme="dark"] .mod-admin .mod-ico { background: #3b2a66; color: #c4b5fd; }
.mod-card.cur { border-color: var(--brand); } .mod-cur { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; color: var(--brand); }
.tabbar .tab-links { display: contents; }
body.nav-collapsed .sidenav .mod-head .nav-label { display: none; } body.nav-collapsed .sidenav .mod-head { padding: 9px; margin: 2px 0 8px; justify-content: center; }
/* Roster: fluid on tablets and desktops — fills the available width, every day column equal.
   Phones keep the fixed cell size and scroll sideways (easier to read). */
@media (min-width: 761px) {
  table.roster { width: 100%; min-width: 0; --name-w: 210px; font-size: clamp(12.5px, .45vw + 8px, 14.5px); }
  table.roster col.c-day { width: auto; }
  table.roster th, table.roster td { padding: 0 clamp(3px, .5vw, 8px); }
  table.roster tbody th.name-col { overflow: hidden; text-overflow: ellipsis; }
  .card .table-scroll:has(table.roster) { overflow-x: visible; }
}
@media (min-width: 761px) and (max-width: 1100px) { table.roster { --name-w: 160px; } }
@media print { table.roster { width: 100%; } }
/* Station work allocation */
.sw-shift-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px 16px; }
.sw-shift-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .sw-shift-row b { font-size: 1.05rem; } .sw-shift-row .small { color: var(--muted); overflow-wrap: anywhere; }
.sw-kpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } .sw-filter { margin: 0 0 10px; max-width: 100%; overflow-x: auto; }
.sw-table td { vertical-align: top; } .sw-table tr.past { opacity: .55; } .sw-table tr.me td { background: var(--brand-soft, #fbe9ee); }
.sw-table tr.sw-bad td:first-child { box-shadow: inset 4px 0 0 #DC2626; }
.sw-kind { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #E0F2FE; color: #075985; white-space: nowrap; }
.sw-kind.k-ARR { background: #DCFCE7; color: #166534; } .sw-kind.k-DEP { background: #FEF3C7; color: #92400E; }
.sw-iss { color: #B91C1C; font-size: 12px; margin-top: 4px; }
.sw-flts div { white-space: nowrap; } .sw-pos { min-width: 92px; } .sw-pos.editable { cursor: pointer; } .sw-pos.editable:hover { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 6px; }
.sw-pos.short { background: #FEF2F2; } .sw-need { color: #B91C1C; font-weight: 700; font-size: 12px; }
.sw-who { display: inline-block; margin: 1px 3px 1px 0; padding: 1px 7px; border-radius: 999px; background: var(--soft, #f2f4f7); font-size: 12.5px; } .sw-who.me { background: var(--brand); color: #fff; }
.sw-pick { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; } .sw-pick .off { opacity: .6; }
.sw-mine { list-style: none; margin: 0 0 10px; padding: 0; } .sw-mine li { padding: 6px 0; border-top: 1px solid var(--line); }
:root[data-theme="dark"] .sw-kind { background: #0c3a52; color: #7dd3fc; } :root[data-theme="dark"] .sw-kind.k-ARR { background: #14532d; color: #bbf7d0; } :root[data-theme="dark"] .sw-kind.k-DEP { background: #78350f; color: #fde68a; }
:root[data-theme="dark"] .sw-pos.short { background: #3b1d1d; }
@media (max-width: 760px) {
  .sw-table thead { display: none; } .sw-table, .sw-table tbody, .sw-table tr, .sw-table td { display: block; width: 100%; }
  .sw-table tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
  .sw-table td { border: 0; padding: 3px 0; } .sw-table td.sw-pos::before { content: attr(data-label) ': '; color: var(--muted); font-size: 12px; }
  .sw-table td.muted:not(.sw-pos) { display: none; } .sw-flts div { white-space: normal; }
}
.sw-all tbody tr { cursor: pointer; } .sw-all tbody tr:hover td { background: var(--soft, #f6f7f9); } .bad-t { color: #B91C1C; } .ok-t { color: #15803D; font-weight: 700; }
.sw-team input[type=number] { width: 64px; } .sw-team td input:not([type]) { min-width: 140px; }
.ta-team { display: flex; flex-wrap: wrap; gap: 4px 12px; } .ta-team > span { white-space: nowrap; } .ta-team b { font-weight: 600; }
.ta-strip i.run { background: #2563EB; animation: taPulse 1.6s ease-in-out infinite; }
.ta-running { display: flex; flex-wrap: wrap; gap: 6px; }
.ta-run { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: #DBEAFE; color: #1E40AF; }
.ta-run i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: taPulse 1.2s ease-in-out infinite; } .ta-run small { opacity: .7; }
.ta-run.over { background: #FEE2E2; color: #991B1B; }
:root[data-theme="dark"] .ta-run { background: #1e3a8a; color: #bfdbfe; } :root[data-theme="dark"] .ta-run.over { background: #7f1d1d; color: #fecaca; }
.ta-acts .btn { min-height: 36px; } .ta-tin { display: inline-flex; gap: 4px; align-items: center; } .ta-tin input { width: 76px; }
.ta-type { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; padding: 1px 5px; border-radius: 4px; background: var(--soft, #f2f4f7); color: var(--muted); }
.ta-type.t-span { background: #DBEAFE; color: #1E40AF; } .ta-type.t-tick { background: #DCFCE7; color: #166534; }
table.ta-ms tr.run td:first-child { color: #1D4ED8; font-weight: 600; }
/* Operations settings */
.os-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; margin-bottom: 8px; } .os-head select { min-width: 220px; }
.os-min { display: inline-flex; align-items: center; gap: 6px; } .os-min input { width: 74px; }
.os-items td { vertical-align: middle; } .os-items input[data-f=label] { min-width: 160px; } .os-move { white-space: nowrap; } .os-move .icon-btn { width: 26px; height: 26px; font-size: 10px; }
.os-acts { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; } .os-acts .spacer { flex: 1; }
.link-btn.danger { color: var(--bad, #b42318); }
.os-prev { position: relative; } .os-axis { position: relative; height: 18px; margin-left: 170px; } .os-axis b { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-weight: 500; }
.os-prow { display: grid; grid-template-columns: 170px 1fr; align-items: center; min-height: 24px; border-top: 1px solid var(--line); } .os-prow span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.os-prow > div { position: relative; height: 22px; } .os-prow .bar { position: absolute; top: 5px; height: 12px; border-radius: 4px; background: #3B82F6; }
.os-prow .dot { position: absolute; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); transform: translateX(-50%); } .os-prow .dot.tick { background: #16A34A; border-radius: 3px; }
.os-prow .std { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .35; }
@media (max-width: 700px) { .os-axis { margin-left: 100px; } .os-prow { grid-template-columns: 100px 1fr; } }
.os-items select[data-f=type] { min-width: 104px; } .os-items select[data-f=auto] { min-width: 140px; } .os-items input[data-f=label] { min-width: 130px; width: 100%; }
.os-items .os-min input { width: 62px; } .os-items th { white-space: nowrap; }
/* ===== Flight board: Dashboard + Gantt ===== */
.board-modes { display: inline-flex; } .board .seg button { color: inherit; background: rgba(127,127,127,.14); border-color: rgba(127,127,127,.3); }
.board .seg button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.board.dash { display: flex; flex-direction: column; gap: 14px; }
.dash-card { background: rgba(127,127,127,.09); border: 1px solid rgba(127,127,127,.22); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.dash-card h3 { margin: 0 0 8px; font-size: 15px; } .dash-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 6px; } .dash-h h3 { margin: 0; }
.board .seg.sm button { padding: 4px 10px; font-size: 12.5px; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dk { background: rgba(127,127,127,.1); border: 1px solid rgba(127,127,127,.22); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-left: 5px solid rgba(127,127,127,.4); }
.dk b { font-size: 1.9rem; line-height: 1.1; } .dk b i { font-size: .55em; font-style: normal; opacity: .65; } .dk span { font-weight: 600; font-size: 13px; } .dk small { font-size: 12px; opacity: .75; }
.dk.ok { border-left-color: #22C55E; } .dk.warn { border-left-color: #F59E0B; } .dk.bad { border-left-color: #EF4444; }
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 14px; }
.dash-next, .dash-alerts { list-style: none; margin: 0; padding: 0; }
.dash-next li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(127,127,127,.2); }
.dash-next li small { display: block; opacity: .75; font-size: 12px; } .dash-next li.late > b { color: #F87171; }
.dash-next em { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(127,127,127,.2); white-space: nowrap; }
.dash-next em.dn-ls { background: #F59E0B; color: #1f1300; } .dash-next em.dn-lir, .dash-next em.dn-checkin { background: #3B82F6; color: #fff; }
.dash-alerts li { padding: 6px 8px 6px 10px; margin: 4px 0; border-radius: 8px; font-size: 13px; border-left: 4px solid #3B82F6; background: rgba(59,130,246,.1); }
.dash-alerts li.l2 { border-left-color: #F59E0B; background: rgba(245,158,11,.12); } .dash-alerts li.l3 { border-left-color: #EF4444; background: rgba(239,68,68,.14); }
.dash-hours { display: flex; gap: 4px; align-items: flex-end; height: 140px; overflow-x: auto; }
.dash-hours > div { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 2px; } .dash-hours .hb { flex: 1; width: 70%; display: flex; flex-direction: column; justify-content: flex-end; }
.dash-hours i { display: block; border-radius: 3px 3px 0 0; } .dash-hours i.dom, .dash-lg i.dom { background: #22C55E; } .dash-hours i.int, .dash-lg i.int { background: #60A5FA; }
.dash-hours b { font-size: 11px; min-height: 13px; } .dash-hours small { font-size: 10.5px; opacity: .7; } .dash-hours .cur small { opacity: 1; font-weight: 800; color: var(--brand); }
.dash-hours .cur .hb { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.dash-lg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: middle; }
/* Gantt */
.gt { overflow-x: auto; } .gt-axis, .gt-row { display: grid; grid-template-columns: 96px minmax(640px, 1fr); align-items: center; }
.gt.big .gt-axis, .gt.big .gt-row { grid-template-columns: 120px minmax(900px, 1fr); }
.gt-axis > div { position: relative; height: 18px; } .gt-axis b { position: absolute; transform: translateX(-50%); font-size: 11px; opacity: .7; font-weight: 600; }
.gt-row { border-top: 1px solid rgba(127,127,127,.18); min-height: 34px; } .gt.big .gt-row { min-height: 44px; }
.gt-lab { font-weight: 700; font-size: 12.5px; padding-right: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gt-lab small { display: block; font-weight: 500; opacity: .65; font-size: 11px; }
.gt-lane { position: relative; height: 30px; } .gt.big .gt-lane { height: 40px; }
.gt-hr { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(127,127,127,.18); }
.gt-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #F43F5E; z-index: 3; box-shadow: 0 0 6px #F43F5E; }
.gt-bar { position: absolute; top: 4px; bottom: 4px; border-radius: 5px; display: flex; align-items: center; gap: 4px; padding: 0 5px; overflow: hidden; white-space: nowrap; font-size: 11.5px; color: #0b1220; z-index: 2; cursor: default; }
.gt-bar[data-go] { cursor: pointer; } .gt-bar small { opacity: .75; font-size: 10.5px; } .gt.big .gt-bar { font-size: 13px; }
.gt-bar.s-todo, .gt-legend .s-todo { background: #CBD5E1; } .gt-bar.s-checkin, .gt-bar.s-lir, .gt-legend .s-lir { background: #93C5FD; }
.gt-bar.s-ls, .gt-legend .s-ls { background: #FCD34D; } .gt-bar.s-air, .gt-legend .s-air { background: #4ADE80; } .gt-bar.s-arr, .gt-legend .s-arr { background: #16A34A; color: #fff; }
.gt-bar.intl { box-shadow: inset 0 -3px 0 #2563EB; } .gt-bar.late, .gt-legend .late { outline: 2px solid #EF4444; outline-offset: -2px; background-image: repeating-linear-gradient(45deg, rgba(239,68,68,.25) 0 5px, transparent 5px 10px); }
.gt-bar.ret { background: #C084FC; }
.gt-delay, .gt-legend .gt-delay { position: absolute; top: 12px; height: 6px; background: repeating-linear-gradient(90deg, #EF4444 0 4px, transparent 4px 7px); border-radius: 3px; z-index: 1; }
.gt.big .gt-delay { top: 17px; }
.gt-gap { position: absolute; top: 11px; height: 8px; border-radius: 4px; z-index: 1; display: flex; justify-content: center; } .gt.big .gt-gap { top: 16px; }
.gt-gap em { font-style: normal; font-size: 9.5px; font-weight: 700; position: relative; top: -12px; opacity: .85; }
.gt-gap.ok, .gt-legend .gap.ok { background: rgba(34,197,94,.45); } .gt-gap.warn, .gt-legend .gap.warn { background: rgba(245,158,11,.7); } .gt-gap.bad, .gt-legend .gap.bad { background: #EF4444; }
.gt-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 11.5px; opacity: .85; }
.gt-legend span { display: inline-flex; align-items: center; gap: 4px; } .gt-legend i { display: inline-block; width: 16px; height: 10px; border-radius: 3px; position: static; }
.gt-legend i.gap { width: 10px; height: 6px; } .gt-legend .gt-delay { position: static; height: 6px; }
.board.theme-contrast .dash-card, .board.theme-contrast .dk { background: #fff; border-color: #000; }
@media (max-width: 1100px) { .dash-main { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .board-ctl { flex-wrap: wrap; } .dash-kpis { grid-template-columns: repeat(2, 1fr); } .dk b { font-size: 1.5rem; } .gt-axis, .gt-row { grid-template-columns: 70px minmax(560px, 1fr); } }
body.tv-mode .board.dash { font-size: 1.05em; } body.tv-mode .dk b { font-size: 2.4rem; }
.board .board-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; } .board .board-ctl select { width: auto; max-width: 210px; flex: 0 1 auto; }
.board-modes { flex: 0 0 auto; }
.dash-hours { justify-content: space-around; } .dash-hours > div { flex: 1 1 0; max-width: 46px; min-width: 20px; }
.board .count { background: rgba(127,127,127,.3); color: inherit; }
/* Turnaround — one flight per line */
.ta-list { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ta-lh, .ta-row { display: grid; grid-template-columns: 70px minmax(190px, 240px) minmax(0, 1fr) minmax(220px, 300px); gap: 14px; align-items: center; }
.ta-lh { padding: 8px 14px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--soft, #f6f7f9); border-bottom: 1px solid var(--line); }
.ta-row { padding: 10px 14px; border-bottom: 1px solid var(--line); border-left: 5px solid #16A34A; margin: 0; border-radius: 0; box-shadow: none; }
.ta-row:last-child { border-bottom: 0; } .ta-row.warn { border-left-color: #D97706; } .ta-row.bad { border-left-color: #DC2626; background: linear-gradient(90deg, rgba(220,38,38,.05), transparent 40%); } .ta-row.done { border-left-color: var(--line); opacity: .6; }
.tr-std b { font-size: 1.25rem; font-variant-numeric: tabular-nums; } .tr-std small { display: block; font-size: 11px; color: var(--bad, #b42318); }
.tr-std, .tr-id { cursor: pointer; } .tr-id > div { line-height: 1.35; } .tr-id .ta-team { margin-top: 3px; }
.tr-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .tr-stat { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tr-tl { min-width: 0; } .tr-tl .ta-flags { margin-top: 4px; }
/* the per-flight time-chart */
.tl { position: relative; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(127,127,127,.12) calc(10% - 1px) 10%); border-radius: 6px; }
.tl-plan { position: absolute; height: 18px; border-radius: 5px; background: rgba(100,116,139,.16); border: 1px dashed rgba(100,116,139,.45); box-sizing: border-box; }
.tl-act { position: absolute; height: 18px; border-radius: 5px; background: #16A34A; }
.tl-act.st-late { background: #D97706; } .tl-act.st-run { background: #2563EB; animation: taPulse 1.6s ease-in-out infinite; } .tl-act.st-overdue { background: #DC2626; animation: taPulse 1.2s ease-in-out infinite; }
.tl-lab { position: absolute; height: 18px; line-height: 18px; padding-left: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--ink); pointer-events: auto; text-shadow: 0 0 3px var(--card), 0 0 3px var(--card); }
.tl-lab.st-done, .tl-lab.st-late, .tl-lab.st-run, .tl-lab.st-overdue { color: #fff; text-shadow: none; }
.tl-mark { position: absolute; top: 3px; width: 11px; height: 11px; transform: translateX(-50%) rotate(45deg); background: #CBD5E1; border-radius: 2px; z-index: 2; }
.tl-mark.tick { border-radius: 50%; transform: translateX(-50%); }
.tl-mark.st-done { background: #16A34A; } .tl-mark.st-late { background: #D97706; } .tl-mark.st-due { background: #F59E0B; } .tl-mark.st-overdue { background: #DC2626; animation: taPulse 1.2s ease-in-out infinite; }
.tl-mark em { position: absolute; left: 12px; top: -3px; transform: rotate(-45deg); transform-origin: left top; font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--muted); white-space: nowrap; display: none; }
.tl-mark.tick em { transform: none; left: 13px; top: -1px; }
.tl-std { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .55; } .tl-std::after { content: 'STD'; position: absolute; top: -1px; left: 4px; font-size: 9px; font-weight: 800; }
.tl-now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #F43F5E; z-index: 3; box-shadow: 0 0 5px #F43F5E; }
:root[data-theme="dark"] .ta-lh { background: rgba(255,255,255,.04); }
@media (max-width: 1000px) { .ta-lh { display: none; } .ta-row { grid-template-columns: 62px minmax(0, 1fr); } .tr-tl, .tr-side { grid-column: 1 / -1; } }
/* ===== Board: fill the screen, calm colours ===== */
.board.dash.theme-night { background: radial-gradient(120% 140% at 0% 0%, #13213a 0%, #0b1324 55%, #070d19 100%); color: #e6edf7; }
.board.dash .board-head h2 { letter-spacing: -.01em; } .board.dash .board-clock { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.board.dash .dash-card, .board.dash .dk { backdrop-filter: blur(2px); }
.board.dash.theme-night .dash-card, .board.dash.theme-night .dk { background: rgba(148,163,184,.07); border-color: rgba(148,163,184,.16); }
.dk b { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.6rem); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dk span { font-size: clamp(12px, .55vw + 7px, 14.5px); } .dk small { font-size: clamp(11px, .4vw + 7px, 13px); }
.gt-bar { background-image: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 60%); box-shadow: 0 1px 2px rgba(0,0,0,.25); border-radius: 6px; font-weight: 600; }
.gt-bar b { font-weight: 800; } .gt-lab { font-size: clamp(12px, .5vw + 7px, 15px); } .gt-axis b { font-size: clamp(11px, .35vw + 7px, 13px); }
@media (min-width: 900px) {
  .view:has(> .board.dash) { padding: 12px; }
  .board.dash { height: calc(100dvh - 54px - 24px); min-height: 600px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 12px; overflow: hidden; }
  body:has(.demo-bar) .board.dash { height: calc(100dvh - 54px - 24px - 26px); }
  .board.dash.mode-gantt { grid-template-rows: auto minmax(0, 1fr); }
  .dash-main { min-height: 0; height: 100%; grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 420px); }
  .dash-gantt { display: flex; flex-direction: column; min-height: 0; height: 100%; }
  .gt { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
  .gt-row { flex: 1 1 0; min-height: 34px; max-height: 120px; } .gt-lane { height: 100% !important; }
  .gt-bar { top: 18%; bottom: 18%; font-size: clamp(11px, .45vw + 6px, 15px); }
  .gt-gap { top: calc(50% - 4px); } .gt-delay { top: calc(50% - 3px); }
  .gt-axis, .gt-row { grid-template-columns: clamp(90px, 8vw, 150px) minmax(640px, 1fr); }
  .dash-side { min-height: 0; height: 100%; overflow: auto; }
  .dash-side .dash-card:last-child { flex: 1; }
  .dash-hours { height: clamp(90px, 12vh, 150px); }
  body.tv-mode .board.dash { height: 100dvh; border-radius: 0; padding: 18px 24px; }
}
.tl-lab { overflow: hidden; text-overflow: ellipsis; padding: 0 5px; box-sizing: border-box; } .tl-lab.st-plan { color: var(--muted); }
.tl-plan { background: rgba(100,116,139,.22); border-color: rgba(100,116,139,.55); }
.tl-mark em { display: none; } .tl { margin-top: 2px; }
.tl-key { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 10px; } .tl-key i { display: inline-block; width: 14px; height: 8px; border-radius: 3px; margin: 0 3px 0 8px; vertical-align: middle; }
.tl-key .k-plan { background: rgba(100,116,139,.25); border: 1px dashed rgba(100,116,139,.6); } .tl-key .k-act { background: #16A34A; } .tl-key .k-run { background: #2563EB; } .tl-key .k-late { background: #D97706; }
/* board: aircraft names stay visible when the chart scrolls */
.board { --gt-bg: #0f1a2b; } .board.dash.theme-night { --gt-bg: #0e182c; } .board.theme-brand { --gt-bg: #9b1037; } .board.theme-contrast { --gt-bg: #fff; }
.gt-lab, .gt-axis > span { position: sticky; left: 0; z-index: 5; background: var(--gt-bg); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
/* frozen aircraft column: every row is as wide as the whole chart, so the sticky name never leaves */
.gt-axis, .gt-row { width: max-content; min-width: 100%; box-sizing: border-box; }
.dc-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1 1 100%; } .dc-pick select { flex: 1 1 160px; min-width: 0; } .dc-code { font-variant-numeric: tabular-nums; letter-spacing: .06em; min-width: 52px; }
.dl-hints { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; } .dl-hints .btn { background: #FEF3C7; border-color: #F59E0B; color: #78350F; }
.dc-tables details { border-top: 1px solid var(--line); padding: 6px 0; } .dc-tables ul { margin: 6px 0 4px 18px; padding: 0; } .dc-stake { columns: 2; }
#dcText { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
/* Ramp mode — big buttons, one hand */
.ramp { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.rp-title { margin: 4px 0; } .ramp h3 { margin: 10px 0 2px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rp-item { display: grid; grid-template-columns: 64px 1fr 20px; gap: 10px; align-items: center; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 6px solid #16A34A; text-decoration: none; color: inherit; font-size: 17px; }
.rp-item.warn { border-left-color: #D97706; } .rp-item.bad { border-left-color: #DC2626; } .rp-item > b { font-size: 20px; } .rp-item small { display: block; color: var(--muted); font-size: 13px; } .rp-item i { font-style: normal; font-size: 26px; color: var(--muted); }
.rp-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.rp-back { font-size: 34px; text-decoration: none; color: var(--ink); line-height: 1; } .rp-head > div:nth-child(2) { font-size: 20px; } .rp-head small { display: block; font-size: 13px; color: var(--muted); }
.rp-std { text-align: right; } .rp-std b { font-size: 34px; font-variant-numeric: tabular-nums; } .rp-std.soon b { color: #D97706; } .rp-std.late b { color: #DC2626; } .rp-std small { display: block; color: var(--muted); }
.rp-strip { height: 12px; } .rp-strip i { height: 12px; } .rp-count { margin: 0; color: var(--muted); } .rp-count .bad { color: #DC2626; } .rp-count .warn { color: #D97706; }
.rp-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 96px; border: 0; border-radius: 18px; font: inherit; cursor: pointer; color: #fff; background: #B5123E; box-shadow: 0 6px 16px rgba(181,18,62,.25); }
.rp-btn b { font-size: 24px; } .rp-btn small { font-size: 14px; opacity: .85; } .rp-btn:active { transform: scale(.98); } .rp-btn:disabled { opacity: .5; }
.rp-btn.run { background: #1D4ED8; box-shadow: 0 6px 16px rgba(29,78,216,.25); } .rp-btn.next { min-height: 120px; } .rp-btn.next b { font-size: 28px; }
.rp-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .rp-btn.small { min-height: 64px; background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: none; } .rp-btn.small b { font-size: 16px; } .rp-btn.small small { font-size: 12px; color: var(--muted); }
.rp-done { padding: 30px; text-align: center; font-size: 22px; font-weight: 700; color: #16A34A; background: rgba(22,163,74,.08); border-radius: 18px; }
.rp-detail { align-self: center; }
.dash-next li[data-go] { cursor: pointer; } .dash-next li[data-go]:hover { background: rgba(127,127,127,.08); } .gt-bar { cursor: pointer; }
.nr-days { display: flex; gap: 3px; align-items: flex-end; height: 120px; } .nr-days > div { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.nr-days span { width: 80%; border-radius: 3px 3px 0 0; background: #CBD5E1; min-height: 2px; } .nr-days .ok span { background: #16A34A; } .nr-days .warn span { background: #F59E0B; } .nr-days .bad span { background: #DC2626; }
.nr-days small { font-size: 10px; color: var(--muted); } .kpi.ok { border-color: #86EFAC; } .chip.ok { background: #DCFCE7; color: #166534; }
.ta-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .ta-ph { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft, #f6f7f9); cursor: pointer; font: inherit; } .ta-ph span { font-size: 20px; } .ta-ph small { font-size: 10px; color: var(--muted); }
.ta-ph-add { cursor: pointer; margin-right: 6px; } #phNote { max-width: 320px; } .ta-fig { margin: 8px 0 0; } .ta-fig img { max-width: 100%; border-radius: 10px; }

/* =====================================================================================
   Modern look — one layer on top of everything: Inter, soft depth, pill controls, motion
   ===================================================================================== */
:root { font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-feature-settings: "cv11", "ss01"; --radius: 14px;
  --bg: #f4f6fa; --line: #e6e9f0; --shadow-sm: 0 1px 2px rgba(16,24,40,.05); --shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 28px -14px rgba(16,24,40,.18); --ring: 0 0 0 3px rgba(181,18,62,.18); }
:root[data-theme="dark"] { --bg: #151922; --card: #1e2430; --line: #2f3746; --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -16px rgba(0,0,0,.7); --ring: 0 0 0 3px rgba(212,51,95,.3); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; letter-spacing: -.005em;
  background: radial-gradient(1200px 600px at 100% -10%, rgba(181,18,62,.05), transparent 60%), var(--bg); background-attachment: fixed; }
h1, h2, h3, h4 { letter-spacing: -.02em; } .toolbar h2 { font-weight: 750; font-size: clamp(1.25rem, .9rem + .9vw, 1.6rem); }
.view { animation: none; }
/* surfaces */
.card, .kpi, .ta-list, .mod-card, .st-card { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); }
.card { padding: 18px; } .kpi { border-radius: var(--radius); transition: transform .15s, box-shadow .15s; } a.kpi:hover { transform: translateY(-2px); }
.kpi-n { font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
/* top bar and menu */
.topbar { background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom-color: var(--line); }
.sidenav { background: color-mix(in srgb, var(--card) 92%, transparent); border-right-color: var(--line); }
.sidenav a { border-radius: 10px; font-weight: 500; transition: background .15s, color .15s; } .sidenav a:hover { background: var(--soft); }
.sidenav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 650; box-shadow: inset 3px 0 0 var(--brand); }
.user-chip { border-radius: 999px; box-shadow: var(--shadow-sm); }
/* buttons */
.btn { border-radius: 10px; font-weight: 600; padding: 8px 14px; transition: background .15s, border-color .15s, box-shadow .15s, transform .08s; box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); } .btn.sm { border-radius: 8px; padding: 4px 10px; font-weight: 600; }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, #fff), var(--brand)); border-color: var(--brand); box-shadow: 0 1px 2px rgba(181,18,62,.3), 0 6px 14px -6px rgba(181,18,62,.45); }
.btn.primary:hover { background: var(--brand-dark); } .btn.ghost { box-shadow: none; }
.btn:focus-visible, .seg button:focus-visible, a:focus-visible, input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--ring); border-color: var(--brand); }
/* fields */
input, select, textarea { border-radius: 10px; border-color: var(--line-strong); padding: 8px 11px; transition: border-color .15s, box-shadow .15s; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: auto; }
label { font-weight: 550; } label > input, label > select, label > textarea { margin-top: 4px; font-weight: 400; }
/* segmented controls as pills */
.seg { border: 0; background: var(--soft); padding: 3px; border-radius: 12px; gap: 2px; }
.seg button { border: 0 !important; border-radius: 9px; background: transparent; color: var(--ink2); font-weight: 600; padding: 6px 12px; transition: background .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--ink); } .seg button.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow-sm); }
.board .seg { background: rgba(127,127,127,.16); } .board .seg button { background: transparent; color: inherit; } .board .seg button.on { background: var(--brand); color: #fff; }
/* tables */
table.list th { background: transparent; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); }
table.list td { border-bottom-color: var(--line); } table.list tbody tr { transition: background .12s; } table.list tbody tr:hover td { background: color-mix(in srgb, var(--soft) 70%, transparent); }
/* chips */
.chip { font-weight: 600; padding: 2px 9px; letter-spacing: .01em; }
/* dialogs and toasts */
.modal-wrap { background: rgba(15,20,30,.38); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn .15s ease-out; }
.modal { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 60px -12px rgba(16,24,40,.35); animation: popIn .18s cubic-bezier(.2,.8,.2,1); }
@keyframes fadeIn { from { opacity: 0; } } @keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.toast { border-radius: 999px; padding: 10px 18px; font-weight: 550; backdrop-filter: blur(8px); }
/* module launcher and home */
.mod-card { padding: 20px; } .mod-card:hover { box-shadow: 0 2px 4px rgba(16,24,40,.06), 0 18px 36px -18px rgba(16,24,40,.3); }
.mod-ico { border-radius: 14px; }
/* phone bottom bar */
.tabbar { background: color-mix(in srgb, var(--card) 85%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-top-color: var(--line); }
@media (prefers-reduced-motion: reduce) { .modal, .modal-wrap, .kpi, .btn { animation: none !important; transition: none !important; } }

/* ===== Time windows: both charts show 6 hours (1 h back, 5 h ahead) and slide with the clock ===== */
.dash-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-h h3 { margin-right: auto; }
.dh-follow { padding: 3px 10px; font-size: 12px; border-radius: 999px; }
.dh-follow::before { content: '◉ '; color: #F43F5E; }
/* Gantt */
.gt.win .gt-axis, .gt.win .gt-row { grid-template-columns: var(--gtlab, 96px) var(--gtw, 1200px) !important; width: max-content; min-width: 0; }
.gt.win { scrollbar-width: thin; }
.gt.win .gt-axis { position: sticky; top: 0; z-index: 7; background: var(--gt-bg, var(--card)); padding: 2px 0 4px; min-height: 26px; }
.gt.win .gt-axis > span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; font-weight: 700; z-index: 8; }
.gt.win .gt-axis > div { height: 22px; }
.gt.win .gt-axis b { top: 3px; padding: 1px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.gt.win .gt-axis b.cur { background: rgba(127,127,127,.18); opacity: 1; }
.gt-nowlab { position: absolute; top: 0; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: #F43F5E; padding: 2px 6px; border-radius: 999px; z-index: 2; box-shadow: 0 2px 8px rgba(244,63,94,.45); font-variant-numeric: tabular-nums; }
.gt-hr.half { background: rgba(127,127,127,.08); }
.gt-past { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(127,127,127,.07); pointer-events: none; }
.gt.win .gt-bar { min-width: 46px; }
.gt.win .gt-bar.s-arr, .gt.win .gt-bar.s-air { opacity: .82; }
/* Departures per hour — stacked by aircraft type */
.dash-dph .dh-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; font-weight: 600; }
.dh-legend span { display: inline-flex; align-items: center; gap: 5px; } .dh-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.dh-legend small { opacity: .6; font-weight: 500; }
.dash-hours { display: grid !important; grid-auto-flow: column; grid-auto-columns: calc(100% / 6); gap: 0; align-items: stretch; height: 190px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; justify-content: start !important; }
.dash-hours > .dh-col { display: flex; flex-direction: column; align-items: stretch; min-width: 0; max-width: none; height: 100%; padding: 0 6px; border-left: 1px dashed rgba(127,127,127,.18); position: relative; }
.dh-col.past { opacity: .6; }
.dh-col.cur { background: linear-gradient(180deg, rgba(244,63,94,.06), rgba(244,63,94,0)); }
.dh-bar { flex: 1; position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.dh-stack { width: min(70%, 64px); min-height: 4px; display: flex; flex-direction: column-reverse; gap: 2px; transition: height .4s; }
.dh-stack i { display: flex; align-items: center; justify-content: center; background: var(--c); border-radius: 4px; min-height: 14px; flex-basis: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.dh-stack i.gone { background: repeating-linear-gradient(135deg, var(--c) 0 6px, color-mix(in srgb, var(--c) 55%, transparent) 6px 10px); opacity: .7; }
.dh-stack em { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); line-height: 1; }
.dh-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #F43F5E; box-shadow: 0 0 6px #F43F5E; z-index: 2; }
.dh-n { text-align: center; font-size: 13px; font-weight: 800; min-height: 17px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.dh-n small { font-weight: 600; font-size: 10.5px; opacity: .65; margin-left: 4px; }
.dh-h { text-align: center; font-size: 11.5px; opacity: .7; font-variant-numeric: tabular-nums; }
.dh-col.cur .dh-h { opacity: 1; font-weight: 800; color: #F43F5E; }
@media (min-width: 900px) { .dash-hours { height: clamp(140px, 20vh, 230px) !important; } }
/* a bar that started before the visible window keeps its flight number readable at the left edge */
.gt-tx { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.gt.win .gt-bar { overflow: clip; }
.gt.win .gt-tx { position: sticky; left: calc(var(--gtlab, 96px) + 6px); }
/* dialogs: a long dialog scrolls as a whole — tables, figures and history never get squeezed or cut */
.modal-body > *, .modal-body .stack > * { flex-shrink: 0; }
.modal-body .table-scroll { max-height: none; }

/* ===== Dashboard: the aircraft chart takes the room, and every aircraft fits without scrolling down ===== */
@media (min-width: 900px) {
  .board.dash.mode-dash { gap: 10px; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .board.dash.mode-dash .board-head { margin-bottom: 0; }
  /* slimmer KPI strip: number and label side by side */
  .board.dash.mode-dash .dk { padding: 7px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
  .board.dash.mode-dash .dk b { font-size: 1.55rem; grid-row: span 2; }
  .board.dash.mode-dash .dk span { font-size: 12.5px; line-height: 1.2; } .board.dash.mode-dash .dk small { font-size: 11px; line-height: 1.2; }
  .board.dash.mode-dash .dash-main { grid-template-columns: minmax(0, 1fr) clamp(260px, 20vw, 360px); gap: 10px; }
  .board.dash.mode-dash .dash-card { padding: 8px 12px; }
  .board.dash.mode-dash .dash-gantt .dash-h { margin-bottom: 4px; } .board.dash.mode-dash .dash-gantt h3 { margin: 0; }
  .board.dash.mode-dash .dash-hours { height: clamp(105px, 13vh, 160px) !important; }
  .board.dash.mode-dash .dash-dph h3 { margin: 0; }
  /* rows share the height equally — no vertical scroll */
  .board.dash .gt.fit { overflow-y: hidden; }
  .board.dash .gt.fit .gt-row { flex: 1 1 0; min-height: 0 !important; max-height: 64px; }
  .board.dash .gt.fit .gt-legend { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; margin-top: 4px; font-size: 11px; position: sticky; left: 0; }
  .gt.fit.dense .gt-lab { font-size: 12px; } .gt.fit.dense .gt-lab small { display: inline; margin-left: 5px; font-size: 10px; }
  .gt.fit.dense .gt-bar { top: 10%; bottom: 10%; font-size: 11px; padding: 0 4px; border-radius: 4px; }
  .gt.fit.dense .gt-gap em { display: none; }
  .gt.fit.xdense .gt-lab { font-size: 11px; } .gt.fit.xdense .gt-lab small { display: none; }
  .gt.fit.xdense .gt-bar { top: 6%; bottom: 6%; font-size: 10px; box-shadow: none; } .gt.fit.xdense .gt-bar small { display: none; }
  .gt.fit.xdense .gt-gap { height: 4px; top: calc(50% - 2px); } .gt.fit.xdense .gt-delay { height: 4px; }
}
/* Departures per hour: the whole day (00–23) in one compact strip, no scrolling */
.dash-hours.day { grid-auto-flow: row; grid-template-columns: repeat(24, minmax(0, 1fr)); grid-auto-columns: auto; overflow: hidden; height: 84px !important; }
.dash-hours.day > .dh-col { padding: 0 2px; }
.dash-hours.day .dh-stack { width: min(78%, 34px); gap: 1px; }
.dash-hours.day .dh-stack i { min-height: 3px; border-radius: 2px; }
.dash-hours.day .dh-stack em { display: none; }
.dash-hours.day .dh-n { font-size: 11px; min-height: 13px; margin-top: 1px; line-height: 13px; } .dash-hours.day .dh-n small { display: none; }
.dash-hours.day .dh-h { font-size: 10px; line-height: 12px; }
.dash-hours.day .dh-col.past { opacity: .5; }
@media (min-width: 900px) { .board.dash.mode-dash .dash-hours.day { height: clamp(62px, 7vh, 84px) !important; } }
.dash-dph .dash-h { margin-bottom: 2px; }

/* ===== Users and staff: one compact row per person ===== */
.ulist { padding: 0; overflow: hidden; }
.ul-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ul-bar input[type=search] { flex: 1 1 260px; max-width: 420px; }
.ul-filt button b { font-weight: 700; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: rgba(127,127,127,.16); font-size: 11px; }
.ul-filt button:disabled { opacity: .45; }
.ul-head, .ucard { display: grid; grid-template-columns: 30px minmax(220px, 1.5fr) minmax(190px, 1.2fr) minmax(140px, .9fr) minmax(220px, 2fr) auto; gap: 14px; align-items: center; padding: 10px 16px; }
.ul-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 8px; padding-bottom: 8px; background: var(--soft); border-bottom: 1px solid var(--line); }
.ucard { border-bottom: 1px solid var(--line); transition: background .15s; }
.ucard:hover { background: var(--soft); }
.ucard.inactive { opacity: .6; }
.uc-move { display: flex; flex-direction: column; gap: 2px; opacity: .35; transition: opacity .15s; } .ucard:hover .uc-move { opacity: 1; }
.uc-move .icon-btn { width: 26px; height: 20px; font-size: 10px; padding: 0; }
.uc-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.uc-who > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uc-who b { font-size: 15px; line-height: 1.2; } .uc-who small { font-size: 12.5px; color: var(--muted); }
.uc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; } .uc-tags .chip { font-size: 11px; padding: 1px 8px; }
.uc-login { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.uc-id { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.uc-nologin { font-size: 13px; color: var(--warn, #b45309); font-weight: 600; }
.uc-login .role-chip { font-size: 12px; }
.uc-duty { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; } .uc-duty small { font-size: 12px; }
.uc-lics { display: flex; flex-wrap: wrap; gap: 5px; }
.uc-lic { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.35); white-space: nowrap; }
.uc-lic small { font-weight: 500; font-size: 11px; opacity: .75; }
.uc-lic.soon { background: var(--warn-bg); border-color: var(--warn-line); } .uc-lic.soon small { color: var(--warn); opacity: 1; }
.uc-lic.expired { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.uc-lic.none { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); font-weight: 600; }
.uc-lic.more { background: var(--soft); border-color: var(--line); }
.uc-act { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.ul-empty { padding: 20px 16px; text-align: center; }
.ulist > p.small { padding: 10px 16px 14px; margin: 0; }
/* narrower screens: the row folds into a card */
@media (max-width: 1100px) {
  .ul-head { display: none; }
  .ucard { grid-template-columns: 30px 1fr auto; grid-template-areas: "mv who act" "mv login login" "mv duty duty" "mv lics lics"; gap: 6px 12px; padding: 12px 14px; }
  .uc-move { grid-area: mv; align-self: start; } .uc-who { grid-area: who; } .uc-act { grid-area: act; align-self: start; flex-direction: column; }
  .uc-login { grid-area: login; flex-direction: row; flex-wrap: wrap; align-items: center; } .uc-duty { grid-area: duty; flex-direction: row; gap: 8px; } .uc-lics { grid-area: lics; }
}
@media (max-width: 560px) { .ucard { grid-template-columns: 1fr auto; grid-template-areas: "who act" "login login" "duty duty" "lics lics"; } .uc-move { display: none; } }
/* Add / edit staff: wide, sectioned, with a jump bar */
.staff-form { gap: 14px; }
.sf-nav { position: sticky; top: -16px; z-index: 3; display: flex; gap: 6px; flex-wrap: wrap; margin: -16px -16px 0; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.sf-nav button { border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: inherit; }
.sf-nav button:hover { border-color: var(--brand); color: var(--brand); }
.sf-h { margin: 8px 0 -4px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--brand); display: flex; align-items: center; gap: 10px; scroll-margin-top: 56px; }
.sf-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.staff-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; }
.staff-form legend { font-size: 13px; font-weight: 600; padding: 0 6px; }
.sf-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-pills > p { flex: 1 1 100%; margin: 4px 0 0; }
.sf-pills label.check { margin: 0; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; gap: 6px; }
.sf-pills label.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.chip.adhoc { background: #EDE9FE; color: #6D28D9; border-color: #C4B5FD; }
:root[data-theme="dark"] .chip.adhoc { background: rgba(139,92,246,.2); color: #C4B5FD; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.adhoc { background: rgba(139,92,246,.2); color: #C4B5FD; } }

/* ===== Roster on phones: compact, so several days fit on screen without pinch-zoom ===== */
@media (max-width: 760px) {
  table.roster { --name-w: 30vw !important; --day-w: max(58px, calc((100vw - 30vw - 40px) / 4.2)); --row-h: 32px; font-size: 12px; width: calc(30vw + 7 * var(--day-w)) !important; }
  table.roster col.c-name { width: 30vw !important; }
  table.roster th, table.roster td { padding: 0 3px; }
  table.roster thead th { height: 28px; font-size: 11px; }
  table.roster tbody th.name-col { padding: 0 6px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; max-width: var(--name-w); }
  table.roster th.name-col .avatar { width: 20px !important; height: 20px !important; font-size: 8.5px !important; margin-right: 5px; }
  table.roster td.cell { letter-spacing: 0; } table.roster td.coded { letter-spacing: .02em; }
  table.roster td.split { font-size: 10.5px; }
  table.roster tfoot td, table.roster tfoot th { height: 26px; font-size: 11px; }
  table.roster tr.gap-row td.gap { font-size: 10.5px; }
  /* the toolbar of buttons takes less room above the roster */
  .roster-tools .btn, .toolbar .actions .btn { padding: 8px 10px; font-size: 13.5px; }
}

/* ===== Turnwise brand ===== */
.brand-logo { width: 56px; height: 56px; border-radius: 14px; display: block; box-shadow: 0 8px 24px rgba(181,18,62,.28); }
.brand-logo.sm { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 3px 10px rgba(181,18,62,.25); display: inline-block; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font-weight: 400; letter-spacing: -.02em; font-size: 1.15rem; }
.wordmark b { font-weight: 800; }
.wordmark { background: none; } .wordmark::first-letter { }
.brand .wordmark { font-weight: 800; } .brand .wordmark b { font-weight: 400; opacity: .78; }
h1.wordmark.big { font-size: 2.1rem; font-weight: 800; margin: 14px 0 2px; } h1.wordmark.big b { font-weight: 400; opacity: .78; }
.auth-tag { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.auth-card .brand-logo { margin-bottom: 4px; }
/* unit selector on Leave planner, Approvals, Staffing and Reports */
.unit-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.unit-pick select { min-width: 170px; padding: 7px 30px 7px 12px; border-radius: 999px; font-weight: 600; color: var(--ink); }
.unit-badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; }
.chip.unit-chip { font-size: 11px; margin-left: 4px; }
td.bad-cell { background: var(--bad-bg); color: var(--bad); font-weight: 700; }

/* ===== Flight board — modern live look ===== */
.board-head { gap: 10px 22px; }
.bh-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bh-airline { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: 7px 12px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.bh-airline img { height: 24px; width: auto; display: block; }
.bh-div { width: 1px; align-self: stretch; margin: 4px 2px; background: linear-gradient(transparent, rgba(255,255,255,.35), transparent); }
.bh-tw { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 16px rgba(225,29,72,.45); }
.bh-title h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; }
.bh-live { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; padding: 3px 9px 3px 7px; border-radius: 999px; color: #fecdd3; background: rgba(244,63,94,.16); border: 1px solid rgba(244,63,94,.4); }
.bh-live i { width: 8px; height: 8px; border-radius: 50%; background: #F43F5E; box-shadow: 0 0 0 0 rgba(244,63,94,.7); animation: bhPulse 1.6s infinite; }
@keyframes bhPulse { 0% { box-shadow: 0 0 0 0 rgba(244,63,94,.7); } 70% { box-shadow: 0 0 0 9px rgba(244,63,94,0); } 100% { box-shadow: 0 0 0 0 rgba(244,63,94,0); } }
.bh-clock { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: end; column-gap: 4px; line-height: 1; }
.bh-clock .board-clock { font-size: 2.6rem; font-weight: 800; letter-spacing: -.01em; background: linear-gradient(180deg, #FFE29A, #FFB547); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bh-sec { font-size: 1.05rem; font-weight: 700; color: #FFB547; opacity: .8; padding-bottom: 6px; font-variant-numeric: tabular-nums; }
.bh-zones { grid-column: 1 / -1; display: flex; gap: 10px; font-size: 11px; color: #94A3B8; margin-top: 4px; font-variant-numeric: tabular-nums; }
.bh-zones b { color: #CBD5E1; font-weight: 600; }
/* night theme: a slow aurora behind the glass cards */
.board.theme-night { position: relative; isolation: isolate; overflow: hidden; }
.board.theme-night::before { content: ''; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 35% at 20% 15%, rgba(225,29,72,.16), transparent 70%), radial-gradient(35% 30% at 85% 10%, rgba(34,211,238,.12), transparent 70%), radial-gradient(45% 40% at 60% 95%, rgba(99,102,241,.12), transparent 70%);
  animation: bhAurora 28s ease-in-out infinite alternate; }
@keyframes bhAurora { 0% { transform: translate3d(0,0,0) rotate(0deg); } 100% { transform: translate3d(-4%, 3%, 0) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .board.theme-night::before, .bh-live i { animation: none; } }
.board.theme-night .dash-card, .board.theme-night .dk { box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 30px rgba(0,0,0,.25); border-radius: 16px; }
.board.theme-night .dk b { background: linear-gradient(180deg, #fff, #C7D2FE); -webkit-background-clip: text; background-clip: text; color: transparent; }
.board .gt-bar { transition: transform .15s, box-shadow .15s; } .board .gt-bar:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.35); z-index: 3; }
/* other themes keep the logos readable */
.board.theme-brand .bh-zones, .board.theme-brand .bh-zones b { color: #ffe4ea; }
.board.theme-brand .bh-clock .board-clock { background: none; color: #fff; } .board.theme-brand .bh-sec { color: #ffe4ea; }
.board.theme-contrast .bh-clock .board-clock { background: none; color: #b5123e; } .board.theme-contrast .bh-sec { color: #b5123e; } .board.theme-contrast .bh-zones, .board.theme-contrast .bh-zones b { color: #333; }
.board.theme-contrast .bh-airline { box-shadow: none; border: 1px solid #ccc; } .board.theme-contrast .bh-live { color: #b5123e; } .board.theme-contrast .bh-div { background: #ccc; }
@media (max-width: 760px) { .bh-airline img { height: 18px; } .bh-tw { width: 32px; height: 32px; } .bh-clock .board-clock { font-size: 2rem; } .bh-div { display: none; } }
@media (min-width: 900px) { .board.dash.mode-dash .board-head .bh-clock .board-clock { font-size: 2.4rem; } }
label.unit-pick { flex-direction: row !important; align-items: center !important; }
label.unit-pick > span { margin: 0; }
@media (max-width: 760px) {
  .bh-tw { display: none; } .bh-brand { gap: 10px; flex-wrap: wrap; } .bh-title h2 { font-size: 1.15rem; white-space: nowrap; } .bh-title small { font-size: 11.5px; }
  .bh-airline { padding: 5px 9px; border-radius: 10px; } .bh-live { font-size: 9.5px; padding: 2px 7px 2px 6px; }
  .board-head { align-items: flex-start; } .bh-clock { margin-left: auto; }
}
/* Maldivian logo after the LIVE badge — no background, white on the dark boards, crimson on high contrast */
.bh-title h2 .bh-airline { height: 26px; width: auto; padding: 0; margin-left: 6px; background: none; border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.board.theme-contrast .bh-title h2 .bh-airline { filter: none; }
@media (max-width: 760px) { .bh-title h2 .bh-airline { height: 18px; margin-left: 2px; } }
@media (max-width: 760px) { .bh-title h2 { flex-wrap: wrap; row-gap: 4px; } }
.board.theme-contrast .bh-title h2 .bh-airline { border: 0; box-shadow: none; }
/* LIVE badge sits beside the clock */
.bh-clock { grid-template-columns: auto auto auto; }
.bh-clock .bh-live { align-self: center; margin-right: 8px; }
.bh-zones { grid-column: 2 / -1; }
/* LT tag on schedule times (Maldives local time) */
.lt-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
small.lt, small.lt-h { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: var(--muted); margin-left: 3px; vertical-align: 1px; }
small.lt-h { text-transform: none; }
.lt-conv { font-style: normal; color: var(--brand); font-weight: 700; margin-left: 1px; cursor: help; }

/* ---- unit settings, users by unit, notification clearing, base arrivals (Nov 2026) ---- */
.us-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; position: sticky; top: 54px; z-index: 5; padding: 8px 0; background: var(--bg); }
.us-nav button { border: 1px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.us-nav button:hover { border-color: var(--brand); color: var(--brand); }
.us-follow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-left: 4px solid var(--line); }
.us-follow.own { border-left-color: var(--brand); } .us-follow > div { display: flex; flex-direction: column; gap: 2px; }
.unit-note { border-left: 4px solid var(--brand); } .unit-note p { margin: 0; }
section.card[id^="us-"] { scroll-margin-top: 110px; }
.ul-unit[hidden] { display: none; }
.ul-unit-h { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; padding: 8px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 14px; }
.ul-unit-h small { margin-left: auto; font-weight: 500; } .ul-unit:first-child .ul-unit-h { margin-top: 0; }
.access-dlg fieldset.auth { grid-column: 1 / -1; border-color: var(--brand); background: var(--brand-soft2, rgba(200,16,46,.04)); }
.access-dlg fieldset.auth legend { color: var(--brand); font-weight: 700; }
.access-dlg fieldset.auth .check { display: flex; }
@media (min-width: 720px) { .access-dlg fieldset.auth { columns: 2; column-gap: 24px; } .access-dlg fieldset.auth > p { column-span: all; margin-top: 0; } .access-dlg fieldset.auth .check { break-inside: avoid; } }
/* notifications: scrolling list between a fixed head and foot; clear button bottom-left */
.notif-panel:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
.notif-panel .np-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.notif-panel .np-head, .notif-panel .np-foot { flex: 0 0 auto; position: static; }
.np-item { position: relative; padding-right: 34px; }
.np-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.np-x:hover { background: var(--soft); color: var(--ink); }
.np-alerts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; } .np-sound { margin: 0; white-space: nowrap; }
/* dashboard alerts: five in view, the rest by scrolling */
.dash-alerts { max-height: 170px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 2px; }
.dash-alerts li { height: 30px; line-height: 18px; margin: 0 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.dash-alerts li:last-child { margin-bottom: 0; }
/* turnaround: base arrivals */
.ta-sec { margin: 18px 0 8px; font-size: 15px; } .arr-chip { background: #dbeafe; color: #1e40af; } .ta-row.is-arr { border-left: 3px solid #3B82F6; }
.rp-kind { margin: 2px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.rp-tag { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--soft); color: var(--ink2); vertical-align: middle; }
.rp-tag.arr { background: #dbeafe; color: #1e40af; } .rp-tag.dep { background: #dcfce7; color: #166534; }
.os-modes { margin-bottom: 8px; } .os-why { margin: 0 0 10px; }
/* phones: the slide-out menu scrolls and stops above the bottom tab bar, so every page can be reached */
@media (max-width: 1023px) {
  .sidenav { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding-bottom: 24px; z-index: 40; }
  .sidenav > *, .sidenav .nav-links > a { flex: 0 0 auto; }
  .us-nav { top: 50px; }
}
@media (max-width: 767px) { .sidenav { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); } }
.np-alerts { flex-wrap: nowrap; gap: 8px; } .np-foot .btn.sm { padding: 4px 9px; font-size: 12px; white-space: nowrap; } .np-foot { gap: 6px; }
@media (min-width: 720px) { .access-dlg .access-grid fieldset.auth { display: block; } .access-dlg fieldset.auth .check { margin: 3px 0; } }
/* dashboard side column: the alerts box always shows five alerts; the next-60-minutes list gives way and scrolls */
.dash-side .dash-alerts-card { flex: 0 0 auto; }
.dash-side .dash-next-card { flex: 1 1 auto; min-height: 120px; overflow-y: auto; }
.dash-alerts { max-height: 166px; } .dash-alerts li { height: 29px; padding-top: 5px; padding-bottom: 5px; margin-bottom: 5px; }
/* notification footer on narrow screens: alerts + sound on top (right), "Clear notifications" bottom-left */
@media (max-width: 520px) {
  .np-foot { flex-wrap: wrap; }
  .np-foot .np-alerts { order: -1; flex: 1 1 100%; justify-content: flex-end; }
}

/* ================= Turnwise OCC — flight board dashboard (operations map) ================= */
.board.occ { --occ-bg: #070d1a; --occ-card: rgba(15, 23, 42, .78); --occ-line: rgba(148, 163, 184, .16); --occ-ink: #e2e8f0; --occ-mut: #94a3b8;
  --dom: #22d3ee; --intl: #c084fc; --okc: #22c55e; --warnc: #f59e0b; --badc: #ef4444;
  background: radial-gradient(1200px 600px at 70% -10%, #13284a 0%, transparent 60%), var(--occ-bg); color: var(--occ-ink); display: flex; flex-direction: column; gap: 10px; min-height: calc(100vh - 110px); }
body.tv-mode .board.occ { min-height: 100vh; }
.occ .bh-wx { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; margin-left: auto; margin-right: 14px; padding: 6px 12px; border: 1px solid var(--occ-line); border-radius: 12px; background: rgba(15,23,42,.6); min-width: 150px; }
.occ .bh-wx b { font-size: 20px; } .occ .bh-wx span { font-size: 12px; color: var(--occ-ink); } .occ .bh-wx small { font-size: 11px; color: var(--occ-mut); }
.occ-kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.occ-kpis .dk { background: var(--occ-card); border: 1px solid var(--occ-line); border-radius: 12px; padding: 8px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-width: 0; }
.occ-kpis .dk b { grid-row: span 2; font-size: 24px; font-variant-numeric: tabular-nums; } .occ-kpis .dk b small { font-size: 13px; color: var(--occ-mut); }
.occ-kpis .dk span { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .occ-kpis .dk small { font-size: 11px; color: var(--occ-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.occ-kpis .dk.blue b { color: #60a5fa; } .occ-kpis .dk.ok b { color: var(--okc); } .occ-kpis .dk.warn b { color: var(--warnc); } .occ-kpis .dk.bad b { color: var(--badc); }
.occ-main { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 10px; min-height: 520px; height: calc(100vh - 330px); }
body.tv-mode .occ-main { height: calc(100vh - 220px); }
.occ-map { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--occ-line); background:
  radial-gradient(circle at 50% 45%, #0f2747 0%, #071022 70%); isolation: isolate; }
.occ-map::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.06) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
.occ-canvas, .occ-mbx { position: absolute; inset: 0; } .occ-canvas.ready::before { display: none; }
.occ-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.occ-tok { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.occ-tok > * { pointer-events: auto; position: absolute; left: 0; top: 0; }
.rt { fill: none; stroke-width: 1.4; stroke-linecap: round; opacity: .35; } .rt.dom { stroke: var(--dom); } .rt.intl { stroke: var(--intl); stroke-dasharray: 6 5; }
.rt.act { opacity: .95; stroke-width: 2.2; stroke-dasharray: 7 7; animation: occFlow 1.2s linear infinite; filter: drop-shadow(0 0 4px currentColor); }
.rt.act.dom { color: var(--dom); } .rt.act.intl { color: var(--intl); }
@keyframes occFlow { to { stroke-dashoffset: -14; } }
.heat.warn { fill: url(#hgW); } .heat.bad { fill: url(#hgB); }
.ap { display: flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: var(--occ-ink); font: 700 11px/1 Inter, system-ui, sans-serif; cursor: pointer; margin: -7px 0 0 -7px; }
.ap i { width: 14px; height: 14px; border-radius: 50%; background: #0b1220; border: 3px solid var(--occ-mut); box-shadow: 0 0 0 3px rgba(0,0,0,.35); flex: none; }
.ap.ok i { border-color: var(--okc); box-shadow: 0 0 0 3px rgba(34,197,94,.18), 0 0 10px rgba(34,197,94,.5); }
.ap.warn i { border-color: var(--warnc); box-shadow: 0 0 0 3px rgba(245,158,11,.2), 0 0 12px rgba(245,158,11,.55); }
.ap.bad i { border-color: var(--badc); box-shadow: 0 0 0 3px rgba(239,68,68,.22), 0 0 14px rgba(239,68,68,.7); animation: occPulse 1.6s ease-in-out infinite; }
.ap.base i { width: 18px; height: 18px; margin: -2px; } .ap.sel i { outline: 2px solid #fff; outline-offset: 2px; }
.ap b { text-shadow: 0 1px 3px #000, 0 0 6px #000; letter-spacing: .04em; } .ap em { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 8px; background: rgba(239,68,68,.85); color: #fff; }
@keyframes occPulse { 50% { box-shadow: 0 0 0 7px rgba(239,68,68,.05), 0 0 18px rgba(239,68,68,.9); } }
.ap-res { display: flex; gap: 4px; font-size: 10px; pointer-events: none !important; } .ap-res span { background: rgba(15,23,42,.85); border: 1px solid var(--occ-line); border-radius: 6px; padding: 1px 5px; color: var(--occ-mut); white-space: nowrap; }
.ac { display: flex; align-items: flex-start; gap: 4px; cursor: pointer; margin: -10px 0 0 -10px; transition: transform 1.2s linear; }
.board.occ.replay .ac { transition: transform .25s linear; }
.ac .pl { width: 20px; height: 20px; display: grid; place-items: center; font-style: normal; font-size: 17px; color: #fde68a; text-shadow: 0 0 6px rgba(253,230,138,.8), 0 1px 2px #000; flex: none; }
.ac.ground .pl { color: #cbd5e1; font-size: 13px; text-shadow: 0 1px 2px #000; } .ac.taxi .pl { color: #fbbf24; }
.ac.intl .pl { color: #e9d5ff; text-shadow: 0 0 6px rgba(192,132,252,.9); }
.ac.ghost { opacity: .5; } .ac.ghost .pl { color: #94a3b8; text-shadow: none; }
.ac.dl .pl { color: #fca5a5; text-shadow: 0 0 8px rgba(239,68,68,.9); } .ac.div .pl { color: #f87171; }
.ac .tk { display: flex; flex-direction: column; background: rgba(2,6,23,.82); border: 1px solid var(--occ-line); border-left: 3px solid var(--dom); border-radius: 7px; padding: 3px 7px; font-size: 11px; line-height: 1.25; white-space: nowrap; backdrop-filter: blur(2px); }
.ac.intl .tk { border-left-color: var(--intl); } .ac.ls .tk { border-left-color: var(--okc); } .ac.nols .tk { border-left-color: var(--warnc); } .ac.dl .tk { border-left-color: var(--badc); }
.ac.ground .tk { opacity: .82; } .ac .tk small { color: var(--occ-mut); font-size: 10px; } .ac .tk .fig { color: #a7f3d0; }
.ac.sel { z-index: 5; } .ac.sel .tk { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.25); } .ac:hover { z-index: 6; }
.occ-tools { position: absolute; top: 10px; left: 10px; z-index: 6; display: flex; gap: 8px; align-items: flex-start; }
.occ-views { background: rgba(2,6,23,.75); border-color: var(--occ-line); } .occ-views button { color: var(--occ-ink); } .occ-views button.on { background: var(--brand); color: #fff; }
.occ-layers { background: rgba(2,6,23,.82); border: 1px solid var(--occ-line); border-radius: 10px; color: var(--occ-ink); font-size: 13px; }
.occ-layers summary { padding: 6px 12px; cursor: pointer; font-weight: 600; } .occ-layers > div { padding: 4px 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.occ-layers .check { color: var(--occ-ink); font-size: 13px; } .occ-layers .dis { opacity: .5; } .occ-layers small { color: var(--occ-mut); }
.occ-legend { position: absolute; left: 10px; bottom: 10px; z-index: 6; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 11px; color: var(--occ-ink); background: rgba(2,6,23,.75); border: 1px solid var(--occ-line); border-radius: 10px; padding: 5px 10px; max-width: calc(100% - 140px); }
.occ-legend .occ-lg { display: inline-block; width: 18px; height: 0; border: 0; border-top: 2px solid var(--dom); background: none; vertical-align: middle; margin-right: 4px; } .occ-legend .occ-lg.intl { border-top: 2px dashed var(--intl); }
.occ-legend .ring { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 2px solid; vertical-align: middle; margin-right: 4px; } .ring.ok { border-color: var(--okc); } .ring.warn { border-color: var(--warnc); } .ring.bad { border-color: var(--badc); }
.occ-legend .muted { color: var(--occ-mut); }
.occ-nomap { position: absolute; top: 10px; right: 10px; z-index: 6; max-width: 340px; font-size: 12px; background: rgba(2,6,23,.85); border: 1px solid var(--occ-line); border-radius: 10px; padding: 8px 12px; color: var(--occ-mut); } .occ-nomap a { color: #93c5fd; }
.occ-card { position: absolute; top: 56px; right: 10px; z-index: 7; width: min(420px, calc(100% - 20px)); max-height: calc(100% - 110px); overflow: auto; background: rgba(2,6,23,.93); border: 1px solid rgba(148,163,184,.3); border-radius: 14px; padding: 12px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5); color: var(--occ-ink); backdrop-filter: blur(6px); }
.occ-card header { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; padding-right: 26px; } .occ-card h4 { margin: 0; font-size: 18px; } .occ-card h4 small, .occ-card header small { color: var(--occ-mut); font-weight: 500; font-size: 12px; }
.occ-card h5 { margin: 10px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--occ-mut); }
.occ-card .oc-pl { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(34,211,238,.12); color: #fde68a; font-size: 20px; }
.occ-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(148,163,184,.15); color: var(--occ-ink); font-size: 18px; cursor: pointer; }
.oc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; } .oc-grid section { min-width: 0; }
.oc-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; } .oc-kv span { display: flex; flex-direction: column; font-size: 11px; color: var(--occ-mut); } .oc-kv b { color: var(--occ-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.oc-gh, .oc-list { list-style: none; margin: 0; padding: 0; font-size: 13px; } .oc-gh li { padding: 2px 0; } .oc-gh i { font-style: normal; display: inline-block; width: 16px; }
.oc-list li { padding: 3px 0; border-bottom: 1px solid var(--occ-line); }
.ok-t { color: var(--okc); font-style: normal; } .bad-t { color: var(--badc); font-style: normal; } .occ-card .muted, .occ-side .muted { color: var(--occ-mut); }
.oc-late { margin: 6px 0 0; color: var(--warnc); font-weight: 700; }
.oc-rot { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; } .oc-rot li { display: flex; flex-direction: column; padding: 5px 8px; border-radius: 8px; background: rgba(148,163,184,.1); border: 1px solid var(--occ-line); font-size: 12px; }
.oc-rot li.cur { border-color: var(--dom); background: rgba(34,211,238,.12); } .oc-rot li.arr { opacity: .7; } .oc-rot small { color: var(--occ-mut); font-size: 10px; }
.oc-acts { display: flex; gap: 8px; margin-top: 10px; } .occ-card .btn { background: rgba(148,163,184,.15); color: var(--occ-ink); border-color: var(--occ-line); }
.ap-dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--occ-mut); } .ap-dot.ok { border-color: var(--okc); } .ap-dot.warn { border-color: var(--warnc); } .ap-dot.bad { border-color: var(--badc); }
.occ-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.occ-panel { background: var(--occ-card); border: 1px solid var(--occ-line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; min-height: 0; }
.occ-panel.grow { flex: 1 1 0; } .occ-panel h3 { margin: 0 0 6px; font-size: 14px; } .occ-panel .count { background: rgba(148,163,184,.18); color: var(--occ-ink); }
.occ-res { display: grid; gap: 4px; font-size: 13px; } .occ-res > div { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; } .occ-res .sub { padding-left: 12px; color: var(--occ-mut); font-size: 12px; }
.occ-res b { font-variant-numeric: tabular-nums; } .rbar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(148,163,184,.18); overflow: hidden; } .rbar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #3b82f6); }
.occ-act, .occ-feed { overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; scrollbar-width: thin; }
.oa { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; background: rgba(148,163,184,.07); border: 1px solid transparent; border-radius: 10px; padding: 6px 8px; margin-bottom: 5px; color: var(--occ-ink); font: inherit; cursor: pointer; }
.oa:hover { border-color: var(--occ-line); } .oa.sel { border-color: var(--dom); background: rgba(34,211,238,.1); } .oa.dl { border-left: 3px solid var(--badc); }
.oa-t, .oa-s { display: flex; flex-direction: column; min-width: 0; } .oa-s { align-items: flex-end; } .oa small { color: var(--occ-mut); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(148,163,184,.2); }
.ph.air { background: rgba(59,130,246,.25); color: #93c5fd; } .ph.taxi { background: rgba(245,158,11,.25); color: #fcd34d; } .ph.late { background: rgba(239,68,68,.25); color: #fca5a5; }
.oa-p { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(148,163,184,.2); overflow: hidden; } .oa-p i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #fde68a); } .oa-p.big { height: 6px; margin-bottom: 6px; }
.occ-feed { list-style: none; margin: 0; padding: 0; font-size: 12px; } .occ-feed li { display: grid; grid-template-columns: 42px 18px 1fr; gap: 4px; padding: 4px 0; border-bottom: 1px solid var(--occ-line); align-items: baseline; }
.occ-feed time { color: var(--occ-mut); font-variant-numeric: tabular-nums; } .occ-feed i { font-style: normal; text-align: center; }
.occ-feed li.dep i, .occ-feed li.air i { color: #93c5fd; } .occ-feed li.arr i { color: var(--okc); } .occ-feed li.ls i { color: #a7f3d0; } .occ-feed li.warn i { color: var(--warnc); } .occ-feed li.bad { color: #fca5a5; }
.occ-time { display: flex; align-items: center; gap: 10px; background: var(--occ-card); border: 1px solid var(--occ-line); border-radius: 14px; padding: 8px 12px; }
.occ-time .btn, .occ-time select { background: rgba(148,163,184,.15); color: var(--occ-ink); border: 1px solid var(--occ-line); border-radius: 8px; min-height: 32px; }
.occ-time .btn.live-on { background: var(--badc); border-color: var(--badc); color: #fff; }
.occ-track { position: relative; flex: 1 1 auto; height: 40px; }
.occ-hist { position: absolute; left: 0; right: 0; top: 2px; height: 16px; } .occ-hist i { position: absolute; bottom: 0; width: calc(100% / 96 - 1px); background: rgba(34,211,238,.35); border-radius: 2px 2px 0 0; }
.occ-track input[type=range] { position: absolute; left: 0; right: 0; top: 10px; width: 100%; margin: 0; accent-color: #22d3ee; background: transparent; }
.occ-ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; font-size: 10px; color: var(--occ-mut); } .occ-ticks b { position: absolute; transform: translateX(-50%); font-weight: 500; }
.occ-ticks b:first-child { transform: none; } .occ-ticks b:last-child { transform: translateX(-100%); }
.occ-tlab { min-width: 118px; font-variant-numeric: tabular-nums; font-size: 15px; } .occ-tlab b { font-size: 11px; letter-spacing: .08em; padding: 2px 6px; border-radius: 6px; background: var(--badc); color: #fff; margin-right: 6px; } .occ-tlab b.rp { background: #7c3aed; }
.board.occ.replay .occ-map { box-shadow: inset 0 0 0 2px #7c3aed; }
.mapboxgl-ctrl-attrib { font-size: 10px; } .occ .mapboxgl-ctrl-logo { opacity: .6; }
@media (max-width: 1280px) { .occ-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1023px) {
  .occ-main { grid-template-columns: 1fr; height: auto; } .occ-map { height: 62vh; min-height: 380px; } .occ-side { display: grid; grid-template-columns: 1fr 1fr; } .occ-side .occ-panel:first-child { grid-column: 1 / -1; } .occ-panel.grow { max-height: 340px; }
}
@media (max-width: 640px) {
  .occ-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .occ-side { grid-template-columns: 1fr; } .occ-map { height: 70vh; }
  .occ .bh-wx { display: none; } .occ-legend { display: none; } .occ-time { flex-wrap: wrap; } .occ-track { flex-basis: 100%; order: 5; }
  .oc-grid { grid-template-columns: 1fr; } .occ-card { top: auto; bottom: 10px; max-height: 65%; }
}

.occ-time select { width: auto; flex: none; padding: 4px 8px; } .occ-time .btn { flex: none; }
.ac.ground { margin: -8px 0 0 -8px; } .ac.ground .pl { width: 16px; height: 16px; font-size: 11px; }
.ap u { text-decoration: none; font-size: 10px; padding: 1px 5px; border-radius: 8px; background: rgba(148,163,184,.25); color: #e2e8f0; }
.oc-park { display: flex; flex-wrap: wrap; gap: 5px; } .oc-park .chip { cursor: pointer; background: rgba(148,163,184,.15); color: var(--occ-ink); border: 1px solid var(--occ-line); }
