:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f0f3f7;
  --ink: #16202e;
  --ink-2: #4a5566;
  --ink-3: #7b8595;
  --line: #dde3ea;
  --line-2: #eef1f5;
  --navy: #0e2240;
  --accent: #1d5fd1;
  --accent-ink: #fff;
  --danger: #c62828;
  --amber: #b26a00;
  --mine: #fff7d6;
  --we: #f5f7fa;
  --today: #1d5fd1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d131c; --surface: #151d29; --surface-2: #1b2533; --ink: #e7ecf3; --ink-2: #b4bfcd; --ink-3: #8390a2;
    --line: #283345; --line-2: #1f2937; --navy: #0a1628; --accent: #5b92f0; --mine: #3a3417; --we: #111925;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.mono, .code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.code { color: var(--ink-3); font-size: 11px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 56px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar a { color: #c9d4e5; }
.topbar a:hover { color: #fff; text-decoration: none; }
.brand { font-weight: 700; color: #fff !important; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 15px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a, .me a { padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.nav a.on, .me a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.me { display: flex; gap: 4px; align-items: center; }
.pill { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: #dbe7ff; color: #1d4ea8; vertical-align: 1px; }
.pill.grey { background: #e4e7ec; color: #555; }
.pill.amber { background: #ffecc7; color: #7a4a00; }
.topbar .pill { background: rgba(255, 255, 255, .16); color: #fff; }

.page { max-width: 1500px; margin: 0 auto; padding: 22px 20px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- flash ---------- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: #e6f4ea; color: #1e5b2e; border: 1px solid #c5e4cf; }
.flash.err { background: #fdecec; color: #8a1f1f; border-color: #f5c8c8; }
.flash.warn { background: #fff4dc; color: #6f4a00; border-color: #f4dfaa; }

/* ---------- buttons & forms ---------- */
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; }
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.icon { width: 34px; height: 34px; justify-content: center; padding: 0; font-size: 20px; }
.small-btn { padding: 5px 10px; font-size: 12.5px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; font-weight: 500; }
.link:hover { text-decoration: underline; }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 13px; }
label .muted { font-weight: 400; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px 14px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 640px; }
.card.attention { border-color: var(--accent); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.pad { padding: 14px 18px; }
.card-head.pad { margin: 0; border-bottom: 1px solid var(--line-2); }
details.card summary { cursor: pointer; }
details.card[open] summary { margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols > .card { margin-bottom: 0; }
.cols + .card, .card + .cols { margin-top: 18px; }

/* ---------- list tables ---------- */
.table-scroll { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
table.list td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.mine td { background: var(--mine); }
table.list tr.disabled td { opacity: .55; }
table.list.compact td, table.list.compact th { padding: 6px 8px; }
.card:not(.flush) table.list th { background: transparent; }
td.notes { color: var(--ink-2); font-size: 13px; min-width: 160px; }
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.events li:last-child { border-bottom: 0; }
.events .when { font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 104px; font-size: 13px; }
.events .what { flex: 1; font-weight: 500; }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 4px 0; }
.bal { display: inline-block; min-width: 30px; text-align: center; padding: 1px 8px; border-radius: 99px; background: #e6f4ea; color: #1e5b2e; font-weight: 600; }
.bal.low { background: #fff1d0; color: #7a4a00; }
.bal.neg { background: #fdecec; color: #8a1f1f; }

/* ---------- schedule ---------- */
.sched-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav h1 { margin: 0 6px; min-width: 170px; text-align: center; }
.month-tabs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; overflow-x: auto; max-width: 100%; }
.month-tabs a { padding: 5px 9px; border-radius: 6px; color: var(--ink-2); font-weight: 500; font-size: 13px; }
.month-tabs a.on { background: var(--navy); color: #fff; }
.month-tabs a:hover { text-decoration: none; background: var(--surface-2); }
.month-tabs a.on:hover { background: var(--navy); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .type i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legend .hint { margin-left: auto; color: var(--ink-3); font-style: italic; }

.grid-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
table.sched { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; min-width: 1180px; }
table.sched th, table.sched td { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); height: 30px; padding: 0; text-align: center; font-size: 12px; }
table.sched .namecol { position: sticky; left: 0; z-index: 2; background: var(--surface); width: 150px; text-align: left; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; border-right: 1px solid var(--line); }
table.sched thead th { background: var(--surface-2); font-weight: 600; color: var(--ink-2); height: 40px; position: sticky; top: 0; }
table.sched thead th.namecol { z-index: 3; background: var(--surface-2); }
table.sched th.day span { display: block; font-size: 10px; color: var(--ink-3); font-weight: 500; }
table.sched th.day.we { color: var(--ink-3); }
table.sched th.day.today { background: var(--today); color: #fff; }
table.sched th.day.today span { color: #dbe7ff; }
table.sched td.empty.we { background: var(--we); }
table.sched td.empty.today { background: color-mix(in srgb, var(--today) 9%, transparent); }
table.sched tr.sec th, table.sched tr.sec td { background: var(--surface-2); height: 28px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); border-top: 1px solid var(--line); }
table.sched tr.sec th.namecol { background: var(--surface-2); color: var(--ink-2); }
table.sched .tot { width: 52px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
table.sched tr.sec .tot { font-size: 10px; letter-spacing: .02em; line-height: 1.05; }
table.sched tr.sec .tot small { display: block; text-transform: lowercase; font-weight: 400; }
table.sched td.tot.strong { font-weight: 700; color: var(--ink); }
table.sched tr.mine th.namecol { background: var(--mine); }
table.sched tr.mine td.empty, table.sched tr.mine td.tot { background: var(--mine); }
table.sched td.blk { font-weight: 700; padding: 3px 2px; }
table.sched td.blk span { display: flex; align-items: center; justify-content: center; height: 100%; border-radius: 5px; overflow: hidden; white-space: nowrap; }
.sw-flight { background: #00B050; } .sw-training { background: #0070C0; } .sw-pto { background: #E02424; } .sw-call { background: #FFE600; } .sw-mx { background: #FFC000; } .sw-away { background: #7030A0; }
.t-flight span   { background: #00B050; color: #fff; }
.t-training span { background: #0070C0; color: #fff; }
.t-pto span      { background: #E02424; color: #fff; }
.t-call span     { background: #FFE600; color: #1b1b1b; }
.t-mx span       { background: #FFC000; color: #1b1b1b; }
.t-away span     { background: #7030A0; color: #fff; }
table.sched td.cont-l span { border-top-left-radius: 0; border-bottom-left-radius: 0; }
table.sched td.cont-r span { border-top-right-radius: 0; border-bottom-right-radius: 0; }
table.sched.editable td.empty { cursor: cell; }
table.sched.editable td.empty:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
table.sched td.blk { cursor: pointer; }
table.sched td.blk:hover span, table.sched td.blk:focus-visible span { outline: 2px solid var(--ink); outline-offset: -1px; }
table.sched td.blk:focus { outline: none; }

/* ---------- dialogs ---------- */
.dlg { border: 0; border-radius: 14px; padding: 22px; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dlg::backdrop { background: rgba(10, 18, 30, .45); }
.dlg-actions { display: flex; gap: 8px; align-items: center; }
.dlg-actions .push { margin-left: auto; }
fieldset.types { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
fieldset.types legend { font-weight: 500; font-size: 13px; margin-bottom: 6px; padding: 0; }
.type { flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-weight: 400; cursor: pointer; }
.type input { width: auto; margin: 0; }
.type:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ---------- users ---------- */
.temp-pw { display: flex; align-items: center; gap: 16px; background: #fff8e1; border: 1px solid #f1d48a; color: #4d3700; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; flex-wrap: wrap; }
.temp-pw > div { flex: 1; min-width: 220px; }
.temp-pw p { margin: 2px 0 0; }
.pw { font-size: 18px; background: #fff; border: 1px dashed #d8b24c; padding: 6px 12px; border-radius: 6px; letter-spacing: .06em; user-select: all; color: #222; }
.row-form { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.row-form:last-of-type { border-bottom: 0; }
.row-form p { margin: 2px 0 0; }

/* ---------- roster ---------- */
.roster-grid { display: grid; grid-template-columns: 130px minmax(120px, 1fr) 110px 80px 60px 60px 150px; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.roster-grid.head { background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--line); }
.roster-grid input, .roster-grid select { padding: 6px 8px; }
.roster-grid .acts { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- auth ---------- */
body.bare { background: radial-gradient(1200px 600px at 20% -10%, #1d3b6b 0, var(--navy) 55%); min-height: 100vh; }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth .flash { width: min(400px, 100%); }
.auth-card { background: var(--surface); border-radius: 16px; padding: 30px; width: min(400px, 100%); box-shadow: 0 24px 70px rgba(0, 0, 0, .35); }
.auth-card.wide { width: min(620px, 100%); }
.auth-card h1 { margin-top: 16px; }
.auth-card .btn.primary { justify-content: center; padding: 10px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .topbar { gap: 12px; padding: 0 12px; }
  .roster-grid { grid-template-columns: 1fr 1fr; }
  .roster-grid.head { display: none; }
  .roster-grid .acts { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .page { padding: 16px 16px 48px; }
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 6px 10px; }
  .nav { order: 3; flex-basis: 100%; flex-wrap: wrap; overflow: visible; }
  .nav a { padding: 5px 9px; }
  .me { margin-left: auto; }
  .grid2, .grid3, fieldset.types { grid-template-columns: 1fr; }
  .month-nav h1 { min-width: 0; font-size: 19px; }
  .legend .hint { display: none; }
  table.sched .namecol { width: 104px; padding: 0 6px; }
}

/* ---------- block details card ---------- */
.dlg.info { width: min(460px, calc(100vw - 32px)); }
.info-head { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 8px 0; }
.info-type { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.info-type.t-flight { background: #00B050; color: #fff; } .info-type.t-training { background: #0070C0; color: #fff; }
.info-type.t-pto { background: #E02424; color: #fff; } .info-type.t-call { background: #FFE600; color: #1b1b1b; }
.info-type.t-mx { background: #FFC000; color: #1b1b1b; } .info-type.t-away { background: #7030A0; color: #fff; }
.info-dates { margin: 2px 0 14px; }
.trip-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); }
.trip-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.trip-tail { font-weight: 700; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.trip-card.event .trip-tail { font-family: inherit; }
.trip-dates { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.trip-route { font-size: 15px; font-weight: 600; margin: 6px 0 8px; letter-spacing: .01em; word-break: break-word; }
.trip-crew { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 13px; }
.trip-crew dt { color: var(--ink-3); font-weight: 600; font-size: 11.5px; letter-spacing: .04em; padding-top: 1px; }
.trip-crew dd { margin: 0; }
.trip-notes { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.dlg .dlg-actions { margin-top: 14px; }

/* ---------- reports ---------- */
.report-form { display: flex; flex-direction: column; gap: 14px; }
.rf-grid { display: grid; grid-template-columns: 170px 170px minmax(200px, 260px) 1fr; gap: 12px 16px; align-items: end; }
.rf-quick > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.chip { display: inline-block; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.rf-inc { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; border-top: 1px solid var(--line-2); padding-top: 12px; }
.rf-inc .push { flex: 1; }
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); }
.report-head { display: flex; align-items: center; gap: 22px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); margin-bottom: 22px; }
.report-logo { height: 72px; width: auto; }
.report-head h1 { font-size: 22px; margin: 0 0 4px; }
.report-head p { margin: 0 0 2px; }
.r-sec { margin-bottom: 26px; break-inside: auto; }
.r-sec h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.r-table { margin-bottom: 12px; border: 1px solid var(--line-2); }
.r-table td.strong { font-weight: 700; }
.r-person { break-inside: avoid; margin-bottom: 14px; }
.r-person h3 { font-size: 14px; margin: 0 0 6px; }
.r-dates { width: 210px; }
.r-type { display: flex; align-items: center; gap: 8px; }
.r-type i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
@media (max-width: 900px) { .rf-grid { grid-template-columns: 1fr 1fr; } .rf-quick { grid-column: 1 / -1; } .report { padding: 18px; } }

/* ---------- print ---------- */
@media print {
  @page { size: landscape; margin: 10mm; }
  :root { color-scheme: light; --surface: #fff; --surface-2: #f3f4f6; --ink: #111; --ink-2: #333; --ink-3: #666; --line: #bbb; --line-2: #ddd; --mine: #fff7d6; }
  body { background: #fff; font-size: 11px; }
  .topbar, .month-tabs, .month-nav .btn, .btn, .link, .legend .hint, dialog, .no-print, .flash { display: none !important; }
  .page { padding: 0; max-width: none; }
  .grid-wrap, .card, .report { box-shadow: none; border: 0; padding: 0; }
  .grid-wrap { overflow: visible; }
  table.sched { min-width: 0; }
  table.list th { background: #f3f4f6 !important; }
  .report-head { margin-bottom: 14px; }
  .r-table tr { break-inside: avoid; }
  .r-sec h2, .r-person h3 { break-after: avoid; }
  table.list td, table.list td.notes, .mono { font-size: 10.5px; }
  thead { display: table-header-group; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- logo & admin password form ---------- */
.brand-logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.auth-logo { height: 88px; width: auto; max-width: 260px; object-fit: contain; }
.set-pw { padding-bottom: 16px; border-bottom: 1px solid var(--line-2); gap: 10px; }
.set-pw p { margin: 2px 0 0; }

.tabs-wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.year-tabs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.year-tabs a { padding: 5px 10px; border-radius: 6px; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.year-tabs a.on { background: var(--accent); color: #fff; }
.year-tabs a:hover { text-decoration: none; background: var(--surface-2); }
.year-tabs a.on:hover { background: var(--accent); }

/* ---------- calendar sync ---------- */
.cal-card { margin-top: 18px; max-width: 760px; }
.cal-card fieldset.scope { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.cal-card fieldset.scope legend { font-weight: 500; font-size: 13px; margin-bottom: 6px; padding: 0; }
.cal-card fieldset.scope label { align-items: flex-start; }
.cal-card fieldset.scope input { margin-top: 3px; }
.cal-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 14px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--ink-2); }
.cal-card details { margin: 12px 0; }
.cal-card details ul { margin-top: 8px; }
.cal-danger { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }

@media (max-width: 640px) { .cal-btn { font-size: 0; padding: 5px 9px; } .cal-btn::first-letter { font-size: 14px; } }

/* ---------- training attendees ---------- */
fieldset.crew-pick { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 12px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
fieldset.crew-pick legend { font-weight: 500; font-size: 13px; padding: 0 4px; }
.crew-group { display: flex; flex-direction: column; gap: 4px; }
label.pick { flex-direction: row; align-items: center; gap: 7px; font-weight: 400; cursor: pointer; }
label.pick input { width: auto; margin: 0; }
.ev-crew { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
@media (max-width: 640px) { fieldset.crew-pick { grid-template-columns: 1fr; } }

/* ---------- Media Admin Library ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 600; color: var(--accent); margin: 0 0 4px; }
.media-head { align-items: flex-end; }
.media-head p { margin: 2px 0 0; max-width: 640px; }
.media-status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.media-status .saved { color: #1e7a3a; }
.media-status .err { color: var(--danger); font-weight: 600; }
.m-tabs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; margin-bottom: 16px; width: max-content; max-width: 100%; overflow-x: auto; }
.m-tabs button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 13px; color: var(--ink-2); padding: 7px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.m-tabs button.on { background: var(--navy); color: #fff; }
.m-tailcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.m-tailcard { margin: 0; padding: 14px 16px; }
.m-tail { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; font-size: 15px; }
.m-count { font-size: 12px; color: var(--accent); font-weight: 600; margin: 2px 0 6px; }
.m-names { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.m-search { width: 220px; padding: 6px 10px; }
.kind { display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; border: 1px solid transparent; vertical-align: 1px; font-family: inherit; }
.kind.master { background: #fdecec; color: #9b2c2c; border-color: #f3c6c6; }
.kind.individual { background: #e6f4ea; color: #1e6b36; border-color: #c5e4cf; }
button.kind { cursor: pointer; }
.tailpill { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-3); background: var(--surface); margin: 2px 4px 2px 0; }
.tailpill.on { background: #e8f0fe; color: #1d4ea8; border-color: #b9cdf5; font-weight: 600; }
.tailpill.btnlike { cursor: pointer; }
.tailpill.btnlike:hover { border-color: var(--accent); }
.m-edit td { vertical-align: middle; }
.m-edit input, .m-edit select, .m-edit textarea { padding: 6px 8px; font-size: 13px; }
.m-edit textarea { min-height: 34px; resize: vertical; font-family: inherit; }
.m-namecell { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.m-tails { display: flex; flex-wrap: wrap; min-width: 200px; }
.m-edit select { min-width: 220px; }
.m-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.m-toolbar input { max-width: 320px; }
.m-vpncard { padding: 14px 16px; }
.m-vpnhead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.m-vpnhead input { max-width: 260px; }
.m-vpnlabel { font-weight: 600; }
.m-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.m-slot { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; background: var(--surface-2); min-height: 34px; font-size: 13px; }
.m-slot.filled { border-color: #b9cdf5; background: var(--surface); }
.m-slot input { border: 0; background: transparent; padding: 3px 0; }
.m-slot input:focus { outline: none; }
.m-slotnum { font-size: 11px; color: var(--ink-3); width: 18px; flex: none; }
.m-footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.m-conflict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .m-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .media-status { align-items: flex-start; } }

/* ---------- two-step sign-in ---------- */
.code-input { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 24px; letter-spacing: .25em; text-align: center; padding: 10px; }
.auth-card .help { margin-top: 14px; }
.auth-card .help p { margin: 6px 0; }
.steps2fa { padding-left: 20px; margin: 18px 0; display: flex; flex-direction: column; gap: 16px; }
.steps2fa li { padding-left: 4px; }
.qr-wrap { display: flex; gap: 18px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.qr { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-manual { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.secret { font-size: 15px; letter-spacing: .06em; background: var(--surface-2); border: 1px dashed var(--line); padding: 8px 10px; border-radius: 6px; word-break: break-all; }
.verify-form { margin-top: 10px; max-width: 320px; }
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; margin: 14px 0 10px; font-size: 16px; text-align: center; letter-spacing: .05em; }
.row-btns { display: flex; gap: 8px; margin-bottom: 16px; }
.btn.full { width: 100%; justify-content: center; }
.twostep-status { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
@media print { .auth-card .btn, .auth-card .row-btns { display: none !important; } body.bare { background: #fff; } }

/* ---------- BB SecOps ---------- */
.so-section { margin-bottom: 28px; }
.so-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.so-head h2 { margin: 0; font-size: 16px; }
.so-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.so-loading { color: var(--ink-3); }
.so-admin { margin-top: 8px; }
.so-admin form { margin-top: 8px; align-items: center; }
.so-sources { margin-top: 30px; }
.so-wx { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wx-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wx-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wx-id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; font-size: 20px; }
.cat { font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); letter-spacing: .04em; }
.cat-VFR { background: #16a34a; color: #fff; } .cat-MVFR { background: #2563eb; color: #fff; }
.cat-IFR { background: #dc2626; color: #fff; } .cat-LIFR { background: #c026d3; color: #fff; }
.wx-rows { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: 13.5px; }
.wx-rows dt { color: var(--ink-3); font-size: 12px; font-weight: 600; padding-top: 1px; }
.wx-rows dd { margin: 0; font-weight: 500; }
.faa { font-size: 12.5px; padding: 7px 10px; border-radius: 7px; }
.faa.ok { background: #e6f4ea; color: #1e5b2e; }
.faa.alert { background: #fff4dc; color: #6f4a00; }
.wx-raw { font-size: 11.5px; color: var(--ink-2); background: var(--surface-2); padding: 6px 8px; border-radius: 6px; word-break: break-word; }
.wx-taf summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.wx-taf .mono { white-space: pre-wrap; font-size: 11.5px; margin-top: 6px; color: var(--ink-2); }
.so-search { display: flex; gap: 8px; margin-bottom: 14px; max-width: 620px; }
.so-search input { font-size: 15px; padding: 10px 12px; }
.res-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.res-head h2 { margin: 0; font-size: 20px; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.res-card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.res-src { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ink-3); }
.res-meta div { margin-top: 2px; }
.uk-change { margin: 0; background: var(--surface-2); padding: 8px 10px; border-radius: 7px; }
.adv-body { font-size: 13.5px; line-height: 1.55; max-height: 420px; overflow: auto; padding-right: 6px; }
.adv-body p { margin: 0 0 8px; } .adv-body ul { margin: 0 0 8px; padding-left: 20px; } .adv-body h2, .adv-body h3 { font-size: 14px; margin: 12px 0 6px; }
.uk-parts details { border-top: 1px solid var(--line-2); padding: 8px 0; }
.uk-parts summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.uk-parts .adv-body { margin-top: 8px; }
.lvl { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 7px; align-self: flex-start; }
.lvl-0 { background: var(--surface-2); color: var(--ink-3); }
.lvl-1 { background: #e6f4ea; color: #1e6b36; } .lvl-2 { background: #fff4cc; color: #7a5a00; }
.lvl-3 { background: #ffe1c7; color: #9a3f00; } .lvl-4 { background: #fdd9d9; color: #9b1c1c; }
.so-watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.watch-card { margin: 0; display: flex; flex-direction: column; gap: 8px; border-left: 5px solid var(--line); }
.lvlborder-1 { border-left-color: #22a052; } .lvlborder-2 { border-left-color: #e0b400; } .lvlborder-3 { border-left-color: #f07a1a; } .lvlborder-4 { border-left-color: #dc2626; }
.watch-top h3 { margin: 0; font-size: 16px; }
.watch-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wlabel { width: 22px; font-weight: 700; }
.watch-note { font-size: 12.5px; background: #fff4dc; color: #6f4a00; border-radius: 7px; padding: 7px 10px; }
.watch-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
@media (max-width: 900px) { .res-grid { grid-template-columns: 1fr; } }

/* ---------- Media passwords ---------- */
.pwv { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.pw-dots { font-size: 13px; letter-spacing: .05em; min-width: 70px; word-break: break-all; }
.pwe { display: flex; flex-direction: column; gap: 6px; min-width: 210px; }
.pwe-row { display: flex; gap: 6px; align-items: center; }
.pwe-row input { min-width: 0; }
.danger-link { color: var(--danger); }
.m-vpnpw { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.m-vpncard textarea { margin-bottom: 10px; }
