:root {
  --navy-950: #04111d;
  --navy-900: #071827;
  --navy-800: #102b43;
  --navy-700: #183d5c;
  --blue-600: #1474de;
  --blue-500: #2d8cf0;
  --blue-100: #e9f3ff;
  --gold-600: #b87810;
  --gold-100: #fff3d9;
  --green-600: #147557;
  --green-100: #def5ec;
  --red-600: #b33c4c;
  --red-100: #ffebee;
  --ink: #112235;
  --muted: #66788b;
  --line: #dce5ed;
  --soft: #f5f8fa;
  --surface: #fff;
  --canvas: #eff3f6;
  --shadow: 0 10px 30px rgba(7, 24, 39, .08);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

/* Aircraft calendar: compact month overview and complete daily flight records. */
.calendar-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.calendar-toolbar .view-switch { flex: 0 0 auto; }
.calendar-toolbar .view-switch button { min-height: 38px; font-size: .875rem; }
.calendar-toolbar .aircraft-picker { flex: 1 1 190px; }
.calendar-toolbar .aircraft-picker select { font-size: .875rem; }
.calendar-toolbar .week-controls { width: auto; }
#scheduleView #todayWeek { display: block; }
.schedule-date-picker { display: grid; gap: 6px; flex: 0 1 165px; min-width: 0; }
.schedule-date-picker > span { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.schedule-date-picker input { width: 100%; min-width: 0; min-height: 43px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font-size: .875rem; }
.month-calendar { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { background: var(--navy-900); color: white; }
.calendar-weekdays span { padding: 12px 0; text-align: center; font-size: .875rem; font-weight: 700; }
.calendar-cell { min-width: 0; min-height: 100px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); padding: 4px; }
.calendar-cell:nth-child(7n) { border-right: 0; }
.calendar-cell--outside { background: #f4f6f8; }
.calendar-cell--outside .calendar-day { color: #66788b; }
.calendar-cell--selected { background: #edf5ff; box-shadow: inset 0 0 0 2px var(--blue-600); }
.calendar-day { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 38px; border: 0; border-radius: 8px; padding: 4px; background: transparent; color: var(--ink); text-align: left; }
.calendar-day > span { display: grid; place-items: center; width: 28px; height: 28px; font-size: .875rem; font-weight: 750; }
.calendar-day--today > span { border-radius: 50%; background: var(--blue-600); color: white; }
.calendar-day small { font-size: .75rem; color: #4c6075; }
.calendar-events { display: grid; gap: 4px; }
.calendar-event { display: grid; gap: 3px; width: 100%; min-width: 0; padding: 7px 5px; border: 0; border-left: 3px solid #147557; border-radius: 5px; background: #e6f4ef; text-align: left; color: #153d32; }
.calendar-event--pending { border-color: #b87810; background: #fff3d9; color: #654109; }
.calendar-event--completed { border-color: #58738b; background: #edf2f6; color: #344e65; }
.calendar-event strong, .calendar-event span { font-size: .875rem; overflow-wrap: anywhere; }
.calendar-event small { font-size: .75rem; }
.calendar-event:hover { filter: brightness(.96); }
.calendar-more { min-height: 32px; border: 0; border-radius: 5px; background: transparent; color: var(--blue-600); text-align: left; font-size: .875rem; font-weight: 750; }
.calendar-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 12px 0 28px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.day-agenda-title { margin: 0 0 14px; font-size: 1.2rem; }
.calendar-agenda { display: grid; gap: 20px; }
.schedule-day-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.schedule-day-heading h3 { font-size: 1rem; }
.schedule-day-heading button { padding: 8px 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--blue-600); font-size: .875rem; font-weight: 700; }
.schedule-day-flights { display: grid; gap: 14px; }
.calendar-empty-day { margin: 0; padding: 18px; border: 1px dashed #b7c7d5; border-radius: 12px; color: #506479; font-size: .9375rem; }
.calendar-flight { min-width: 0; padding: 18px 18px 0; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 5px 16px rgba(7,24,39,.04); }
.calendar-flight__heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.aircraft-tag { font-size: .875rem; font-weight: 850; letter-spacing: .04em; color: var(--blue-600); }
.calendar-flight h3 { font-size: 1.35rem; overflow-wrap: anywhere; }
.calendar-flight h3 > span { color: var(--muted); font-weight: 400; padding: 0 6px; }
.calendar-flight__time { margin: 8px 0 18px; font-size: .9375rem; line-height: 1.5; color: #40576d; }
.calendar-flight__details { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 0 0 18px; }
.calendar-flight__details div { min-width: 0; }
.calendar-flight__details dt { margin-bottom: 4px; color: var(--muted); font-size: .875rem; }
.calendar-flight__details dd { margin: 0; font-size: 1rem; font-weight: 650; overflow-wrap: anywhere; }
.calendar-flight__notes { padding: 13px; background: var(--soft); border-radius: 10px; }
.calendar-flight__notes strong { font-size: .875rem; }
.calendar-flight__notes p { margin: 6px 0 0; font-size: .9375rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.calendar-flight .card-detail-button { margin-top: 10px; font-size: .875rem; }
#detailNotes { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 360px) { .main-shell .live-note { margin-left: -12px; margin-right: -12px; } }
@media (min-width: 760px) { .schedule-day-flights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .calendar-toolbar .view-switch { flex: 1 1 100%; }
  .calendar-toolbar .view-switch button { flex: 1; }
  .calendar-toolbar .aircraft-picker { flex: 1 1 100%; }
  .schedule-date-picker { flex: 1; }
  .calendar-cell { min-height: 72px; padding: 2px; }
  .calendar-day { flex-direction: column; justify-content: flex-start; min-height: 64px; gap: 4px; padding: 4px 0; }
  .calendar-day small { font-size: .75rem; white-space: nowrap; }
  .calendar-events { display: none; }
  .calendar-weekdays span { font-size: .75rem; }
  .calendar-legend { margin-bottom: 20px; }
  .calendar-flight { padding-left: 14px; padding-right: 14px; }
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--navy-900); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(45, 140, 240, .35); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--navy-900); font-size: clamp(1.7rem, 6vw, 2.25rem); line-height: 1.06; letter-spacing: -.04em; }
h2 { margin-bottom: 0; color: var(--navy-900); font-size: 1.25rem; letter-spacing: -.025em; }
h3 { margin-bottom: 0; color: var(--navy-900); font-size: 1.05rem; }

.app-shell { min-height: 100vh; }
.main-shell { max-width: 820px; min-height: 100vh; margin: 0 auto; padding: 0 16px calc(94px + env(safe-area-inset-bottom)); }
.side-rail { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: calc(76px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
.brand { display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .055em; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: white; background: linear-gradient(145deg, var(--blue-500), var(--blue-600)); box-shadow: 0 7px 16px rgba(20, 116, 222, .24); font-size: .75rem; font-weight: 900; letter-spacing: 0; }
.brand strong, .brand small { display: block; }
.brand strong { color: var(--navy-900); font-size: .84rem; }
.brand small { margin-top: 2px; color: var(--muted); font-size: .75rem; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 13px; color: var(--navy-700); background: white; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid white; border-radius: 50%; background: #e5485d; }
.role-button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 3px 8px 3px 3px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: white; }
.role-button > span:nth-child(2) { display: none; text-align: left; }
.role-button strong, .role-button small { display: block; }
.role-button strong { font-size: .8rem; }.role-button small { margin-top: 2px; color: var(--muted); font-size: .75rem; }
.role-button svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; color: white; background: var(--blue-600); font-size: .75rem; font-weight: 900; }
.demo-note { display: flex; align-items: center; gap: 8px; margin: 0 -16px 22px; padding: 8px 16px; color: #38506a; background: #deebf6; font-size: .78rem; font-weight: 700; }
.demo-note > span { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-600); }
.view { display: none; animation: fade-in .18s ease; }
.view.is-active { display: block; }
@keyframes fade-in { from { opacity: .55; transform: translateY(4px); } }
.eyebrow { margin: 0 0 6px; color: var(--blue-600); font-size: .75rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.page-heading, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.page-heading { margin: 0 0 22px; }
.section-heading { margin: 28px 0 12px; }
.button { min-height: 47px; padding: 0 17px; border: 0; border-radius: 13px; font-size: .85rem; font-weight: 850; }
.button--primary { color: white; background: var(--blue-600); box-shadow: 0 7px 17px rgba(20, 116, 222, .22); }
.button--secondary { color: var(--navy-800); background: #edf2f6; }
.button--compact { min-height: 42px; padding: 0 13px; white-space: nowrap; }
.button--full { width: 100%; }
.count-pill { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy-700); background: white; font-size: .7rem; font-weight: 800; }

.schedule-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.aircraft-picker { flex: 1; min-width: 0; }
.aircraft-picker span { display: block; margin: 0 0 6px 2px; color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.aircraft-picker select { width: 100%; min-height: 43px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy-900); background: white; font-size: .82rem; font-weight: 700; }
.view-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.view-switch button { min-height: 34px; padding: 0 11px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: .78rem; font-weight: 800; }
.view-switch button.is-active { color: white; background: var(--navy-800); }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 5px 16px rgba(7, 24, 39, .04); }
.week-strip.is-hidden { display: none; }
.week-strip button { position: relative; display: grid; place-items: center; gap: 5px; min-width: 0; min-height: 66px; padding: 7px 2px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; }
.week-strip button span { font-size: .75rem; font-weight: 850; }.week-strip button strong { font-size: .92rem; }.week-strip button > i { display: block; min-width: 6px; height: 6px; padding: 0 3px; border-radius: 99px; color: transparent; background: #c5d1dc; font-size: 0; }
.week-strip button.selected { color: white; background: var(--navy-900); box-shadow: 0 7px 15px rgba(7, 24, 39, .2); }
.week-strip button.selected > i { background: #67b1ff; }
.schedule-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 11px; }
.schedule-summary > div { display: flex; align-items: center; gap: 10px; }
.schedule-summary strong, .schedule-summary small { display: block; }.schedule-summary strong { font-size: .9rem; }.schedule-summary small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.summary-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; font-size: .75rem; font-weight: 900; }
.summary-icon--blue { color: var(--blue-600); background: var(--blue-100); }.summary-icon--gold { color: var(--gold-600); background: var(--gold-100); }
.availability { display: flex; align-items: center; gap: 6px; color: var(--green-600); font-size: .75rem; font-weight: 800; }.availability i { width: 7px; height: 7px; border-radius: 50%; background: #1e9a72; }
.schedule-list { display: grid; gap: 11px; }
.schedule-card { display: grid; grid-template-columns: 65px minmax(0, 1fr); min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.time-column { position: relative; display: flex; flex-direction: column; align-items: center; padding: 20px 6px; border-right: 1px solid var(--line); background: #f9fbfc; }
.time-column strong { color: var(--navy-900); font-size: .95rem; }.time-column > span { margin-top: 1px; color: var(--muted); font-size: .75rem; font-weight: 800; }.time-column > i { width: 2px; flex: 1; min-height: 40px; margin: 9px 0; border-radius: 99px; background: linear-gradient(var(--blue-500), #c8d7e4); }.time-column small { color: var(--muted); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.flight-content { min-width: 0; padding: 16px 15px 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 5px 8px; border-radius: 999px; font-size: .75rem; font-weight: 850; letter-spacing: .02em; }.status i { width: 6px; height: 6px; border-radius: 50%; }
.status--confirmed { color: var(--green-600); background: var(--green-100); }.status--confirmed i { background: #209a73; }
.status--pending { color: #7f570d; background: var(--gold-100); }.status--pending i { background: #d5911d; }
.status--declined { color: var(--red-600); background: var(--red-100); }.status--declined i { background: var(--red-600); }
.status--ready { color: var(--blue-600); background: var(--blue-100); }.status--ready i { background: var(--blue-600); }
.more-button { padding: 5px; border: 0; color: var(--muted); background: transparent; letter-spacing: .1em; }
.route-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 17px 0 14px; }
.route-row > strong { color: var(--navy-900); font-size: 1.38rem; letter-spacing: -.025em; }
.route-row > span { display: flex; align-items: center; min-width: 30px; }.route-row > span i { height: 1px; flex: 1; background: #aebfce; }.route-row > span b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: white; background: var(--blue-600); font-size: .62rem; }
.flight-details { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; }.flight-details span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.flight-details b { color: var(--navy-800); }
.card-detail-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 45px; margin-top: 13px; padding: 0; border: 0; border-top: 1px solid var(--line); color: var(--blue-600); background: white; font-size: .78rem; font-weight: 850; }.card-detail-button span { font-size: 1.25rem; }
.empty-schedule { display: flex; align-items: center; gap: 12px; min-height: 84px; padding: 15px; border: 1px dashed #bac9d6; border-radius: var(--radius); color: var(--muted); background: rgba(255,255,255,.65); }.empty-schedule > span { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; color: var(--green-600); background: var(--green-100); font-weight: 900; }.empty-schedule div { flex: 1; }.empty-schedule strong { color: var(--navy-900); font-size: .85rem; }.empty-schedule p { margin: 3px 0 0; font-size: .78rem; }.empty-schedule button { border: 0; color: var(--blue-600); background: transparent; font-size: .78rem; font-weight: 850; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stats-grid article { min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 5px 16px rgba(7,24,39,.04); }.stats-grid span, .stats-grid strong, .stats-grid small { display: block; }.stats-grid span { color: var(--muted); font-size: .75rem; }.stats-grid strong { margin: 5px 0 3px; overflow: hidden; color: var(--navy-900); font-size: 1.3rem; text-overflow: ellipsis; }.stats-grid small { overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.request-list { display: grid; gap: 12px; }
.request-card { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }.request-card__top { display: flex; justify-content: space-between; gap: 10px; }.request-card__top h3 { margin-top: 11px; font-size: 1.18rem; }.request-card__top p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }.tail-badge { align-self: flex-start; padding: 7px 9px; border: 1px solid #cad6e1; border-radius: 9px; color: var(--navy-700); background: var(--soft); font-size: .75rem; font-weight: 900; letter-spacing: .06em; }
.request-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 17px 0 13px; padding: 14px; border-radius: 14px; background: var(--soft); }.request-card dl div { min-width: 0; }.request-card dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }.request-card dd { margin: 4px 0 0; overflow: hidden; color: var(--navy-900); font-size: .8rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }.request-notes { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.request-actions { display: flex; gap: 8px; margin-top: 15px; }.request-actions .button:first-child { flex: 1; }.button--approve { color: white; background: var(--green-600); }.button--decline { color: var(--red-600); background: var(--red-100); }

.pilot-callout { padding: 16px; border: 1px solid #ecd29b; border-radius: var(--radius); background: linear-gradient(130deg, #fff9ed, #fff); }.pilot-callout > div { display: flex; align-items: flex-start; gap: 11px; }.pilot-callout strong { color: var(--navy-900); font-size: .87rem; }.pilot-callout p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.log-list, .completed-list { display: grid; gap: 10px; }
.log-card { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }.log-card > div:nth-child(2) { min-width: 0; }.log-date { display: grid; place-items: center; align-content: center; width: 48px; height: 56px; border-radius: 12px; color: white; background: var(--navy-800); }.log-date span { font-size: .75rem; font-weight: 800; letter-spacing: .08em; }.log-date strong { font-size: 1.1rem; }.log-card h3 { margin-top: 7px; }.log-card p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }.log-card > button { grid-column: 1 / -1; }
.completed-list article { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }.record-check { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--green-600); background: var(--green-100); font-weight: 900; }.completed-list strong { font-size: .82rem; }.completed-list p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }.completed-list button { border: 0; color: var(--blue-600); background: transparent; font-size: .75rem; font-weight: 850; }

.profile-card, .menu-list, .install-card { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.profile-card { display: flex; align-items: center; gap: 13px; padding: 18px; }.avatar--large { width: 52px; height: 52px; font-size: .8rem; }.profile-card strong { font-size: .92rem; }.profile-card p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.menu-list { margin-top: 13px; overflow: hidden; }.menu-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 57px; padding: 0 17px; border: 0; color: var(--navy-900); background: white; font-size: .8rem; font-weight: 750; }.menu-list button + button { border-top: 1px solid var(--line); }.chevron { color: #8796a5; font-size: 1.3rem; }
.install-card { display: flex; align-items: center; gap: 12px; margin-top: 13px; padding: 16px; }.install-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; color: white; background: var(--navy-800); font-size: 1.15rem; }.install-card strong { font-size: .82rem; }.install-card p { margin: 4px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }

.bottom-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(72px + env(safe-area-inset-bottom)); padding: 7px 7px env(safe-area-inset-bottom); border-top: 1px solid rgba(205,217,228,.9); background: rgba(255,255,255,.95); backdrop-filter: blur(18px); }
.nav-button { display: grid; place-items: center; align-content: center; gap: 4px; min-width: 0; border: 0; color: #758596; background: transparent; font-size: .8rem; font-weight: 750; }.nav-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.nav-button.is-active { color: var(--blue-600); }
body[data-role="customer"] .admin-customer-field { display: none; }
body[data-role="customer"] .nav-button[data-view="flightlog"], body[data-role="pilot"] .nav-button[data-view="requests"] { display: none; }
body[data-role="customer"] .bottom-nav, body[data-role="pilot"] .bottom-nav { grid-template-columns: repeat(3, 1fr); }
body[data-role="pilot"] .schedule-heading [data-modal="requestModal"] { display: none; }

.modal { width: min(100% - 16px, 560px); max-height: 90vh; margin: auto auto 8px; padding: 0; border: 0; border-radius: 25px 25px 18px 18px; color: var(--ink); background: white; box-shadow: 0 28px 80px rgba(0,0,0,.3); }.modal::backdrop { background: rgba(3,12,23,.62); backdrop-filter: blur(3px); }.modal form { max-height: 90vh; padding: 8px 19px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; }.modal-handle { width: 42px; height: 5px; margin: 3px auto 18px; border-radius: 99px; background: #d8dfe6; }.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }.modal-heading h2 { font-size: 1.45rem; }.modal-close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: #edf1f5; font-size: 1.45rem; font-weight: 300; }.modal-copy { margin: -5px 0 15px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.reservation-note { display: flex; align-items: flex-start; gap: 10px; margin: -2px 0 16px; padding: 12px; border: 1px solid #c9def4; border-radius: 13px; background: var(--blue-100); }.reservation-note span { display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; color: white; background: var(--blue-600); font-size: .75rem; font-weight: 900; }.reservation-note p { margin: 1px 0 0; color: #315a80; font-size: .78rem; line-height: 1.45; }
.modal label { display: grid; gap: 7px; margin-bottom: 14px; color: var(--navy-700); font-size: .82rem; font-weight: 850; }.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.field-row--three { grid-template-columns: repeat(3, 1fr); }.modal input, .modal select, .modal textarea { width: 100%; min-width: 0; min-height: 47px; padding: 11px 12px; border: 1px solid #c8d5df; border-radius: 11px; color: var(--navy-900); background: white; font-size: .88rem; font-weight: 650; }.modal textarea { min-height: 82px; resize: vertical; }.modal fieldset { margin: 0 0 15px; padding: 14px 13px 2px; border: 1px solid var(--line); border-radius: 15px; }.modal legend { padding: 0 6px; color: var(--navy-800); font-size: .8rem; font-weight: 900; }.calculated-time { margin: -3px 0 11px; padding: 9px 10px; border-radius: 9px; color: #315a80; background: var(--blue-100); font-size: .78rem; font-weight: 750; }.attestation { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; gap: 9px !important; margin: 5px 0 15px !important; padding: 12px; border-radius: 11px; background: var(--soft); line-height: 1.4; }.attestation input { width: 18px; min-height: 18px; margin: 1px 0 0; }.role-options { display: grid; gap: 9px; }.role-options button { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; width: 100%; min-height: 68px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; text-align: left; color: var(--ink); background: white; }.role-options button:hover { border-color: #91bce8; background: #f7fbff; }.role-option-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: white; background: var(--navy-800); font-size: .75rem; font-weight: 900; }.role-options strong, .role-options small { display: block; }.role-options strong { font-size: .82rem; }.role-options small { margin-top: 4px; color: var(--muted); font-size: .75rem; }.detail-status { margin: -3px 0 16px; }.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }.detail-grid div { min-width: 0; padding: 12px; background: var(--soft); }.detail-grid dt, .detail-notes span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }.detail-grid dd { margin: 5px 0 0; color: var(--navy-900); font-size: .8rem; font-weight: 800; line-height: 1.35; }.detail-notes { margin-bottom: 15px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }.detail-notes p { margin: 6px 0 0; color: var(--ink); font-size: .8rem; line-height: 1.5; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; width: min(calc(100% - 30px), 430px); padding: 13px 15px; border-radius: 15px; color: white; background: var(--navy-900); box-shadow: 0 16px 38px rgba(0,0,0,.25); opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: .24s ease; }.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }.toast > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--navy-900); background: #72e1b6; font-size: .7rem; font-weight: 900; }.toast p { margin: 0; font-size: .76rem; font-weight: 750; }

@media (min-width: 520px) {
  .role-button > span:nth-child(2) { display: block; }
  .log-card { grid-template-columns: 48px minmax(0, 1fr) auto; }.log-card > button { grid-column: auto; }
}

@media (min-width: 760px) {
  .main-shell { padding-left: 28px; padding-right: 28px; }.demo-note { margin-left: -28px; margin-right: -28px; padding-left: 28px; }
  .schedule-list { grid-template-columns: 1fr 1fr; }.schedule-card { grid-template-columns: 66px minmax(0, 1fr); }.stats-grid { gap: 13px; }.request-card dl { grid-template-columns: repeat(4, 1fr); }
  .modal { margin: auto; border-radius: 25px; }.modal--wide { width: min(100% - 30px, 720px); }
}

@media (min-width: 1080px) {
  body { background: #e7edf2; }
  .app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); max-width: 1440px; margin: 0 auto; background: var(--canvas); box-shadow: 0 0 80px rgba(7,24,39,.12); }
  .side-rail { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 30px 19px; color: white; background: var(--navy-900); }
  .brand--rail .brand-mark { box-shadow: none; }.brand--rail strong { color: white; }.brand--rail small { color: #8ea7bb; }
  .desktop-nav { display: grid; gap: 6px; margin-top: 42px; }.desktop-nav .nav-button { display: flex; justify-content: flex-start; gap: 13px; min-height: 48px; padding: 0 13px; border-radius: 13px; color: #9db0c1; font-size: .8rem; }.desktop-nav .nav-button.is-active { color: white; background: rgba(45,140,240,.18); }.desktop-nav .nav-button svg { width: 20px; }
  .rail-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 16px 4px 0; border-top: 1px solid rgba(255,255,255,.1); }.rail-footer strong, .rail-footer small { display: block; }.rail-footer strong { font-size: .8rem; }.rail-footer small { margin-top: 3px; color: #8ea5b8; font-size: .75rem; }
  .main-shell { width: 100%; max-width: 980px; padding-bottom: 50px; }.topbar { justify-content: flex-end; }.brand--mobile { display: none; }.bottom-nav { display: none; }.toast { bottom: 28px; }
}

@media (max-width: 430px) {
  .schedule-heading { align-items: flex-start; }.schedule-heading .button { width: 44px; overflow: hidden; padding: 0; color: transparent; font-size: 0; }.schedule-heading .button::after { content: "+"; color: white; font-size: 1.3rem; }
  .schedule-summary { align-items: flex-start; }.availability { max-width: 110px; justify-content: flex-end; padding-top: 4px; text-align: right; }
  .field-row--three { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .main-shell { padding-left: 12px; padding-right: 12px; }.demo-note { margin-left: -12px; margin-right: -12px; padding-left: 12px; }.week-strip { gap: 2px; padding: 5px; }.week-strip button { min-height: 62px; }.stats-grid small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Secure portal states */
.is-hidden { display: none !important; }
button:disabled { cursor: wait; opacity: .62; }
.loading-screen { display: grid; place-items: center; align-content: center; gap: 28px; min-height: 100vh; padding: 24px; background: radial-gradient(circle at 50% 30%, #153c5e, var(--navy-950) 62%); }
.brand--loading strong { color: white; }.brand--loading small { color: #8da8be; }
.spinner { width: 27px; height: 27px; border: 3px solid rgba(255,255,255,.2); border-top-color: #67b1ff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-shell { display: grid; min-height: 100vh; background: white; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; width: min(100%, 520px); min-height: 100vh; margin: 0 auto; padding: 34px 24px calc(34px + env(safe-area-inset-bottom)); }
.auth-brand { margin-bottom: 56px; }.auth-heading { margin-bottom: 25px; }.auth-heading > p:last-child { max-width: 440px; margin: 14px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.auth-form { display: grid; gap: 15px; }.auth-form label { display: grid; gap: 7px; color: var(--navy-700); font-size: .85rem; font-weight: 850; }
.auth-form input { width: 100%; min-height: 51px; padding: 12px 13px; border: 1px solid #c8d5df; border-radius: 12px; color: var(--navy-900); background: white; font-size: 1rem; }
.auth-form .button { margin-top: 3px; }.text-button { padding: 5px; border: 0; color: var(--blue-600); background: transparent; font-size: .82rem; font-weight: 850; }
.auth-switch { margin-top: 22px; color: var(--muted); text-align: center; font-size: .85rem; }.auth-switch button { padding: 0; border: 0; color: var(--blue-600); background: transparent; font-weight: 850; }
.form-help { margin: -3px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.inline-alert { margin-top: 17px; padding: 12px 13px; border: 1px solid #b9ddcf; border-radius: 12px; color: var(--green-600); background: var(--green-100); font-size: .8rem; font-weight: 750; line-height: 1.45; }
.inline-alert.is-error { border-color: #efc2c8; color: var(--red-600); background: var(--red-100); }
.auth-aside { display: none; }

.pending-shell { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: radial-gradient(circle at 50% 25%, #153c5e, var(--navy-950) 65%); }
.pending-card { width: min(100%, 520px); padding: 34px 28px; border-radius: 24px; text-align: center; background: white; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.pending-card h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); }.pending-card > p:not(.eyebrow) { margin: 16px auto 25px; color: var(--muted); line-height: 1.65; }
.pending-card .button { width: 100%; }.pending-card .text-button { margin-top: 12px; }
.pending-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 19px; border-radius: 50%; color: var(--green-600); background: var(--green-100); font-size: 1.25rem; font-weight: 950; }

.live-note { display: flex; align-items: center; gap: 7px; margin: 0 -16px 22px; padding: 8px 16px; color: #38506a; background: #deebf6; font-size: .75rem; }
.live-note > span { width: 7px; height: 7px; border-radius: 50%; background: #19966f; box-shadow: 0 0 0 4px rgba(25,150,111,.12); }.live-note strong { font-size: .75rem; }.live-note small { margin-left: auto; color: #60768b; font-size: .75rem; }
.week-controls { display: flex; align-items: center; flex: 0 0 auto; height: 43px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.week-controls button { min-width: 34px; height: 35px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--navy-700); background: transparent; font-size: .78rem; font-weight: 850; }.week-controls button:first-child, .week-controls button:last-child { font-size: 1.25rem; }
.refresh-button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--blue-600); background: white; font-size: .75rem; font-weight: 850; }

.pilot-approval { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; width: 100%; }.pilot-approval select { min-width: 0; min-height: 43px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--navy-800); background: white; font-size: .78rem; font-weight: 700; }
.admin-list { display: grid; gap: 11px; }.admin-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.admin-card__heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }.admin-card__heading div { min-width: 0; }.admin-card__heading strong, .admin-card__heading p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.admin-card__heading strong { font-size: .88rem; }.admin-card__heading p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.admin-fields { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 9px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }.admin-fields label { display: grid; gap: 5px; color: var(--muted); font-size: .72rem; font-weight: 800; }.admin-fields select, .access-row select { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy-800); background: white; font-size: .8rem; font-weight: 750; }.approval-check { display: flex !important; align-items: center; gap: 7px !important; min-height: 42px; color: var(--navy-800) !important; }.approval-check input { width: 18px; height: 18px; }
.access-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, auto) auto; align-items: center; gap: 8px; margin-top: 12px; }.access-row > div { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.access-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 7px 6px 9px; border-radius: 999px; color: #315a80; background: var(--blue-100); font-size: .72rem; font-weight: 850; }.access-chip button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; color: #315a80; background: rgba(49,90,128,.1); }.no-access { color: var(--muted); font-size: .75rem; font-style: italic; }
.fleet-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }.fleet-card strong { font-size: .86rem; }.fleet-card p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.security-card { margin-top: 13px; padding: 18px; border: 1px solid #c9def4; border-radius: var(--radius); background: var(--blue-100); }.security-card strong { color: var(--navy-800); font-size: .88rem; }.security-card p { margin: 7px 0 0; color: #4d6a83; font-size: .8rem; line-height: 1.55; }.account-signout { margin-top: 16px; }
.optional { color: var(--muted); font-size: .72rem; font-weight: 600; }

@media (min-width: 760px) {
  .live-note { margin-left: -28px; margin-right: -28px; padding-left: 28px; padding-right: 28px; }
  .admin-list { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .auth-shell { grid-template-columns: minmax(440px, .9fr) minmax(420px, 1.1fr); }
  .auth-panel { padding: 54px 64px; }.auth-aside { display: flex; flex-direction: column; justify-content: space-between; padding: 70px 65px; color: white; background: radial-gradient(circle at 80% 20%, #174b73, var(--navy-950) 65%); }
  .auth-aside h2 { max-width: 560px; margin-top: 16px; color: white; font-size: clamp(2.1rem, 4vw, 3.7rem); line-height: 1.03; letter-spacing: -.05em; }.auth-kicker { color: #67b1ff; font-size: .78rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
  .auth-aside ul { display: grid; gap: 15px; max-width: 560px; margin: 40px 0 0; padding: 0; list-style: none; color: #b5c9d9; }.auth-aside li { position: relative; padding-left: 28px; line-height: 1.5; }.auth-aside li::before { content: "✓"; position: absolute; left: 0; color: #72e1b6; font-weight: 900; }
}

@media (max-width: 620px) {
  .pilot-approval { grid-template-columns: 1fr 1fr; }.pilot-approval select { grid-column: 1 / -1; }
  .admin-fields { grid-template-columns: 1fr auto; }.admin-fields .button { grid-column: 1 / -1; }.access-row { grid-template-columns: 1fr auto; }.access-row > div { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .week-controls #todayWeek { display: none; }.week-controls { width: 78px; justify-content: space-between; }.schedule-toolbar { align-items: end; }
  .auth-panel { padding-left: 20px; padding-right: 20px; }.auth-brand { margin-bottom: 42px; }
}
