:root {
  --bg: #f5f7f8;
  --panel: #fff;
  --line: #d9e1e5;
  --text: #172026;
  --muted: #64727c;
  --accent: #1f7a5c;
  --danger: #b84444;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 0 24px; background: #10231d; color: #fff; }
.topbar span { color: #bdd2ca; margin-left: 12px; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.topbar a { color: #eaf3ef; text-decoration: none; padding: 8px 10px; border-radius: 4px; }
.topbar a:hover { background: rgba(255,255,255,.12); }
main { max-width: 1680px; margin: 0 auto; padding: 24px; }
.page-title { margin-bottom: 18px; }
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-title button { white-space: nowrap; }
h1 { font-size: 28px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 14px; }
p { color: var(--muted); margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 12px; }
.notice { margin-bottom: 16px; padding: 12px 14px; background: #e6f3ed; border: 1px solid #b9dccd; border-radius: 6px; }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .full-span { grid-column: 1 / -1; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.big-number { font-size: 32px; line-height: 1; font-weight: 800; margin: 8px 0; color: var(--accent); }
.login { max-width: 430px; margin: 60px auto; }
.table-scroll { width: 100%; min-width: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table { min-width: 980px; table-layout: auto; }
.compact-table { min-width: 720px; }
.data-table th, .data-table td { white-space: nowrap; }
.date-cell, .time-cell { font-variant-numeric: tabular-nums; font-weight: 600; color: #23343d; }
.time-cell { width: 74px; }
.operator-name { font-weight: 700; color: #182a31; }
.mattinale-table { min-width: 1380px; }
.mattinale-table th:nth-child(1), .mattinale-table td:nth-child(1) { width: 118px; }
.mattinale-table th:nth-child(2), .mattinale-table td:nth-child(2) { width: 72px; }
.mattinale-table th:nth-child(3), .mattinale-table td:nth-child(3) { width: 220px; }
.mattinale-table th:nth-child(4), .mattinale-table td:nth-child(4) { width: 260px; }
.mattinale-table .note-cell { white-space: normal; min-width: 560px; line-height: 1.35; }
.users-table { min-width: 520px; }
.sorties-table { min-width: 620px; }
.q-table { min-width: 1320px; }
.q-table input { min-width: 86px; padding: 7px 8px; }
.q-table td:first-child { width: 54px; font-weight: 700; }
.compact-review { min-width: 820px; }
.compact-review td:first-child { width: 260px; }
.compact-review input { min-width: 120px; }
.totals-row td { background: #f8fbfa; font-weight: 700; }
.changed-row td { background: #fff8e1; }
.mail-review { border-top: 1px solid var(--line); padding-top: 14px; }
.mail-review pre { margin: 8px 0 0; white-space: pre-wrap; font-family: inherit; color: var(--text); line-height: 1.4; }
.send-terminal { border: 1px solid #203830; border-radius: 6px; background: #101816; color: #d7f4e6; overflow: hidden; }
.send-terminal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: #17251f; border-bottom: 1px solid #29473d; }
.send-terminal-head span { color: #9dcbb8; font-size: 13px; }
.send-terminal-head b { color: #fff; font-variant-numeric: tabular-nums; }
.send-terminal pre { max-height: 300px; overflow: auto; margin: 0; padding: 12px; white-space: pre-wrap; font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.45; color: #d7f4e6; }
.auto-hidden .auto-row { display: none; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: middle; }
th { color: #3d4b53; background: #f1f5f6; }
input, textarea, button, select { font: inherit; }
input, textarea, select { width: 100%; border: 1px solid #c8d2d7; border-radius: 4px; padding: 9px 10px; background: #fff; }
input[type="checkbox"] { width: 16px !important; min-width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--accent); flex: 0 0 auto; }
label:has(input[type="checkbox"]) { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; width: auto; white-space: nowrap; }
textarea { min-height: 90px; resize: vertical; }
button { border: 0; background: var(--accent); color: #fff; border-radius: 4px; padding: 10px 14px; cursor: pointer; }
button.danger { background: var(--danger); }
button:disabled { opacity: .48; cursor: not-allowed; }
button.link { background: transparent; color: #eaf3ef; padding: 8px 10px; }
a.button { display: inline-block; text-decoration: none; background: var(--accent); color: #fff; border-radius: 4px; padding: 10px 14px; text-align: center; }
a.button.danger { background: var(--danger); }
.badge { display: inline-block; min-width: 64px; text-align: center; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.ok { background: #dff3e8; color: #176246; }
.badge.ko { background: #fae1e1; color: #9a3030; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.ok { background: #dff3e8; color: #176246; }
.status-pill.warn { background: #fff1c7; color: #7a5400; }
.status-ok { color: #176246; }
.status-off { color: #9a3030; }
.users-accordion { display: grid; gap: 10px; }
.user-card { border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; overflow: hidden; }
.user-card summary { cursor: pointer; display: grid; grid-template-columns: 20px minmax(220px, 1.5fr) minmax(150px, .7fr) minmax(220px, 1fr); gap: 14px; align-items: center; padding: 13px 14px; list-style: none; }
.user-card summary::-webkit-details-marker { display: none; }
.user-card summary::before { content: "\203A"; font-size: 22px; line-height: 1; color: var(--muted); transform: rotate(0deg); transition: transform .15s ease; }
.user-card[open] summary::before { transform: rotate(90deg); }
.user-card[open] summary { border-bottom: 1px solid var(--line); background: #f2f6f5; }
.user-summary-name { font-weight: 700; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary-status, .user-summary-invite { justify-self: start; border-radius: 999px; padding: 4px 9px; background: #eef3f1; font-size: 13px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary-invite { color: var(--muted); }
.user-detail-grid { padding: 14px; }
.user-detail-form { display: grid; gap: 14px; }
.form-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.access-list { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 12px; }
.access-list h3 { margin: 0 0 12px; font-size: 15px; }
.access-group { border-top: 1px solid var(--line); padding: 12px 0; }
.access-group:first-of-type { border-top: 0; padding-top: 0; }
.access-group:last-child { padding-bottom: 0; }
.access-page, .access-section { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 18px; align-items: center; min-height: 30px; }
.access-page { font-weight: 700; color: var(--text); }
.access-sections { display: grid; gap: 6px; margin-top: 8px; padding-left: 24px; }
.access-section { color: #36464e; font-size: 13px; }
.access-name { min-width: 0; overflow-wrap: anywhere; }
.access-control { display: inline-flex; justify-content: flex-end; align-items: center; gap: 8px; white-space: nowrap; }
.access-control input[type="checkbox"] { width: 16px !important; }
.user-form-actions { display: flex; justify-content: space-between; gap: 14px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.user-delete-button { margin-left: auto; min-width: 118px; }
.presence-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: middle; box-shadow: 0 0 0 2px rgba(0,0,0,.06); }
.presence-dot.green { background: #1f9d5a; }
.presence-dot.yellow { background: #d5a21c; }
.presence-dot.red { background: #c84242; }
.dos-available-list { display: grid; gap: 8px; }
.dos-available-card { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(120px, .75fr) minmax(120px, .7fr) minmax(180px, .9fr); gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 9px 10px; }
.dos-available-card span { color: var(--muted); font-size: 13px; }
.refresh-note { align-self: flex-start; background: #eef6f2; border: 1px solid #c9dfd5; border-radius: 6px; color: #285943; font-weight: 700; padding: 9px 12px; white-space: nowrap; }
.dos-ops-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dos-ops-stat { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.dos-ops-stat span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.dos-ops-stat strong { display: block; font-size: 26px; color: #143126; }
.dos-ops-list { display: grid; gap: 10px; }
.dos-ops-card { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(130px, .7fr) minmax(100px, .55fr) minmax(190px, .9fr); gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #fff; }
.dos-ops-card.available { border-left: 5px solid var(--accent); }
.dos-ops-card div { min-width: 0; }
.dos-ops-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.dos-ops-card strong { display: block; overflow-wrap: anywhere; }
.dos-ops-card p { grid-column: 1 / -1; margin: 0; color: #36464e; background: #f8fbfa; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
.dos-ops-compact { display: grid; gap: 8px; max-height: 430px; overflow: auto; }
.dos-ops-compact div { display: grid; grid-template-columns: 70px minmax(160px, 1fr) minmax(120px, .8fr); gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding: 7px 0; }
.dos-ops-compact span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dos-ops-compact em { color: var(--muted); font-style: normal; font-size: 13px; }
.dos-grid { min-width: 1120px; font-size: 10px; }
.dos-grid th { text-align: center; }
.dos-grid th:first-child, .dos-grid td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 52px; max-width: 60px; white-space: nowrap; }
.dos-grid th:first-child { background: #f1f5f6; z-index: 3; }
.dos-grid td:nth-child(2) { white-space: nowrap; min-width: 96px; max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
.dos-status { text-align: center; font-weight: 700; min-width: 26px; padding: 6px 2px; border-left: 1px solid #edf1f2; }
.dos-l { background: #dff3e8; color: #176246; }
.dos-re { background: #e8f0fb; color: #244f84; }
.dos-r { background: #f2f4f5; color: #53616a; }
.dos-p, .dos-po { background: #fff2cc; color: #8a5a00; }
.dos-m, .dos-nd { background: #fae1e1; color: #9a3030; }
.dos-override { outline: 2px solid #1f7a5a; outline-offset: -2px; }
.selected-day { box-shadow: inset 0 0 0 2px #1f7a5c; }
.dos-build-detail { margin-top: 12px; }
.dos-build-detail summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.dos-profile-list { display: grid; gap: 10px; }
.dos-profile-card { border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.dos-profile-card summary { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(80px, .4fr); gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; background: #f7faf9; }
.dos-profile-card summary span { color: var(--muted); }
.dos-profile-card form { padding: 14px; border-top: 1px solid var(--line); }
.dos-month-builder { overflow: hidden; }
.dos-build-grid { min-width: 1210px; font-size: 8px; }
.dos-build-grid th { text-align: center; vertical-align: bottom; }
.dos-build-grid th:first-child, .dos-build-grid td:first-child { position: sticky; left: 0; z-index: 3; background: #fff; min-width: 48px; max-width: 54px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dos-build-grid th:nth-child(2), .dos-build-grid td:nth-child(2) { min-width: 42px; max-width: 48px; }
.dos-build-grid th:nth-child(3), .dos-build-grid td:nth-child(3), .dos-build-grid th:nth-child(4), .dos-build-grid td:nth-child(4), .dos-build-grid th:nth-child(5), .dos-build-grid td:nth-child(5), .dos-build-grid th:nth-child(6), .dos-build-grid td:nth-child(6), .dos-build-grid th:nth-child(7), .dos-build-grid td:nth-child(7), .dos-build-grid th:nth-child(8), .dos-build-grid td:nth-child(8) { min-width: 34px; max-width: 42px; text-align: center; }
.dos-build-grid thead th:first-child { background: #f1f5f6; z-index: 4; }
.dos-month-settings { display: grid; grid-template-columns: 110px 90px auto 1fr; gap: 10px; align-items: end; margin-bottom: 10px; font-size: 12px; }
.dos-month-settings input { width: 100%; }
.dos-month-settings span { color: var(--muted); align-self: center; }
.dos-auto-cell { white-space: nowrap; text-align: center; }
.mini-button { padding: 3px 5px; min-height: 22px; font-size: 9px; margin: 1px; }
.dos-hours-cell { font-weight: 700; }
.dos-build-cell { min-width: 28px; padding: 1px; text-align: center; }
.dos-build-cell select { width: 27px; min-width: 27px; padding: 2px 0; font-size: 8px; text-align: center; background: transparent; }
.dos-build-prev, .dos-prev-status-cell { background: #eef4f3; color: #31464d; font-weight: 700; }
.dos-build-grid th small { font-size: 8px; }
.dos-build-saturday { background: #f5f7f7; }
.dos-build-holiday { background: #fdeaea; }
.dos-build-grid th.dos-build-holiday { color: #9a3030; }
.dos-build-grid th.dos-build-saturday { color: #53616a; }
.dos-build-grid tbody tr:nth-child(even) td { background: #eef8fb; }
.dos-build-grid tbody tr:nth-child(even) td.dos-build-saturday { background: #e2edf1; }
.dos-build-grid tbody tr:nth-child(even) td.dos-build-holiday { background: #f6dada; }
.dos-build-grid tbody tr:nth-child(even) td.dos-build-prev { background: #dfeeed; }
.dos-build-grid tbody tr:nth-child(odd) td.dos-build-saturday { background: #f5f7f7; }
.dos-build-grid tbody tr:nth-child(odd) td.dos-build-holiday { background: #fdeaea; }
.dos-build-note, .dos-note-cell { text-align: center; font-weight: 700; color: #435059; background: #fff8d8 !important; }
.dos-non-rotation-row td { background: #fffdf0 !important; }
.aircraft-regional-page { display: grid; gap: 18px; }
.aircraft-section-nav { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: rgba(245,247,248,.96); border: 1px solid var(--line); border-radius: 6px; padding: 10px; backdrop-filter: blur(4px); }
.aircraft-section-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 12px; border-radius: 4px; background: #fff; border: 1px solid #cfd9de; color: #23343d; text-decoration: none; font-weight: 700; }
.aircraft-section-nav a:hover { border-color: var(--accent); color: var(--accent); }
.aircraft-section-nav a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.aircraft-section-heading { border-left: 5px solid var(--accent); background: #eef6f2; border-radius: 6px; padding: 14px 16px; margin-top: 4px; }
.aircraft-section-heading h2 { margin: 0 0 4px; font-size: 22px; color: #16372b; }
.aircraft-section-heading p { margin: 0; max-width: 980px; }
.aircraft-kpis .panel { min-height: 132px; display: flex; flex-direction: column; justify-content: center; }
.aircraft-kpis h2 { margin-bottom: 6px; color: #31464d; }
.aircraft-workbench { align-items: stretch; }
.aircraft-upload-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; }
.aircraft-upload-card input[type="file"] { align-self: end; }
.stack-form { display: grid; gap: 10px; }
.stack-form h2 { margin-bottom: 0; }
.import-results-table tr.import-result-complete td { background: #edf8f1; }
.import-results-table tr.import-result-partial td { background: #fff8df; }
.import-results-table tr.import-result-failed td { background: #fdeaea; }
.import-results-table tr.has-note td { box-shadow: inset 4px 0 #2b7a78; }
.import-status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 4px; font-weight: 800; white-space: nowrap; }
.import-status-complete { background: #dff3e7; color: #145a36; }
.import-status-partial { background: #fff0c2; color: #7a4b00; }
.import-status-failed { background: #ffd8d8; color: #8b1f1f; }
.badge-note { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 3px 8px; border-radius: 4px; background: #dff4f1; color: #175852; font-weight: 800; }
.aircraft-regional-page .panel { overflow: hidden; }
.aircraft-regional-page .panel > .table-scroll { margin-top: 2px; }
.aircraft-regional-page .row-form { grid-template-columns: repeat(3, minmax(180px, 1fr)); align-items: end; margin-bottom: 0; }
.aircraft-regional-page .row-form button { align-self: stretch; }
.aircraft-regional-page table input { min-width: 110px; }
.aircraft-regional-page table label:has(input[type="checkbox"]) { min-height: 28px; }
.aircraft-regional-page .data-table { min-width: 1180px; }
.aircraft-regional-page .compact-table { min-width: 640px; }
.aircraft-regional-page details summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.aircraft-regional-page details .grid { margin-top: 10px; }
.aircraft-mission-row { cursor: pointer; }
.aircraft-mission-row:hover td, .aircraft-mission-row.is-open td { background: #eef7f3; }
.mission-toggle { font-weight: 800; color: var(--accent); }
.mission-toggle::before { content: "▸"; display: inline-block; margin-right: 7px; color: #52636b; }
.aircraft-mission-row.is-open .mission-toggle::before { transform: rotate(90deg); }
.mission-detail-box { border: 1px solid var(--line); border-radius: 6px; background: #fbfdfc; padding: 14px; }
.mission-detail-box h3 { margin: 0 0 12px; font-size: 18px; color: #1c3f32; }
.mission-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.missing-summary { padding: 6px 9px; border: 1px solid #f0b6b6; border-radius: 4px; background: #fff1f1; color: #8b1f1f; font-weight: 700; }
.mission-edit-form { display: grid; gap: 12px; margin-bottom: 14px; }
.mission-type-toggle { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f5faf7; }
.mission-type-toggle label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #153d2f; }
.mission-type-toggle input { width: auto !important; }
.mission-edit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mission-edit-grid label { display: grid; gap: 5px; color: #34454c; font-size: 12px; font-weight: 700; }
.mission-edit-grid input, .mission-edit-grid textarea { min-width: 0 !important; }
.mission-edit-grid textarea { min-height: 72px; resize: vertical; }
.mission-edit-grid .field-missing span { color: #a12727; }
.mission-edit-grid .field-missing input, .mission-edit-grid .field-missing textarea { border-color: #c93d3d; background: #fff7f7; box-shadow: inset 3px 0 #c93d3d; }
.mission-lookup-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: stretch; }
.mission-lookup-field button { min-height: 38px; padding-inline: 12px; }
.regional-bases-table { min-width: 1840px !important; table-layout: fixed; }
.regional-bases-table th:nth-child(1), .regional-bases-table td:nth-child(1) { width: 230px; }
.regional-bases-table th:nth-child(2), .regional-bases-table td:nth-child(2) { width: 150px; }
.regional-bases-table th:nth-child(3), .regional-bases-table td:nth-child(3) { width: 86px; }
.regional-bases-table th:nth-child(4), .regional-bases-table td:nth-child(4) { width: 210px; }
.regional-bases-table th:nth-child(5), .regional-bases-table td:nth-child(5) { width: 260px; }
.regional-bases-table th:nth-child(6), .regional-bases-table td:nth-child(6),
.regional-bases-table th:nth-child(7), .regional-bases-table td:nth-child(7) { width: 140px; }
.regional-bases-table th:nth-child(8), .regional-bases-table td:nth-child(8) { width: 120px; }
.regional-bases-table th:nth-child(9), .regional-bases-table td:nth-child(9) { width: 150px; }
.regional-bases-table th:nth-child(10), .regional-bases-table td:nth-child(10) { width: 140px; }
.regional-bases-table th:nth-child(11), .regional-bases-table td:nth-child(11) { width: 86px; }
.regional-bases-table input { min-width: 0 !important; }
.regional-bases-table td { vertical-align: top; }
.cell-stack { display: grid; gap: 7px; align-content: start; }
.cell-stack input[type="date"] { min-height: 36px; }
.check-stack label:has(input[type="checkbox"]) { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: center; white-space: normal; line-height: 1.25; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-grid h2, .form-grid .wide { grid-column: 1 / -1; }
.form-grid label, .row-form label, .login label { color: #36464e; font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; padding-top: 24px; }
.check input { width: 16px; }
.row-form { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; margin-bottom: 18px; }
.row-form label { display: flex; gap: 6px; align-items: center; }
.row-form label input[type="checkbox"] { width: 16px; }
.row-form.mini { grid-template-columns: 1fr auto; margin-top: 12px; margin-bottom: 0; }
.q-editor { display: grid; gap: 14px; }
.actions-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto auto; gap: 10px; align-items: end; }
.inline-form { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 8px; align-items: center; }
.inline-form label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.inline-form input[type="checkbox"] { width: 16px; }
.inline-form input[type="text"], .inline-form input:not([type]) { min-width: 150px; }
.engagement-list { display: grid; gap: 10px; }
.engagement-item { border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; overflow: hidden; }
.engagement-item summary { cursor: pointer; list-style-position: inside; padding: 12px 14px; }
.engagement-item[open] summary { border-bottom: 1px solid var(--line); background: #f2f6f5; }
.eng-main { display: grid; grid-template-columns: 110px minmax(180px, 1.4fr) 130px 120px 150px; gap: 14px; align-items: center; margin-left: 8px; }
.eng-main span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eng-detail { padding: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.detail-grid div { border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; background: #fff; min-width: 0; }
.detail-grid span, .eng-notes span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.detail-grid strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.eng-notes { margin-top: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 10px; background: #fff; }
.eng-notes p { margin: 0; color: var(--text); white-space: normal; line-height: 1.4; }
.eng-detail h3 { font-size: 15px; margin: 14px 0 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
@media (max-width: 900px) {
  .grid.two, .grid.three, .form-grid, .row-form, .actions-row { grid-template-columns: 1fr; }
  .topbar { align-items: stretch; flex-direction: column; padding: 16px; }
  .topbar nav { width: 100%; }
  .detail-title { flex-direction: column; }
  .eng-main { grid-template-columns: 1fr; gap: 6px; }
  .detail-grid { grid-template-columns: 1fr; }
  .user-card summary { grid-template-columns: 20px 1fr; gap: 8px; }
  .user-summary-status, .user-summary-invite { grid-column: 2; }
  .form-grid.compact { grid-template-columns: 1fr; }
  .access-page, .access-section { grid-template-columns: 1fr; gap: 6px; }
  .access-sections { padding-left: 14px; }
  .access-control { justify-content: flex-start; }
  .user-form-actions { align-items: stretch; flex-direction: column; }
  .user-delete-button { margin-left: 0; }
  .dos-available-card { grid-template-columns: 1fr; gap: 4px; }
  .dos-ops-summary, .dos-ops-card, .dos-ops-compact div { grid-template-columns: 1fr; gap: 6px; }
  .refresh-note { width: 100%; white-space: normal; }
  .dos-profile-card summary { grid-template-columns: 1fr; gap: 4px; }
  .aircraft-section-nav { position: static; }
  .aircraft-section-nav a { flex: 1 1 220px; }
  .aircraft-regional-page .row-form { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { background: #eef3f1; }
  main { padding: 12px; }
  .topbar { gap: 12px; min-height: 0; padding: 12px; }
  .topbar > div { display: grid; gap: 2px; }
  .topbar span { margin-left: 0; font-size: 12px; }
  .topbar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .topbar a, button.link { padding: 10px 8px; text-align: center; background: rgba(255,255,255,.08); }
  h1 { font-size: 22px; }
  h2 { font-size: 16px; }
  .page-title { margin-bottom: 12px; }
  .panel { padding: 12px; border-radius: 4px; }
  .notice { padding: 10px 12px; }
  .send-terminal-head { align-items: flex-start; flex-direction: column; }
  .send-terminal pre { max-height: 240px; font-size: 12px; }
  table { font-size: 13px; }
  th, td { padding: 8px 7px; }
  .table-scroll, .panel { overflow-x: auto; }
  .data-table, .mattinale-table, .q-table, .compact-table { min-width: 760px; }
  .q-table { min-width: 1120px; }
  input, textarea, select, button, a.button { min-height: 42px; }
  button, a.button { width: 100%; }
  .row-form.mini { gap: 8px; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form input[type="text"], .inline-form input:not([type]) { min-width: 0; }
  .actions-row { gap: 8px; }
  .login { margin: 24px auto; }
  .badge { min-width: 0; }
}
