/* ATS+ — Fluent 2 Compact Operations (Light). BUILD 001. */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SF Mono", ui-monospace, Menlo, monospace;
  --bg: #f5f5f5; --surface: #ffffff; --surface-2: #fafafa; --surface-3: #f0f0f0;
  --stroke: #e0e0e0; --stroke-2: #d1d1d1; --stroke-strong: #8a8a8a;
  --text: #242424; --text-2: #424242; --text-3: #616161;
  --brand: #0f6cbd; --brand-hover: #115ea3; --brand-pressed: #0c3b5e; --brand-bg: #ebf3fc; --brand-stroke: #b4d6fa;
  --ok: #0e700e; --ok-bg: #f1faf1; --ok-stroke: #9fd89f;
  --warn: #835b00; --warn-bg: #fff9e5; --warn-stroke: #f2d17f;
  --danger: #b10e1c; --danger-bg: #fdf3f4; --danger-stroke: #eeacb2;
  --phone: #00666d; --phone-bg: #e8f6f7; --phone-stroke: #86cdd2;
  --r: 4px; --r-lg: 6px;
  --shadow: 0 0 2px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.10);
  --header-h: 52px; --side-w: 232px; --side-mini: 52px;
  --gap: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 20px; color: var(--text); background: var(--bg); }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 2px; }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--text-3); }
.small { font-size: 12px; line-height: 16px; }
.strong { font-weight: 600; }
.mono { font-family: var(--mono); }
.upper { text-transform: uppercase; }
.upper::placeholder { text-transform: none; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; }
.skip-link:focus { left: 8px; }
.inline-form { display: inline; margin: 0; }

/* Header */
.app-header { position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 30; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--stroke); }
.brand { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--text); }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-suite { font-size: 11px; font-weight: 600; color: var(--text-3); border: 1px solid var(--stroke-2); border-radius: 3px; padding: 0 4px; line-height: 16px; }
.ctx-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--brand-bg); color: var(--brand-pressed); font-size: 13px; }
.ctx-chip .ic { width: 16px; height: 16px; }
.header-spacer { flex: 1; }
.utc-clock { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.utc-clock .ic { width: 16px; height: 16px; color: var(--text-3); }
.user-box { display: flex; flex-direction: column; line-height: 16px; text-align: right; }
.user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11px; color: var(--text-3); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--text-2); cursor: pointer; transition: background-color .1s; }
.icon-btn:hover { background: var(--surface-3); }
.icon-btn:active { background: var(--stroke); }

/* Sidebar */
.sidebar { position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--side-w); z-index: 20; background: var(--surface-2); border-right: 1px solid var(--stroke); padding: 8px; display: flex; flex-direction: column; justify-content: space-between; transition: width .15s ease, transform .18s ease; overflow: hidden; }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: var(--r); color: var(--text-2); text-decoration: none; white-space: nowrap; position: relative; transition: background-color .1s; }
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.nav-link.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--brand); }
.nav-link.active .ic { color: var(--brand); }
.sidebar-foot { font-size: 11px; color: var(--text-3); padding: 8px 10px; }
.nav-overlay { display: none; }
.main { margin-left: var(--side-w); padding: calc(var(--header-h) + 20px) 24px 32px; max-width: 1600px; transition: margin-left .15s ease; }
.main:focus { outline: none; }
.nav-toggle { display: none; }

.sidebar-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; }
.side-collapse { flex: none; color: var(--text-2); }
.side-collapse:hover { color: var(--text); }
@media (min-width: 1024px) {
  body.nav-collapsed .sidebar-bottom { justify-content: center; }
  body.nav-collapsed .sidebar { width: var(--side-mini); }
  body.nav-collapsed .nav-label { display: none; }
  body.nav-collapsed .main { margin-left: var(--side-mini); }
}
@media (max-width: 1023.98px) {
  .nav-toggle { display: inline-grid; }
  .side-collapse { display: none; }
  .sidebar { transform: translateX(-100%); box-shadow: none; width: 272px; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
  body.nav-open .nav-overlay { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.28); z-index: 15; }
  .main { margin-left: 0; padding: calc(var(--header-h) + 16px) 16px 32px; }
}

/* Page */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-title { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.01em; }
.page-sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.back-link { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; text-decoration: none; margin-bottom: 4px; color: var(--text-3); }
.back-link .ic { width: 16px; height: 16px; }
.back-link:hover { color: var(--brand); }
.panel { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 20px; font-weight: 600; margin-bottom: 12px; }
.panel-head .panel-title { margin-bottom: 0; }
.panel-title .ic { color: var(--text-3); }
.count-pill { min-width: 24px; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--surface-3); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.empty { display: flex; align-items: center; gap: 8px; padding: 16px; color: var(--text-3); background: var(--surface-2); border: 1px dashed var(--stroke-2); border-radius: var(--r); }

/* Messages */
.msg { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r); border: 1px solid; margin-bottom: 12px; }
.msg-success { background: var(--ok-bg); border-color: var(--ok-stroke); color: var(--ok); }
.msg-error { background: var(--danger-bg); border-color: var(--danger-stroke); color: var(--danger); }
.msg-info { background: var(--brand-bg); border-color: var(--brand-stroke); color: var(--brand-pressed); }
.poll-banner { position: sticky; top: calc(var(--header-h) + 8px); z-index: 10; display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 12px; background: var(--brand-bg); border: 1px solid var(--brand-stroke); border-radius: var(--r); color: var(--brand-pressed); }
.poll-banner[hidden] { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 5px 12px; border: 1px solid var(--stroke-2); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .1s, border-color .1s; white-space: nowrap; }
.btn:hover { background: var(--surface-3); border-color: #c7c7c7; color: var(--text); }
.btn:active { background: var(--stroke); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn-primary:active { background: var(--brand-pressed); }
.btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-success:hover { background: #0b5a0b; border-color: #0b5a0b; color: #fff; }
.btn-danger { background: var(--surface); border-color: var(--danger-stroke); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-warning { background: var(--warn-bg); border-color: var(--warn-stroke); color: var(--warn); }
.btn-warning:hover { background: #fff1c2; color: var(--warn); }
.btn-subtle { border-color: transparent; background: transparent; color: var(--brand); }
.btn-subtle:hover { background: var(--brand-bg); border-color: transparent; color: var(--brand-hover); }
.btn-sm { min-height: 28px; padding: 3px 8px; font-size: 13px; }
.btn-block { width: 100%; }

/* Badges & tags */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; border-radius: 12px; border: 1px solid; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge .ic { width: 14px; height: 14px; stroke-width: 2; }
.badge-draft, .badge-closed { background: var(--surface-3); border-color: var(--stroke-2); color: var(--text-2); }
.badge-submitted { background: var(--brand-bg); border-color: var(--brand-stroke); color: var(--brand-pressed); }
.badge-enav-standby { background: var(--warn-bg); border-color: var(--warn-stroke); color: var(--warn); }
.badge-approved { background: var(--ok-bg); border-color: var(--ok-stroke); color: var(--ok); }
.badge-rejected { background: var(--danger-bg); border-color: var(--danger-stroke); color: var(--danger); }
.badge-approved-by-phone { background: var(--phone-bg); border-color: var(--phone-stroke); color: var(--phone); }
.tag { display: inline-block; padding: 0 6px; border-radius: 3px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; line-height: 18px; }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.icao { font-family: var(--mono); font-weight: 700; letter-spacing: .02em; }

/* Times */
.tz { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.tz-z { font-weight: 600; font-variant-numeric: tabular-nums; }
.tz-lt { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Dashboard */
.dash-top { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 16px; }
.dash-top .stat-row { margin-bottom: 0; }
.airport-strip { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 0; }
.airport-strip .panel { margin-bottom: 0; }
.airport-ctx-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.airport-ctx-head .icao { font-size: 18px; color: var(--brand-pressed); }
.stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--stroke); border-left: 3px solid var(--stroke-2); border-radius: var(--r-lg); text-decoration: none; color: var(--text); transition: background-color .1s; }
.stat:hover { background: var(--surface-2); color: var(--text); }
.stat-num { font-size: 24px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--text-3); }
.stat-submitted { border-left-color: var(--brand); }
.stat-enav-standby { border-left-color: #c49000; }
.stat-approved { border-left-color: var(--ok); }
.stat-approved-by-phone { border-left-color: var(--phone); }
.stat-rejected { border-left-color: var(--danger); }

/* Key-values */
.kv { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.kv > div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--surface-3); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--text-3); font-size: 13px; }
.kv dd { margin: 0; }
.kv-inline > div { grid-template-columns: 1fr auto; padding: 6px 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.data-table td { padding: 8px 10px; height: 42px; border-bottom: 1px solid var(--surface-3); vertical-align: middle; }
.data-table tbody tr { transition: background-color .08s; }
.data-table tbody tr[data-href] { cursor: pointer; }
.data-table tbody tr:hover { background: var(--surface-2); }
.ref-link { font-family: var(--mono); font-weight: 600; text-decoration: none; }
.ref-link:hover { text-decoration: underline; }
.only-mobile { display: none !important; }
.case-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.case-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--stroke); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; color: var(--text); min-height: 44px; }
.case-card:active { background: var(--surface-2); }
.case-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.case-card-top .ref { font-weight: 600; font-size: 13px; }
.case-card-times { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.case-card-times .ic { width: 14px; height: 14px; color: var(--text-3); }

/* Forms */
.form-stack { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.form-grid .panel { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field { display: grid; gap: 4px; margin: 0 0 12px; min-width: 0; border: 0; padding: 0; }
.form-stack .field, .form-row .field { margin-bottom: 0; }
.field label, .field legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0; }
.optional { font-weight: 400; color: var(--text-3); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input:not([type]), select, textarea {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--stroke-2); border-bottom-color: var(--stroke-strong); border-radius: var(--r); transition: border-color .1s;
}
textarea { resize: vertical; min-height: 60px; }
input:hover, select:hover, textarea:hover { border-color: #b3b3b3; border-bottom-color: var(--text-2); }
input:focus, select:focus, textarea:focus { outline: none; border-bottom: 2px solid var(--brand); padding-bottom: 5px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 0; }
[aria-invalid=true] { border-color: var(--danger) !important; }
.field-error { display: flex; align-items: center; gap: 4px; color: var(--danger); font-size: 12px; line-height: 16px; }
.field-error .ic { width: 14px; height: 14px; }
.field-error[hidden] { display: none; }
.wait-age { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--warn); }
.wait-since { font-size: 11px; }
.rev-notice { margin: 4px 0 8px; font-size: 13px; }
.event-tree { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--stroke); display: grid; gap: 10px; }
.event-item { position: relative; padding: 10px 12px; border: 1px solid var(--stroke); border-radius: var(--r-md, 6px); background: var(--surface); }
.event-item::before { content: ''; position: absolute; left: -16px; top: 18px; width: 14px; border-top: 2px solid var(--stroke); }
.event-cancelled { opacity: .65; }
.event-cancelled .event-end strong { text-decoration: line-through; }
.event-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-meta, .event-end { margin-top: 2px; }
.event-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: flex-start; }
.event-rev-list { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; }
.ts-authorized .ts-z { color: var(--success, #0e700e); }
.suggest-panel { margin-bottom: 16px; }
.suggest-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.suggest-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.hint { font-size: 12px; color: var(--text-3); display: flex; gap: 4px; align-items: center; min-height: 16px; }
.hint .ic { width: 14px; height: 14px; }
.readonly-value { min-height: 36px; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--surface-3); border-radius: var(--r); }
.input-time { max-width: 180px; font-size: 16px; }
.segmented { display: inline-flex; border: 1px solid var(--stroke-2); border-radius: var(--r); overflow: hidden; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; font-weight: 600; font-size: 13px; color: var(--text-2); border-right: 1px solid var(--stroke-2); }
.seg-opt:last-child span { border-right: 0; }
.seg-opt input:checked + span { background: var(--brand); color: #fff; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--text); outline-offset: -3px; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400 !important; min-height: 32px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.field-check { align-content: end; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.schedule-box { margin-top: 4px; padding: 12px; border-radius: var(--r); background: var(--brand-bg); border: 1px solid var(--brand-stroke); }
.schedule-main { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.schedule-label { font-size: 13px; color: var(--brand-pressed); font-weight: 600; }
.schedule-close .tz-z { font-size: 22px; line-height: 28px; }
.schedule-meta { margin-top: 4px; color: var(--text-2); }
.schedule-missing { display: flex; align-items: center; gap: 6px; color: var(--danger); }
.end-ok { color: var(--ok); font-weight: 600; }
.end-bad { color: var(--danger); font-weight: 600; }

/* Case detail */
.case-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.case-head .back-link { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.detail-side { position: sticky; top: calc(var(--header-h) + 16px); }
.time-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ts-block { display: grid; gap: 2px; min-width: 150px; }
.ts-label { font-size: 12px; color: var(--text-3); font-weight: 600; }
.ts-z { font-size: 28px; line-height: 34px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ts-lt { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ts-requested .ts-z { color: var(--brand-pressed); }
.ts-arrow { display: flex; flex-direction: column; align-items: center; color: var(--text-3); }
.ts-delta { font-size: 12px; font-weight: 600; color: var(--text-2); }
.action-panel .form-stack { margin-top: 12px; }
.enav-panel { border-top: 3px solid var(--brand); }
.decision-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 4px 0 8px; }
.decision-buttons .btn { min-height: 40px; }
.disclosure > summary { list-style: none; cursor: pointer; }
.disclosure > summary::-webkit-details-marker { display: none; }
details.panel > summary.panel-title { margin-bottom: 0; }
details.panel[open] > summary.panel-title { margin-bottom: 12px; }
.phone-callout { display: flex; gap: 10px; margin-top: 12px; padding: 12px; border-radius: var(--r); background: var(--phone-bg); border: 1px solid var(--phone-stroke); color: var(--phone); }
.phone-callout p { color: var(--text-2); margin-top: 2px; }
.phone-callout .ack-ok, .phone-callout .ack-pending { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 600; }
.phone-callout .ack-ok { color: var(--ok); }
.phone-callout .ack-pending { color: var(--warn); }
.phone-callout .ic { flex: none; }
.ack-ok .ic, .ack-pending .ic { width: 14px; height: 14px; }
.tl-phone-approval-acknowledged .tl-dot { background: var(--ok-bg); color: var(--ok); border-color: var(--phone-stroke); }
.tl-phone-approval-acknowledged .tl-title { color: var(--phone); }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.btn-subtle-danger { color: var(--danger); }
.btn-subtle-danger:hover { background: var(--danger-bg); color: var(--danger); }
.poll-note { display: flex; align-items: center; gap: 6px; }
.poll-note .ic { width: 14px; height: 14px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 92px 28px 1fr; gap: 10px; position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: 92px; margin-left: 23px; top: 28px; bottom: 0; width: 2px; background: var(--stroke); }
.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 0; }
.tl-time { display: grid; text-align: right; line-height: 18px; }
.tl-date { font-size: 11px; color: var(--text-3); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--stroke-2); position: relative; z-index: 1; }
.tl-dot .ic { width: 14px; height: 14px; stroke-width: 2; }
.tl-title { font-weight: 600; }
.tl-actor { color: var(--text-2); }
.tl-note { margin-top: 6px; padding: 6px 10px; background: var(--surface-2); border-left: 2px solid var(--stroke-2); border-radius: 2px; }
.tl-case-submitted .tl-dot { background: var(--brand-bg); color: var(--brand); border-color: var(--brand-stroke); }
.tl-enav-standby .tl-dot { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-stroke); }
.tl-enav-approved .tl-dot { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-stroke); }
.tl-enav-rejected .tl-dot { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-stroke); }
.tl-phone-approval-recorded .tl-dot { background: var(--phone); color: #fff; border-color: var(--phone); }
.tl-phone-approval-recorded .tl-body { padding: 8px 10px; margin-top: -4px; border: 1px solid var(--phone-stroke); background: var(--phone-bg); border-radius: var(--r); }
.tl-phone-approval-recorded .tl-title { color: var(--phone); }
.tl-phone { margin: 6px 0 0; display: grid; gap: 2px; }
.tl-phone > div { display: grid; grid-template-columns: 170px 1fr; gap: 8px; }
.tl-phone dt { color: var(--text-3); }
.tl-phone dd { margin: 0; }

/* Operational reference */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.oref { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oref-icao { font-family: var(--mono); font-weight: 700; color: var(--text-2); }
.oref-id { font-family: var(--mono); font-weight: 700; color: var(--text); }
.oref-date { color: var(--text-3); font-size: 12px; }
.oref-sep { color: var(--stroke-strong); }
.rev-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid var(--stroke-2); border-radius: 3px; font-size: 11px; line-height: 16px; font-weight: 600; color: var(--text-2); background: var(--surface); }
.rev-tag-lg { font-size: 12px; line-height: 20px; padding: 0 8px; margin-left: 10px; }
.ref-card { flex: 1 1 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding: 8px 16px; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-lg); }
.ref-card-main { display: grid; gap: 2px; }
.ref-card-meta { display: grid; gap: 2px; padding-left: 24px; border-left: 1px solid var(--stroke); }
.ref-card-meta .page-sub { margin: 0; }
.ref-card-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.ref-card-parts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ref-chip { font-family: var(--mono); font-size: 20px; line-height: 28px; font-weight: 700; padding: 2px 10px; border-radius: 4px; }
.ref-chip-icao { background: #efedfa; color: #3b2f8f; }
.ref-chip-id { background: #e9f5ec; color: #0b5a2a; }
.ref-chip-date { background: transparent; color: var(--text); }
.ref-dash { color: var(--text-3); font-size: 18px; }
.ref-card-full { display: flex; align-items: center; gap: 8px; }
.ref-card-full code { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
/* Diff old → new */
.diff-list { display: grid; gap: 6px; margin: 4px 0 10px; }
.diff { display: grid; grid-template-columns: 140px 1fr; gap: 8px; align-items: baseline; }
.diff-label { font-size: 12px; color: var(--text-3); }
.diff-values { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.diff-old { color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.diff-arrow { color: var(--text-3); }
.diff-new { font-weight: 600; color: var(--text); }
.diff-delta { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 0 6px; border: 1px solid var(--stroke-2); border-radius: 3px; }
.rev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rev-item { border: 1px solid var(--stroke); border-radius: var(--r); }
.rev-item > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; cursor: pointer; min-height: 40px; }
.rev-item > summary .rev-tag { margin-left: 0; }
.rev-body { padding: 4px 12px 10px; border-top: 1px solid var(--surface-3); }
.badge-superseded { background: var(--surface-3); border-color: var(--stroke-2); color: var(--text-3); }
.btn-active { background: var(--brand-bg); border-color: var(--brand-stroke); color: var(--brand-pressed); }
/* Fluent 2 dialog */
.fl-dialog { border: 0; padding: 0; border-radius: 8px; width: min(480px, calc(100vw - 32px)); box-shadow: 0 0 8px rgba(0,0,0,.12), 0 32px 64px rgba(0,0,0,.14); color: var(--text); }
.fl-dialog::backdrop { background: rgba(0,0,0,.4); }
.fl-dialog form { padding: 24px; display: grid; gap: 12px; }
.fl-dialog-title { font-size: 20px; line-height: 28px; font-weight: 600; }
.fl-dialog-body { font-size: 14px; color: var(--text-2); }
.fl-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
@media (max-width: 767.98px) { .diff { grid-template-columns: 1fr; gap: 2px; } .fl-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; } .ref-chip { font-size: 17px; } }

/* Admin */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--stroke); margin-bottom: 16px; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; text-decoration: none; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab .ic { width: 18px; height: 18px; color: var(--text-3); }
.tab.active .ic { color: var(--brand); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--brand); }
.link-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 1px solid var(--stroke-2); border-radius: 13px; background: var(--surface); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.chip .ic { width: 14px; height: 14px; }
.chip-on { background: var(--ok-bg); border-color: var(--ok-stroke); color: var(--ok); }

/* Login */
.login-body { background: var(--bg); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--stroke); border-radius: 8px; padding: 28px 24px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.login-brand { display: flex; align-items: baseline; gap: 6px; }
.login-title { font-size: 20px; line-height: 28px; font-weight: 600; }
.login-foot { text-align: center; margin-top: 4px; }

/* Responsive */
@media (max-width: 1199.98px) {
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-top { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1023.98px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; order: -1; }
  .user-box { display: none; }
}
@media (max-width: 767.98px) {
  body { font-size: 15px; }
  .hide-sm { display: none !important; }
  .app-header { gap: 8px; padding: 0 8px; }
  .icon-btn { width: 44px; height: 44px; }
  .only-desktop { display: none !important; }
  .only-mobile { display: grid !important; }
  .main { padding: calc(var(--header-h) + 12px) 12px 96px; }
  .page-title { font-size: 20px; line-height: 28px; }
  .page-head > .btn, .page-head > a.btn { width: 100%; }
  .panel { padding: 12px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .airport-strip { grid-template-columns: 1fr; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  input, select, textarea { min-height: 44px !important; font-size: 16px !important; }
  .segmented { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .seg-opt span { min-height: 44px; justify-content: center; width: 100%; }
  .input-time { max-width: none; }
  .sticky-actions { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--stroke); z-index: 25; display: grid; grid-template-columns: 1fr 1fr; }
  .sticky-actions .btn-primary { grid-column: 1 / -1; order: -1; }
  .sticky-actions a.btn { display: none; }
  .case-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .ref-card { width: 100%; }
  .ref-card-meta { padding-left: 0; border-left: 0; }
  .time-summary { justify-content: space-between; gap: 8px; }
  .ts-block { min-width: 0; }
  .ts-z { font-size: 24px; line-height: 30px; }
  .enav-panel { position: sticky; bottom: 0; }
  .tl-item { grid-template-columns: 64px 24px 1fr; gap: 8px; }
  .tl-item::before { left: 64px; margin-left: 19px; }
  .tl-dot { width: 24px; height: 24px; }
  .tl-phone > div { grid-template-columns: 1fr; gap: 0; }
  .filter-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .filter-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { border: 1px solid var(--stroke); border-radius: var(--r-lg); padding: 8px; margin-bottom: 8px; }
  .admin-table td { height: auto; border: 0; padding: 4px 0; }
  .admin-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--text-3); font-weight: 600; }
}
@media (min-width: 768px) {
  .filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
  .filter-bar .field { margin: 0; min-width: 170px; }
  .filter-actions { display: flex; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
