/* ============================================================
   CrewBench — main stylesheet
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #1d9e75;
  --green-dark:  #0f6e56;
  --green-light: #e1f5ee;
  --red:         #e24b4a;
  --red-light:   #fcebeb;
  --amber:       #ba7517;
  --amber-light: #faeeda;
  --blue:        #185fa5;
  --blue-light:  #e6f1fb;
  --gray-50:     #f9f9f9;
  --gray-100:    #f0f0f0;
  --gray-400:    #767676;
  --gray-700:    #444;
  --gray-900:    #1a1a1a;
  --radius:      8px;
  --radius-lg:   12px;
}

[data-theme="dark"] {
  --gray-50:     #0f172a;
  --gray-100:    #1e293b;
  --gray-400:    #64748b;
  --gray-700:    #94a3b8;
  --gray-900:    #e2e8f0;
  --green-light: #0d2e22;
  --red-light:   #2a0d0d;
  --amber-light: #2a1e05;
  --blue-light:  #0d1e38;
}

/* ---- Dark mode overrides (hardcoded colors) ---- */
body[data-theme="dark"]                  { background: var(--gray-50); color: var(--gray-900); }
[data-theme="dark"] .navbar              { background: #1e293b; border-bottom-color: #2d3f55; }
[data-theme="dark"] .nav-links a         { color: var(--gray-700); }
[data-theme="dark"] .nav-links a:hover   { background: #243044; color: #e2e8f0; }
[data-theme="dark"] .nav-links a.active { background: #243044; color: #1D9E75; }
[data-theme="dark"] .nav-user-dropdown   { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .nav-user-info       { border-color: #2d3f55; }
[data-theme="dark"] .nav-user-name       { color: #e2e8f0; }
[data-theme="dark"] .nav-user-email      { color: #64748b; }
[data-theme="dark"] .nav-user-divider    { background: #2d3f55; }
[data-theme="dark"] .nav-user-item       { color: #94a3b8; }
[data-theme="dark"] .nav-user-item:hover { background: #243044; color: #e2e8f0; }
[data-theme="dark"] .trip-card           { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .stat                { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .form-input          { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .btn-secondary       { background: #1e293b; border-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] dialog               { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .pilot-card          { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .pricing-card        { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .plan-status-card    { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .an-card             { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .an-box              { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .btn-secondary:hover { background: #2d3f55; }
[data-theme="dark"] .an-table tbody tr:hover td { background: #243044; }
[data-theme="dark"] .nav-theme-label     { color: #64748b; }

/* ─── Roster ─────────────────────────────────────────────────────────── */
[data-theme="dark"] .roster-sidebar           { background: #0f172a; border-right-color: #2d3f55; }
[data-theme="dark"] .roster-pilot-chip        { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .roster-pilot-chip:hover  { background: #243044; }
[data-theme="dark"] .roster-date-nav          { background: #1e293b; border-bottom-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .roster-gantt-header      { background: #1e293b; border-bottom-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .roster-gantt-row         { border-bottom-color: #2d3f55; }
[data-theme="dark"] .roster-gantt-cell        { border-right-color: #2d3f55; }
[data-theme="dark"] .roster-gantt-cell.today  { background: #0d1e38; }
[data-theme="dark"] .roster-modal             { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .roster-modal-header      { border-bottom-color: #2d3f55; }
[data-theme="dark"] .roster-empty             { color: #64748b; }

/* ─── Trip Show ───────────────────────────────────────────────────────── */
[data-theme="dark"] .trip-show-card           { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .trip-show-header         { border-bottom-color: #2d3f55; }
[data-theme="dark"] .trip-info-card           { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .trip-info-label          { color: #64748b; }
[data-theme="dark"] .trip-info-value          { color: #e2e8f0; }
[data-theme="dark"] .trip-legs-accordion      { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .leg-card                 { background: #243044; border-color: #2d3f55; }
[data-theme="dark"] .leg-card-header          { background: #1e293b; border-bottom-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .leg-drag-handle          { color: #4a5f77; }
[data-theme="dark"] .leg-remove-btn           { color: #4a5f77; }
[data-theme="dark"] .leg-detail-label         { color: #64748b; }
[data-theme="dark"] .leg-detail-value         { color: #e2e8f0; }
[data-theme="dark"] .crew-section             { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .crew-section-header      { border-bottom-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .crew-row                 { border-bottom-color: #2d3f55; }
[data-theme="dark"] .crew-row:hover           { background: #243044; }
[data-theme="dark"] .pilot-status-badge       { color: #94a3b8; }
[data-theme="dark"] .trip-notes-card          { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .trip-notes-body          { color: #94a3b8; }

/* ============================================================
   CREWBENCH — TRIP SHOW PAGE DARK MODE FIX
   Scope: body[data-theme="dark"] only
   ============================================================ */

/* --------------------------------------------------
   1. FLIGHT INFO CARD (top card)
   -------------------------------------------------- */
body[data-theme="dark"] .flight-info-card,
body[data-theme="dark"] .fic-card {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .fic-datetime,
body[data-theme="dark"] .fic-info-icon {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .fic-route,
body[data-theme="dark"] .fic-airport,
body[data-theme="dark"] .fic-dest {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .fic-arc-label,
body[data-theme="dark"] .fic-hours-label {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .fic-meta,
body[data-theme="dark"] .fic-crew-info,
body[data-theme="dark"] .fic-aircraft {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .fic-bottom-row,
body[data-theme="dark"] .fic-details-row {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .fic-details-row span,
body[data-theme="dark"] .fic-details-row div {
  color: #94a3b8 !important;
}

/* --------------------------------------------------
   2. FLIGHT LEGS ACCORDION
   -------------------------------------------------- */
body[data-theme="dark"] .legs-accordion {
  background: #1e293b !important;
  border-color: #2d3f55 !important;
}

body[data-theme="dark"] .legs-accordion-header,
body[data-theme="dark"] .legs-accordion-title {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .legs-accordion-count {
  color: #94a3b8 !important;
  background: rgba(148, 163, 184, 0.1) !important;
}

body[data-theme="dark"] .legs-accordion-route {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .leg-detail-card {
  background: #162032 !important;
  border-color: #2d3f55 !important;
}

body[data-theme="dark"] .leg-detail-num {
  color: #64748b !important;
}

body[data-theme="dark"] .leg-detail-airport,
body[data-theme="dark"] .leg-detail-city,
body[data-theme="dark"] .leg-detail-iata {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .leg-detail-arrow {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .leg-detail-time,
body[data-theme="dark"] .leg-detail-ft,
body[data-theme="dark"] .leg-detail-date {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .leg-detail-time-main {
  color: #e2e8f0 !important;
}

/* --------------------------------------------------
   3. RESPONSE STATS CARDS (3 Available / 0 Pending / 0 Unavailable)
   -------------------------------------------------- */
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .response-stats-card,
body[data-theme="dark"] .stats-grid > div {
  background: #1e293b !important;
  border-color: #2d3f55 !important;
}

body[data-theme="dark"] .stat-number {
  color: #34d399 !important;
}

body[data-theme="dark"] .stat-label {
  color: #94a3b8 !important;
}

/* --------------------------------------------------
   4. SENIORITY PANEL
   -------------------------------------------------- */
body[data-theme="dark"] .seniority-panel,
body[data-theme="dark"] [class*="seniority-panel"] {
  background: #1e293b !important;
  border-color: #2d3f55 !important;
}

body[data-theme="dark"] .seniority-panel-title {
  color: #34d399 !important;
}

body[data-theme="dark"] .seniority-panel-desc {
  color: #94a3b8 !important;
}

/* --------------------------------------------------
   5. NOTIFY CREW MEMBERS SECTION
   -------------------------------------------------- */
body[data-theme="dark"] .notify-section,
body[data-theme="dark"] .notify-crew-section {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .pilot-checkboxes {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .pilot-checkbox-label {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
}

body[data-theme="dark"] .pilot-checkbox-label:hover {
  background: #243449 !important;
}

body[data-theme="dark"] .pilot-checkbox-label.pilot-checkbox-select-all {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #2d3f55 !important;
}

/* Spans inside pilot-checkbox-label (e.g. "0.0 Hours this month") */
body[data-theme="dark"] .pilot-checkbox-label span {
  color: #64748b !important;
}

/* Override for pilot name span (should be bright) */
body[data-theme="dark"] .pilot-checkbox-label .pilot-name {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .pilot-checkbox-label.pilot-checkbox-select-all .pilot-name {
  color: #94a3b8 !important;
}

/* pilot-ratings inside label */
body[data-theme="dark"] .pilot-checkbox-label .pilot-ratings {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .pilot-name {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .pilot-ratings {
  color: #94a3b8 !important;
}

/* --------------------------------------------------
   6. RESPONSES SECTION
   -------------------------------------------------- */
body[data-theme="dark"] .responses-section,
body[data-theme="dark"] .response-list {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .response-row {
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
}

body[data-theme="dark"] .response-pilot,
body[data-theme="dark"] .pilot-name-btn {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .response-time {
  color: #64748b !important;
}

body[data-theme="dark"] .response-status {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .pilot-initials,
body[data-theme="dark"] .response-avatar {
  color: #e2e8f0 !important;
}

/* --------------------------------------------------
   7. STATUS BADGES
   -------------------------------------------------- */
body[data-theme="dark"] .status-badge.badge-available,
body[data-theme="dark"] .badge-available {
  background: rgba(52, 211, 153, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
}

body[data-theme="dark"] .status-badge.badge-pending,
body[data-theme="dark"] .badge-pending {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}

body[data-theme="dark"] .status-badge.badge-unavailable,
body[data-theme="dark"] .badge-unavailable {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

body[data-theme="dark"] .status-badge.badge-open,
body[data-theme="dark"] .badge-open {
  background: rgba(96, 165, 250, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
}

/* --------------------------------------------------
   8. CONFIRM BUTTON (in response rows)
   -------------------------------------------------- */
body[data-theme="dark"] .btn.btn-confirm,
body[data-theme="dark"] .btn-confirm {
  background: rgba(52, 211, 153, 0.15) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

body[data-theme="dark"] .btn.btn-confirm:hover,
body[data-theme="dark"] .btn-confirm:hover {
  background: rgba(52, 211, 153, 0.25) !important;
  color: #6ee7b7 !important;
}

/* --------------------------------------------------
   9. TRIP HISTORY / AUDIT LOG
   -------------------------------------------------- */
body[data-theme="dark"] .audit-section * {
  border-color: #2d3f55 !important;
}

body[data-theme="dark"] .audit-section,
body[data-theme="dark"] .trip-history-section {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .audit-header {
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
  background: transparent !important;
}

body[data-theme="dark"] .audit-title,
body[data-theme="dark"] .audit-event-title {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .audit-meta {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .audit-time {
  color: #64748b !important;
}

body[data-theme="dark"] .audit-dot {
  background: #94a3b8 !important;
  border-color: #1e293b !important;
}

body[data-theme="dark"] .audit-dot.audit-dot-notify {
  background: #3b82f6 !important;
}

body[data-theme="dark"] .audit-dot.audit-dot-response {
  background: #34d399 !important;
}

body[data-theme="dark"] .audit-dot.audit-dot-created {
  background: #94a3b8 !important;
}

/* Download CSV button */
body[data-theme="dark"] .audit-inner-link,
body[data-theme="dark"] .btn-secondary.audit-inner-link {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #2d3f55 !important;
}

body[data-theme="dark"] .audit-inner-link:hover {
  background: #243449 !important;
  color: #e2e8f0 !important;
}

/* --------------------------------------------------
   10. COMPLIANCE DOCUMENTS SECTION
   -------------------------------------------------- */
body[data-theme="dark"] .compliance-section,
body[data-theme="dark"] [class*="compliance-section"],
body[data-theme="dark"] [class*="shield-section"],
body[data-theme="dark"] .crewbench-shield-section {
  background: #1e293b !important;
  border-color: #2d3f55 !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"] [class*="compliance-header"],
body[data-theme="dark"] [class*="shield-header"] {
  background: rgba(52, 211, 153, 0.1) !important;
  color: #e2e8f0 !important;
  border-color: rgba(52, 211, 153, 0.2) !important;
}

body[data-theme="dark"] [class*="compliance-doc-card"],
body[data-theme="dark"] [class*="doc-card"] {
  background: #162032 !important;
  border-color: #2d3f55 !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"] [class*="doc-title"],
body[data-theme="dark"] [class*="doc-name"] {
  color: #e2e8f0 !important;
}

body[data-theme="dark"] [class*="doc-status"],
body[data-theme="dark"] [class*="doc-desc"],
body[data-theme="dark"] [class*="doc-subtitle"] {
  color: #94a3b8 !important;
}

/* --------------------------------------------------
   11. INLINE STYLE OVERRIDES
   (Some elements have hardcoded color:#111 inline styles)
   -------------------------------------------------- */
body[data-theme="dark"] [style*="color:#111"],
body[data-theme="dark"] [style*="color: #111"],
body[data-theme="dark"] [style*="color:#000"],
body[data-theme="dark"] [style*="color: #000"],
body[data-theme="dark"] [style*="color:rgb(17"],
body[data-theme="dark"] [style*="color: rgb(17"],
body[data-theme="dark"] [style*="color:rgb(0, 0, 0)"],
body[data-theme="dark"] [style*="color: rgb(0, 0, 0)"] {
  color: #e2e8f0 !important;
}

/* --------------------------------------------------
   12. TRIP STATUS BADGE
   -------------------------------------------------- */
body[data-theme="dark"] .trip-status-badge,
body[data-theme="dark"] .status-open {
  background: rgba(96, 165, 250, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
}

/* ─── Bench Pilots / Crew Index ───────────────────────────────────────── */
[data-theme="dark"] .bench-filter-bar         { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .filter-btn               { background: #0f172a; border-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .filter-btn:hover         { background: #243044; color: #e2e8f0; }
[data-theme="dark"] .filter-btn.active        { background: #243044; color: #e2e8f0; border-color: #64748b; }
[data-theme="dark"] .seniority-panel          { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .seniority-panel-header   { border-bottom-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .seniority-row            { border-bottom-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .seniority-row:hover      { background: #243044; }
[data-theme="dark"] .seniority-number         { color: #64748b; }
[data-theme="dark"] .pilot-tags-row           { border-top-color: #2d3f55; }
[data-theme="dark"] .pilot-tag                { background: #243044; border-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .bench-empty-state        { color: #64748b; }
[data-theme="dark"] .crew-search-input        { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .crew-search-input::placeholder { color: #64748b; }

/* ─── Analytics ───────────────────────────────────────────────────────── */
[data-theme="dark"] .an-tabs                  { border-bottom-color: #2d3f55; }
[data-theme="dark"] .an-tab                   { color: #64748b; }
[data-theme="dark"] .an-tab:hover             { color: #94a3b8; }
[data-theme="dark"] .an-tab.active            { color: #e2e8f0; border-bottom-color: #e2e8f0; }
[data-theme="dark"] .an-bar-track             { background: #0f172a; }
[data-theme="dark"] .an-table                 { border-color: #2d3f55; }
[data-theme="dark"] .an-table thead tr        { background: #0f172a; }
[data-theme="dark"] .an-table thead th        { color: #64748b; border-bottom-color: #2d3f55; }
[data-theme="dark"] .an-table tbody tr        { border-bottom-color: #2d3f55; }
[data-theme="dark"] .an-table tbody td        { color: #94a3b8; }
[data-theme="dark"] .an-number                { color: #e2e8f0; }
[data-theme="dark"] .an-label                 { color: #64748b; }
[data-theme="dark"] .an-upsell-overlay        { background: rgba(15,23,42,0.85); }
[data-theme="dark"] .an-lock-card             { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }

/* ============================================================
   CREWBENCH ANALYTICS PAGE — COMPREHENSIVE DARK MODE FIX
   All tabs: Fleet & Trips, Pilot analytics, Your Impact, Fuel, Duty
   ============================================================ */

/* Page subtitle */
body[data-theme="dark"] p {
  color: #94a3b8 !important;
}

/* Inactive tabs */
body[data-theme="dark"] .an-tab {
  color: #64748b !important;
}
body[data-theme="dark"] .an-tab:hover {
  color: #94a3b8 !important;
}
body[data-theme="dark"] .an-tab.active,
body[data-theme="dark"] .an-tab[aria-selected="true"],
body[data-theme="dark"] .an-tab.an-tab-active {
  color: #e2e8f0 !important;
}

/* Stat cards */
body[data-theme="dark"] .an-card,
body[data-theme="dark"] .an-stat-card {
  background: #1e293b !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] .an-card-val {
  color: #e2e8f0 !important;
}
body[data-theme="dark"] .an-card-label,
body[data-theme="dark"] .an-card-sub {
  color: #94a3b8 !important;
}

/* Bar chart rows */
body[data-theme="dark"] .an-bar-lbl,
body[data-theme="dark"] .an-bar-lbl-wide {
  color: #94a3b8 !important;
}
body[data-theme="dark"] .an-bar-count {
  color: #94a3b8 !important;
}
body[data-theme="dark"] .an-bar-track {
  background: #2d3f55 !important;
}

/* Progress bars */
body[data-theme="dark"] .an-prog-track {
  background: #2d3f55 !important;
}
body[data-theme="dark"] .an-prog-pct {
  color: #94a3b8 !important;
}

/* Chart labels */
body[data-theme="dark"] .an-chart-num {
  color: #94a3b8 !important;
}
body[data-theme="dark"] .an-chart-label,
body[data-theme="dark"] .an-chart-axis {
  color: #64748b !important;
}

/* Tables */
body[data-theme="dark"] .an-table th,
body[data-theme="dark"] .analytics-table th,
body[data-theme="dark"] table th {
  color: #64748b !important;
  border-color: #2d3f55 !important;
  background: transparent !important;
}
body[data-theme="dark"] .an-table td,
body[data-theme="dark"] .analytics-table td,
body[data-theme="dark"] table td {
  color: #94a3b8 !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] table td:first-child {
  color: #e2e8f0 !important;
}

/* Section cards */
body[data-theme="dark"] .an-section,
body[data-theme="dark"] .an-card-section {
  background: #1e293b !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] .an-section-title,
body[data-theme="dark"] .an-card-section-title {
  color: #e2e8f0 !important;
}
body[data-theme="dark"] .an-section-sub,
body[data-theme="dark"] .an-card-section-sub {
  color: #94a3b8 !important;
}

/* Pilot analytics — reliability badges */
body[data-theme="dark"] .an-rating.an-rating-excellent {
  background: rgba(52, 211, 153, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.3) !important;
}
body[data-theme="dark"] .an-rating.an-rating-good {
  background: rgba(96, 165, 250, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
}
body[data-theme="dark"] .an-rating.an-rating-poor {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

/* Your Impact — Share button */
body[data-theme="dark"] .an-btn.an-btn-secondary,
body[data-theme="dark"] .an-btn-secondary {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] .an-btn.an-btn-secondary:hover {
  background: #243449 !important;
}

/* Duty tab — role labels, bar track, footnote */
body[data-theme="dark"] .an-duty-row span,
body[data-theme="dark"] .duty-row-role,
body[data-theme="dark"] .an-pilot-role {
  color: #64748b !important;
}
body[data-theme="dark"] .an-duty-track,
body[data-theme="dark"] .duty-bar-track {
  background: #2d3f55 !important;
}
body[data-theme="dark"] .an-duty-label.overtime,
body[data-theme="dark"] .duty-label-overtime {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.12) !important;
}
body[data-theme="dark"] .an-duty-label.undertime,
body[data-theme="dark"] .duty-label-undertime {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
body[data-theme="dark"] .an-duty-footnote,
body[data-theme="dark"] .duty-footnote {
  color: #64748b !important;
}

/* Inline style overrides (hardcoded dark colors) */
body[data-theme="dark"] [style*="color:#111"],
body[data-theme="dark"] [style*="color: #111"],
body[data-theme="dark"] [style*="color:#000"],
body[data-theme="dark"] [style*="color: #000"],
body[data-theme="dark"] [style*="color:rgb(17"],
body[data-theme="dark"] [style*="color: rgb(17"],
body[data-theme="dark"] [style*="color:rgb(26"],
body[data-theme="dark"] [style*="color: rgb(26"],
body[data-theme="dark"] [style*="color:rgb(68"],
body[data-theme="dark"] [style*="color: rgb(68"],
body[data-theme="dark"] [style*="color:rgb(85"],
body[data-theme="dark"] [style*="color: rgb(85"] {
  color: #94a3b8 !important;
}

/* Light background inline overrides (progress bar tracks) */
body[data-theme="dark"] [style*="background-color:rgb(240"],
body[data-theme="dark"] [style*="background-color: rgb(240"],
body[data-theme="dark"] [style*="background-color:rgb(239"],
body[data-theme="dark"] [style*="background-color: rgb(239"] {
  background: #2d3f55 !important;
  color: #e2e8f0 !important;
}

/* ─── Settings ────────────────────────────────────────────────────────── */
[data-theme="dark"] .settings-section         { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .settings-section-header  { border-bottom-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .settings-row             { border-bottom-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .settings-label           { color: #e2e8f0; }
[data-theme="dark"] .settings-sublabel        { color: #64748b; }
[data-theme="dark"] .toggle-group             { background: #0f172a; border-color: #2d3f55; }
[data-theme="dark"] .toggle-option            { color: #64748b; }
[data-theme="dark"] .toggle-option.active     { background: #243044; color: #e2e8f0; }
[data-theme="dark"] .contact-btn              { background: #1e293b; border-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .contact-btn:hover        { background: #243044; color: #e2e8f0; }
[data-theme="dark"] .rating-tag               { background: #243044; border-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .settings-sidebar         { background: #0f172a; border-right-color: #2d3f55; }
[data-theme="dark"] .settings-sidebar-title   { color: #e2e8f0; }
[data-theme="dark"] .settings-sidebar-group-label { color: #64748b; }
[data-theme="dark"] .settings-sidebar-item    { color: #94a3b8; }
[data-theme="dark"] .settings-sidebar-item:hover { background: #1a2540; color: #e2e8f0; }
[data-theme="dark"] .settings-sidebar-item--active { background: #1e293b; color: #e2e8f0; border-left-color: #1D9E75; }
[data-theme="dark"] .settings-sidebar-item--locked { color: #3d4f63; }
[data-theme="dark"] .settings-content         { background: #0f172a; }
[data-theme="dark"] .settings-input           { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .notification-delay-input { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }

/* ─── Mobile Nav ──────────────────────────────────────────────────────── */
[data-theme="dark"] .mobile-menu              { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .mobile-menu-item         { color: #94a3b8; border-bottom-color: #2d3f55; }
[data-theme="dark"] .mobile-menu-item:hover   { background: #243044; color: #e2e8f0; }
[data-theme="dark"] .mobile-menu-overlay      { background: rgba(15,23,42,0.6); }

/* ─── Onboarding / Page Tour ──────────────────────────────────────────── */
[data-theme="dark"] .onboarding-panel         { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .onboarding-step          { border-color: #2d3f55; }
[data-theme="dark"] .onboarding-step.done     { color: #64748b; }
[data-theme="dark"] .tour-tooltip             { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .tour-tooltip-arrow       { background: #1e293b; border-color: #2d3f55; }

/* ─── Chat Widget ─────────────────────────────────────────────────────── */
[data-theme="dark"] #chat-window              { background: #1e293b !important; border-color: #2d3f55 !important; color: #e2e8f0 !important; }
[data-theme="dark"] #chat-messages            { background: #1e293b !important; }
[data-theme="dark"] .chat-msg-bot             { background: #243044 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .chat-msg-user            { background: #0d1e38 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .chat-pill                { background: #243044 !important; border-color: #1D9E75 !important; color: #e2e8f0 !important; }
[data-theme="dark"] #chat-input-area          { background: #1e293b !important; border-top-color: #2d3f55 !important; }
[data-theme="dark"] #chat-input               { background: #1e293b !important; border-color: #2d3f55 !important; color: #e2e8f0 !important; }
[data-theme="dark"] #chat-escalate-area       { background: #1e293b !important; border-top-color: #2d3f55 !important; }
[data-theme="dark"] #chat-escalate-input      { background: #1e293b !important; border-color: #2d3f55 !important; color: #e2e8f0 !important; }

/* ─── Select / Textarea elements ──────────────────────────────────────── */
[data-theme="dark"] select                    { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] textarea                  { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }

/* ─── Inline-style overrides (FTL, compliance, feedback, settings views) */
/* Background colors */
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background-color:#ffffff"],
[data-theme="dark"] [style*="background-color: #ffffff"]         { background: #1e293b !important; }

[data-theme="dark"] [style*="background:#fafafa"],
[data-theme="dark"] [style*="background: #fafafa"],
[data-theme="dark"] [style*="background:#f9fafb"],
[data-theme="dark"] [style*="background: #f9fafb"],
[data-theme="dark"] [style*="background:#f3f4f6"],
[data-theme="dark"] [style*="background: #f3f4f6"],
[data-theme="dark"] [style*="background:#f0f0f0"],
[data-theme="dark"] [style*="background: #f0f0f0"],
[data-theme="dark"] [style*="background:#ebebeb"],
[data-theme="dark"] [style*="background: #ebebeb"]               { background: #243044 !important; }

/* Border colors */
[data-theme="dark"] [style*="border:1px solid #e5e7eb"],
[data-theme="dark"] [style*="border: 1px solid #e5e7eb"],
[data-theme="dark"] [style*="border:1px solid #e0e0e0"],
[data-theme="dark"] [style*="border: 1px solid #e0e0e0"],
[data-theme="dark"] [style*="border:1px solid #ddd"],
[data-theme="dark"] [style*="border: 1px solid #ddd"],
[data-theme="dark"] [style*="border:1px solid #ccc"],
[data-theme="dark"] [style*="border: 1px solid #ccc"]            { border-color: #2d3f55 !important; }

[data-theme="dark"] [style*="border:2px solid #e5e7eb"],
[data-theme="dark"] [style*="border: 2px solid #e5e7eb"]         { border-color: #2d3f55 !important; }

[data-theme="dark"] [style*="border-bottom:1px solid #f3f4f6"],
[data-theme="dark"] [style*="border-bottom: 1px solid #f3f4f6"],
[data-theme="dark"] [style*="border-bottom:1px solid #e5e7eb"],
[data-theme="dark"] [style*="border-bottom: 1px solid #e5e7eb"],
[data-theme="dark"] [style*="border-bottom:2px solid #e5e7eb"],
[data-theme="dark"] [style*="border-bottom: 2px solid #e5e7eb"],
[data-theme="dark"] [style*="border-bottom:1px solid #f0f0f0"],
[data-theme="dark"] [style*="border-bottom: 1px solid #f0f0f0"] { border-bottom-color: #2d3f55 !important; }

[data-theme="dark"] [style*="border-top:1px solid #f3f4f6"],
[data-theme="dark"] [style*="border-top: 1px solid #f3f4f6"]    { border-top-color: #2d3f55 !important; }

[data-theme="dark"] [style*="border:1px dashed #ccc"],
[data-theme="dark"] [style*="border: 1px dashed #ccc"]           { border-color: #2d3f55 !important; background: #1e293b !important; }

/* Text colors */
[data-theme="dark"] [style*="color:#374151"],
[data-theme="dark"] [style*="color: #374151"],
[data-theme="dark"] [style*="color:#333"],
[data-theme="dark"] [style*="color: #333"]                       { color: #e2e8f0 !important; }

[data-theme="dark"] [style*="color:#6b7280"],
[data-theme="dark"] [style*="color: #6b7280"],
[data-theme="dark"] [style*="color:#6c757d"],
[data-theme="dark"] [style*="color: #6c757d"]                    { color: #94a3b8 !important; }

[data-theme="dark"] [style*="color:#9ca3af"],
[data-theme="dark"] [style*="color: #9ca3af"],
[data-theme="dark"] [style*="color:#999"],
[data-theme="dark"] [style*="color: #999"],
[data-theme="dark"] [style*="color:#aaa"],
[data-theme="dark"] [style*="color: #aaa"]                       { color: #64748b !important; }

/* Progress bar tracks */
[data-theme="dark"] [style*="background:#f3f4f6"][style*="height:6px"],
[data-theme="dark"] [style*="background: #f3f4f6"][style*="height:6px"] { background: #243044 !important; }

/* Upsell / highlight banners — keep green tint but darken */
[data-theme="dark"] [style*="background:#f0fdf9"],
[data-theme="dark"] [style*="background: #f0fdf9"],
[data-theme="dark"] [style*="background:#f0fdf8"],
[data-theme="dark"] [style*="background: #f0fdf8"]               { background: #0d2e22 !important; }

/* Lock overlays */
[data-theme="dark"] [style*="background:rgba(255,255,255"],
[data-theme="dark"] [style*="background: rgba(255,255,255"]      { background: rgba(15,23,42,0.75) !important; }

/* ─── Tail / airport / rating picker dropdowns ────────────────────── */
[data-theme="dark"] .tail-dropdown         { background: #1e293b !important; border-color: #2d3f55 !important; }
[data-theme="dark"] .tail-option           { color: #e2e8f0 !important; }
[data-theme="dark"] .tail-option:hover     { background: #243044 !important; }
[data-theme="dark"] .tail-opt-tail         { color: #e2e8f0 !important; }
[data-theme="dark"] .tail-opt-rating       { color: #94a3b8 !important; }
[data-theme="dark"] .airport-dropdown     { background: #1e293b !important; border-color: #2d3f55 !important; }
[data-theme="dark"] .airport-option       { color: #e2e8f0 !important; }
[data-theme="dark"] .airport-option:hover { background: #243044 !important; }

/* ─── Rating currency / airport tags ─────────────────────────────── */
[data-theme="dark"] .airport-tag                              { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .airport-tag-locked                       { background: #0d2e22; color: #4ade80; }
[data-theme="dark"] .rating-currency-tag                      { background: #243044; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .rating-tag-white                         { background: #1e293b; }
[data-theme="dark"] .rating-tag-divider                       { background: #2d3f55; }
[data-theme="dark"] .rating-tag-date-input                    { color: #e2e8f0; }
[data-theme="dark"] .rating-currency-tag .airport-tag-remove  { background: #1e293b; color: #64748b; }

/* ─── Role / status badges ────────────────────────────────────────── */
[data-theme="dark"] .badge-captain          { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .badge-first-officer    { background: #2e1065; color: #c4b5fd; }
[data-theme="dark"] .badge-flight-attendant { background: #3b0a2a; color: #f9a8d4; }
[data-theme="dark"] .badge-open             { color: #60a5fa; }
[data-theme="dark"] .badge-filled           { color: #4ade80; }
[data-theme="dark"] .badge-cancelled        { color: #94a3b8; }

/* ─── Admin pages ─────────────────────────────────────────────────── */
[data-theme="dark"] .admin-table-wrap                           { border-color: #2d3f55 !important; }
[data-theme="dark"] .admin-table th                             { background: #0f172a !important; color: #64748b !important; border-bottom-color: #2d3f55 !important; }
[data-theme="dark"] .admin-table td                             { border-bottom-color: #2d3f55 !important; color: #94a3b8 !important; }
[data-theme="dark"] .admin-table tbody tr:hover td              { background: #243044 !important; }
[data-theme="dark"] .admin-filter-bar input,
[data-theme="dark"] .admin-filter-bar select                    { background: #1e293b !important; border-color: #2d3f55 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .admin-clear-btn                            { background: #1e293b !important; border-color: #2d3f55 !important; color: #94a3b8 !important; }
[data-theme="dark"] .admin-page-btn                             { background: #1e293b !important; border-color: #2d3f55 !important; color: #94a3b8 !important; }
[data-theme="dark"] .admin-tab-count                            { background: #243044 !important; color: #94a3b8 !important; }
[data-theme="dark"] .admin-count                                { color: #64748b; }
[data-theme="dark"] .admin-muted                                { color: #64748b !important; }

/* ─── Admin statistics ────────────────────────────────────────────── */
[data-theme="dark"] .stat-card                { background: #1e293b !important; border-color: #2d3f55 !important; }
[data-theme="dark"] .stat-card .stat-value    { color: #e2e8f0 !important; }
[data-theme="dark"] .stat-card .stat-label    { color: #64748b !important; }
[data-theme="dark"] .stat-card .stat-sub      { color: #64748b !important; }
[data-theme="dark"] .stat-card.highlight      { background: #0d2e22 !important; border-color: #1D9E75 !important; }
[data-theme="dark"] .stats-box                { background: #1e293b !important; border-color: #2d3f55 !important; }
[data-theme="dark"] .stats-box-title          { color: #64748b !important; }
[data-theme="dark"] .stats-table td           { border-bottom-color: #2d3f55 !important; }
[data-theme="dark"] .stats-table .st-label    { color: #94a3b8 !important; }
[data-theme="dark"] .stats-table .st-count    { color: #e2e8f0 !important; }
[data-theme="dark"] .stats-section-title      { color: #64748b; }
[data-theme="dark"] .stats-disclaimer         { color: #4a5f77; }

/* ─── Settings training — warm parchment palette ─────────────────── */
[data-theme="dark"] [style*="background:#F1EFE8"],
[data-theme="dark"] [style*="background: #F1EFE8"]                  { background: #1e293b !important; }
[data-theme="dark"] [style*="border:1px solid #D3D1C7"],
[data-theme="dark"] [style*="border: 1px solid #D3D1C7"]            { border-color: #2d3f55 !important; background: #243044 !important; }
[data-theme="dark"] [style*="border-top:1px solid #D3D1C7"],
[data-theme="dark"] [style*="border-top: 1px solid #D3D1C7"]        { border-top-color: #2d3f55 !important; }
[data-theme="dark"] [style*="color:#5F5E5A"],
[data-theme="dark"] [style*="color: #5F5E5A"]                       { color: #94a3b8 !important; }

/* ─── Settings referrals — stat cards ────────────────────────────── */
[data-theme="dark"] [style*="background:#f5f8ff"],
[data-theme="dark"] [style*="background: #f5f8ff"]                  { background: #0d1e38 !important; }
[data-theme="dark"] [style*="background:#f5fff9"],
[data-theme="dark"] [style*="background: #f5fff9"]                  { background: #0d2e22 !important; }
[data-theme="dark"] [style*="border:1px solid #d0daf5"],
[data-theme="dark"] [style*="border: 1px solid #d0daf5"]            { border-color: #1e3a5f !important; }
[data-theme="dark"] [style*="border:1px solid #a7f3d0"],
[data-theme="dark"] [style*="border: 1px solid #a7f3d0"]            { border-color: #1D9E75 !important; }
[data-theme="dark"] [style*="color:#1D4ED8"],
[data-theme="dark"] [style*="color: #1D4ED8"]                       { color: #93c5fd !important; }

/* ─── Inline status badges (rewarded / pending) ──────────────────── */
[data-theme="dark"] [style*="background:#dcfce7"],
[data-theme="dark"] [style*="background: #dcfce7"]                  { background: #0d2e22 !important; }
[data-theme="dark"] [style*="color:#166534"],
[data-theme="dark"] [style*="color: #166534"]                       { color: #4ade80 !important; }
[data-theme="dark"] [style*="background:#fef9c3"],
[data-theme="dark"] [style*="background: #fef9c3"]                  { background: #2a1e05 !important; }
[data-theme="dark"] [style*="color:#854d0e"],
[data-theme="dark"] [style*="color: #854d0e"]                       { color: #fbbf24 !important; }

/* ─── Reports page ────────────────────────────────────────────────── */
[data-theme="dark"] .report-panel                                   { border-color: #2d3f55; }
[data-theme="dark"] .report-panel[open]                             { border-color: #1D9E75; }
[data-theme="dark"] .report-panel-summary                           { background: #1e293b; }
[data-theme="dark"] .report-panel[open] .report-panel-summary       { background: #0d2e22; border-bottom-color: #1a4a35; }
[data-theme="dark"] .report-panel-title                             { color: #e2e8f0; }
[data-theme="dark"] .report-panel-subtitle                          { color: #64748b; }
[data-theme="dark"] .report-panel-body                              { background: #162032; }
[data-theme="dark"] .report-table th                                { background: #1e293b !important; color: #64748b !important; border-bottom-color: #2d3f55 !important; }
[data-theme="dark"] .report-table td                                { border-bottom-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .report-table td:first-child                    { color: #e2e8f0; }
[data-theme="dark"] .report-table tbody tr:hover                    { background: #243044; }
[data-theme="dark"] .report-status--open                            { background: rgba(251,191,36,0.15); color: #fbbf24; }
[data-theme="dark"] .report-status--filled                          { background: rgba(52,211,153,0.15); color: #34d399; }
[data-theme="dark"] .report-status--cancelled                       { background: rgba(148,163,184,0.15); color: #94a3b8; }

/* ─── Welcome / subscription modal ───────────────────────────────── */
[data-theme="dark"] .welcome-modal                                  { background: #1e293b; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
}

/* ---- Accessibility ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  background: var(--green);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus { top: 8px; }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ---- Nav ---- */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-brand {
  font-size: 17px;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.nav-links { display: flex; gap: 4px; align-items: center; padding: 0; }
.nav-links a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.1s, color 0.1s;
}
.nav-links a:hover { color: var(--green-dark); background: var(--green-light); }
.nav-links a.active { color: var(--green-dark); background: var(--green-light); font-weight: 600; }

/* lp-nav-links intentionally removed — replaced by lp-nav-page-links */

/* ---- Layout ---- */
.main-content { max-width: 980px; margin: 0 auto; padding: 32px 24px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-subtitle { font-size: 14px; color: var(--gray-400); margin-top: 4px; }

/* ---- Flash messages ---- */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.flash-notice { background: var(--green-light); color: var(--green-dark); }
.flash-alert  { background: var(--red-light);   color: var(--red); }
.flash-upgrade-link { color: #712B13; font-weight: 600; text-decoration: underline; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.1s;
}
.btn-primary        { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover  { background: var(--green-dark); }
.btn-secondary      { background: #fff; color: var(--gray-700); border-color: var(--gray-100); }
.btn-secondary:hover{ background: var(--gray-50); }
.btn-danger         { background: var(--red); color: #fff; }
.btn-danger-outline { background: transparent; color: var(--red); border-color: var(--red); }
.btn-confirm        { background: var(--green-light); color: var(--green-dark); border-color: var(--green-light); font-size: 13px; padding: 5px 12px; }
.btn-current        { background: var(--gray-100); color: var(--gray-400); cursor: default; }
.btn-upgrade        { background: var(--amber-light); color: var(--amber); border-color: var(--amber-light); }
.btn-sm             { padding: 5px 10px; font-size: 13px; }
.btn-xs             { padding: 3px 8px; font-size: 11px; font-weight: 600; }

/* ---- Trip cards ---- */
.trip-list { display: flex; flex-direction: column; gap: 10px; }
.trip-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s;
}
.trip-card:hover { border-color: var(--green); }
.trip-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.trip-route       { font-size: 16px; font-weight: 600; }
.trip-card-meta   { font-size: 13px; color: var(--gray-400); margin-bottom: 8px; display: flex; gap: 12px; }
.trip-card-responses { display: flex; gap: 12px; font-size: 13px; }
.resp-available   { color: var(--green-dark); }
.resp-pending     { color: var(--amber); }
.resp-unavailable { color: var(--red); }

/* ---- Status badges ---- */
.badge-open        { background: var(--blue-light);  color: var(--blue);       padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-filled      { background: var(--green-light); color: var(--green-dark); padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-cancelled   { background: var(--gray-100);    color: var(--gray-400);   padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-available   { background: var(--green-light); color: var(--green-dark); padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.badge-contract    { background: var(--amber-light); color: var(--amber);      padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-pending     { background: var(--amber-light); color: var(--amber);      padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.badge-ioe        { background: var(--amber-light); color: var(--amber);      padding: 1px 6px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; vertical-align: middle; }
.badge-unavailable { background: var(--red-light);   color: var(--red);        padding: 2px 8px; border-radius: 20px; font-size: 12px; }

/* ---- Response stats ---- */
.response-stats { display: flex; gap: 12px; margin-bottom: 24px; }
.stat { flex: 1; background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat-number { font-size: 28px; font-weight: 600; }
.stat-label  { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.stat-available .stat-number   { color: var(--green-dark); }
.stat-pending .stat-number     { color: var(--amber); }
.stat-unavailable .stat-number { color: var(--red); }

/* ---- Response rows ---- */
.response-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.response-row:last-child { border-bottom: none; }
.response-pilot  { display: flex; align-items: center; gap: 10px; flex: 1; }
.response-status { display: flex; align-items: center; gap: 8px; }
.response-time   { font-size: 12px; color: var(--gray-400); }
.response-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.response-actions .badge-filled {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border: 1px solid #b8e8d6;
}
.response-actions .button_to { display: inline-flex; margin: 0; }
.response-actions .btn.btn-sm.btn-danger {
  background: transparent;
  color: #c0392b;
  border: 1px solid #e8b4b4;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.response-actions .btn.btn-sm.btn-danger:hover {
  background: #fdf0f0;
  border-color: #e24b4a;
  color: #e24b4a;
}
.pilot-initials  { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-light); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.pilot-name      { font-weight: 500; font-size: 14px; display: block; }
.pilot-ratings   { font-size: 12px; color: var(--gray-400); }
.conflict-badge { flex-basis: 100%; padding-left: 34px; font-size: 11px; color: #C0392B; display: flex; align-items: center; gap: 4px; }
.conflict-badge a { color: #C0392B; text-decoration: underline; }

/* ---- Pilot name button (opens contact modal) ---- */
.pilot-name-btn { background: none; border: none; padding: 0; font-weight: 500; font-size: 14px; color: var(--gray-900); cursor: pointer; }
.pilot-name-btn:hover { color: var(--blue); }
.pilot-name-btn .schedule-pilot-name { text-decoration: underline dotted var(--gray-400); text-underline-offset: 2px; }
.pilot-name-btn:hover .schedule-pilot-name { text-decoration-color: var(--blue); }

/* ---- Audit upgrade dialog ---- */
dialog#audit-upgrade-dialog::backdrop { background: rgba(0,0,0,0.45); }

/* ---- Pilot contact modal ---- */
dialog.pilot-contact-dialog { border: none; border-radius: var(--radius-lg); padding: 0; width: 340px; max-width: 94vw; box-shadow: 0 8px 32px rgba(0,0,0,0.18); margin: auto; }
dialog.pilot-contact-dialog::backdrop { background: rgba(0,0,0,0.45); }
.pilot-contact-header { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--gray-100); position: relative; }
.pilot-contact-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-light); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.pilot-contact-info { flex: 1; min-width: 0; }
.pilot-contact-name { font-weight: 700; font-size: 15px; color: var(--gray-900); }
.pilot-contact-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.pilot-contact-employment { font-size: 12px; color: var(--gray-400); }
.pilot-seniority-badge { font-size: 12px; color: var(--gray-400); }
.pilot-contact-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--gray-400); cursor: pointer; padding: 2px; line-height: 1; display: flex; }
.pilot-contact-close:hover { color: var(--gray-700); }
.pilot-contact-ratings { padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--gray-100); }
.pilot-rating-tag { background: var(--gray-100); color: var(--gray-700); padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.pilot-contact-actions { padding: 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.pilot-contact-btn { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--gray-50); border: 1px solid var(--gray-100); color: var(--gray-900); font-size: 14px; text-decoration: none; font-weight: 500; transition: background 0.15s; }
.pilot-contact-btn:hover { background: var(--gray-100); }
.pilot-contact-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot-contact-btn--whatsapp { color: #128c7e; }
.pilot-contact-btn--whatsapp:hover { background: #e8f5f3; }

/* ---- Confirmed banner ---- */
.confirmed-banner {
  background: var(--green-light);
  color: var(--green-dark);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}

/* ---- Notify section ---- */
.notify-section  { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--gray-100); }
.notify-section h2 { font-size: 16px; margin-bottom: 14px; }
.pilot-checkboxes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pilot-checkbox-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; padding: 8px; border-radius: var(--radius); border: 1px solid var(--gray-100); background: #fff; }
.pilot-checkbox-label:hover { border-color: var(--green); }
.pilot-checkbox-label input { margin: 0; }

/* ---- Usage bar ---- */
.usage-bar {
  background: var(--amber-light);
  color: var(--amber);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.usage-bar a { color: var(--amber); font-weight: 500; }

/* ---- Forms ---- */
.form { max-width: 520px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.form-input { width: 100%; padding: 9px 12px; border: 1px solid var(--gray-100); border-radius: var(--radius); font-size: 14px; color: var(--gray-900); background: #fff; }
.form-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,158,117,0.12); }
.form-hint  { font-size: 12px; color: var(--gray-400); margin-top: 4px; display: block; }
.form-errors  { background: var(--red-light);   color: var(--red);        padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: 13px; }
.form-notice  { background: var(--green-light); color: var(--green-dark); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: 13px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; }

/* ---- Bench pilots ---- */
.pilot-list    { display: flex; flex-direction: column; gap: 8px; }
.pilot-card    { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.pilot-avatar  { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-light); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.pilot-card.pilot-inactive { opacity: 0.5; }
.pilot-info    { flex: 1; }
.pilot-contact { font-size: 12px; color: var(--gray-400); display: block; }
.pilot-actions { display: flex; gap: 8px; }

/* ---- Pricing ---- */
.billing-toggle { display: flex; gap: 6px; margin-bottom: 24px; }
.toggle-btn { padding: 7px 16px; border-radius: var(--radius); border: 1px solid var(--gray-100); background: #fff; cursor: pointer; font-size: 14px; color: var(--gray-700); }
.toggle-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.save-badge { background: var(--amber-light); color: var(--amber); font-size: 11px; padding: 1px 6px; border-radius: 20px; margin-left: 6px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 32px; }
.pricing-card { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: 24px; position: relative; }
.pricing-card-featured { border: 2px solid var(--green); }
.pricing-card-featured-blue { border: 2px solid var(--blue); }
.pricing-card-featured-gray { border: 2px solid var(--gray-400); }
.pricing-card-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--green); color: #fff; font-size: 11px; font-weight: 500; padding: 2px 12px; border-radius: 20px; white-space: nowrap; }
.pricing-card-badge-blue { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; font-size: 11px; font-weight: 500; padding: 2px 12px; border-radius: 20px; white-space: nowrap; }
.pricing-card-badge-gray { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--gray-400); color: #fff; font-size: 11px; font-weight: 500; padding: 2px 12px; border-radius: 20px; white-space: nowrap; }
.pricing-card-header h2 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.price-amount { font-size: 28px; font-weight: 700; }
.price-period { font-size: 14px; font-weight: 400; color: var(--gray-400); }
.price-saving { font-size: 12px; color: var(--green-dark); display: block; margin-top: 2px; }
.pricing-features { list-style: none; margin: 16px 0; font-size: 14px; }
.pricing-features li { padding: 5px 0; border-bottom: 1px solid var(--gray-100); }
.pricing-features li::before { content: "✓ "; color: var(--green); font-weight: 600; }
.pricing-features li:last-child { border-bottom: none; }
.pricing-actions { margin-top: 16px; }
.plan-status-card { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 24px; }
.plan-status-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.plan-badge { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }
.plan-badge-free   { background: var(--gray-100);    color: var(--gray-700); }
.plan-badge-pro    { background: var(--green-light); color: var(--green-dark); }
.plan-badge-scale  { background: var(--blue-light);  color: var(--blue); }
.plan-badge-shield { background: #f0ebff;            color: #5b21b6; }
.billing-interval { font-size: 12px; color: var(--gray-400); margin-left: 8px; }
.cancellation-notice { font-size: 13px; color: var(--amber); }
.cancel-section { padding-top: 24px; border-top: 1px solid var(--gray-100); font-size: 14px; color: var(--gray-400); }
.cancel-section p { margin-bottom: 12px; }

/* ---- Respond page (pilot magic link) ---- */
.respond-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--gray-50); }
.respond-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--gray-100); padding: 32px; max-width: 440px; width: 100%; }
.respond-header h1 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.respond-header p  { color: var(--gray-400); font-size: 14px; margin-bottom: 20px; }
.trip-details { background: var(--gray-50); border-radius: var(--radius); padding: 16px; margin-bottom: 24px; }
.trip-detail-row { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.trip-detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--gray-400); min-width: 70px; }
.detail-value { font-weight: 500; }
.respond-buttons { display: flex; flex-direction: column; gap: 10px; }
.btn-respond { width: 100%; padding: 14px; border-radius: var(--radius); font-size: 16px; font-weight: 600; cursor: pointer; border: none; }
.btn-available   { background: var(--green);   color: #fff; }
.btn-unavailable { background: var(--gray-100); color: var(--gray-700); }
.respond-footer { font-size: 12px; color: var(--gray-400); text-align: center; margin-top: 16px; }

/* ---- Result pages ---- */
.respond-card-result { text-align: center; }
.result-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 16px; }
.result-available   { background: var(--green-light); color: var(--green-dark); }
.result-unavailable { background: var(--red-light);   color: var(--red); }

/* ---- Empty states ---- */
.empty-state { text-align: center; padding: 48px 24px; color: var(--gray-400); }
.empty-state p { margin-bottom: 16px; }
.empty-state-small { color: var(--gray-400); font-size: 14px; padding: 12px 0; }

/* ---- Section headers ---- */
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.section-header h2 { font-size: 16px; font-weight: 600; }

/* ---- Trip notes ---- */
.trip-notes { background: var(--gray-50); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; font-size: 14px; color: var(--gray-700); }
.hint-text { font-size: 13px; color: var(--gray-400); }

/* ---- Plan detail ---- */
.plan-detail { font-size: 14px; color: var(--gray-700); }

@media (max-width: 600px) {
  .main-content { padding: 16px; }
  .response-stats { flex-wrap: wrap; }
  .stat { min-width: 80px; }
  .trip-card-meta { flex-direction: column; gap: 2px; }
}

.settings-section { max-width: 100%; }
.settings-section h2 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.settings-desc { font-size: 14px; color: var(--gray-400); margin-bottom: 20px; }
.settings-tabs { display: flex; border-bottom: 1px solid var(--gray-100); margin-bottom: 28px; gap: 0; }
.settings-tab { padding: 10px 20px; font-size: 13px; color: var(--gray-400); text-decoration: none; }
.settings-tab--active { color: var(--gray-900); font-weight: 600; border-bottom: 2px solid var(--gray-900); margin-bottom: -1px; }
.settings-layout { display: flex; min-height: calc(100vh - 72px); }
.settings-sidebar { width: 210px; flex-shrink: 0; background: var(--gray-50); border-right: 1px solid var(--gray-100); padding: 8px 0 24px; }
.settings-sidebar-title { font-size: 16px; font-weight: 700; color: var(--gray-900); padding: 8px 18px 18px; }
.settings-sidebar-group-label { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--gray-400); padding: 12px 18px 4px; display: block; }
.settings-sidebar-item { display: flex; align-items: center; padding: 7px 18px; font-size: 13px; color: var(--gray-700); text-decoration: none; border-left: 3px solid transparent; }
.settings-sidebar-item:hover { background: var(--gray-100); color: var(--gray-900); }
.settings-sidebar-item--active { background: #fff; color: var(--gray-900); font-weight: 600; border-left-color: #1D9E75; padding-left: 15px; }
.settings-sidebar-item--locked { color: #c9d0d9; pointer-events: none; }
.settings-sidebar-item--sub { padding-left: 28px; font-size: 12px; }
.settings-sidebar-pro-badge { font-size: 9px; background: #fef3c7; color: #92400e; padding: 1px 5px; border-radius: 6px; font-weight: 700; margin-left: 8px; }
.settings-content { flex: 1; padding: 28px 36px; min-width: 0; }
.ratings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 16px;
}

.badge-captain        { background: #E6F1FB; color: #0C447C; padding: 1px 8px; border-radius: 20px; font-size: 12px; }
.badge-first-officer  { background: #EEEDFE; color: #3C3489; padding: 1px 8px; border-radius: 20px; font-size: 12px; }
.badge-both           { background: #E1F5EE; color: #085041; padding: 1px 8px; border-radius: 20px; font-size: 12px; }
.inner-ratings  {margin-left: 5px;}

.pilot-checkbox-select-all {
  background: var(--gray-50);
  border-radius: var(--radius);
}

/* Role checkboxes on trip new/edit */
.role-checkboxes { display: flex; flex-direction: column; gap: 6px; }
.role-checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--gray-100); background: #fff; }
.role-checkbox-label:hover { border-color: var(--green); }
.role-checkbox-label input[type=checkbox] { margin: 0; width: 16px; height: 16px; flex-shrink: 0; }
.role-checkbox-full-crew { background: var(--gray-50); }
.role-checkbox-name { font-size: 14px; font-weight: 500; }
.role-checkbox-sub { font-size: 12px; color: var(--gray-400); margin-left: auto; }
#notify-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.trip-card-past { opacity: 0.55; }
.badge-past { background: var(--gray-100); color: var(--gray-400); padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.show-all-row { text-align: center; margin-top: 20px; }
.edit-warning {
  background: var(--amber-light);
  color: var(--amber);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 18px;
}

/* ---- Landing page ---- */
.lp { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a1a; }
.lp-nav { display: flex; justify-content: space-between; align-items: center; padding: 0 8%; height: 64px; border-bottom: 1px solid #f0f0f0; background: #fff; position: sticky; top: 0; z-index: 100; }
.lp-nav-left { display: flex; align-items: center; gap: 32px; height: 100%; }
.lp-nav-brand { display: flex; align-items: center; height: 100%; text-decoration: none; flex-shrink: 0; }
.lp-nav-brand img { display: block; }
.lp-nav-page-links { display: flex; align-items: center; gap: 4px; height: 100%; padding-top: 20px;}
.lp-nav-page-link { font-size: 14px; font-weight: 500; color: #555; text-decoration: none; padding: 6px 12px; border-radius: 8px; transition: color .15s, background .15s; display: flex; align-items: center; }
.lp-nav-page-link:hover { color: #0f6e56; background: #f0faf6; }
.lp-nav-actions { display: flex; gap: 8px; align-items: center; }
.lp-brand { font-size: 20px; font-weight: 700; color: #0F6E56; letter-spacing: -0.5px; }
.btn-lp-nav { padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; color: #444; border: 1px solid #e0e0e0; background: #fff; transition: background .15s; }
.btn-lp-nav:hover { background: #f5f5f5; }
.btn-lp-nav.btn-lp-primary { background: #1D9E75; color: #fff; border-color: #1D9E75; }
.btn-lp-nav.btn-lp-primary:hover { background: #0f6e56; }

/* Scroll-to-top button */
.lp-scroll-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: #0f6e56; color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.18); opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 500; }
.lp-scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lp-scroll-top:hover { background: #1d9e75; }

.lp-hero { padding: 80px 8% 64px; text-align: center; }
.lp-tag { display: inline-block; background: #E1F5EE; color: #0F6E56; font-size: 13px; font-weight: 500; padding: 5px 16px; border-radius: 20px; margin-bottom: 24px; letter-spacing: 0.5px; }
.lp-hero h1 { font-size: 56px; font-weight: 700; line-height: 1.1; letter-spacing: -2px; margin-bottom: 22px; }
.lp-green { color: #1D9E75; }
.lp-hero p { font-size: 19px; color: #555; line-height: 1.7; margin-bottom: 36px; max-width: 640px; margin-left: auto; margin-right: auto; }
.lp-hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-lp { display: inline-block; padding: 14px 30px; border-radius: 8px; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-lp-primary { background: #1D9E75; color: #fff; display: block; text-align: center;}
.btn-lp-primary:hover { background: #0F6E56; }
.btn-lp-secondary { background: #fff; color: #444; border: 1px solid #e0e0e0; }
.btn-lp-outline { background: #fff; color: #1D9E75; border: 1.5px solid #1D9E75; display: block; text-align: center; }
.btn-lp-outline:hover { background: #E1F5EE; }

/* ── Trusted-by logos section ── */
.lp-logos { padding: 40px 8% 44px; background: #fff; border-bottom: 1px solid #f0f0f0; }
.lp-logos-label { text-align: center; font-size: 11px; font-weight: 600; color: #bbb; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 28px; }
.lp-logos-row { display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; }
.lp-logo-item { display: flex; align-items: center; }
.lp-logo-img { height: 36px; width: auto; max-width: 140px; object-fit: contain; filter: grayscale(1); opacity: 0.6; transition: opacity 0.2s, filter 0.2s; }
.lp-logo-img:hover { opacity: 1; filter: grayscale(0); }

.lp-usecases { background: #0F6E56; padding: 64px 8%; }
.lp-usecases-label { text-align: center; font-size: 12px; font-weight: 600; color: #9FE1CB; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 32px; }
.lp-uc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 900px; margin: 0 auto; }
.lp-uc-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; padding: 24px 26px; }
.lp-uc-tag { font-size: 11px; font-weight: 700; color: #9FE1CB; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 12px; }
.lp-uc-quote { font-size: 15px; font-style: italic; color: rgba(255,255,255,0.88); line-height: 1.7; margin-bottom: 14px; }
.lp-uc-attr { font-size: 13px; color: rgba(255,255,255,0.45); }
.lp-uc-card-wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .lp-uc-grid { grid-template-columns: 1fr; } .lp-uc-card-wide { grid-column: auto; } }

.lp-how { padding: 72px 8%; }
.lp-how h2 { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 44px; letter-spacing: -0.5px; }
.lp-steps { display: flex; align-items: stretch; }
.lp-step { flex: 1; min-width: 0; background: #fff; border: 1px solid #f0f0f0; border-radius: 14px; padding: 28px 18px; text-align: center; }
.lp-step-arrow { display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0 6px; opacity: 0.7; }
.lp-step-num { width: 44px; height: 44px; border-radius: 12px; background: #E1F5EE; color: #0F6E56; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.lp-step-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.lp-step-desc { font-size: 13px; color: #888; line-height: 1.6; }

.lp-why { background: #f9f9f9; padding: 72px 8%; border-top: 1px solid #f0f0f0; }
.lp-why h2 { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 40px; letter-spacing: -0.5px; }
.lp-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.lp-feature { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid #f0f0f0; border-radius: 14px; padding: 24px; }
.lp-feature-icon { width: 40px; height: 40px; background: #E1F5EE; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lp-feature-title { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.lp-feature-desc { font-size: 14px; color: #888; line-height: 1.6; }

.lp-pricing { padding: 72px 8%; }
.lp-pricing h2 { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 10px; letter-spacing: -0.5px; }
.lp-pricing-sub { text-align: center; color: #888; font-size: 16px; margin-bottom: 40px; }
.lp-pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 18px; }
.lp-pc { background: #fff; border: 1px solid #f0f0f0; border-radius: 16px; padding: 36px 28px; position: relative; }
.lp-pc-featured { border: 2px solid #1D9E75; }
.lp-pc-featured-blue { border: 2px solid rgb(24, 95, 165); }
.lp-pc-featured-gray { border: 2px solid rgb(136, 136, 136); }
.lp-pc-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #1D9E75; color: #fff; font-size: 12px; font-weight: 600; padding: 3px 16px; border-radius: 20px; white-space: nowrap; }
.lp-pc-badge-blue { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: rgb(24, 95, 165); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 16px; border-radius: 20px; white-space: nowrap; }
.lp-pc-badge-gray { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: rgb(136, 136, 136); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 16px; border-radius: 20px; white-space: nowrap; }
.lp-pc-name { font-size: 13px; font-weight: 600; color: #888; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.lp-pc-price { font-size: 42px; font-weight: 700; letter-spacing: -1.5px; }
.lp-pc-period { font-size: 14px; color: #999; margin-bottom: 22px; }
.lp-pc-features { list-style: none; padding: 0; margin-bottom: 24px; }
.lp-pc-features li { font-size: 14px; color: #555; padding: 6px 0; border-bottom: 1px solid #f5f5f5; }
.lp-pc-features li::before { content: "✓ "; color: #1D9E75; font-weight: 700; }
.lp-pc-features li:last-child { border-bottom: none; }
.lp-aircraft-slider { margin: 0 auto 24px; max-width: 480px; text-align: center; }
.lp-slider-label { display: block; font-size: 14px; color: var(--gray-400, #888); margin-bottom: 12px; }
.lp-slider-count { color: var(--gray-100, #f0f0f0); margin-left: 4px; }
.lp-slider-row { display: flex; align-items: center; gap: 10px; }
.lp-slider-row .lp-slider { flex: 1; }
.lp-slider { width: 100%; accent-color: var(--green, #1D9E75); cursor: pointer; }
.lp-slider-btn { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--gray-300, #ccc); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-600, #555); transition: background 0.15s, border-color 0.15s; }
.lp-slider-btn:hover { background: var(--green, #1D9E75); border-color: var(--green, #1D9E75); color: #fff; }
.lp-slider-range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-500, #666); margin-top: 4px; }
.lp-billing-toggle { display: flex; justify-content: center; gap: 4px; margin-bottom: 36px; background: #f4f4f4; border-radius: 12px; padding: 4px; width: fit-content; margin-left: auto; margin-right: auto; }
.lp-toggle-btn { background: transparent; border: none; padding: 8px 22px; border-radius: 9px; font-size: 14px; font-weight: 500; color: #888; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background 0.15s, color 0.15s; }
.lp-toggle-btn.lp-toggle-active { background: #fff; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,0.10); }
.lp-toggle-save-chip { background: #1D9E75; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; letter-spacing: 0.2px; }
.lp-pc-saving { font-size: 12px; color: #1D9E75; font-weight: 600; margin-bottom: 18px; margin-top: -14px; }
.lp-pc-billing-note { font-size: 11px; color: #aaa; margin-bottom: 14px; margin-top: -12px; }

/* Shield banner */
.shield-banner { background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%); border-radius: 18px; padding: 32px 36px; position: relative; overflow: hidden; display: grid; grid-template-columns: 200px 1fr 180px; gap: 36px; align-items: center; }
.shield-banner::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(13,148,136,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(13,148,136,.08) 1px, transparent 1px); background-size: 28px 28px; pointer-events: none; }
.shield-banner-left { position: relative; }
.shield-banner-pill { display: inline-block; background: rgba(13,148,136,.25); border: 1px solid rgba(13,148,136,.5); color: #5eead4; font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; padding: 3px 12px; border-radius: 20px; margin-bottom: 12px; }
.shield-banner-name { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.5px; line-height: 1; margin-bottom: 6px; }
.shield-banner-price { font-size: 36px; font-weight: 800; color: #5eead4; letter-spacing: -1.5px; line-height: 1; }
.shield-banner-period { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 4px; }
.shield-banner-saving { font-size: 11px; color: #5eead4; font-weight: 600; margin-top: 6px; }
.shield-banner-features { position: relative; }
.shield-banner-features-heading { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.35); margin-bottom: 12px; }
.shield-banner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; list-style: none; padding: 0; margin: 0; }
.shield-banner-grid li { font-size: 12.5px; color: rgba(255,255,255,.8); padding: 5px 0 5px 18px; border-bottom: 1px solid rgba(255,255,255,.06); position: relative; line-height: 1.35; }
.shield-banner-grid li:last-child { border-bottom: none; }
.shield-banner-grid li::before { content: "✓"; position: absolute; left: 0; color: #5eead4; font-weight: 700; }
.shield-banner-cta { position: relative; display: flex; flex-direction: column; gap: 10px; }
.shield-banner-btn-primary { display: block; text-align: center; background: #0d9488; color: #fff; font-size: 13px; font-weight: 700; padding: 11px 20px; border-radius: 10px; border: none; text-decoration: none; white-space: nowrap; }
.shield-banner-btn-secondary { display: block; text-align: center; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); font-size: 12px; font-weight: 600; padding: 9px 20px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); text-decoration: none; white-space: nowrap; }
.shield-banner-cta-note { font-size: 10px; color: rgba(255,255,255,.3); text-align: center; line-height: 1.4; }

.lp-footer { padding: 28px 8%; border-top: 1px solid #f0f0f0; display: flex; gap: 24px; align-items: center; font-size: 14px; color: #999; }
.lp-footer a { color: #555; text-decoration: none; }
.lp-footer a:hover { color: #1D9E75; }

/* ── Product showcase ── */
.lp-product { padding: 72px 8%; background: #f7f8fa; }
.lp-product-inner { max-width: 980px; margin: 0 auto; }
.lp-product-heading { text-align: center; margin-bottom: 36px; }
.lp-product-heading h2 { font-size: 32px; font-weight: 700; color: #111; margin: 0 0 10px; }
.lp-product-heading p { font-size: 16px; color: #666; margin: 0; }

.lp-product-tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.lp-product-tab {
  padding: 8px 18px; border-radius: 20px; border: 1.5px solid #e2e2e2;
  background: #fff; font-size: 13px; font-weight: 500; color: #555;
  cursor: pointer; transition: all .15s;
}
.lp-product-tab:hover { border-color: #1D9E75; color: #1D9E75; }
.lp-product-tab.active { background: #1D9E75; border-color: #1D9E75; color: #fff; }

.lp-browser {
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid #e2e2e2; background: #fff;
}
.lp-browser-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; background: #f0f0f0; border-bottom: 1px solid #e2e2e2;
}
.lp-browser-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.lp-browser-url {
  flex: 1; margin: 0 12px; background: #fff; border: 1px solid #e2e2e2;
  border-radius: 6px; padding: 4px 12px; font-size: 12px; color: #888;
  text-align: center; max-width: 280px;
}
.lp-browser-body { overflow: hidden; }

.lp-screen { display: none; }
.lp-screen.active { display: block; }

@media (max-width: 900px) {
  .lp-steps { flex-direction: column; }
  .lp-step-arrow { transform: rotate(90deg); padding: 4px 0; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-pricing-cards { grid-template-columns: 1fr; }
  .shield-banner { grid-template-columns: 1fr; padding: 28px 24px; }
  .shield-banner-grid { grid-template-columns: 1fr; }
}

.lp-hero { position: relative; overflow: hidden; padding: 150px 5% 200px; text-align: center; }
.lp-hero-video-wrap { position: absolute; inset: 0; z-index: 0; }
.lp-hero-video { width: 100%; height: 100%; object-fit: cover; }
.lp-hero-overlay { position: absolute; inset: 0; background: rgba(10, 40, 30, 0.15); }
.lp-hero-content { position: relative; z-index: 1; }
.lp-hero h1 { color: #fff; }
.lp-hero p { color: rgba(255,255,255,0.85); }

/* ---- Auth pages ---- */
.lp-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f9f9f9; padding: 24px; }
.lp-auth-card { background: #fff; border: 1px solid #f0f0f0; border-radius: 16px; padding: 40px; width: 100%; max-width: 440px; }
.lp-auth-header { text-align: center; margin-bottom: 28px; }
.lp-auth-header .lp-brand { display: block; font-size: 22px; font-weight: 700; color: #0F6E56; text-decoration: none; margin-bottom: 16px; }
.lp-auth-header h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.lp-auth-header p { font-size: 14px; color: #888; }
.lp-auth-switch { text-align: center; font-size: 13px; color: #888; margin-top: 16px; }
.lp-auth-switch a { color: #1D9E75; text-decoration: none; font-weight: 500; }

.bench-filter { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn { padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; text-decoration: none; border: 1px solid #f0f0f0; background: #fff; color: #666; }
.filter-btn.active { background: #1D9E75; color: #fff; border-color: #1D9E75; }
.filter-btn:hover { border-color: #1D9E75; color: #1D9E75; }
.badge-flight-attendant { background: #FBEAF0; color: #72243E; padding: 1px 8px; border-radius: 20px; font-size: 12px; }
.hidden { display: none; }

.field_with_errors input,
.field_with_errors select,
.field_with_errors textarea {
  border-color: #e24b4a;
  box-shadow: 0 0 0 3px rgba(226, 75, 74, 0.12);
}

.field_with_errors label {
  color: #a32d2d;
}

.tail-dropdown { position: absolute; z-index: 100; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; margin-top: 2px; width: 100%; max-height: 200px; overflow-y: auto; }
.tail-option { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; cursor: pointer; font-size: 14px; }
.tail-option:hover { background: #f9f9f9; }
.tail-opt-tail { font-weight: 500; color: #1a1a1a; }
.tail-opt-rating { font-size: 12px; color: #888; }
.form-row { position: relative; }

.drag-handle { cursor: grab; padding: 4px; color: #888; flex-shrink: 0; }
.drag-handle:active { cursor: grabbing; }
.seniority-note { font-size: 13px; color: #888; margin-bottom: 12px; padding: 8px 12px; background: #f9f9f9; border-radius: 8px; }
.seniority-panel { background: #E1F5EE; border: 1px solid #9FE1CB; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; }
.seniority-panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.seniority-panel-title { font-size: 14px; font-weight: 600; color: #085041; margin-bottom: 2px; }
.seniority-panel-desc { font-size: 13px; color: #0F6E56; }

/* ---- Audit log ---- */
.audit-section { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--gray-100); }
.audit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.audit-header h2 { font-size: 16px; font-weight: 600; margin: 0; }
.audit-timeline { position: relative; padding-left: 24px; }
.audit-timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--gray-100); }
.audit-event { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; position: relative; }
.audit-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; position: absolute; left: -20px; border: 2px solid #fff; }
.audit-dot-create    { background: #888780; }
.audit-dot-notify    { background: #378ADD; }
.audit-dot-available { background: #1D9E75; }
.audit-dot-unavailable { background: #E24B4A; }
.audit-dot-pending   { background: #BA7517; }
.audit-dot-confirmed { background: #1D9E75; }
.audit-dot-filled    { background: #1D9E75; }
.audit-dot-cancelled { background: #888780; }
.audit-content { display: flex; flex-direction: column; gap: 2px; padding-left: 4px; }
.audit-label { font-size: 14px; font-weight: 500; color: var(--gray-900); }
.audit-meta  { font-size: 13px; color: var(--gray-400); }
.audit-time  { font-size: 12px; color: var(--gray-400); }

/* ── Analytics page ─────────────────────────────────────────────────────── */
.an-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:28px; }
.an-header h1 { font-size:22px; font-weight:700; margin:0 0 4px; color:#111; }
.an-header p  { font-size:13px; color:#888; margin:0; }

/* Tabs */
.an-tabs { display:flex; gap:0; border-bottom:2px solid #f0f0f0; margin-bottom:28px; }
.an-tab  { padding:11px 22px; border:none; background:transparent; font-size:13px;
           font-weight:500; color:#999; cursor:pointer; border-bottom:2px solid transparent;
           margin-bottom:-2px; font-family:inherit; transition:color .15s; white-space:nowrap; }
.an-tab.active { color:#0F6E56; border-bottom-color:#1D9E75; }
.an-tab:hover:not(.active) { color:#444; }
.an-tab-lock { font-size:10px; margin-left:5px; opacity:.7; }
.an-tab-content { animation:anFade .15s ease; }
@keyframes anFade { from{opacity:0;transform:translateY(3px)} to{opacity:1;transform:translateY(0)} }

/* Stat cards */
.an-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:24px; }
.an-card  { background:#fff; border:1px solid #ebebeb; border-radius:12px; padding:20px 22px; }
.an-card-val  { font-size:26px; font-weight:700; color:#111; line-height:1.15; letter-spacing:-.5px; }
.an-card-lbl  { font-size:12px; color:#999; margin-top:5px; font-weight:500; letter-spacing:.02em; }

/* 2-col grid */
.an-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }

/* Section box */
.an-box   { background:#fff; border:1px solid #ebebeb; border-radius:12px; padding:22px 24px; margin-bottom:16px; }
.an-box h3 { font-size:14px; font-weight:600; color:#111; margin:0 0 4px; }
.an-box p  { font-size:12px; color:#999; margin:0 0 16px; }

/* Bar rows */
.an-bar-row  { display:flex; align-items:center; gap:12px; margin-bottom:11px; }
.an-bar-row:last-child { margin-bottom:0; }
.an-bar-lbl  { font-size:13px; color:#444; width:160px; flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.an-bar-lbl-wide { width:210px; }
.an-bar-track { flex:1; background:#f3f3f3; border-radius:6px; height:7px; min-width:0; }
.an-bar-fill  { height:7px; border-radius:6px; }
.an-bar-count { font-size:12px; font-weight:600; color:#444; width:70px; text-align:right; flex-shrink:0; }

/* Mini bar chart */
.an-chart     { display:flex; align-items:flex-end; gap:8px; height:64px; margin-top:16px; }
.an-chart-col { display:flex; flex-direction:column; align-items:center; flex:1; gap:4px; }
.an-chart-bar { width:100%; background:#1D9E75; border-radius:4px 4px 0 0; min-height:4px; }
.an-chart-num { font-size:10px; font-weight:600; color:#1a1a1a; }
.an-chart-lbl { font-size:10px; color:#aaa; }

/* Table */
.an-table     { width:100%; border-collapse:collapse; font-size:13px; }
.an-table th  { text-align:left; padding:9px 14px; font-size:11px; font-weight:600; color:#aaa;
                text-transform:uppercase; letter-spacing:.05em; border-bottom:1px solid #f0f0f0; white-space:nowrap; }
.an-table td  { padding:11px 14px; border-bottom:1px solid #f9f9f9; vertical-align:middle; white-space:nowrap; }
.an-table tbody tr:last-child td { border-bottom:none; }
.an-table tbody tr:hover td { background:#fafafa; }

/* Inline progress in table */
.an-prog       { display:flex; align-items:center; gap:5px; min-width:0; }
.an-prog-track { width:40px; background:#f0f0f0; border-radius:4px; height:5px; flex-shrink:0; }
.an-prog-fill  { height:5px; border-radius:4px; }
.an-prog-pct   { font-size:12px; font-weight:600; color:#444; width:30px; }

/* Reliability badge */
.an-rating     { font-size:11px; font-weight:600; padding:3px 8px; border-radius:20px; }
.an-rating-excellent { background:#E1F5EE; color:#085041; }
.an-rating-good      { background:#E6F1FB; color:#0C447C; }
.an-rating-poor      { background:#FCEBEB; color:#A32D2D; }

/* Upgrade banner */
.an-banner       { border-radius:10px; padding:14px 18px; margin-bottom:20px; display:flex; gap:12px; align-items:center; font-size:13px; }
.an-banner a     { font-weight:700; color:inherit; }
.an-banner-pro   { background:#FAEEDA; border:1px solid #F0C97A; color:#633806; }
.an-banner-scale { background:#E1F5EE; border:1px solid #9FE1CB; color:#085041; }

/* Lock overlay */
.an-lock-wrap { position:relative; overflow:hidden; border-radius:12px; }
.an-lock-overlay { position:absolute; inset:0; background:rgba(255,255,255,.8);
                   backdrop-filter:blur(5px); border-radius:12px; z-index:10;
                   display:flex; flex-direction:column; align-items:center;
                   justify-content:center; gap:10px; padding:24px; text-align:center; }
.an-lock-overlay .lock-icon  { font-size:30px; }
.an-lock-overlay .lock-title { font-size:15px; font-weight:700; color:#111; }
.an-lock-overlay .lock-sub   { font-size:13px; color:#666; max-width:300px; line-height:1.6; }
.an-lock-btn { display:inline-block; background:#1D9E75; color:#fff; padding:10px 22px;
               border-radius:8px; font-size:13px; font-weight:600; text-decoration:none; margin-top:4px; }

/* CTA footer strip */
.an-cta       { margin-top:20px; background:#E1F5EE; border:1px solid #9FE1CB; border-radius:12px;
                padding:18px 22px; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.an-cta-pro   { background:#FAEEDA; border-color:#F0C97A; }
.an-cta-title { font-size:14px; font-weight:600; color:#085041; margin-bottom:3px; }
.an-cta-pro .an-cta-title { color:#633806; }
.an-cta-sub   { font-size:12px; color:#0F6E56; }
.an-cta-pro .an-cta-sub { color:#7A4A0A; }
.an-cta-btn   { background:#1D9E75; color:#fff; padding:11px 22px; border-radius:8px;
                font-size:13px; font-weight:600; text-decoration:none; white-space:nowrap; flex-shrink:0; }

.an-table th,
.an-table td   { padding:10px 6px; }
.an-table th:first-child,
.an-table td:first-child { padding-left:18px; }
.an-table th:last-child,
.an-table td:last-child  { padding-right:18px; }
.an-box.an-lock-wrap { margin-bottom:16px; }

.an-table th   { white-space:normal; line-height:1.3; }
.an-table td   { white-space:nowrap; }


/* ── Nav user dropdown ─────────────────────────────────────────────── */
.nav-user          { position:relative; margin-left:auto; flex-shrink:0; }
.nav-user-btn      { display:flex; align-items:center; gap:7px; background:transparent;
                     border:none; cursor:pointer; padding:6px 8px; border-radius:8px;
                     color:inherit; font-family:inherit; }
.nav-user-btn:hover { background:rgba(0,0,0,.05); }
.nav-user-avatar   { width:32px; height:32px; border-radius:50%; background:#1D9E75;
                     color:#fff; font-size:12px; font-weight:700; display:flex;
                     align-items:center; justify-content:center; flex-shrink:0; }
.nav-user-dropdown { display:none; position:absolute; top:calc(100% + 8px); right:0;
                     background:#fff; border:1px solid #e8e8e8; border-radius:12px;
                     box-shadow:0 8px 24px rgba(0,0,0,.10); min-width:200px; z-index:200;
                     overflow:hidden; }
.nav-user-dropdown.open { display:block; }
.nav-user-info     { padding:14px 16px 12px; }
.nav-user-name     { font-size:13px; font-weight:600; color:#111; }
.nav-user-email    { font-size:12px; color:#999; margin-top:2px; }
.nav-user-divider  { height:1px; background:#f0f0f0; }
.nav-user-item     { display:flex; align-items:center; gap:9px; padding:11px 16px;
                     font-size:13px; color:#333; text-decoration:none;
                     transition:background .1s; }
.nav-user-item:hover     { background:#f9f9f9; color:#111; }
.nav-user-signout        { color:#A32D2D !important; }
.nav-user-signout:hover  { background:#FCEBEB !important; }
/* role-switch button_to form strip */
form:has(.nav-role-switch-btn) { display:block; margin:0; padding:0; }
button.nav-role-switch-btn     { background:none; border:none; cursor:pointer; width:100%;
                                  text-align:left; font:inherit; }

/* ---- Nav theme toggle ---- */
.nav-theme-row   { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; }
.nav-theme-label { font-size:12px; color:#999; }
.nav-theme-pill  { display:flex; background:#f0f0f0; border-radius:8px; padding:3px; gap:2px; }
.nav-theme-btn   { flex:1; padding:4px 10px; border:none; border-radius:6px; font-size:12px;
                   font-weight:500; background:transparent; color:#888; cursor:pointer;
                   font-family:inherit; transition:background .1s,color .1s; white-space:nowrap; }
.nav-theme-btn.active { background:#fff; color:#111; box-shadow:0 1px 3px rgba(0,0,0,.12); }

[data-theme="dark"] .nav-theme-pill        { background:#243044; }
[data-theme="dark"] .nav-theme-btn         { color:#64748b; }
[data-theme="dark"] .nav-theme-btn.active  { background:#2d3f55; color:#e2e8f0; }

/* ── Contact section ───────────────────────────────────────────────── */
.lp-contact        { background:#f0faf6; padding:80px 24px; }
.lp-contact-inner  { max-width:960px; margin:0 auto; display:grid;
                     grid-template-columns:1fr 1.4fr; gap:64px; align-items:start; }
.lp-contact-left h2 { font-size:28px; font-weight:700; color:#111; margin:0 0 12px; }
.lp-contact-left p  { font-size:15px; color:#666; line-height:1.7; margin:0 0 28px; }
.lp-contact-detail  { display:flex; align-items:center; gap:10px; font-size:14px;
                      color:#444; margin-bottom:12px; }
.lp-contact-form    { display:flex; flex-direction:column; gap:16px; }
.lp-contact-row     { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.lp-contact-field   { display:flex; flex-direction:column; gap:6px; }
.lp-contact-field label { font-size:13px; font-weight:500; color:#333; }
.lp-contact-input   { border:1px solid #e0e0e0; border-radius:8px; padding:10px 14px;
                      font-size:14px; font-family:inherit; color:#111; outline:none;
                      transition:border-color .15s; background:#fff; width:100%;
                      box-sizing:border-box; resize:vertical; }
.lp-contact-input:focus  { border-color:#1D9E75; box-shadow:0 0 0 3px rgba(29,158,117,.1); }
.lp-req                  { color:#E24B4A; }
.lp-contact-success      { background:#E1F5EE; border:1px solid #9FE1CB; border-radius:8px;
                           padding:12px 16px; font-size:14px; color:#085041; display:flex;
                           align-items:center; gap:10px; margin-bottom:16px; }

@media (max-width: 700px) {
  .lp-contact-inner { grid-template-columns:1fr; gap:36px; }
  .lp-contact-row   { grid-template-columns:1fr; }
}

/* ── Onboarding welcome spotlight (one-time backdrop + callout) ───── */
.ob-backdrop        { display:none; position:fixed; inset:0; z-index:9100;
                      background:rgba(0,0,0,.72); cursor:pointer;
                      transition:opacity .28s ease; }

.ob-intro-content   { display:none; position:fixed; z-index:9300;
                      top:70px; right:444px;
                      flex-direction:row; align-items:center;
                      pointer-events:none;
                      transition:opacity .28s ease; }

.ob-intro-arrow     { flex-shrink:0; margin-left:10px;
                      filter:drop-shadow(2px 0 4px rgba(0,0,0,.25)); }
.ob-intro-callout   { background:#fff; border-radius:14px; padding:22px 24px 18px;
                      box-shadow:0 12px 40px rgba(0,0,0,.35); width:300px; }
.ob-intro-wave      { font-size:28px; margin-bottom:8px; line-height:1; }
.ob-intro-title     { font-size:17px; font-weight:700; color:#111; margin:0 0 8px; }
.ob-intro-body      { font-size:14px; color:#555; line-height:1.6; margin:0 0 14px; }
.ob-intro-hint      { font-size:12px; color:#aaa; display:block; }

/* ── Onboarding navbar button + dropdown panel ────────────────────── */
.nav-ob             { position:relative; display:flex; align-items:center; }

.nav-ob-btn         { display:flex; align-items:center; gap:6px;
                      background:transparent; border:1px solid #e2e2e2;
                      border-radius:20px; padding:5px 12px 5px 8px;
                      cursor:pointer; font-family:inherit; color:#555;
                      font-size:12px; font-weight:600; white-space:nowrap;
                      transition:border-color .15s, background .15s, color .15s; }
.nav-ob-btn:hover   { border-color:#1D9E75; background:#f0fdf8; color:#1D9E75; }
.nav-ob-btn:hover svg circle:last-child { stroke:#1D9E75; }

.nav-ob-label       { font-size:12px; font-weight:600; }
.nav-ob-count       { font-size:11px; color:#aaa; font-weight:500; }

.nav-ob-panel       { display:none; position:absolute; top:calc(100% + 10px); right:0;
                      width:340px; background:#fff; border:1px solid #e0e0e0;
                      border-radius:12px; box-shadow:0 8px 32px rgba(0,0,0,.14);
                      z-index:9200; }
.nav-ob-panel.open  { display:block; }

.nav-ob-panel-hd    { display:flex; align-items:center; gap:8px; padding:12px 14px;
                      border-bottom:1px solid #f0f0f0; }
.nav-ob-panel-title { font-size:13px; font-weight:700; color:#111; }
.nav-ob-panel-badge { font-size:11px; font-weight:600; color:#1D9E75;
                      background:#E1F5EE; padding:1px 8px; border-radius:10px; }
.nav-ob-panel-bar   { flex:1; height:4px; background:#f0f0f0; border-radius:2px; overflow:hidden; }
.nav-ob-panel-fill  { height:100%; background:#1D9E75; border-radius:2px; }

.ob-body            { overflow-y:auto; max-height:420px; }

.ob-step            { display:flex; align-items:flex-start; gap:10px; padding:9px 14px;
                      border-bottom:1px solid #f8f8f8; transition:background .1s; }
.ob-step:last-child { border-bottom:none; }
.ob-step:hover      { background:#fafafa; }
.ob-step-done       { opacity:.55; }
.ob-step-icon       { flex-shrink:0; margin-top:1px; }
.ob-step-num        { width:20px; height:20px; border-radius:50%; background:#f0f0f0;
                      display:flex; align-items:center; justify-content:center;
                      font-size:10px; font-weight:700; color:#999; }
.ob-step-text       { flex:1; min-width:0; }
.ob-step-title      { font-size:13px; font-weight:600; color:#111; line-height:1.3; }
.ob-step-done .ob-step-title { text-decoration:line-through; color:#aaa; }
.ob-step-desc       { font-size:11px; color:#999; margin-top:1px; line-height:1.4; }
.ob-step-done .ob-step-desc { display:none; }
.ob-step-link            { flex-shrink:0; font-size:12px; font-weight:600; color:#1D9E75;
                           text-decoration:none; padding:3px 9px; border:1px solid #9FE1CB;
                           border-radius:6px; background:#E1F5EE; white-space:nowrap; margin-top:1px; }
.ob-step-link:hover      { background:#1D9E75; color:#fff; border-color:#1D9E75; }
.ob-step-tour-link       { color:#378ADD; border-color:#aad0f5; background:#EDF5FF; }
.ob-step-tour-link:hover { background:#378ADD; color:#fff; border-color:#378ADD; }

/* ── Page tour spotlight ─────────────────────────────────────────────── */
#page-tour-spotlight {
  position:fixed; border-radius:8px; pointer-events:none; z-index:9500;
  box-shadow:0 0 0 9999px rgba(0,0,0,0.72), 0 0 0 2px rgba(255,255,255,0.30);
  transition:top .22s ease, left .22s ease, width .22s ease, height .22s ease;
}
#page-tour-tooltip {
  position:fixed; z-index:9501; background:#fff; border-radius:14px;
  padding:20px 22px 16px; max-width:356px; width:356px;
  box-shadow:0 10px 40px rgba(0,0,0,0.22);
  transition:top .22s ease, left .22s ease;
}
.pt-counter { font-size:11px; font-weight:700; color:#aaa; text-transform:uppercase; letter-spacing:.06em; margin-bottom:7px; }
.pt-title   { font-size:16px; font-weight:700; color:#111; margin-bottom:8px; line-height:1.3; }
.pt-desc    { font-size:13px; color:#555; line-height:1.6; margin-bottom:16px; }
.pt-actions { display:flex; align-items:center; gap:6px; }
.pt-btn-next { margin-left:auto; padding:7px 18px; border-radius:7px; border:none; background:#1D9E75; color:#fff; font-size:13px; font-weight:600; cursor:pointer; }
.pt-btn-next:hover { background:#178a64; }
.pt-btn-back { padding:7px 14px; border-radius:7px; border:1px solid #e2e2e2; background:#fff; font-size:13px; font-weight:500; color:#555; cursor:pointer; }
.pt-btn-back:hover { border-color:#aaa; }
.pt-btn-skip { padding:7px 10px; border-radius:7px; border:none; background:transparent; font-size:12px; color:#bbb; cursor:pointer; }
.pt-btn-skip:hover { color:#e05555; }

@media (max-width:500px) {
  .nav-ob-panel { right:-8px; width:calc(100vw - 16px); }
  .nav-ob-label { display:none; }
  .ob-intro-content { top:auto; right:8px; bottom:8px; flex-direction:column; align-items:flex-end; }
  .ob-intro-arrow { display:none; }
}

/* ── Roster page ───────────────────────────────────────────────────── */
.roster-page          { display:grid; grid-template-columns:220px 1fr;
                        height:calc(100vh - 60px); overflow:hidden; }
.roster-sidebar       { border-right:1px solid #ebebeb; overflow-y:auto;
                        padding:20px 16px; background:#fafafa; }
.roster-sidebar-header h2 { font-size:15px; font-weight:700; margin:0 0 4px; }
.roster-sidebar-header p  { font-size:12px; color:#999; margin:0 0 20px; }
.roster-role-group    { margin-bottom:18px; }
.roster-role-label    { font-size:10px; font-weight:700; letter-spacing:.08em; margin-bottom:8px; }
.roster-pilot-chip    { display:flex; align-items:center; gap:10px; padding:8px 10px;
                        background:#fff; border:1px solid #ebebeb; border-radius:10px;
                        margin-bottom:6px; cursor:grab; }
.roster-pilot-chip:hover { box-shadow:0 2px 8px rgba(0,0,0,.08); }
.roster-pilot-avatar  { width:32px; height:32px; border-radius:50%; display:flex;
                        align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0; }
.roster-pilot-name    { font-size:12px; font-weight:600; color:#111; }
.roster-pilot-role    { font-size:11px; }
.roster-drag-handle   { margin-left:auto; color:#ccc; font-size:16px; }

.roster-gantt-wrap    { display:flex; flex-direction:column; overflow:hidden; }
.roster-date-nav      { display:flex; align-items:center; gap:10px; padding:10px 16px;
                        border-bottom:1px solid #ebebeb; background:#fff; flex-shrink:0; }
.roster-nav-btn       { font-size:12px; color:#1D9E75; font-weight:500; text-decoration:none;
                        padding:6px 12px; border:1px solid #9FE1CB; border-radius:8px;
                        background:#E1F5EE; white-space:nowrap; }
.roster-nav-btn:hover { background:#1D9E75; color:#fff; border-color:#1D9E75; }
.roster-nav-label     { font-size:13px; font-weight:600; color:#333; flex:1; text-align:center; }
.roster-nav-today     { font-size:12px; color:#888; text-decoration:none;
                        padding:6px 10px; border:1px solid #e0e0e0; border-radius:8px; }
.roster-nav-today:hover { background:#f5f5f5; }

.roster-gantt-header  { display:grid; grid-template-columns:160px 1fr;
                        border-bottom:2px solid #ebebeb; flex-shrink:0;
                        background:#fff; overflow:hidden; }
.roster-gantt-aircraft-col { padding:12px 16px; border-right:1px solid #ebebeb;
                              display:flex; flex-direction:column; justify-content:center; }
.roster-gantt-date-cell { text-align:center; padding:6px 2px; border-right:1px solid #f5f5f5; }
.roster-date-day      { font-size:9px; color:#aaa; text-transform:uppercase; }
.roster-date-num      { font-size:12px; font-weight:600; color:#333; }
.roster-date-today .roster-date-num { color:#1D9E75; background:#E1F5EE;
                                      border-radius:50%; width:22px; height:22px;
                                      line-height:22px; margin:0 auto; }

.roster-gantt-body    { flex:1; overflow-y:auto; overflow-x:auto; }
.roster-gantt-row     { display:grid; grid-template-columns:160px 1fr;
                        border-bottom:1px solid #f0f0f0; min-height:158px; }
.roster-gantt-col-bg  { height:100%; border-right:1px solid #f5f5f5; }
.roster-col-weekend   { background:#f9f9f9; }
.roster-aircraft-tail { font-size:13px; font-weight:700; font-family:monospace; letter-spacing:.04em; }
.roster-aircraft-type { font-size:11px; color:#aaa; margin-top:3px; }

.roster-bar           { position:absolute; height:40px; border-radius:8px;
                        padding:0 10px; display:flex; align-items:center; gap:6px;
                        cursor:pointer; overflow:hidden; white-space:nowrap;
                        transition:filter .1s, box-shadow .1s; z-index:2; }
.roster-bar:hover     { filter:brightness(.95); box-shadow:0 2px 8px rgba(0,0,0,.1); }
.roster-bar-label     { font-size:12px; font-weight:600; }
.roster-bar-role      { font-size:10px; opacity:.6; }

.roster-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45);
                        z-index:1000; display:flex; align-items:center; justify-content:center; }
.roster-modal         { background:#fff; border-radius:14px; width:480px; max-width:94vw;
                        box-shadow:0 20px 60px rgba(0,0,0,.15); overflow:hidden; }
.roster-modal-header  { display:flex; justify-content:space-between; align-items:center;
                        padding:18px 22px; border-bottom:1px solid #f0f0f0; }
.roster-modal-header h3 { font-size:15px; font-weight:700; margin:0; }
.roster-modal-close   { background:transparent; border:none; font-size:22px; color:#aaa; cursor:pointer; }
.roster-modal-body    { padding:20px 22px; display:flex; flex-direction:column; gap:14px; }
.roster-modal-footer  { padding:16px 22px; border-top:1px solid #f0f0f0; display:flex; align-items:center; }
/* ---- Airport picker ---- */
.airport-tags         { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; min-height:0; }
.airport-tag          { display:inline-flex; align-items:center; gap:4px;
                        background:#e8f0fe; color:#1a56db; border-radius:6px;
                        padding:3px 8px; font-size:13px; font-weight:600; }
.airport-tag-remove   { background:transparent; border:none; color:#1a56db;
                        cursor:pointer; font-size:15px; line-height:1; padding:0 0 0 2px; }
.airport-tag-remove:hover { color:#c0392b; }
.airport-tag-locked   { background:#e8f5e9; color:#2e7d32; cursor:default; }

.airport-dropdown     { position:absolute; left:0; right:0; z-index:200;
                        background:#fff; border:1px solid #e0e0e0; border-radius:8px;
                        box-shadow:0 4px 16px rgba(0,0,0,.1); max-height:220px; overflow-y:auto; }
.airport-option       { padding:9px 14px; cursor:pointer; font-size:13px; color:#333; }
.airport-option:hover { background:#f5f5f5; }

/* ---- Rating currency picker ---- */
.rating-currency-tag  { background:#EAE8E1; color:#1A1A18; border:1px solid #C8C6BD;
                        border-radius:20px; padding:0; gap:0; overflow:hidden; }
.rating-tag-label     { padding:5px 8px 5px 12px; font-weight:600; }
.rating-tag-divider   { width:1px; background:#C8C6BD; align-self:stretch; flex-shrink:0; }
.rating-tag-white     { display:inline-flex; align-items:center; background:#fff; }
.rating-tag-date-input { border:none; background:transparent; font-size:12px; color:#5F5E5A;
                         width:105px; outline:none; font-family:inherit; padding:4px 4px 4px 8px; }
.rating-currency-tag .airport-tag-remove { background:#fff; color:#999; padding:5px 10px 5px 2px; }

/* ---- Subscription welcome modal ---- */
.welcome-modal-overlay  { position:fixed; inset:0; background:rgba(0,0,0,.5);
                          z-index:1000; display:flex; align-items:center; justify-content:center;
                          padding:16px; }
.welcome-modal          { background:#fff; border-radius:16px; width:100%; max-width:480px;
                          box-shadow:0 24px 64px rgba(0,0,0,.18); overflow:hidden;
                          animation:modal-in .25s ease; }
@keyframes modal-in     { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
.welcome-modal-header   { background:linear-gradient(135deg,#1D9E75 0%,#0f7a59 100%);
                          padding:28px 28px 20px; text-align:center; color:#fff; }
.welcome-modal-icon     { font-size:36px; display:block; margin-bottom:10px; }
.welcome-modal-header h2 { font-size:20px; font-weight:700; margin:0 0 6px; }
.welcome-modal-header p  { font-size:14px; opacity:.85; margin:0; }
.welcome-modal-features { padding:20px 24px; display:flex; flex-direction:column; gap:14px; }
.welcome-feature        { display:flex; align-items:flex-start; gap:14px; }
.welcome-feature-icon   { font-size:20px; flex-shrink:0; line-height:1.3; }
.welcome-feature strong { display:block; font-size:14px; font-weight:600; color:#111; }
.welcome-feature span   { font-size:13px; color:#666; }
.welcome-modal-footer   { padding:16px 24px 24px; text-align:center; }
.welcome-modal-footer .btn { width:100%; }

/* ---- Crew picker ---- */
.crew-picker-trigger  { cursor:pointer; caret-color:transparent; user-select:none; }
.crew-picker-trigger:focus { outline:none; border-color:#1D9E75; box-shadow:0 0 0 3px rgba(29,158,117,.1); }
.crew-option          { display:flex; align-items:center; justify-content:space-between; }
.crew-option-sub      { font-size:11px; color:#aaa; margin-left:8px; }

/* ============================================================
   MOBILE RESPONSIVE — comprehensive additions
   ============================================================ */

/* ---- Navbar hamburger (hidden on desktop) ---- */
.nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 6px;
  color: var(--gray-700);
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-mobile-menu {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
  z-index: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-100);
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { background: var(--gray-50); color: var(--green-dark); }
.nav-mobile-menu a.nav-mobile-signout { color: var(--red); }
.nav-mobile-menu a.nav-mobile-signout:hover { background: var(--red-light); }
.nav-mobile-divider { height: 1px; background: var(--gray-100); margin: 4px 0; }

@media (max-width: 768px) {
  .navbar { padding: 0 16px; position: relative; }
  .nav-links { display: none !important; }
  .nav-hamburger { display: flex; }
  .nav-user { margin-left: 4px; }
  .nav-user-btn > span:not(.nav-user-avatar) { display: none; } /* hide chevron */
}

/* ---- Layout mobile ---- */
@media (max-width: 600px) {
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-header > div { width: 100%; }
}

/* ---- Roster mobile ---- */
.roster-mobile-hint {
  display: none;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0 4px;
  font-size: 13px;
  color: #5d4037;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}
.roster-sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-align: left;
}
.roster-sidebar-crew-wrap { }
.roster-row-add-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-light);
  border: 1.5px solid var(--green);
  color: var(--green-dark);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  margin: auto 8px;
  transition: background 0.1s;
}
.roster-row-add-btn:hover { background: var(--green); color: #fff; }

@media (max-width: 768px) {
  .roster-page {
    grid-template-columns: 1fr !important;
    height: auto !important;
    overflow: visible !important;
  }
  .roster-sidebar {
    border-right: none;
    border-bottom: 1px solid #ebebeb;
    padding: 12px 16px;
  }
  .roster-sidebar-toggle-btn { display: flex; }
  .roster-sidebar-header { margin-bottom: 0; }
  .roster-sidebar-header p { display: none; }
  .roster-sidebar-crew-wrap { overflow: hidden; max-height: 0; transition: max-height 0.28s ease; }
  .roster-sidebar-crew-wrap.open { max-height: 1200px; }
  .roster-gantt-wrap { overflow: hidden; }
  .roster-gantt-body {
    overflow-x: auto;
    overflow-y: visible !important;
    max-height: none !important;
    -webkit-overflow-scrolling: touch;
  }
  .roster-gantt-header { overflow-x: auto; }
  .roster-mobile-hint { display: flex; }
  .roster-view-toggle { display: none; }
  .roster-pdf-btn { margin-left: auto; }
  .roster-row-add-btn { display: flex; }
  .roster-gantt-aircraft-col { min-width: 100px; width: 100px; padding: 10px 8px; }
  .roster-gantt-header { grid-template-columns: 100px 1fr; }
  .roster-gantt-row { grid-template-columns: 100px 1fr; min-height: 140px; }
  .roster-gantt-row > .roster-gantt-aircraft-col { min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
}

/* ---- Analytics mobile ---- */
.an-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0 0 12px 12px; }

@media (max-width: 680px) {
  .an-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .an-card { padding: 16px; }
  .an-card-val { font-size: 22px; }
  .an-grid2 { grid-template-columns: 1fr; }
  .an-bar-lbl { width: 90px !important; font-size: 12px; }
  .an-bar-lbl-wide { width: 90px !important; }
  .an-bar-count { width: 55px; font-size: 11px; }
  .an-header { flex-direction: column; gap: 8px; }
  .an-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .an-tab { padding: 11px 14px; }
  .an-cta { flex-direction: column; gap: 12px; }
  .an-cta-btn { align-self: flex-start; }
  .an-chart { height: 54px; }
  .an-chart-num { font-size: 9px; }
  .an-chart-lbl { font-size: 9px; }
}

/* ---- Trip show mobile ---- */
@media (max-width: 600px) {
  .seniority-panel-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .seniority-panel-header > div:last-child { align-self: stretch; }
  .seniority-panel-header .btn { width: 100%; text-align: center; }
  .response-row { flex-wrap: wrap; gap: 8px; }
  .response-actions { min-width: unset; }
  .response-time { font-size: 11px; }
  .audit-header { flex-wrap: wrap; gap: 8px; }
}

/* ---- Pilot / aircraft / team cards mobile ---- */
@media (max-width: 560px) {
  .pilot-card { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .pilot-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
  }
  .pilot-actions .btn { flex: 1; text-align: center; }
  .drag-handle { margin-right: auto; }
}

/* ---- Subscriptions mobile ---- */
@media (max-width: 520px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .plan-status-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .billing-toggle { flex-wrap: wrap; }
}

/* ---- Team invite form mobile ---- */
@media (max-width: 600px) {
  .team-invite-row { flex-direction: column !important; gap: 12px !important; }
  .team-invite-row > div { width: 100% !important; min-width: unset !important; }
}

/* ---- Forms mobile ---- */
@media (max-width: 600px) {
  .form { max-width: 100%; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; text-align: center; min-width: 120px; }
}

/* ---- Landing page mobile ---- */
.lp-nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 6px;
  color: #444;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.lp-mobile-nav {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  padding: 0;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.lp-mobile-nav.open { display: block; }
.lp-mobile-nav a {
  display: block;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
}
.lp-mobile-nav a:last-child { border-bottom: none; }
.lp-mobile-nav a:hover { color: #1D9E75; background: #f0faf6; }
.lp-mobile-nav-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }
.lp-mobile-cta { padding: 16px 20px 20px; }
.lp-mobile-cta a {
  display: block; width: 100%; padding: 13px; border-radius: 8px;
  font-size: 15px; font-weight: 600; text-align: center; text-decoration: none;
  background: #1D9E75; color: #fff;
}

@media (max-width: 768px) {
  .lp-nav { padding: 0 5%; position: relative; }
  .lp-nav-page-links { display: none; }
  .lp-nav-actions { display: none; }
  .lp-nav-hamburger { display: flex; }

  .lp-hero { padding: 70px 5% 80px !important; }
  .lp-hero h1 { font-size: 34px !important; letter-spacing: -0.5px !important; line-height: 1.2 !important; }
  .lp-hero p { font-size: 15px !important; }
  .lp-hero-btns { flex-direction: column; gap: 10px; }
  .lp-hero-btns .btn-lp { width: 100%; text-align: center; padding: 14px 20px; }

  .lp-logos { padding: 28px 5% 32px; }
  .lp-logos-row { gap: 24px; }
  .lp-usecases { padding: 48px 5%; }
  .lp-how { padding: 48px 5%; }
  .lp-how h2 { font-size: 26px; }
  .lp-why { padding: 48px 5%; }
  .lp-why h2 { font-size: 26px; }
  .lp-pricing { padding: 48px 5%; }
  .lp-pricing h2 { font-size: 26px; }
  .lp-contact { padding: 48px 5%; }

  .lp-product { padding: 48px 5%; }
  .lp-product-heading h2 { font-size: 24px; }
  .lp-product-tab { font-size: 12px; padding: 6px 10px; }
  .lp-browser-url { display: none; }

  .lp-footer { flex-wrap: wrap; gap: 10px; padding: 20px 5%; font-size: 13px; }

  .lp-pricing-cards { grid-template-columns: 1fr; }
  .lp-pc { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .lp-hero h1 { font-size: 28px !important; }
  .lp-product-tabs { gap: 4px; }
}

/* Make LP browser mockup scroll horizontally on mobile */
@media (max-width: 768px) {
  .lp-browser-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .lp-screen { min-width: 560px; }
}

/* Respond page (pilot magic link) — already works well on mobile, small polish */
@media (max-width: 480px) {
  .respond-card { padding: 24px 20px; }
  .respond-header h1 { font-size: 18px; }
}

/* Usage bar mobile */
@media (max-width: 480px) {
  .usage-bar { flex-direction: column; gap: 6px; align-items: flex-start; }
}

/* ---- Flight info card ---- */
.flight-info-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.fic-header { margin-bottom: 10px; }
.fic-arc-area {
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}
.fic-airport { display: flex; flex-direction: column; min-width: 90px; }
.fic-airport-dep { text-align: left; }
.fic-airport-arr { text-align: right; }
.fic-icao {
  font-size: 28px; font-weight: 800; letter-spacing: .04em;
  color: var(--green-dark); line-height: 1;
  position: relative; cursor: default;
}
.fic-icao[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 20, 18, 0.86);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 20;
}
.fic-icao[data-tooltip]:hover::after { opacity: 1; }
.fic-airport-arr .fic-icao[data-tooltip]::after { left: auto; right: 0; transform: none; }
.fic-datetime { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.fic-arc { flex: 1; position: relative; height: 76px; }
.fic-arc svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.fic-arc-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  padding: 4px 10px 4px 7px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  white-space: nowrap;
}
.fic-plane-svg { width: 16px; height: 16px; color: var(--green-dark); flex-shrink: 0; transform: rotate(-45deg); }
.fic-flight-time { font-size: 11px; font-weight: 600; color: var(--gray-700); letter-spacing: .02em; }
.fic-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--gray-100);
  padding-top: 12px;
  margin-top: 14px;
}
.fic-info-bar {
  display: flex;
  flex-wrap: wrap;
  row-gap: 6px;
  font-size: 12px;
  color: var(--gray-700);
  align-items: center;
  flex: 1;
}
.fic-info-item { display: flex; align-items: center; gap: 5px; }
.fic-info-item:not(:last-child) { padding-right: 16px; margin-right: 16px; border-right: 1px solid var(--gray-100); }
.fic-info-icon { width: 14px; height: 14px; flex-shrink: 0; color: var(--gray-400); }
.fic-info-legs { color: var(--gray-700); }
.fic-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.fic-btn { display: inline-flex !important; align-items: center; gap: 5px; }

@media (max-width: 600px) {
  .fic-icao { font-size: 20px; }
  .fic-airport { min-width: 60px; }
  .fic-arc { height: 56px; }
  .fic-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .fic-actions { align-self: flex-end; }
}

/* ---- Legs accordion (trip show page) ---- */
.legs-accordion {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.legs-accordion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.legs-accordion-header::-webkit-details-marker,
.legs-accordion-header::marker { display: none; }
.legs-accordion-header:hover { background: var(--gray-50); }

.legs-accordion-icon { font-size: 13px; color: var(--green); flex-shrink: 0; }
.legs-accordion-title { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.legs-accordion-count {
  background: var(--gray-100);
  color: var(--gray-400);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}
.legs-accordion-route { flex: 1; font-size: 13px; color: var(--gray-400); }
.legs-accordion-chevron {
  color: #ccc;
  font-size: 20px;
  line-height: 1;
  transition: transform .2s ease;
  transform: rotate(90deg);
  display: inline-block;
}
.legs-accordion[open] .legs-accordion-chevron { transform: rotate(-90deg); }

.legs-accordion-body {
  border-top: 1px solid var(--gray-100);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--gray-50);
}

.leg-detail-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.leg-detail-num {
  font-size: 10px;
  font-weight: 700;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
  min-width: 34px;
}
.leg-detail-route {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.leg-detail-airport { display: flex; flex-direction: column; min-width: 0; }
.leg-detail-icao { font-size: 17px; font-weight: 700; color: var(--gray-900); letter-spacing: .03em; line-height: 1.2; }
.leg-detail-city { font-size: 11px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.leg-detail-arrow { color: #ccc; font-size: 15px; flex-shrink: 0; }

.leg-detail-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
  text-align: right;
}
.leg-detail-date { font-size: 12px; color: var(--gray-400); }
.leg-detail-time { font-size: 13px; color: var(--gray-700); white-space: nowrap; }
.leg-detail-time strong { font-weight: 600; }
.leg-detail-local { font-size: 12px; color: var(--gray-400); margin-left: 3px; }
.leg-detail-ft {
  font-size: 11px;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 1px 7px;
  border-radius: 20px;
}

@media (max-width: 600px) {
  .leg-detail-card { flex-wrap: wrap; gap: 8px; }
  .leg-detail-meta { align-items: flex-start; text-align: left; }
  .leg-detail-city { max-width: 80px; }
}

/* ---- Trip leg form cards ---- */
.legs-section { margin-bottom: 24px; }
.legs-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.legs-add-row { margin-top: 2px; }

.leg-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
}
.leg-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--gray-100);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.leg-drag-handle { color: #c0c4cc; cursor: grab; font-size: 14px; user-select: none; }
.leg-drag-handle:active { cursor: grabbing; }
.leg-card-label { flex: 1; font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .07em; }
.leg-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #c0c4cc;
  font-size: 20px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 4px;
  transition: color .15s;
}
.leg-remove-btn:hover { color: var(--red); }

.leg-card-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.leg-airports-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.leg-airport-field { position: relative; }
.leg-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.leg-tz-label { font-size: 10px; font-weight: 400; color: #aaa; margin-left: 2px; }

.leg-time-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.leg-time-field { }

@media (max-width: 520px) {
  .leg-airports-row { grid-template-columns: 1fr; }
  .leg-time-row { grid-template-columns: 1fr 1fr; }
  .leg-time-field:last-child { grid-column: span 2; }
}

/* ---- Settings page sections ---- */
.settings-section-bordered {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-100);
}

/* ---- Pilot respond: multi-leg breakdown table ---- */
.legs-breakdown {
  margin: 0 0 20px;
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.legs-breakdown-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 10px;
}
.legs-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.legs-breakdown-table tr { border-bottom: 1px solid var(--gray-100); }
.legs-breakdown-table tr:last-child { border-bottom: none; }
.legs-breakdown-table td { padding: 7px 6px; vertical-align: middle; }
.leg-num {
  font-size: 10px;
  font-weight: 700;
  color: #bbb;
  width: 22px;
  text-align: center;
}
.leg-route { font-weight: 600; color: var(--gray-900); }
.leg-date  { color: var(--gray-400); font-size: 12px; white-space: nowrap; padding-left: 10px; }
.leg-time  { color: var(--gray-700); white-space: nowrap; font-size: 12px; padding-left: 8px; }
.leg-ft {
  white-space: nowrap;
  padding-left: 8px;
}
.leg-ft span,
.leg-ft {
  font-size: 11px;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 1px 7px;
  border-radius: 20px;
}

/* ---- Trip show: leg arrival time span ---- */
.leg-detail-arrival {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* ---- Trip card: subtle status left accent ---- */
.trip-card {
  border-left: 3px solid transparent;
}
.trip-card.status-open   { border-left-color: var(--blue); }
.trip-card.status-filled { border-left-color: var(--green); }
.trip-card.status-cancelled { border-left-color: var(--gray-400); }
.trip-card-past.status-open,
.trip-card-past.status-filled { border-left-color: var(--gray-100); }

/* ---- Confirmed banner: stronger visual ---- */
.confirmed-banner {
  border-left: 3px solid var(--green);
  margin-top: 20px;
}

/* ---- Mobile: pilot respond legs table ---- */
@media (max-width: 480px) {
  .legs-breakdown-table { font-size: 12px; }
  .leg-date { display: none; }
}

/* ===== SCHEDULE PAGE ===================================================== */

/* Toolbar */
.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.schedule-month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.schedule-month-label-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.schedule-month-label {
  font-size: 16px;
  font-weight: 700;
  min-width: 120px;
  text-align: center;
  padding: 5px 14px;
  border: 1.5px solid #1D9E75;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.12s;
}
.schedule-month-label:hover { background: #f0fdf8; }
.schedule-month-label--open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.schedule-month-caret { color: #1D9E75; font-size: 11px; }
.schedule-range-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 3px 10px;
  background: #f0fdf8;
  border: 1px solid #1D9E75;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #1D9E75;
  white-space: nowrap;
}
.schedule-range-chip-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(29,158,117,0.18);
  border: none;
  color: #1D9E75;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.12s;
}
.schedule-range-chip-clear:hover { background: rgba(29,158,117,0.38); }
.schedule-range-panel {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  background: #fff;
  border: 1.5px solid #1D9E75;
  border-radius: 0 8px 8px 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  z-index: 200;
  padding: 12px;
  min-width: 240px;
}
.schedule-range-panel-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.schedule-range-option {
  padding: 9px 10px;
  border: 1.5px solid var(--gray-100);
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
}
.schedule-range-option:hover { border-color: #94a3b8; background: var(--gray-50); }
.schedule-range-option.active {
  border-color: #1D9E75;
  background: #f0fdf8;
  color: #1D9E75;
  font-weight: 600;
}
.schedule-range-panel-status {
  font-size: 11px;
  color: var(--gray-400);
  text-align: center;
  margin-top: 8px;
}
.schedule-week-chips-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}
.schedule-week-chips-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}
.schedule-week-chips-row { display: flex; gap: 5px; flex-wrap: wrap; }
.schedule-week-chip {
  padding: 4px 10px;
  border: 1.5px solid var(--gray-100);
  border-radius: 20px;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s, background 0.12s;
}
.schedule-week-chip:hover { border-color: #94a3b8; }
.schedule-week-chip.active {
  border-color: #1D9E75;
  background: #f0fdf8;
  color: #1D9E75;
  font-weight: 600;
}
.schedule-custom-range-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}
.schedule-custom-range-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}
.schedule-custom-date-row { display: flex; align-items: center; gap: 6px; }
.schedule-custom-date-input {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--gray-100);
  border-radius: 6px;
  font-size: 11px;
  color: var(--gray-700);
  background: var(--gray-50);
  outline: none;
  min-width: 0;
}
.schedule-custom-date-input:focus { border-color: #1D9E75; background: transparent; }
.schedule-custom-date-sep { font-size: 12px; color: var(--gray-400); flex-shrink: 0; }
.schedule-custom-apply-btn {
  margin-top: 8px;
  width: 100%;
  padding: 7px;
  background: #1D9E75;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s;
}
.schedule-custom-apply-btn:hover { opacity: 0.88; }
.schedule-col--hidden { display: none !important; }

/* View toggle */
.schedule-view-toggle {
  display: flex;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-50);
}
.schedule-toggle-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.schedule-toggle-btn + .schedule-toggle-btn {
  border-left: 1px solid var(--gray-100);
}
.schedule-toggle-btn.active {
  background: var(--gray-900);
  color: #fff;
}

/* Grid wrapper */
.schedule-grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  padding-bottom: 6px;
}

/* Table */
.schedule-table {
  table-layout: fixed;
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-size: 12px;
}

/* Header row */
.schedule-table thead th {
  padding: 7px 0;
  text-align: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--gray-400);
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-100);
  border-right: 1px solid var(--gray-100);
  white-space: nowrap;
}
.schedule-table thead th:last-child { border-right: none; }

/* Today column header highlight */
.schedule-day-col.today {
  color: #fff !important;
  background: #2563eb !important;
  font-weight: 700;
}

.schedule-pilot-col {
  width: 200px;
  text-align: left !important;
  padding-left: 14px !important;
  border-right: 2px solid var(--gray-100) !important;
  overflow: hidden;
}
.schedule-day-col { min-width: 30px; }
.schedule-day-col.weekend { background: #f7f8fa; }
.schedule-day-dow {
  display: block;
  font-size: 8px;
  font-weight: 500;
  color: var(--gray-300);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 2px;
}
.schedule-day-col.today .schedule-day-dow { color: rgba(255,255,255,0.65); }
[data-theme="dark"] .schedule-day-dow { color: #475569; }
[data-theme="dark"] .schedule-day-col.today .schedule-day-dow { color: rgba(255,255,255,0.5); }
.schedule-count-col {
  width: 46px;
  border-right: 2px solid var(--gray-100) !important;
}

/* Body rows */
.schedule-table tbody tr { border-bottom: 1px solid var(--gray-100); }
.schedule-table tbody tr:last-child { border-bottom: none; }
.schedule-table tbody tr:hover .schedule-cell,
.schedule-table tbody tr:hover .schedule-pilot-cell,
.schedule-table tbody tr:hover .schedule-count-cell { background-color: #f0fdf9; }

.schedule-table .schedule-col--hovered,
.schedule-table th.schedule-col--hovered { background-color: #f0fdf9; }

/* Pilot name cell */
.schedule-pilot-cell {
  padding: 6px 10px 6px 14px;
  white-space: nowrap;
  border-right: 2px solid var(--gray-100);
  vertical-align: middle;
}
.schedule-pilot-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
}
.schedule-role-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0.03em;
}
.schedule-role-badge--cpt { background: #dbeafe; color: #1e40af; }
.schedule-role-badge--fo  { background: #dcfce7; color: #166534; }
.schedule-role-badge--fa  { background: #ede9fe; color: #5b21b6; }

/* Data cells */
.schedule-cell {
  position: relative;
  padding: 3px;
  text-align: center;
  cursor: pointer;
  border-right: 1px solid var(--gray-100);
  vertical-align: middle;
  transition: background 0.1s;
}
.schedule-cell.weekend { background: #f7f8fa; }
.schedule-cell.today   { background: #eff6ff; }
.schedule-cell:hover   { background: #e6faf3 !important; }
.schedule-count-cell {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  padding: 0 6px;
  border-right: 2px solid var(--gray-100);
  vertical-align: middle;
}

/* Duty chips — fill full cell width */
.duty-chip {
  display: block;
  width: 100%;
  padding: 4px 2px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  user-select: none;
}
.duty-chip--empty {
  display: block;
  height: 22px;
}

/* ── Pilot schedule notes ──────────────────────────────────────────────── */
.note-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  pointer-events: none;
}

.note-pencil-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  background: rgba(59,130,246,0.85);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  padding: 0;
  line-height: 1;
}
.note-pencil-btn::after { content: "✏"; }

.schedule-cell:hover .note-pencil-btn { display: flex; }

/* Note editor popover */
.note-popover {
  position: fixed;
  z-index: 1100;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 12px;
}
.note-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.note-popover-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.note-popover-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
}
.note-popover-textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 7px 9px;
  font-size: 12px;
  font-family: inherit;
  color: #334155;
  resize: none;
  height: 72px;
  line-height: 1.5;
  background: #f8fafc;
}
.note-popover-textarea:focus { outline: none; border-color: #1D9E75; }
.note-popover-textarea::placeholder { color: #94a3b8; }
.note-popover-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.note-popover-delete {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.note-popover-delete:hover { color: #ef4444; }
.note-popover-save {
  background: #1D9E75;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.note-popover-save:hover { background: #178a64; }

/* Dark theme */
[data-theme="dark"] .note-popover                  { background: #1e293b; border-color: #334155; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
[data-theme="dark"] .note-popover-title            { color: #e2e8f0; }
[data-theme="dark"] .note-popover-textarea         { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .note-popover-textarea:focus   { border-color: #1D9E75; }
[data-theme="dark"] .note-popover-textarea::placeholder { color: #475569; }
[data-theme="dark"] .note-popover-close            { color: #64748b; }
[data-theme="dark"] .note-popover-delete           { color: #64748b; }
[data-theme="dark"] .note-dot         { background: #fbbf24; }
[data-theme="dark"] .note-pencil-btn  { background: rgba(96,165,250,0.85); }

/* Legend bar */
.schedule-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--gray-100);
  font-size: 11px;
  background: var(--gray-50);
  border-radius: 0 0 10px 10px;
}
.schedule-legend-label {
  font-weight: 500;
  color: var(--gray-400);
  margin-right: 2px;
}
.schedule-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  cursor: default;
}
.schedule-legend-item[data-tooltip]::before,
.schedule-legend-item[data-tooltip]::after {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
}
.schedule-legend-item[data-tooltip]::after {
  content: attr(data-tooltip);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 6px;
  width: 220px;
  white-space: normal;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.schedule-legend-item[data-tooltip]::before {
  content: "";
  border: 5px solid transparent;
  border-top-color: #1e293b;
  bottom: calc(100% + 1px);
  width: 0;
  height: 0;
  padding: 0;
  border-radius: 0;
}
.schedule-legend-item[data-tooltip]:hover::before,
.schedule-legend-item[data-tooltip]:hover::after {
  opacity: 1;
}
.schedule-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.schedule-legend-type {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-700);
}

/* Duty type popover */
.duty-popover {
  position: fixed;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 220px;
}
.duty-popover-btn {
  padding: 6px 10px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: opacity 0.1s;
  min-width: 52px;
}
.duty-popover-btn:hover { opacity: 0.82; }
.duty-popover-clear {
  width: 100%;
  padding: 5px;
  border: 1px solid var(--gray-100);
  border-radius: 5px;
  background: #fff;
  color: var(--gray-400);
  font-size: 11px;
  cursor: pointer;
  margin-top: 2px;
}
.duty-popover-clear:hover { background: var(--gray-50); color: var(--gray-700); }

/* Generic modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 { font-size: 15px; font-weight: 700; margin: 0; }
.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.modal-close:hover { color: var(--gray-900); }
.modal-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Per-pilot calendar view */
.schedule-cal-pilot-nav { margin-bottom: 12px; }
.cal-pilot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.cal-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cal-pilot-name { font-size: 15px; font-weight: 600; }
.cal-pilot-meta { font-size: 12px; color: var(--gray-400); }
.schedule-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  padding: 4px 0;
}
.cal-dow.weekend { color: #94a3b8; }
.cal-day {
  min-height: 64px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  padding: 5px;
  cursor: pointer;
  transition: border-color 0.1s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.cal-day:hover .note-pencil-btn { display: flex; }
.cal-day:hover { border-color: var(--green); }
.cal-day--other { background: var(--gray-50); border-color: transparent; cursor: default; }
.cal-day--today { border-color: #2563eb !important; background: #eff6ff; }
.cal-day.weekend { background: #f7f8fa; }
.cal-day-num { font-size: 11px; font-weight: 600; color: var(--gray-400); }
.cal-stats { margin-top: 10px; font-size: 12px; color: var(--gray-400); }

/* ── Dark mode ── */
[data-theme="dark"] .schedule-toggle-btn             { background: transparent; color: #64748b; }
[data-theme="dark"] .schedule-toggle-btn.active      { background: #e2e8f0; color: #0f172a; }
[data-theme="dark"] .schedule-view-toggle            { border-color: #2d3f55; background: #1e293b; }
[data-theme="dark"] .schedule-toggle-btn + .schedule-toggle-btn { border-left-color: #2d3f55; }
[data-theme="dark"] .schedule-grid-wrap              { border-color: #2d3f55; }
[data-theme="dark"] .schedule-table thead th         { background: #1e293b; color: #64748b; border-bottom-color: #2d3f55; border-right-color: #2d3f55; }
[data-theme="dark"] .schedule-day-col.weekend        { background: #1a2233; }
[data-theme="dark"] .schedule-pilot-col              { border-right-color: #2d3f55 !important; }
[data-theme="dark"] .schedule-count-col              { border-right-color: #2d3f55 !important; }
[data-theme="dark"] .schedule-table tbody tr         { border-bottom-color: #2d3f55; }
[data-theme="dark"] .schedule-table tbody tr:hover .schedule-cell,
[data-theme="dark"] .schedule-table tbody tr:hover .schedule-pilot-cell,
[data-theme="dark"] .schedule-table tbody tr:hover .schedule-count-cell { background-color: #0d2e22; }
[data-theme="dark"] .schedule-table .schedule-col--hovered,
[data-theme="dark"] .schedule-table th.schedule-col--hovered { background-color: #0d2e22; }
[data-theme="dark"] .schedule-pilot-cell             { border-right-color: #2d3f55; }
[data-theme="dark"] .schedule-pilot-name             { color: #e2e8f0; }
[data-theme="dark"] .schedule-role-badge--cpt        { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .schedule-role-badge--fo         { background: #14532d; color: #86efac; }
[data-theme="dark"] .schedule-role-badge--fa         { background: #2e1065; color: #c4b5fd; }
[data-theme="dark"] .schedule-cell                   { border-right-color: #2d3f55; }
[data-theme="dark"] .schedule-cell.weekend           { background: #1a2233; }
[data-theme="dark"] .schedule-cell.today             { background: #0f1e3d; }
[data-theme="dark"] .schedule-cell:hover             { background: #0d2e22 !important; }
[data-theme="dark"] .schedule-count-cell             { border-right-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .schedule-legend                 { background: #1e293b; border-top-color: #2d3f55; }
[data-theme="dark"] .schedule-legend-type            { color: #94a3b8; }
[data-theme="dark"] .duty-popover                    { background: #1e293b; border-color: #2d3f55; box-shadow: 0 8px 28px rgba(0,0,0,0.5); }
[data-theme="dark"] .duty-popover-clear              { border-color: #2d3f55; background: #1e293b; color: #64748b; }
[data-theme="dark"] .duty-popover-clear:hover        { background: #2d3f55; }
[data-theme="dark"] .modal-box                       { background: #1e293b; }
[data-theme="dark"] .modal-header                    { border-bottom-color: #2d3f55; }
[data-theme="dark"] .modal-header h3                 { color: #e2e8f0; }
[data-theme="dark"] .modal-footer                    { border-top-color: #2d3f55; }
[data-theme="dark"] .cal-day                         { border-color: #2d3f55; }
[data-theme="dark"] .cal-day--today                  { background: #0f1e3d; border-color: #2563eb !important; }
[data-theme="dark"] .cal-day.weekend                 { background: #1a2233; }
[data-theme="dark"] .schedule-month-label:hover      { background: #0d2e22; }
[data-theme="dark"] .schedule-range-panel            { background: #1e293b; box-shadow: 0 8px 28px rgba(0,0,0,0.5); }
[data-theme="dark"] .schedule-range-option.active    { background: #0d2e22; }
[data-theme="dark"] .schedule-range-chip             { background: #0d2e22; }
[data-theme="dark"] .schedule-week-chip.active       { background: #0d2e22; }
[data-theme="dark"] .schedule-custom-date-input:focus { background: #1e293b; }

/* ===== DUTY TEMPLATES (settings) ======================================== */

.settings-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.duty-tpl-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.duty-tpl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.duty-tpl-dials {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.dial-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dial-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dial-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.dial-btn:hover { background: var(--gray-100); }

.dial-val {
  font-size: 18px;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
  color: var(--gray-900);
}

/* Toggle rows (travel day toggles) */
.duty-tpl-toggles {
  border-top: 1px solid var(--gray-100);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-info { flex: 1; }

.toggle-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-900);
}

.toggle-desc {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 1px;
}

/* Checkbox toggle switch */
.cb-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cb-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}

.cb-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cb-toggle input:checked + .cb-slider { background: var(--green); }
.cb-toggle input:checked + .cb-slider::before { transform: translateX(18px); }

/* Template preview strip */
.duty-tpl-preview-wrap {
  background: var(--gray-50);
  border-radius: 6px;
  padding: 10px 12px;
}

.duty-tpl-preview { display: flex; flex-wrap: wrap; }

/* Template card footer */
.duty-tpl-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--gray-100);
  padding-top: 12px;
}

/* Danger small button */
.btn-danger-sm {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #dc2626;
  cursor: pointer;
  transition: background 0.12s;
}
.btn-danger-sm:hover { background: #fee2e2; }

.duty-tpl-code-btn {
  border: none;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.4;
  vertical-align: middle;
}

.duty-tpl-code-btn:hover { opacity: 0.85; }

.duty-tpl-banner {
  background: rgba(29, 158, 117, 0.08);
  border: 1px solid rgba(29, 158, 117, 0.25);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 11px;
  color: #1D9E75;
}

/* Dark mode */
[data-theme="dark"] .duty-tpl-card         { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .duty-tpl-toggles      { border-top-color: #2d3f55; }
[data-theme="dark"] .duty-tpl-footer       { border-top-color: #2d3f55; }
[data-theme="dark"] .duty-tpl-preview-wrap { background: #0f172a; }
[data-theme="dark"] .duty-tpl-banner       { color: #6ee7b7; }
[data-theme="dark"] .dial-btn              { background: #283447; border-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .dial-btn:hover        { background: #2d3f55; }
[data-theme="dark"] .dial-val              { color: #e2e8f0; }
[data-theme="dark"] .toggle-title          { color: #e2e8f0; }
[data-theme="dark"] .cb-slider             { background: #374357; }
[data-theme="dark"] .btn-danger-sm         { background: #1e293b; border-color: #4a1a1a; color: #f87171; }
[data-theme="dark"] .btn-danger-sm:hover   { background: #2d1717; }

/* ── Schedule grid save overlay ─────────────────────────────────────────── */
.schedule-grid-loader {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  backdrop-filter: blur(1px);
  pointer-events: all;
}
.schedule-grid-loader-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  padding: 10px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}
.schedule-grid-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-100);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: schedule-spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes schedule-spin { to { transform: rotate(360deg); } }
[data-theme="dark"] .schedule-grid-loader      { background: rgba(15,23,42,0.55); }
[data-theme="dark"] .schedule-grid-loader-inner { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .schedule-grid-spinner      { border-color: #2d3f55; border-top-color: var(--green); }

/* ── Cell drag-selection highlight ─────────────────────────────────────── */
.schedule-table { user-select: none; }

.schedule-cell--selected {
  background: #eff6ff !important;
  box-shadow: inset 0 0 0 2px #3b82f6;
}
[data-theme="dark"] .schedule-cell--selected {
  background: #1e3a5f !important;
  box-shadow: inset 0 0 0 2px #3b82f6;
}

/* ── Crew filter ─────────────────────────────────────────────────────────── */
.crew-filter-wrap { position: relative; }

.crew-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--gray-700);
  white-space: nowrap;
  line-height: 1;
}
.crew-filter-btn:hover { background: var(--gray-100); }
.crew-filter-btn--active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.crew-filter-caret { font-size: 10px; opacity: 0.6; }

.crew-filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 300;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
  min-width: 220px;
  max-width: 300px;
}
.crew-filter-search-wrap { padding: 10px 10px 6px; }
.crew-filter-search {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--gray-100);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  background: #fff;
  color: var(--gray-900);
}
.crew-filter-search:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.crew-filter-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}
.crew-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-900);
}
.crew-filter-item:hover { background: var(--gray-50); }
.crew-filter-item input[type="checkbox"] {
  flex-shrink: 0;
  accent-color: #3b82f6;
  cursor: pointer;
}
.crew-filter-name { flex: 1; font-weight: 500; }
.crew-filter-footer {
  padding: 8px 12px;
  border-top: 1px solid var(--gray-100);
}
.crew-filter-clear {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
}
.crew-filter-clear:hover { color: var(--gray-700); }

/* Dark mode — crew filter */
[data-theme="dark"] .crew-filter-btn              { background: #1e293b; border-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .crew-filter-btn:hover         { background: #283447; }
[data-theme="dark"] .crew-filter-btn--active       { background: #1e3a5f; border-color: #3b82f6; color: #93c5fd; }
[data-theme="dark"] .crew-filter-dropdown          { background: #1e293b; border-color: #2d3f55; box-shadow: 0 8px 28px rgba(0,0,0,0.5); }
[data-theme="dark"] .crew-filter-search            { background: #0f172a; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .crew-filter-item              { color: #e2e8f0; }
[data-theme="dark"] .crew-filter-item:hover        { background: #283447; }
[data-theme="dark"] .crew-filter-footer            { border-top-color: #2d3f55; }
[data-theme="dark"] .crew-filter-clear             { color: #64748b; }
[data-theme="dark"] .crew-filter-clear:hover       { color: #94a3b8; }

/* ── DARK MODE: DUTY DAYS 2026 modal corrections ── */
body[data-theme="dark"] .pilot-duty-stats-title { color: #64748b !important; border-bottom-color: rgba(255,255,255,0.08) !important; }
body[data-theme="dark"] .pilot-duty-stats-row { border-bottom-color: rgba(255,255,255,0.07) !important; }
body[data-theme="dark"] .pilot-duty-stat-label { color: #94a3b8 !important; }
body[data-theme="dark"] .pilot-duty-stat-value > span:first-child { color: #e2e8f0 !important; }
body[data-theme="dark"] .pilot-duty-stat-ovt { color: #fbbf24 !important; }
body[data-theme="dark"] .pilot-duty-stat-quarter { background: #1a2535 !important; border-color: #2d3f55 !important; }
body[data-theme="dark"] .pilot-duty-stat-q-label { color: #64748b !important; }
body[data-theme="dark"] .pilot-duty-stat-q-value > span:first-child { color: #e2e8f0 !important; }
body[data-theme="dark"] .pilot-duty-stat-quarter .pilot-duty-stat-ovt { color: #fbbf24 !important; }
body[data-theme="dark"] .pilot-contact-actions { border-top-color: rgba(255,255,255,0.08) !important; }
body[data-theme="dark"] .pilot-contact-btn { background: rgba(255,255,255,0.04) !important; border-color: rgba(255,255,255,0.10) !important; }
body[data-theme="dark"] .pilot-contact-btn:hover { background: rgba(255,255,255,0.09) !important; }

/* ── Schedule pilot contact dialog (wider to fit duty stats) ── */
dialog.pilot-contact-dialog--schedule { width: 380px; }

/* Duty stats section inside pilot modal */
.pilot-duty-stats { padding: 14px 20px 18px; border-top: 1px solid var(--gray-100); }
.pilot-duty-stats-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); margin-bottom: 10px; }
.pilot-duty-stats-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.pilot-duty-stat-label { font-size: 13px; color: var(--gray-600); }
.pilot-duty-stat-value { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.pilot-duty-stats-quarters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.pilot-duty-stat-quarter { background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: 6px; padding: 6px 8px; text-align: center; }
.pilot-duty-stat-q-label { display: block; font-size: 10px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.pilot-duty-stat-q-value { display: block; font-size: 13px; font-weight: 600; color: var(--gray-900); }
.pilot-duty-stat-ovt     { font-size: 10px; font-weight: 600; color: #d97706; display: block; margin-top: 1px; }

/* DUTY DAYS modal improvements */
.pilot-duty-stats { padding: 16px 20px 20px; }
.pilot-duty-stats-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #8a8f98; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.pilot-duty-stats-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #f7f7f7; }
.pilot-duty-stats-row:last-child { border-bottom: none; }
.pilot-duty-stat-label { font-size: 13.5px; color: #555; font-weight: 400; flex-shrink: 0; }
.pilot-duty-stat-value { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.3; }
.pilot-duty-stat-value > span:first-child { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.pilot-duty-stat-ovt { font-size: 11.5px; color: #d97706; font-weight: 500; margin-top: 1px; }
.pilot-duty-stats-quarters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.pilot-duty-stat-quarter { background: #f8f9fa; border: 1px solid #eaecef; border-radius: 8px; padding: 8px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pilot-duty-stat-q-label { font-size: 10.5px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1; }
.pilot-duty-stat-q-value { display: flex; flex-direction: column; align-items: center; margin-top: 2px; }
.pilot-duty-stat-q-value > span:first-child { font-size: 13px; font-weight: 700; color: #1a1a1a; line-height: 1.2; }
.pilot-duty-stat-quarter .pilot-duty-stat-ovt { font-size: 10px; margin-top: 1px; }
.pilot-contact-actions { padding: 12px 20px 16px; gap: 6px; border-top: 1px solid #f0f0f0; }
.pilot-contact-btn { border-radius: 8px; padding: 9px 14px; font-size: 13.5px; border: 1px solid #eaecef; background: #fafafa; }
.pilot-contact-btn:hover { background: #f0f0f0; }

.stat-ovt-inline { font-size: 11px; font-weight: 500; color: #d97706; white-space: nowrap; }

/* Dark mode — pilot duty stats */
[data-theme="dark"] .pilot-duty-stats                { border-top-color: #2d3f55; }
[data-theme="dark"] .pilot-duty-stats-divider        { background: #2d3f55; }
[data-theme="dark"] .pilot-duty-stat-quarter         { background: #1a2535; border-color: #2d3f55; }
[data-theme="dark"] .pilot-duty-stat-label           { color: #94a3b8; }
[data-theme="dark"] .pilot-duty-stat-value           { color: #e2e8f0; }
[data-theme="dark"] .pilot-duty-stat-q-label         { color: #64748b; }
[data-theme="dark"] .pilot-duty-stat-q-value         { color: #e2e8f0; }
[data-theme="dark"] .pilot-duty-stat-ovt             { color: #fbbf24; }

/* ═══════════════════════════════════════════════════
   CREWBENCH DARK MODE – ROSTER PAGE COMPLETE FIX
   ═══════════════════════════════════════════════════ */
body[data-theme="dark"] .roster-gantt-col-bg.roster-col-weekend { background: rgba(255,255,255,0.03) !important; }
body[data-theme="dark"] .roster-filter-btn { background: #1e293b !important; color: #cbd5e1 !important; border-color: #2d3f55 !important; }
body[data-theme="dark"] .roster-filter-btn:hover { background: #253147 !important; }
body[data-theme="dark"] .roster-filter-panel { background: #1e293b !important; border: 1px solid #2d3f55 !important; box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important; }
body[data-theme="dark"] .roster-filter-option { color: #cbd5e1 !important; }
body[data-theme="dark"] .roster-filter-option:hover { background: rgba(255,255,255,0.06) !important; }
body[data-theme="dark"] .roster-filter-input { color: #e2e8f0 !important; }
body[data-theme="dark"] .roster-filter-option-tail { color: #94a3b8 !important; }
body[data-theme="dark"] .roster-filter-option-sub { color: #64748b !important; }
body[data-theme="dark"] .roster-view-btn { background: #1e293b !important; color: #94a3b8 !important; border-color: #2d3f55 !important; }
body[data-theme="dark"] .roster-view-btn.active { background: #1d3557 !important; color: #e2e8f0 !important; border-color: #2d4a6e !important; }
body[data-theme="dark"] .roster-pdf-btn { background: #1e293b !important; color: #94a3b8 !important; border-color: #2d3f55 !important; }
body[data-theme="dark"] .roster-nav-btn { background: rgba(29,158,117,0.12) !important; color: #1d9e75 !important; border-color: rgba(29,158,117,0.3) !important; }
body[data-theme="dark"] .roster-nav-label { color: #64748b !important; }
body[data-theme="dark"] .roster-date-num { background: rgba(29,158,117,0.15) !important; color: #1d9e75 !important; border-color: rgba(29,158,117,0.4) !important; }
body[data-theme="dark"] .roster-pilot-name { color: #e2e8f0 !important; }
body[data-theme="dark"] .roster-sidebar-header { color: #e2e8f0 !important; }
body[data-theme="dark"] .roster-sidebar-toggle-btn { color: #94a3b8 !important; }
body[data-theme="dark"] .roster-mobile-hint { background: rgba(217,119,6,0.12) !important; color: #fbbf24 !important; border-color: rgba(217,119,6,0.3) !important; }
body[data-theme="dark"] .roster-modal-footer { border-top-color: rgba(255,255,255,0.08) !important; }
body[data-theme="dark"] .roster-gantt-aircraft-col { background: #0f172a !important; border-right-color: #2d3f55 !important; }
body[data-theme="dark"] .roster-gantt-row { border-bottom-color: #1a2535 !important; }

/* ── Schedule summary row (crews-available count) ── */
.schedule-summary-row { border-top: 2px solid var(--gray-200) !important; }
.schedule-summary-label {
  padding: 5px 10px 5px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-400);
  white-space: nowrap;
  vertical-align: middle;
  position: relative;
}
.schedule-summary-label[data-tooltip]::before,
.schedule-summary-label[data-tooltip]::after {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  position: absolute;
  bottom: calc(100% + 7px);
  left: 0;
  transform: none;
  z-index: 200;
}
.schedule-summary-label[data-tooltip]::after {
  content: attr(data-tooltip);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 6px;
  width: 240px;
  white-space: normal;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.schedule-summary-label[data-tooltip]::before {
  content: "";
  border: 5px solid transparent;
  border-top-color: #1e293b;
  bottom: calc(100% + 1px);
  width: 0;
  height: 0;
  padding: 0;
  border-radius: 0;
}
.schedule-summary-label[data-tooltip]:hover::before,
.schedule-summary-label[data-tooltip]:hover::after { opacity: 1; }
.schedule-summary-count {
  border-right: 2px solid var(--gray-100);
  vertical-align: middle;
}
.schedule-summary-cell {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  padding: 5px 2px;
  border-right: 1px solid var(--gray-100);
  vertical-align: middle;
}
.schedule-summary-cell.weekend { background: #f7f8fa; }
.schedule-summary-cell.today   { background: #eff6ff; }
.schedule-summary-row:hover .schedule-summary-cell,
.schedule-summary-row:hover .schedule-summary-label,
.schedule-summary-row:hover .schedule-summary-count { background: inherit !important; }
.schedule-summary-cell--pool { color: #3b82f6; }
.schedule-summary-cell--clickable {
  cursor: pointer;
}
.schedule-summary-cell--clickable:hover {
  text-decoration: underline;
  color: #1D9E75;
}

/* Dark mode — summary row */
[data-theme="dark"] .schedule-summary-row          { border-top-color: #2d3f55 !important; }
[data-theme="dark"] .schedule-summary-count        { border-right-color: #2d3f55; }
[data-theme="dark"] .schedule-summary-cell         { border-right-color: #2d3f55; color: #34d399; }
[data-theme="dark"] .schedule-summary-cell.weekend { background: #1a2233; }
[data-theme="dark"] .schedule-summary-cell.today   { background: #0f1e3d; }
[data-theme="dark"] .schedule-summary-cell--pool   { color: #60a5fa; }

/* ---- Crew portal page content ---- */

/* Trip cards (dashboard) */
.crew-trip-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
}
.crew-trip-card-past {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
}
.crew-trip-name        { font-size: 14px; font-weight: 600; color: #111; }
.crew-trip-name-past   { font-size: 14px; font-weight: 600; color: #555; }
.crew-trip-meta        { font-size: 13px; color: #666; margin-top: 2px; }
.crew-trip-meta-past   { font-size: 13px; color: #999; margin-top: 2px; }
.crew-section-title    { font-size: 14px; font-weight: 600; color: #333; margin: 24px 0 12px; }
.crew-section-title-past { font-size: 14px; font-weight: 600; color: #333; margin: 32px 0 12px; }
.crew-empty            { color: #9ca3af; margin-top: 24px; }

/* Stat chips (schedule) */
.crew-stat-chips { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.crew-stat-chip {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
  min-width: 80px;
}
.crew-stat-chip-ovt {
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 20px;
  text-align: center;
  min-width: 80px;
}
.crew-stat-value       { font-size: 22px; font-weight: 700; }
.crew-stat-label       { font-size: 11px; color: #6b7280; margin-top: 2px; }

/* Next-duty banner (schedule) */
.crew-next-duty {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.crew-next-duty-text   { font-size: 13px; font-weight: 600; color: #15803d; }
.crew-next-duty-sub    { font-size: 11px; color: #64748b; margin-top: 2px; }

/* Calendar (schedule) */
.crew-cal-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.crew-cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}
.crew-cal-dow {
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.05em;
}
.crew-cal-dow-weekend  { color: #94a3b8; }
.crew-cal-grid         { display: grid; grid-template-columns: repeat(7, 1fr); }
.crew-cal-cell {
  min-height: 60px;
  padding: 6px;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.crew-cal-cell[data-type="today"]   { background: #f0fdf4; }
.crew-cal-cell[data-type="weekend"] { background: #fafafa; }
.crew-cal-cell-empty {
  min-height: 60px;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}
.crew-cal-day-num      { font-size: 11px; font-weight: 400; color: #374151; margin-bottom: 4px; }
.crew-cal-day-num-today   { font-weight: 700; color: #15803d; }
.crew-cal-day-num-weekend { color: #94a3b8; }
.crew-cal-note { font-size: 11px; color: #9ca3af; text-align: right; }

.crew-month-label { font-size: 13px; font-weight: 600; color: #374151; min-width: 110px; text-align: center; }
.crew-pilot-info  { font-size: 13px; color: #64748b; margin-bottom: 16px; }
.crew-pilot-name  { color: #111; }

/* Document alerts (dashboard) */
.crew-alerts-wrap      { margin-bottom: 24px; }
.crew-alerts-title     { font-size: 14px; font-weight: 600; color: #333; margin: 0 0 8px; }
.crew-alert-list       { display: flex; flex-direction: column; gap: 5px; }
.crew-alert-item {
  border-radius: 0 6px 6px 0;
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.crew-alert-item[data-tier="expired"]  { border-left: 3px solid #DC2626; background: #FEF2F2; }
.crew-alert-item[data-tier="critical"] { border-left: 3px solid #EA580C; background: #FFF7ED; }
.crew-alert-item[data-tier="warning"]  { border-left: 3px solid #D97706; background: #FFFBEB; }
.crew-alert-item[data-tier="notice"]   { border-left: 3px solid #CA8A04; background: #FEFCE8; }
.crew-alert-label      { font-size: 13px; font-weight: 600; color: #111; }
.crew-alert-status-expired  { font-size: 11px; font-weight: 600; margin-top: 1px; color: #DC2626; }
.crew-alert-status-critical { font-size: 11px; font-weight: 600; margin-top: 1px; color: #EA580C; }
.crew-alert-status-warning  { font-size: 11px; font-weight: 600; margin-top: 1px; color: #D97706; }
.crew-alert-status-notice   { font-size: 11px; font-weight: 600; margin-top: 1px; color: #CA8A04; }
.crew-alert-link-expired  { font-size: 12px; color: #DC2626; text-decoration: none; font-weight: 600; white-space: nowrap; }
.crew-alert-link-critical { font-size: 12px; color: #EA580C; text-decoration: none; font-weight: 600; white-space: nowrap; }
.crew-alert-link-warning  { font-size: 12px; color: #D97706; text-decoration: none; font-weight: 600; white-space: nowrap; }
.crew-alert-link-notice   { font-size: 12px; color: #CA8A04; text-decoration: none; font-weight: 600; white-space: nowrap; }
.crew-alert-current    { font-size: 12px; color: #aaa; margin: 6px 0 0; text-align: right; }

/* Training rows */
.crew-training-row {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

/* Notification preference rows (settings) */
.crew-pref-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

/* ---- Dark mode overrides for crew portal ---- */
[data-theme="dark"] .crew-trip-card       { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .crew-trip-card-past  { background: #1a2438; border-color: #2d3f55; }
[data-theme="dark"] .crew-trip-name       { color: #e2e8f0; }
[data-theme="dark"] .crew-trip-name-past  { color: #94a3b8; }
[data-theme="dark"] .crew-trip-meta       { color: #94a3b8; }
[data-theme="dark"] .crew-trip-meta-past  { color: #64748b; }
[data-theme="dark"] .crew-section-title   { color: #e2e8f0; }
[data-theme="dark"] .crew-section-title-past { color: #e2e8f0; }
[data-theme="dark"] .crew-empty           { color: #4b5563; }

[data-theme="dark"] .crew-stat-chip       { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .crew-stat-chip-ovt   { background: #1e293b; border-color: #7f1d1d; }
[data-theme="dark"] .crew-stat-label      { color: #64748b; }

[data-theme="dark"] .crew-next-duty       { background: #0d2218; border-color: #166534; }
[data-theme="dark"] .crew-next-duty-text  { color: #4ade80; }
[data-theme="dark"] .crew-next-duty-sub   { color: #64748b; }

[data-theme="dark"] .crew-cal-wrap        { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .crew-cal-head        { background: #162032; border-bottom-color: #2d3f55; }
[data-theme="dark"] .crew-cal-dow         { color: #64748b; }
[data-theme="dark"] .crew-cal-dow-weekend { color: #4b5563; }
[data-theme="dark"] .crew-cal-cell        { background: #1e293b; border-right-color: #2d3f55; border-bottom-color: #2d3f55; }
[data-theme="dark"] .crew-cal-cell[data-type="today"]   { background: #0d2218; }
[data-theme="dark"] .crew-cal-cell[data-type="weekend"] { background: #162032; }
[data-theme="dark"] .crew-cal-cell-empty  { border-right-color: #2d3f55; border-bottom-color: #2d3f55; }
[data-theme="dark"] .crew-cal-day-num         { color: #94a3b8; }
[data-theme="dark"] .crew-cal-day-num-today   { color: #4ade80; }
[data-theme="dark"] .crew-cal-day-num-weekend { color: #4b5563; }
[data-theme="dark"] .crew-cal-note        { color: #4b5563; }

[data-theme="dark"] .crew-month-label { color: #e2e8f0; }
[data-theme="dark"] .crew-pilot-name  { color: #e2e8f0; }

[data-theme="dark"] .crew-alerts-title    { color: #e2e8f0; }
[data-theme="dark"] .crew-alert-label     { color: #e2e8f0; }
[data-theme="dark"] .crew-alert-item[data-tier="expired"]  { background: #2a0d0d; }
[data-theme="dark"] .crew-alert-item[data-tier="critical"] { background: #2a1205; }
[data-theme="dark"] .crew-alert-item[data-tier="warning"]  { background: #2a1e05; }
[data-theme="dark"] .crew-alert-item[data-tier="notice"]   { background: #261f05; }
[data-theme="dark"] .crew-alert-current   { color: #4b5563; }

[data-theme="dark"] .crew-training-row    { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .crew-pref-row        { border-bottom-color: #2d3f55; }

/* ============================================================
   CREWBENCH FEEDBACK MANAGEMENT PAGE — DARK MODE FIX
   ============================================================ */

/* Filter dropdowns */
body[data-theme="dark"] select {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] select option {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

/* Filter submit button */
body[data-theme="dark"] input[type="submit"] {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] input[type="submit"]:hover {
  background: #243449 !important;
}

/* Muted stat/meta text (inline rgb(136,136,136)) */
body[data-theme="dark"] [style*="color: rgb(136, 136, 136)"],
body[data-theme="dark"] [style*="color:rgb(136, 136, 136)"] {
  color: #94a3b8 !important;
}

/* Inline near-black text overrides */
body[data-theme="dark"] [style*="color: rgb(0, 0, 0)"],
body[data-theme="dark"] [style*="color:rgb(0, 0, 0)"] {
  color: #e2e8f0 !important;
}

/* Action buttons — fix light borders */
body[data-theme="dark"] .main-content button {
  border-color: #2d3f55 !important;
}

/* "Mark closed" button — keep green */
body[data-theme="dark"] .main-content button[style*="color: rgb(29, 158"],
body[data-theme="dark"] .main-content button[style*="color:rgb(29, 158"] {
  border-color: rgba(52, 211, 153, 0.4) !important;
  color: #34d399 !important;
}

/* "Forward to" dropdown — green outline */
body[data-theme="dark"] select#contact-select {
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  background: #1e293b !important;
}

/* ------ Pilot Contact Dialog ------ */
body[data-theme="dark"] .pilot-contact-dialog {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}
body[data-theme="dark"] .pilot-contact-header,
body[data-theme="dark"] .pilot-contact-info,
body[data-theme="dark"] .pilot-contact-name {
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] .pilot-contact-meta { color: #94a3b8 !important; }
body[data-theme="dark"] .pilot-contact-employment { color: #64748b !important; }
body[data-theme="dark"] .pilot-seniority-badge { color: #64748b !important; }
body[data-theme="dark"] .pilot-contact-ratings,
body[data-theme="dark"] .pilot-contact-actions {
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] .pilot-rating-tag {
  background: #162032 !important;
  color: #94a3b8 !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] .pilot-contact-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #e2e8f0 !important;
  border-color: #2d3f55 !important;
}
body[data-theme="dark"] .pilot-contact-btn--whatsapp { color: #34d399 !important; }
body[data-theme="dark"] .pilot-contact-close { color: #64748b !important; }
/* ── Pilot contact modal — banner header ─────────────────────────────── */
.pilot-contact-header--banner {
  background: linear-gradient(135deg, #1a3a2a, #2d6a4f);
  border-bottom: none;
  align-items: center;
  padding: 16px 20px 14px;
  gap: 12px;
}
.pilot-contact-banner-photo { flex-shrink: 0; }
.pilot-contact-banner-img {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255,255,255,0.3);
  display: block;
}
.pilot-contact-avatar--banner {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 16px;
}
.pilot-contact-banner-info { flex: 1; min-width: 0; }
.pilot-contact-header--banner .pilot-contact-name { color: #fff; }
.pilot-contact-header--banner .pilot-contact-meta { color: rgba(255,255,255,0.85); margin-top: 3px; }
.pilot-contact-header--banner .pilot-contact-employment { color: rgba(255,255,255,0.7); }
.pilot-contact-header--banner .pilot-seniority-badge { color: rgba(255,255,255,0.7); }
.pilot-contact-banner-detail { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 4px; }
.pilot-contact-icao {
  font-family: monospace; font-style: normal;
  background: rgba(255,255,255,0.15); padding: 1px 5px; border-radius: 3px;
}
.pilot-contact-close--banner { color: rgba(255,255,255,0.75); }
.pilot-contact-close--banner:hover { color: #fff; }

/* dark theme — banner header keeps its own colors */
body[data-theme="dark"] .pilot-contact-header--banner { background: linear-gradient(135deg, #1a3a2a, #2d6a4f) !important; }
body[data-theme="dark"] .pilot-contact-header--banner .pilot-contact-name { color: #fff !important; }
body[data-theme="dark"] .pilot-contact-header--banner .pilot-contact-meta { color: rgba(255,255,255,0.85) !important; }


/* =========================================
   Nearby Available Crew Section
   ========================================= */

/* Accordion wrapper */
.nearby-crew-accordion {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

/* Summary / Header row */
summary.nearby-crew-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #fff;
  transition: background 0.15s;
}
summary.nearby-crew-summary::-webkit-details-marker { display: none; }
summary.nearby-crew-summary:hover { background: #f9fafb; }

.nearby-crew-icon  { font-size: 16px; flex-shrink: 0; }
.nearby-crew-title { font-size: 15px; font-weight: 600; color: #111827; flex-shrink: 0; }

.nearby-crew-badge {
  font-size: 12px;
  font-weight: 600;
  color: #1D9E75;
  background: #e6f7f1;
  border-radius: 20px;
  padding: 2px 10px;
  flex-shrink: 0;
}

/* List / Map toggle buttons */
.nearby-crew-view-toggle {
  display: flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.nearby-view-btn {
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: #fff;
  color: #6b7280;
  border: none;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}
.nearby-view-btn:first-child { border-right: 1px solid #d1d5db; }
.nearby-view-btn:hover       { background: #f3f4f6; color: #374151; }
.nearby-view-btn.active      { background: #1D9E75; color: #fff; }

/* Chevron */
.nearby-crew-chevron {
  font-size: 18px;
  color: #9ca3af;
  transition: transform 0.2s;
  margin-left: 4px;
  flex-shrink: 0;
}
details.nearby-crew-accordion[open] .nearby-crew-chevron { transform: rotate(90deg); }

/* Body */
.nearby-crew-body { border-top: 1px solid #e5e7eb; }

/* Filter bar */
.nearby-crew-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.nearby-crew-role-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.nearby-role-btn {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nearby-role-btn:hover  { background: #f3f4f6; border-color: #9ca3af; }
.nearby-role-btn.active { background: #1D9E75; color: #fff; border-color: #1D9E75; }

/* "Available only" toggle */
#nearby-available-only { display: none; }

.nearby-availability-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  font-family: inherit;
}

.nearby-toggle-track {
  display: inline-flex;
  align-items: center;
  width: 36px;
  height: 20px;
  background: #d1d5db;
  border-radius: 999px;
  padding: 2px;
  transition: background 0.2s;
  flex-shrink: 0;
}
#nearby-available-only:checked + .nearby-availability-label .nearby-toggle-track {
  background: #1D9E75;
}

.nearby-toggle-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
#nearby-available-only:checked + .nearby-availability-label .nearby-toggle-thumb {
  transform: translateX(16px);
}

/* List view */
#nearby-list-view { max-height: 420px; overflow-y: auto; }

.nearby-crew-list { padding: 0; }

.nearby-crew-row {
  padding: 10px 18px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}
.nearby-crew-row:last-child { border-bottom: none; }
.nearby-crew-row:hover      { background: #f9fafb; }

.nearby-crew-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nearby-crew-row-main > div:first-child { min-width: 0; }

.nearby-crew-name { font-size: 14px; font-weight: 600; color: #111827; }
.nearby-crew-role { font-size: 12px; color: #6b7280; margin-top: 1px; }

.nearby-crew-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nearby-crew-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.nearby-crew-meta-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nearby-crew-distance {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
}

.nearby-crew-hours {
  font-size: 11px;
  color: #b0b7c3;
}

.nearby-crew-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  min-width: 48px;
  text-align: center;
  letter-spacing: 0.03em;
}

.nearby-crew-base {
  margin-top: 3px;
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nearby-crew-no-base { font-style: italic; color: #c4c9d4; }

.empty-state-small {
  padding: 24px 18px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  font-style: italic;
}

/* Map view */
.nearby-crew-map-container {
  height: 380px;
  width: 100%;
  border-radius: 0 0 12px 12px;
  position: relative;   /* needed for the "no home base" overlay note */
}

/* ICAO badge inside crew rows */
.nearby-crew-icao {
  font-family: monospace;
  font-size: 11px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 1px 5px;
  color: #374151;
  letter-spacing: .02em;
}

/* Freelancer divider inside the nearby list */
.nearby-freelancer-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.nearby-freelancer-divider::before,
.nearby-freelancer-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}
/* =========================================
   Crew Dashboard – banner extensions
   ========================================= */
.crew-dash-banner-wrap {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}
.crew-dash-operator-label {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.03em;
}
.crew-dash-operator-selector {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 20px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}
.crew-dash-operator-selector select {
  background: none;
  border: none;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}
[data-theme="dark"] .crew-dash-banner-wrap {
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

/* ── Navbar operator selector ───────────────────────────────────────────── */
.crew-nav-operator-selector {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 12px;
  color: #555;
  flex-shrink: 0;
}
.crew-nav-operator-selector form { display: flex; align-items: center; gap: 5px; margin: 0; }
.crew-nav-operator-select {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  max-width: 160px;
}
[data-theme="dark"] .crew-nav-operator-selector {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: #94a3b8;
}
[data-theme="dark"] .crew-nav-operator-select { color: #e2e8f0; }

/* =========================================
   Crew edit form – tabs
   ========================================= */
.crew-tab-btn {
  padding: 8px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  border-radius: 4px 4px 0 0;
  font-family: inherit;
}
.crew-tab-btn:hover { color: #1D9E75; }
.crew-tab-btn.active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}
[data-theme="dark"] .crew-tab-btn         { color: #94a3b8; }
[data-theme="dark"] .crew-tab-btn:hover   { color: #34d399; }
[data-theme="dark"] .crew-tab-btn.active  { color: #e2e8f0; border-bottom-color: #e2e8f0; }

/* ===== DUTY CODES SETTINGS TAB ===== */
[data-controller="duty-codes"] table { width:100%; border-collapse:collapse; border-radius:10px; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,.08); }
[data-controller="duty-codes"] table th { background:#f8fafc; color:#64748b; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; padding:10px 14px; text-align:left; border-bottom:1px solid #e2e8f0; }
[data-controller="duty-codes"] table td { padding:12px 14px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
[data-controller="duty-codes"] table tr:last-child td { border-bottom:none; }
[data-controller="duty-codes"] table tr:hover td { background:#f8fafc; }
[data-controller="duty-codes"] table td:last-child { text-align:right; }

[data-controller="duty-codes"] .action-btns { display:flex; align-items:center; gap:6px; justify-content:flex-end; }
[data-controller="duty-codes"] details summary.btn { list-style:none; padding:5px 14px; border-radius:6px; font-size:13px; font-weight:500; background:#f1f5f9; border:1px solid #e2e8f0; color:#475569; cursor:pointer; transition:all .15s; display:inline-block; }
[data-controller="duty-codes"] details summary.btn:hover { background:#e2e8f0; color:#1e293b; }
[data-controller="duty-codes"] details summary::-webkit-details-marker { display:none; }
[data-controller="duty-codes"] .button_to button[type=submit] { background:none; border:1px solid #fca5a5; color:#ef4444; border-radius:6px; padding:5px 12px; font-size:13px; font-weight:500; cursor:pointer; transition:all .15s; }
[data-controller="duty-codes"] .button_to button[type=submit]:hover { background:#fee2e2; border-color:#ef4444; }

[data-controller="duty-codes"] details { position:relative; }
[data-controller="duty-codes"] details > div { position:fixed !important; top:50% !important; left:50% !important; transform:translate(-50%,-50%) !important; z-index:9999 !important; background:#fff !important; border-radius:14px !important; box-shadow:0 20px 60px rgba(0,0,0,.18),0 4px 20px rgba(0,0,0,.08) !important; padding:28px 28px 24px !important; width:400px !important; border:1px solid #e2e8f0 !important; }
[data-controller="duty-codes"] details[open]::before { content:''; position:fixed; inset:0; background:rgba(15,23,42,.4); z-index:9998; backdrop-filter:blur(2px); }
[data-controller="duty-codes"] details[open] > div::before { content:'Edit Duty Code'; display:block; font-size:17px; font-weight:700; color:#0f172a; margin-bottom:22px; padding-bottom:16px; border-bottom:1px solid #f1f5f9; text-align:left; }
[data-controller="duty-codes"] details > div .form-row { margin-bottom:16px; text-align:left; }
[data-controller="duty-codes"] details > div .form-label { display:block; font-size:12px; font-weight:600; color:#374151; margin-bottom:6px; text-align:left; }
[data-controller="duty-codes"] details > div .form-input { width:100%; padding:8px 12px; border:1.5px solid #e2e8f0; border-radius:8px; font-size:14px; color:#1e293b; background:#f8fafc; transition:border-color .15s,box-shadow .15s; box-sizing:border-box; outline:none; }
[data-controller="duty-codes"] details > div .form-input:focus { border-color:#3b82f6; box-shadow:0 0 0 3px rgba(59,130,246,.12); background:#fff; }
[data-controller="duty-codes"] details > div input[type="color"] { width:48px; height:36px; border:2px solid #e2e8f0; border-radius:8px; cursor:pointer; padding:2px; background:none; display:block; }
[data-controller="duty-codes"] details > div > form > div > div:not(.form-row) { display:flex; gap:14px; margin-bottom:20px; flex-wrap:wrap; justify-content:flex-start; }
[data-controller="duty-codes"] details > div > form > div > div:not(.form-row) label { display:flex; align-items:center; gap:6px; font-size:13px; color:#374151; cursor:pointer; font-weight:500; }
[data-controller="duty-codes"] details > div > form > div > div:not(.form-row) input[type="checkbox"] { width:15px; height:15px; accent-color:#3b82f6; cursor:pointer; }
[data-controller="duty-codes"] details > div .btn.btn-primary { background:#1d4ed8; color:#fff; border:none; border-radius:8px; padding:9px 20px; font-size:14px; font-weight:600; cursor:pointer; }
[data-controller="duty-codes"] details > div .btn.btn-primary:hover { background:#1e40af; }

[data-controller="duty-codes"] form.form { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:16px 20px; box-sizing:border-box; width:100% !important; max-width:none !important; }
[data-controller="duty-codes"] form.form > div { display:flex; align-items:flex-end; gap:10px; flex-wrap:nowrap; width:100%; }
[data-controller="duty-codes"] form.form .form-row { display:flex; flex-direction:column; margin-bottom:0; }
[data-controller="duty-codes"] form.form .form-row label { font-size:11px; font-weight:600; color:#64748b; margin-bottom:5px; text-transform:uppercase; letter-spacing:.05em; white-space:nowrap; }
[data-controller="duty-codes"] form.form .form-row input:not([type=hidden]):not([type=color]) { padding:8px 10px; border:1.5px solid #e2e8f0; border-radius:8px; font-size:13px; color:#1e293b; background:#fff; width:100%; box-sizing:border-box; outline:none; }
[data-controller="duty-codes"] form.form .form-row input[type=color] { width:44px; height:36px; border:2px solid #e2e8f0; border-radius:8px; cursor:pointer; padding:2px; background:none; display:block; }
[data-controller="duty-codes"] form.form .btn.btn-primary { background:#1d4ed8; color:#fff; border:none; border-radius:8px; padding:8px 16px; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; height:36px; flex-shrink:0; }
[data-controller="duty-codes"] form.form .btn.btn-primary:hover { background:#1e40af; }


/* ── Settings page / duty codes – dark theme fixes ── */

[data-theme="dark"] .form,
body[data-theme="dark"] .form {
  background: #1e293b !important;
}

[data-theme="dark"] .form-input,
body[data-theme="dark"] .form-input {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .form-input::placeholder,
body[data-theme="dark"] .form-input::placeholder {
  color: #64748b !important;
}

[data-theme="dark"] .form-input:focus,
body[data-theme="dark"] .form-input:focus {
  border-color: #1d9e75 !important;
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.15) !important;
}

[data-theme="dark"] .form-row label,
body[data-theme="dark"] .form-row label {
  color: #94a3b8 !important;
}

[data-theme="dark"] .form-label,
body[data-theme="dark"] .form-label {
  color: #94a3b8 !important;
}

[data-theme="dark"] .btn-secondary,
body[data-theme="dark"] .btn-secondary {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .btn-secondary:hover,
body[data-theme="dark"] .btn-secondary:hover {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

/* Fix duty-codes table row hover */
[data-theme="dark"] [data-controller="duty-codes"] table tr:hover td,
body[data-theme="dark"] [data-controller="duty-codes"] table tr:hover td {
  background-color: #243044 !important;
}

/* remove the Ukranian flag from the maps view */
.leaflet-attribution-flag { 
    display: none !important; 
}

/* Dark theme overrides for Edit Duty Code modal */
body[data-theme="dark"] [data-controller="duty-codes"] details > div,
[data-theme="dark"] [data-controller="duty-codes"] details > div {
  background-color: rgb(30, 41, 59) !important;
  border-color: rgb(51, 65, 85) !important;
}

body[data-theme="dark"] [data-controller="duty-codes"] details[open] > div::before,
[data-theme="dark"] [data-controller="duty-codes"] details[open] > div::before {
  color: rgb(226, 232, 240) !important;
  border-bottom-color: rgb(51, 65, 85) !important;
}

body[data-theme="dark"] [data-controller="duty-codes"] details > div .form-label,
[data-theme="dark"] [data-controller="duty-codes"] details > div .form-label {
  color: rgb(148, 163, 184) !important;
}

body[data-theme="dark"] [data-controller="duty-codes"] details > div .form-input,
[data-theme="dark"] [data-controller="duty-codes"] details > div .form-input {
  background-color: rgb(15, 23, 42) !important;
  color: rgb(226, 232, 240) !important;
  border-color: rgb(51, 65, 85) !important;
}

body[data-theme="dark"] [data-controller="duty-codes"] details > div .form-input:focus,
[data-theme="dark"] [data-controller="duty-codes"] details > div .form-input:focus {
  background-color: rgb(15, 23, 42) !important;
  border-color: rgb(59, 130, 246) !important;
}

body[data-theme="dark"] [data-controller="duty-codes"] details > div > form > div > div:not(.form-row) label,
[data-theme="dark"] [data-controller="duty-codes"] details > div > form > div > div:not(.form-row) label {
  color: rgb(148, 163, 184) !important;
}

/* =====================================================
   Nearby Available Crew — Dark Theme Overrides
   ===================================================== */
body[data-theme="dark"] .nearby-crew-accordion { background: rgb(30, 41, 59); border-color: rgb(45, 63, 85); }
body[data-theme="dark"] summary.nearby-crew-summary { background: rgb(30, 41, 59); }
body[data-theme="dark"] summary.nearby-crew-summary:hover { background: rgb(40, 52, 71); }
body[data-theme="dark"] .nearby-crew-title { color: rgb(226, 232, 240); }
body[data-theme="dark"] .nearby-crew-chevron { color: rgb(100, 116, 139); }
body[data-theme="dark"] .nearby-crew-badge { background: rgba(29, 158, 117, 0.15); color: rgb(52, 211, 153); }
body[data-theme="dark"] .nearby-crew-view-toggle { border-color: rgb(45, 63, 85); }
body[data-theme="dark"] .nearby-view-btn { background: rgb(30, 41, 59); color: rgb(148, 163, 184); }
body[data-theme="dark"] .nearby-view-btn:first-child { border-right-color: rgb(45, 63, 85); }
body[data-theme="dark"] .nearby-view-btn:hover { background: rgb(40, 52, 71); color: rgb(226, 232, 240); }
body[data-theme="dark"] .nearby-view-btn.active { background: rgb(29, 158, 117); color: #fff; }
body[data-theme="dark"] .nearby-crew-body { border-top-color: rgb(45, 63, 85); }
body[data-theme="dark"] .nearby-crew-filters { background: rgb(22, 31, 48); border-bottom-color: rgb(45, 63, 85); }
body[data-theme="dark"] .nearby-role-btn { background: rgb(30, 41, 59); color: rgb(148, 163, 184); border-color: rgb(45, 63, 85); }
body[data-theme="dark"] .nearby-role-btn:hover { background: rgb(40, 52, 71); color: rgb(226, 232, 240); border-color: rgb(71, 85, 105); }
body[data-theme="dark"] .nearby-role-btn.active { background: rgb(29, 158, 117); color: #fff; border-color: rgb(29, 158, 117); }
body[data-theme="dark"] .nearby-availability-label { color: rgb(148, 163, 184); }
body[data-theme="dark"] .nearby-toggle-track { background: rgb(51, 65, 85); }
body[data-theme="dark"] .nearby-crew-row { border-bottom-color: rgb(45, 63, 85); }
body[data-theme="dark"] .nearby-crew-row:hover { background: rgb(40, 52, 71); }
body[data-theme="dark"] .nearby-crew-name { color: rgb(226, 232, 240); }
body[data-theme="dark"] .nearby-crew-role { color: rgb(100, 116, 139); }
body[data-theme="dark"] .nearby-crew-distance { color: rgb(100, 116, 139); }
body[data-theme="dark"] .nearby-crew-hours { color: rgb(71, 85, 105); }
body[data-theme="dark"] .nearby-crew-base { color: rgb(100, 116, 139); }
body[data-theme="dark"] .nearby-crew-icao { background: rgb(22, 31, 48); border-color: rgb(45, 63, 85); color: rgb(148, 163, 184); }

/* Map — dark tile filter + controls */
body[data-theme="dark"] .nearby-crew-map-container .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(0.85) contrast(0.9) saturate(0.8); }
body[data-theme="dark"] .nearby-crew-map-container .leaflet-control-zoom a { background: rgb(30, 41, 59); color: rgb(148, 163, 184); border-color: rgb(45, 63, 85); }
body[data-theme="dark"] .nearby-crew-map-container .leaflet-control-zoom a:hover { background: rgb(40, 52, 71); color: rgb(226, 232, 240); }
body[data-theme="dark"] .nearby-crew-map-container .leaflet-control-attribution { background: rgba(30, 41, 59, 0.85); color: rgb(100, 116, 139); }
body[data-theme="dark"] .nearby-crew-map-container .leaflet-control-attribution a { color: rgb(148, 163, 184); }

/* ===== SETTINGS PAGE — SAFE DESIGN IMPROVEMENTS ===== */

/* ----- GLOBAL ----- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- SIDEBAR ----- */
.settings-sidebar {
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
  padding: 20px 0 32px;
}

.settings-sidebar-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.3px;
  padding: 4px 20px 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f0f1f5;
}

.settings-sidebar-group-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 16px 20px 5px;
}

.settings-sidebar-item {
  display: block;
  padding: 8px 12px 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  margin: 1px 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.settings-sidebar-item--sub {
  padding-left: 22px;
  font-size: 13px;
  color: #4b5563;
}

.settings-sidebar-item:hover {
  background: #f3f4f8;
  color: #111827;
  text-decoration: none;
}

.settings-sidebar-item.settings-sidebar-item--active,
.settings-sidebar-item[aria-current] {
  background: #ecfdf5;
  color: #059669;
  font-weight: 600;
}

/* ----- CONTENT AREA ----- */
.settings-content {
  background: #f3f4f8;
  padding: 40px 48px;
}

/* Page headings */
.settings-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
}

/* Description text (shared across all settings pages) */
.settings-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 0 24px;
}

/* ----- PAYLOCITY FORM CARD ONLY -----                      */
/* .form-group is exclusively used on the Paylocity page.    */
/* Scoping through it keeps all other pages completely safe. */

/* Wrap the form in a card */
.settings-content .form-group:first-of-type {
  /* no-op — used as anchor only */
}

/* Paylocity form sits inside the section card — no double-card */
.settings-content form:has(.form-group) {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: 460px;
  box-shadow: none;
}

/* Field groups */
.form-group {
  margin-bottom: 20px;
}

/* Labels — scoped to only inside a .form-group */
.form-group .form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

/* Inputs — scoped to only inside a .form-group */
.form-group .form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  box-sizing: border-box;
  font-family: inherit;
}

.form-group .form-control::placeholder {
  color: #c4c9d4;
  font-size: 13px;
}

.form-group .form-control:focus {
  border-color: #10b981;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* ----- CARD DESIGN FOR ALL SETTINGS SECTIONS ----- */

/* Every section except duty codes (which has dark inline styles) gets a card */
.settings-section:not([data-controller="duty-codes"]) {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

/* Bordered sub-sections become separate cards — no border-top divider needed */
.settings-section-bordered:not([data-controller="duty-codes"]) {
  margin-top: 0;
  border-top: none;
}

/* Dark mode: use dark card surface instead of white */
[data-theme="dark"] .settings-section:not([data-controller="duty-codes"]) {
  background: #1e293b;
  border-color: #2d3f55;
  box-shadow: none;
}

/* ── Dashboard ──────────────────────────────────────────────────── */
.dashboard-page { padding: 0; }

.dashboard-map-section {
  position: relative;
  height: 52vh;
  min-height: 340px;
  background: #0d1b2a;
  border-bottom: 1px solid #1e3a5f;
}

.dashboard-below-map {
  padding: 20px 24px 40px;
}

.dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.dashboard-kpi-tile {
  display: block;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s;
}
.dashboard-kpi-tile:hover { border-color: var(--tile-color, #1D9E75); transform: translateY(-1px); }

.dashboard-kpi-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--tile-color, #1D9E75);
}
.dashboard-kpi-label {
  font-size: 11px;
  color: #64748b;
  margin-top: 5px;
  line-height: 1.3;
}
.dashboard-kpi-cta { font-size: 9px; color: #334155; margin-top: 4px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 14px;
}

.dashboard-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 16px;
}
.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.dashboard-card-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.dashboard-card-viewall { font-size: 10px; color: #1D9E75; text-decoration: none; }
.dashboard-card-viewall:hover { text-decoration: underline; }

.dashboard-row {
  display: flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 11px;
  margin-bottom: 6px;
  text-decoration: none;
  transition: border-color 0.12s;
  cursor: pointer;
}
.dashboard-row:hover { border-color: #334155; }
.dashboard-row:last-child { margin-bottom: 0; }

.dashboard-alert-card {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-left-width: 3px;
  border-left-style: solid;
}

/* Map filter bar */
.dashboard-map-filters {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
}
.dashboard-map-filter-select {
  background: rgba(30,41,59,0.9);
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  outline: none;
  backdrop-filter: blur(4px);
}
.dashboard-map-live-indicator {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  z-index: 10;
}
.dashboard-map-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #1D9E75;
  box-shadow: 0 0 5px #1D9E75;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

.dashboard-map-loader {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.dashboard-map-loader--hidden {
  opacity: 0;
}
.dashboard-map-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(29, 158, 117, 0.25);
  border-top-color: #1D9E75;
  border-radius: 50%;
  animation: mapSpin 0.7s linear infinite;
}
@keyframes mapSpin {
  to { transform: rotate(360deg); }
}
[data-theme="light"] .dashboard-map-loader {
  background: rgba(241, 245, 249, 0.75);
}

/* New: prevents zoom controls from overlapping the filter bar */
.dashboard-map-section .mapboxgl-ctrl-top-right {
  top: 50px !important;
}

.dashboard-fullscreen-btn:hover { background: rgba(29,158,117,0.2); }

/* Mapbox popup overrides */
.mapboxgl-popup-content {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 10px !important;
  padding: 14px !important;
  color: #e2e8f0 !important;
  min-width: 200px;
}
.mapboxgl-popup-tip { display: none !important; }

/* ============================
   LIGHT THEME OVERRIDES
   ============================ */

[data-theme="light"] .dashboard-map-section {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .dashboard-map-filter-select {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .dashboard-map-filter-select option {
  background: #ffffff;
  color: #334155;
}

[data-theme="light"] .dashboard-map-live-indicator,
[data-theme="light"] .dashboard-map-live-dot {
  color: #475569;
}

[data-theme="light"] .dashboard-kpi-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

[data-theme="light"] .dashboard-kpi-label {
  color: #64748b;
}

[data-theme="light"] .dashboard-kpi-cta {
  color: #94a3b8;
}

[data-theme="light"] .dashboard-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

[data-theme="light"] .dashboard-card-title {
  color: #64748b;
}

[data-theme="light"] .dashboard-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

[data-theme="light"] .dashboard-row:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .dashboard-row > div > div:first-child {
  color: #1e293b;
}

[data-theme="light"] .dashboard-row > div > div:nth-child(2),
[data-theme="light"] .dashboard-row > div > div:nth-child(3) {
  color: #64748b;
}

[data-theme="light"] .dashboard-card p {
  color: #94a3b8;
}

/* BEFORE */
.dashboard-map-live-indicator {
  position: absolute;
  bottom: 10px;   /* ← covers Mapbox logo */
  left: 12px;
}

/* AFTER */
.dashboard-map-live-indicator {
  position: absolute;
  bottom: 32px;   /* ← raised above Mapbox logo */
  left: 12px;
}







/* New wrapper — positions button top-right */
.dashboard-fullscreen-wrapper {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 11;
}

/* Remove margin-left: auto — button is no longer in the flex bar */
.dashboard-fullscreen-btn {
  background: rgba(29, 158, 117, 0.1);
  border: 1px solid rgb(29, 158, 117);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  color: rgb(29, 158, 117);
  cursor: pointer;
  text-decoration: none;
  /* margin-left: auto; <-- DELETE THIS LINE */
}

/* Push Mapbox zoom controls below the fullscreen button */
.dashboard-map-section .mapboxgl-ctrl-top-right {
  top: 48px !important;
}

/* ── Duty view filter states ── */
.schedule-grid--actual-only .duty-chip--request  { display: none !important; }
.schedule-grid--requested-only .duty-chip:not(.duty-chip--request) { display: none !important; }
.schedule-grid--requested-only .cal-duty-chip    { display: none !important; }
.schedule-grid--requested-only .note-pencil-btn  { display: none !important; }
.schedule-grid--requested-only .note-dot         { display: none !important; }
.schedule-grid--requested-only .schedule-count-cell { visibility: hidden; }

.duty-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 3px;
}

/* ── Duty Request: pending chip on operator schedule ── */
.duty-chip--request {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.4;
  cursor: pointer;
  transition: outline 0.1s;
}
.duty-chip--request:hover {
  outline: 2px solid #f59e0b;
  outline-offset: 1px;
}

/* ── Crew calendar: cell drag-select state ── */
.crew-cal-cell--selecting {
  background: var(--green-light) !important;
  border-color: var(--green) !important;
  cursor: crosshair;
}
[data-theme="dark"] .crew-cal-cell--selecting {
  background: #0d2218 !important;
  border-color: #1D9E75 !important;
}

/* ── Crew duty picker button ── */
.crew-duty-pick-btn {
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.15s;
}
.crew-duty-pick-btn:hover { opacity: 0.82; }

/* ── Duty Request modals / popover (theme-aware) ── */
.dr-modal-inner {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
[data-theme="dark"] .dr-modal-inner {
  background: #1a2d3f;
  border-color: #2d4a62;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.dr-section-label {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.dr-popover-label {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.dr-modal-title {
  font-size: 14px;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.dr-info-text {
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--gray-700);
}

.dr-summary {
  font-size: 12px;
  color: var(--gray-400);
  background: var(--gray-50);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
  border: 1px solid var(--gray-100);
}
[data-theme="dark"] .dr-summary {
  background: #0f1c2a;
  border-color: #1e2d3d;
}

.dr-textarea {
  width: 100%;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 6px;
  color: var(--gray-900);
  font-size: 12px;
  padding: 8px 10px;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}
.dr-textarea::placeholder { color: var(--gray-400); }
[data-theme="dark"] .dr-textarea {
  background: #0f1c2a;
  border-color: #2d3f52;
}

.dr-btn-ghost {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  color: var(--gray-700);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.dr-btn-ghost:hover { opacity: 0.85; }
[data-theme="dark"] .dr-btn-ghost {
  background: #0f1c2a;
  border-color: #2d4a62;
  color: #94a3b8;
}

.dr-btn-ghost--wide {
  padding: 9px;
  border-radius: 8px;
  font-size: 13px;
}

.dr-btn-ghost--danger { color: var(--red); }
[data-theme="dark"] .dr-btn-ghost--danger { color: #ef4444; }

.dr-req-popover {
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
[data-theme="dark"] .dr-req-popover {
  background: #1a2d3f;
  border-color: #2d4a62;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── Modify day toggle cards ── */
.modify-day-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid var(--gray-100);
  background: var(--gray-50);
  cursor: pointer;
  min-width: 52px;
  user-select: none;
  transition: opacity 0.15s;
}
.modify-day-toggle--approved {
  border-color: var(--green);
  background: var(--green-light);
}
.modify-day-toggle--rejected { opacity: 0.45; }

.modify-day-check {
  font-size: 12px;
  color: var(--gray-400);
}
.modify-day-toggle--approved .modify-day-check { color: var(--green); }

.modify-day-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}
.modify-day-toggle--approved .modify-day-num { color: var(--green); }
.modify-day-toggle--rejected  .modify-day-num { color: var(--gray-400); }

.modify-day-dow {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-400);
}
.modify-day-toggle--approved .modify-day-dow { color: var(--green); }

[data-theme="dark"] .modify-day-toggle {
  background: #0f1c2a;
  border-color: #2d4a62;
}
[data-theme="dark"] .modify-day-toggle--approved {
  background: #0d2218;
  border-color: #1D9E75;
}
[data-theme="dark"] .modify-day-toggle--rejected {
  background: #0a1520;
  border-color: #334155;
}

/* ── Crew pending request list ── */
.crew-pending-list-label {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.crew-pending-req-text { font-size: 12px; color: var(--gray-700); }
[data-theme="dark"] .crew-pending-req-text { color: #cbd5e1; }

.crew-pending-req-cancel {
  background: transparent;
  border: 1px solid var(--gray-100);
  color: var(--gray-400);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
  cursor: pointer;
}
[data-theme="dark"] .crew-pending-req-cancel {
  border-color: #334155;
  color: #64748b;
}

/* Owner portal — operator-side trip indicators */
.trip-card--owner-pending {
  border-left: 3px solid #f59e0b !important;
}

/* ═══════════════════════════════════════════════════════════
   OWNER PORTAL — Sidebar layout + full design system
   ═══════════════════════════════════════════════════════════ */

/* Layout */
.owner-layout { display: flex; min-height: 100vh; }

.owner-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.owner-sidebar-logo {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.owner-sidebar-logo-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.owner-sidebar-logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.owner-sidebar-nav {
  flex: 1;
  padding: 14px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.owner-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}

.owner-sidebar-link:hover { background: var(--gray-50); color: var(--gray-900); }

.owner-sidebar-link.active {
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
}

.owner-sidebar-cta {
  margin: 4px 10px 8px;
}

.owner-sidebar-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0;
  flex-shrink: 0;
}

.owner-sidebar-aircraft-block {
  padding: 10px 12px;
}

.owner-sidebar-section-label {
  padding: 2px 4px 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.owner-sidebar-aircraft {
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: 8px;
  border: 1px solid var(--gray-100);
}

.owner-sidebar-tail {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.owner-sidebar-rating { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

.owner-sidebar-footer {
  padding: 10px 10px 12px;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.owner-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 10px;
}

.owner-sidebar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.owner-sidebar-user-info { min-width: 0; flex: 1; }
.owner-sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.owner-sidebar-user-email { font-size: 11px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main content */
.owner-main {
  margin-left: 240px;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  background: var(--gray-50);
}

.owner-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 28px;
}

.owner-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.owner-page-title { font-size: 22px; font-weight: 800; margin: 0; line-height: 1.2; color: var(--gray-900); }
.owner-page-subtitle { font-size: 13px; color: var(--gray-400); margin: 4px 0 0; }

/* Stat cards */
.owner-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.owner-stat-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 18px 20px;
}

.owner-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.owner-stat-value { font-size: 20px; font-weight: 800; color: var(--gray-900); line-height: 1.2; }
.owner-stat-sub { font-size: 12px; color: var(--gray-400); margin-top: 3px; }

.owner-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.owner-status-dot--green { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.owner-status-dot--amber { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }

/* Owner cards */
.owner-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.owner-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
}

/* Trip rows */
.owner-trip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}

.owner-trip-row:last-child { border-bottom: none; }
.owner-trip-row:hover { background: var(--gray-50); }

.owner-trip-route { font-weight: 700; font-size: 14px; color: var(--gray-900); }
.owner-trip-meta { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* Calendar */
.owner-calendar-wrap {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  overflow: hidden;
}

.owner-calendar-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}

.owner-calendar-dow {
  padding: 10px 6px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.owner-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.owner-calendar-cell {
  padding: 8px;
  min-height: 86px;
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.owner-calendar-cell:nth-child(7n) { border-right: none; }
.owner-calendar-cell--empty { background: var(--gray-50); }

.owner-calendar-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 5px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.owner-calendar-cell--today .owner-calendar-date {
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.owner-cal-pill {
  display: block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  line-height: 1.5;
}

.owner-cal-pill--pending   { background: #fef3c7; color: #92400e; }
.owner-cal-pill--confirmed { background: #d1fae5; color: #065f46; }
.owner-cal-pill--owner     { background: #dbeafe; color: #1e40af; }
.owner-cal-pill--charter   { background: var(--gray-100); color: var(--gray-600); }

.owner-cal-legend {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--gray-400);
}

.owner-cal-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

.owner-cal-legend-dot--pending   { background: #f59e0b; }
.owner-cal-legend-dot--confirmed { background: #10b981; }
.owner-cal-legend-dot--charter   { background: var(--gray-300); }

/* Month nav */
.owner-month-nav { display: flex; align-items: center; gap: 10px; }
.owner-month-label { font-size: 15px; font-weight: 700; min-width: 130px; text-align: center; color: var(--gray-900); }

/* Auth pages */
.owner-auth-bg {
  min-height: 100vh;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.owner-auth-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.owner-auth-logo { text-align: center; margin-bottom: 22px; }
.owner-auth-title { font-size: 20px; font-weight: 800; text-align: center; margin: 0 0 5px; color: #0f172a; }
.owner-auth-subtitle { font-size: 14px; color: var(--gray-400); text-align: center; margin: 0 0 26px; line-height: 1.5; }

.owner-auth-field { margin-bottom: 14px; }
.owner-auth-label { display: block; font-size: 12px; font-weight: 700; color: var(--gray-600); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.owner-auth-input {
  display: block; width: 100%; padding: 10px 13px; font-size: 14px;
  border: 1px solid var(--gray-100); border-radius: 8px; background: #fff; color: #111;
  box-sizing: border-box; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.owner-auth-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,158,117,0.12); }

.owner-auth-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 13px; }
.owner-auth-remember { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-600); cursor: pointer; }
.owner-auth-link { color: var(--green-dark); text-decoration: none; font-size: 13px; font-weight: 500; }
.owner-auth-link:hover { text-decoration: underline; }

.owner-auth-submit {
  display: block; width: 100%; padding: 11px; font-size: 14px; font-weight: 700;
  background: var(--green); color: #fff; border: none; border-radius: 8px;
  cursor: pointer; font-family: inherit; transition: background 0.15s;
  margin-top: 4px;
}
.owner-auth-submit:hover { background: var(--green-dark); }

.owner-auth-errors { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.owner-auth-error { font-size: 13px; color: #dc2626; margin: 0; line-height: 1.6; }

/* Form fields inside owner portal */
.owner-field { margin-bottom: 16px; }
.owner-field-label { display: block; font-size: 12px; font-weight: 700; color: var(--gray-500); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.owner-field-input {
  display: block; width: 100%; padding: 9px 12px; font-size: 14px;
  border: 1px solid var(--gray-100); border-radius: 8px; background: #fff; color: var(--gray-900);
  box-sizing: border-box; font-family: inherit; transition: border-color 0.15s;
}
.owner-field-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,158,117,0.12); }

/* Leg fields */
.owner-leg-block {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.owner-leg-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

/* Reports table */
.owner-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.owner-table th { text-align: left; padding: 10px 16px; font-size: 10px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--gray-100); }
.owner-table td { padding: 11px 16px; border-bottom: 1px solid var(--gray-100); color: var(--gray-900); font-size: 13px; }
.owner-table tr:last-child td { border-bottom: none; }
.owner-table tbody tr:hover td { background: var(--gray-50); }

/* Pax mode toggle */
.pax-mode-toggle {
  display: flex;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  width: fit-content;
  margin-bottom: 16px;
}

.pax-mode-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.pax-mode-btn--active {
  background: #fff;
  color: var(--gray-900);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.passenger-row {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}

/* Fleet page — owner section */
.pilot-card-owner-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 18px 12px;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  flex: 0 0 100%;
  box-sizing: border-box;
}

.pilot-card-owner-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-top: 6px;
  min-width: 44px;
  flex-shrink: 0;
}

.owner-pills-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.owner-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  padding: 4px 10px 4px 4px;
  font-size: 12px;
  color: var(--gray-700);
  cursor: default;
  transition: border-color 0.15s;
}

.owner-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.owner-name { font-weight: 600; }
.owner-share { color: var(--gray-400); font-size: 11px; }

.owner-badge-pending {
  background: #fef3c7;
  color: #92400e;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.owner-invite-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px dashed var(--gray-300);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  background: none;
  cursor: pointer;
  transition: all 0.15s;
}
.owner-invite-btn:hover { border-color: var(--green); color: var(--green-dark); }

.owner-add-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: 8px;
  border: 1px solid var(--gray-100);
  margin-top: 4px;
  width: 100%;
}

.owner-add-input {
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--gray-100);
  border-radius: 6px;
  background: #fff;
  color: var(--gray-900);
  font-family: inherit;
}

.owner-add-input:focus { outline: none; border-color: var(--green); }

.owner-pill-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 50;
  min-width: 220px;
  padding: 6px;
}

.owner-pill-action {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--gray-700);
  font-family: inherit;
}
.owner-pill-action:hover { background: var(--gray-50); }
.owner-pill-action--danger { color: #dc2626; }
.owner-pill-action--danger:hover { background: #fef2f2; }

/* ── Dark mode ─────────────────────────────────────────────── */
[data-theme="dark"] .owner-sidebar { background: #1e293b; border-right-color: #2d3f55; }
[data-theme="dark"] .owner-sidebar-logo { border-bottom-color: #2d3f55; }
[data-theme="dark"] .owner-sidebar-logo-text { color: #e2e8f0; }
[data-theme="dark"] .owner-sidebar-logo-sub { color: #64748b; }
[data-theme="dark"] .owner-sidebar-link { color: #94a3b8; }
[data-theme="dark"] .owner-sidebar-link:hover { background: #243044; color: #e2e8f0; }
[data-theme="dark"] .owner-sidebar-link.active { background: #0d2e22; color: #34d399; }
[data-theme="dark"] .owner-sidebar-divider { background: #2d3f55; }
[data-theme="dark"] .owner-sidebar-aircraft { background: #243044; border-color: #2d3f55; }
[data-theme="dark"] .owner-sidebar-tail { color: #e2e8f0; }
[data-theme="dark"] .owner-sidebar-rating { color: #64748b; }
[data-theme="dark"] .owner-sidebar-footer { border-top-color: #2d3f55; }
[data-theme="dark"] .owner-sidebar-user-name { color: #e2e8f0; }
[data-theme="dark"] .owner-sidebar-user-email { color: #64748b; }
[data-theme="dark"] .owner-main { background: #0f172a; }
[data-theme="dark"] .owner-stat-card { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .owner-stat-value { color: #e2e8f0; }
[data-theme="dark"] .owner-stat-label { color: #64748b; }
[data-theme="dark"] .owner-stat-sub { color: #64748b; }
[data-theme="dark"] .owner-status-dot--green { box-shadow: 0 0 0 3px #052e16; }
[data-theme="dark"] .owner-status-dot--amber { box-shadow: 0 0 0 3px #451a03; }
[data-theme="dark"] .owner-card { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .owner-card-header { border-bottom-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .owner-trip-row:hover { background: #243044; }
[data-theme="dark"] .owner-trip-route { color: #e2e8f0; }
[data-theme="dark"] .owner-trip-meta { color: #64748b; }
[data-theme="dark"] .owner-page-title { color: #e2e8f0; }
[data-theme="dark"] .owner-page-subtitle { color: #64748b; }
[data-theme="dark"] .owner-month-label { color: #e2e8f0; }
[data-theme="dark"] .owner-calendar-wrap { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .owner-calendar-head { background: #243044; border-bottom-color: #2d3f55; }
[data-theme="dark"] .owner-calendar-dow { color: #64748b; }
[data-theme="dark"] .owner-calendar-cell { border-color: #2d3f55; }
[data-theme="dark"] .owner-calendar-cell--empty { background: #151e2d; }
[data-theme="dark"] .owner-cal-pill--pending   { background: #451a03; color: #f59e0b; }
[data-theme="dark"] .owner-cal-pill--confirmed { background: #052e16; color: #34d399; }
[data-theme="dark"] .owner-cal-pill--owner     { background: #172554; color: #60a5fa; }
[data-theme="dark"] .owner-cal-pill--charter   { background: #243044; color: #64748b; }
[data-theme="dark"] .owner-cal-legend { color: #64748b; }
[data-theme="dark"] .owner-cal-legend-dot--charter { background: #475569; }
[data-theme="dark"] .owner-field-input { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .owner-field-label { color: #94a3b8; }
[data-theme="dark"] .owner-leg-block { background: #1a2640; border-color: #2d3f55; }
[data-theme="dark"] .owner-leg-label { color: #64748b; }
[data-theme="dark"] .owner-table th { color: #64748b; border-bottom-color: #2d3f55; }
[data-theme="dark"] .owner-table td { color: #e2e8f0; border-bottom-color: #2d3f55; }
[data-theme="dark"] .owner-table tbody tr:hover td { background: #243044; }
[data-theme="dark"] .pax-mode-toggle { background: #243044; border-color: #2d3f55; }
[data-theme="dark"] .pax-mode-btn { color: #64748b; }
[data-theme="dark"] .pax-mode-btn--active { background: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .passenger-row { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .pilot-card-owner-row { border-top-color: #2d3f55; }
[data-theme="dark"] .owner-pill { background: #243044; border-color: #2d3f55; color: #94a3b8; }
[data-theme="dark"] .owner-badge-pending { background: #451a03; color: #f59e0b; }
[data-theme="dark"] .owner-invite-btn { border-color: #2d3f55; color: #64748b; }
[data-theme="dark"] .owner-invite-btn:hover { border-color: var(--green); color: #34d399; }
[data-theme="dark"] .owner-add-inline { background: #1a2640; border-color: #2d3f55; }
[data-theme="dark"] .owner-add-input { background: #1e293b; border-color: #2d3f55; color: #e2e8f0; }
[data-theme="dark"] .owner-pill-menu { background: #1e293b; border-color: #2d3f55; }
[data-theme="dark"] .owner-pill-action { color: #94a3b8; }
[data-theme="dark"] .owner-pill-action:hover { background: #243044; }
[data-theme="dark"] .owner-pill-action--danger { color: #f87171; }
[data-theme="dark"] .owner-pill-action--danger:hover { background: #3b0f0f; }

/* Responsive */
@media (max-width: 768px) {
  .owner-sidebar { display: none; }
  .owner-main { margin-left: 0; }
  .owner-stat-grid { grid-template-columns: 1fr 1fr; }
  .owner-page { padding: 20px 16px; }
}