/* Global Styles */
:root {
    --primary-blue: #12426A;
    --primary-orange: #EA5B0C;
    --light-gray: #F5F5F5;
    --medium-gray: #ddd;
    --dark-gray: #333;
    --text-color: #333;
    --white: #fff;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #6c757d;
    --info-blue: #17a2b8; 
}

body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; background-color: var(--light-gray); color: var(--text-color); }
/* Login Page Styles */
.login-body { background: linear-gradient(135deg, var(--primary-blue) 40%, var(--primary-orange) 90%); display: flex; justify-content: center; align-items: center; height: 100vh; }
.login-container { background-color: var(--white); padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); width: 100%; max-width: 320px; text-align: center; margin: 20px;}
.login-logo { max-width: 200px; margin-bottom: 20px; }
.login-container h2 { color: var(--dark-gray); margin-bottom: 10px; }
.login-message { color: #666; margin-bottom: 20px; font-size: 16px; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; margin-bottom: 5px; color: #666; }
.input-group input { width: 100%; padding: 10px; border: 1px solid var(--medium-gray); border-radius: 4px; box-sizing: border-box; }
button { width: 100%; padding: 12px; background-color: var(--primary-blue); color: var(--white); border: none; border-radius: 4px; cursor: pointer; font-size: 16px; margin-top: 10px; }
button:hover { background-color: #0d314d; }
.forgot-password { margin-top: 15px; font-size: 14px; }
.forgot-password a { color: #007bff; text-decoration: none; }
.forgot-password a:hover { text-decoration: underline; }
.error-message { color: var(--danger); font-size: 14px; margin-top: 15px; min-height: 1em; }
/* Dashboard Styles */
.dashboard-container { display: flex; height: 100vh; position: relative; overflow-x: hidden; }
.sidebar { width: 260px; background-color: var(--white); box-shadow: 2px 0 5px rgba(0,0,0,0.05); display: flex; flex-direction: column; overflow-y: auto; position: fixed; top: 0; left: 0; height: 100%; z-index: 1001; transition: transform 0.3s ease-in-out; }
.sidebar-header { padding: 20px; text-align: center; }
.dashboard-logo { max-width: 80%; }
.nav-menu { flex-grow: 1; padding: 10px 0; }
.nav-item { display: flex; align-items: center; padding: 12px 20px; cursor: pointer; color: var(--text-color); transition: background-color 0.3s; }
.nav-item:hover { background-color: #f0f0f0; }
.nav-item.active { background-color: #e9e9e9; font-weight: 500; }
.icon { margin-right: 15px; width: 20px; text-align: center; color: #666; }
.nav-title { flex-grow: 1; }
.arrow { transition: transform 0.3s; font-size: 12px; color: #666; }
.submenu { list-style: none; padding: 0; background-color: #fdfdfd; }
.submenu .nav-item { padding-left: 55px; }
.nav-item.collapsed .arrow { transform: rotate(-90deg); }
.logout { border-top: 1px solid #eee; margin-top: auto; }
.main-content { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; position: relative; margin-left: 260px; width: calc(100% - 260px); transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;}
.dashboard-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; background-color: var(--white); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.header-left { display: flex; align-items: center; gap: 15px; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-color); }
.header-title h1 { margin: 0; color: var(--dark-gray); }
.header-title p { margin: 0; color: #666; font-size: 14px; }
.user-info { text-align: right; }
#userName { font-weight: 500; }
#userRole { font-size: 14px; color: #666; }
.content-area { padding: 30px; }
.content-section {
    background-color: var(--white);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    display: none;
}
.back-to-menu { display: inline-block; margin-bottom: 20px; color: #007bff; text-decoration: none; }
/* Form Styles */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid var(--medium-gray); border-radius: 4px; box-sizing: border-box; font-size: 1em; font-family: 'Segoe UI';}
.form-button { padding: 10px 15px; background-color: var(--primary-blue); color: var(--white); border: none; border-radius: 4px; cursor: pointer; font-size: 16px; width: auto; margin-top: 10px; }
.form-button:hover { background-color: #003366; }
.full-width-btn { width: 100%; }

/* --- REVISED MODAL STYLES FOR SCROLLING --- */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
    justify-content: center; 
    align-items: flex-start; /* Aligns content to the top */
    overflow-y: auto; /* Enables scrolling for the whole modal overlay */
    padding: 5vh 2vw; /* Adds some space at the top/bottom and sides */
    box-sizing: border-box;
}
.modal-content { 
    background-color: #fefefe; 
    padding: 20px; 
    border: 1px solid #888; 
    width: 90%; 
    max-width: 500px; 
    border-radius: 8px; 
    position: relative; 
    margin: 0 auto; /* Removed vertical margin, keeps horizontal centering */
}
/* --- END OF REVISED MODAL STYLES --- */

.close-btn { color: #aaa; position: absolute; top: 10px; right: 20px; font-size: 28px; font-weight: bold; cursor: pointer; }
.close-btn:hover, .close-btn:focus { color: black; text-decoration: none; }
#passengerDetailContent p, #locatorDetailContent p, #bookingSummaryContent p { margin: 5px 0; line-height: 1.6; }
#passengerDetailContent strong, #locatorDetailContent strong, #bookingSummaryContent strong { color: var(--dark-gray); min-width: 120px; display: inline-block;}
#bookingSummaryContent h3, #bookingSummaryContent h4 { margin-bottom: 10px; }
.modal-actions { margin-top: 20px; border-top: 1px solid var(--medium-gray); padding-top: 15px; text-align: right; }
/* Aircraft List & Table Styles */
.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px;}
.content-header-actions { display: flex; gap: 10px; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 14px; }
.data-table th, .data-table td { border: 1px solid var(--medium-gray); padding: 12px; text-align: left; vertical-align: middle; }
.data-table th { background-color: #f2f2f2; font-weight: 600; }
.data-table tr:nth-child(even){ background-color: #f9f9f9; }
.data-table tr:hover { background-color: #f1f1f1; }
.table-photo { max-width: 100px; height: auto; border-radius: 4px; display: block; }
.data-table .edit-btn, .data-table .delete-btn, .data-table .details-btn { padding: 5px 10px; border: none; border-radius: 4px; color: var(--white); cursor: pointer; width: auto; margin: 2px; font-size: 14px; }
.edit-btn { background-color: var(--warning); color: var(--dark-gray);}
.delete-btn { background-color: var(--danger); }
.details-btn { background-color: var(--primary-blue); }
.status-badge { padding: 3px 8px; border-radius: 12px; font-size: 12px; color: white; text-transform: capitalize; }
.status-active { background-color: var(--success); }
.status-inactive { background-color: var(--info); }
.status-cargo-ReceivedatOrigin, .status-cargo-IncludedinFlightManifest, .status-cargo-IncludedinManifest { background-color: var(--primary-blue); }
.status-cargo-EnroutetoDestination { background-color: var(--primary-orange); }
.status-cargo-ArrivedatDestination, .status-cargo-ArrivedinDestination { background-color: var(--success); }
.status-cargo-CheckedIn { background-color: var(--primary-blue); }
.status-cargo-OnBoard { background-color: #7c3aed; }
.status-cargo-Claimed { background-color: #374151; }
.status-cargo-FlightCancelled { background-color: #b91c1c; }
.status-badge:not([class*="status-cargo-"]) { background-color: #607d8b; }
.form-button:disabled, .form-button[disabled] { opacity: .45; cursor: not-allowed; }
.tbd { font-style: italic; color: #888; }

/* Form Grid */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.form-group.span-2 { grid-column: span 2; }
/* Weight & Balance & Cargo Page Styles */
.wb-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.wb-menu-card { background: #fdfdfd; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; cursor: pointer; transition: all 0.3s; }
.wb-menu-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
.wb-menu-card.completed { background-color: #e7f4e8; border-color: #66FF00; color: var(--dark-gray); }
.wb-menu-card.completed:hover { background-color: #d7efda; }
.wb-menu-card.completed h3 { color: var(--success); }
.wb-menu-card h3 { margin-top: 0; color: var(--primary-blue); }
.wb-calculator-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.wb-calc-card { background-color: #f9f9f9; padding: 20px; border-radius: 8px; border: 1px solid #e0e0e0; }
.static-info { font-size: 0.9em; color: #555; margin-bottom: 15px; }
.form-group-checkbox { display: flex; align-items: center; margin: 10px 0; }
.form-group-checkbox input { margin-right: 10px; width: auto; }
.payload-result { margin-top: 20px; padding: 15px; background-color: #e7f4e8; border: 1px solid #c8e6c9; border-radius: 4px; font-size: 1.2em; font-weight: 500; text-align: center; }
/* Add Passenger Modal Styles */
.modal-content.wide { max-width: 850px; }
.modal.wide .modal-content.wide { max-width: 90vw; height: 90vh; display: flex; flex-direction: column; }
.pdf-viewer-container { flex-grow: 1; margin-top: 15px; }
#pdfViewer { width: 100%; height: 100%; border: 1px solid var(--medium-gray); }
.modal-title-bordered { text-align: center; font-weight: 500; padding-bottom: 15px; margin-bottom: 25px; margin-top: 10px; border-bottom: 1px solid var(--medium-gray); }
/* Button Color Variations */
.form-button.secondary { background-color: var(--info); }
.form-button.tertiary { background-color: var(--warning); color: var(--dark-gray); }
.form-button.success { background-color: var(--success); }
.form-button.delete-btn { background-color: var(--danger); }
.form-button.info { background-color: var(--info-blue); }

/* Manifest Page Styles */
#flightManifest { background-color: transparent; box-shadow: none; padding: 0; }
.manifest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.manifest-left-col, .manifest-right-col { display: flex; flex-direction: column; gap: 30px; }
.manifest-card { background-color: var(--white); border-radius: 8px; padding: 20px; box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
.flight-info-card h2 { margin-top: 0; margin-bottom: 20px; }
.manifest-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.manifest-actions .form-button { margin-top: 0; }
.seat-plan-container h3 { margin-top: 0; text-align: center; color: #555; margin-bottom: 20px; }
.seat-plan { display: grid; grid-template-columns: repeat(var(--seat-cols, 3), 1fr); gap: 15px; }
.seat { border: 1px solid #ccc; border-radius: 4px; padding: 10px; text-align: center; font-weight: 500; background-color: #f9f9f9; line-height: 1.4; }
.seat.occupied { background-color: var(--info); color: var(--white); cursor: pointer; transition: background-color 0.3s; }
.seat.occupied:hover { background-color: #5a6268; }
.seat-pax-name { font-size: 15px; font-weight: 600; display: block; margin-top: 4px; line-height: 1.25; overflow-wrap: anywhere; }
.seat .seat-flags { display: block; font-size: 11px; font-weight: 500; opacity: 0.9; margin-top: 2px; }
.seat.vip { background-color: #7b1fa2; } .seat.priority { background-color: #b45309; } .seat.assist { box-shadow: inset 0 0 0 3px #ffc107; }
.manifest-preview-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #eee; margin-bottom: 15px; }
.manifest-preview-header h4 { margin: 0; }
.manifest-preview-header .form-button { margin-top: 0; }
.manifest-preview-content { max-height: 60vh; overflow-y: auto; }
.payload-summary-card h3 { margin-top: 0; }
.payload-progress { width: 100%; margin: 0 auto; }
.payload-progress-bar { width: 100%; background-color: #e9ecef; border-radius: 5px; height: 10px; overflow: hidden; }
.payload-progress-fill { width: 0%; height: 100%; background-color: var(--success); border-radius: 5px; transition: width 0.4s ease, background-color 0.4s ease; }
.payload-progress-fill.yellow-warning { background-color: var(--warning); }
.payload-progress-text { text-align: right; font-size: 12px; margin-top: 5px; color: #666; }

/* Seating Configuration Modal Styles */
.seat-config-grid-preview { display: grid; grid-template-columns: repeat(var(--seat-cols, 3), 1fr); gap: 10px; margin-bottom: 20px; max-width: 600px; margin-left: auto; margin-right: auto; }
.config-seat { border: 1px solid #ccc; border-radius: 4px; padding: 10px; text-align: center; font-weight: 500; background-color: #f9f9f9; cursor: pointer; transition: background-color 0.3s, color 0.3s, border-color 0.3s; user-select: none; }
.config-seat:hover { background-color: #e9e9e9; border-color: #aaa; }
.config-seat.is-pilot { background-color: var(--primary-blue); color: var(--white); border-color: var(--primary-blue); }
.seat.is-pilot { background-color: var(--dark-gray); color: var(--white); cursor: not-allowed; }

/* Locator & Booking Filter Page Styles */
.locator-form, .booking-filter-form { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; align-items: center; }
.locator-form input, .locator-form select,
.booking-filter-form input, .booking-filter-form select { padding: 10px; border: 1px solid var(--medium-gray); border-radius: 4px; font-size: 1em; }
.locator-form input[type="text"] { flex: 2; min-width: 150px; }
.booking-filter-form input[type="text"] { flex-grow: 2; min-width: 200px; }
.locator-form input[type="date"], .locator-form select,
.booking-filter-form input[type="date"], .booking-filter-form select { flex: 1; min-width: 150px; }
.locator-form button, .booking-filter-form button { margin-top: 0; }


.status-tracker { margin-top: 25px; padding-top: 15px; border-top: 1px solid #eee; }
.status-item { display: flex; align-items: center; margin-bottom: 15px; position: relative; }
.status-dot { width: 20px; height: 20px; border-radius: 50%; background-color: var(--medium-gray); border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--medium-gray); margin-right: 15px; z-index: 2; }
.status-name { color: var(--info); }
.status-item.completed .status-dot { background-color: var(--success); box-shadow: 0 0 0 2px var(--success); }
.status-item.completed .status-name { color: var(--dark-gray); font-weight: 500; }
.status-item:not(:last-child)::before { content: ''; width: 2px; height: 150%; background-color: var(--medium-gray); position: absolute; left: 9px; top: 10px; z-index: 1; }
.status-item.completed:not(:last-child)::before { background-color: var(--success); }

@media print {
    body, .dashboard-container, .main-content { background: white; margin: 0; padding: 0; }
    body * { visibility: hidden; }
    .print-modal-content, .print-modal-content * { visibility: visible; }
    #printModal, #printOfpModal { position: absolute; left: 0; top: 0; width: 100%; height: auto; padding: 0; }
    .modal-content.print-modal-content { width: 100%; max-width: 100%; margin: 0; padding: 0; border: none; box-shadow: none; }
    .print-actions, #printModal .print-actions, #tagPrintModal .print-actions { display: none !important; }
    #tagPrintModal, #printReportModal { position: absolute; left: 0; top: 0; width: 100%; height: auto; padding: 0; }
    .dfr-page-break { page-break-before: always; break-before: page; }
    .tag-sheet { display: block; }
    .tag-card { page-break-inside: avoid; break-inside: avoid; }
    @page { size: portrait; margin: 0.5in; }
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-260px); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .mobile-menu-btn { display: block; }
    .manifest-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .content-area { padding: 15px; }
    .dashboard-header { padding: 15px; flex-direction: column; align-items: flex-start; gap: 10px; }
    .user-info { width: 100%; text-align: left; }
    .form-grid { grid-template-columns: 1fr; }
    .data-table, .data-table thead, .data-table tbody, .data-table th, .data-table td, .data-table tr { display: block; }
    .data-table thead tr { position: absolute; top: -9999px; left: -9999px; }
    .data-table tr { border: 1px solid #ccc; margin-bottom: 10px;}
    .data-table td { border: none; border-bottom: 1px solid #eee; position: relative; padding-left: 50%; text-align: right; }
    .data-table td:before { position: absolute; top: 6px; left: 6px; width: 45%; padding-right: 10px; white-space: nowrap; content: attr(data-label); font-weight: bold; text-align: left;}
    .data-table td:first-child { display: flex; align-items: center; justify-content: flex-end; }
    .table-photo { margin-left: auto; }
}
@media (max-width: 480px) {
    .header-title h1 { font-size: 1.5em; }
    .flight-card-header { flex-direction: column; align-items: flex-start; }
    .flight-actions { width: 100%; margin-top: 10px; }
    .flight-actions button { flex-grow: 1; }
}
/* Locator Type Color Coding */
.data-table .type-baggage { background-color: #e0f7fa; color: #00796b; }
.data-table .type-cargo { background-color: #fff9c4; color: #f57f17; }
.data-table .type-document { background-color: #ffecb3; color: #e65100; }

/* GENERIC MODAL STYLES */
#customModal { z-index: 2000; }   /* notifications / confirmations always sit above any other open window */
#customModal .modal-content { max-width: 450px; }
#customModalMessage { line-height: 1.6; font-size: 1.1em; margin: 20px 0; }

/* EQUIPMENT MODAL STYLES */
.equipment-modal .modal-content { max-width: 700px; }
.equipment-checkbox-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
}
.input-with-select { display: flex; gap: 10px; }
.input-with-select input { flex-grow: 1; }
.input-with-select select { width: 120px; }

/* GENERAL PASSENGER FORM STYLES */
.passenger-modal-options { padding: 0 0 20px 5px; }
.priority-booking { background-color: #e7f3ff !important; font-weight: 500; }
.passenger-form { border: 1px solid var(--medium-gray); border-radius: 8px; padding: 1.2rem; margin-bottom: 1.5rem; background-color: #fdfdfd; }
.pax-form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.pax-form-header h3 { margin: 0; color: var(--primary-blue); }
.passenger-form fieldset { border: 1px solid #e0e0e0; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; background-color: var(--white); }
.passenger-form legend { font-weight: 600; color: var(--dark-gray); padding: 0 0.5em; margin-left: 0.5em; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-group-inline { display: flex; flex-direction: column; }
.form-group-inline label { font-size: 0.8em; color: #555; margin-bottom: 4px; }
.form-group-inline input, .form-group-inline select { width: 100%; padding: 8px; border: 1px solid var(--medium-gray); border-radius: 4px; box-sizing: border-box; }

@media (max-width: 768px) {
    .form-grid-3, .form-grid-2 { grid-template-columns: 1fr; }
}

/* PROFESSIONAL PASSENGER FORM V3 LAYOUT */
.professional-type-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.professional-type-status-grid .col-stack { display: flex; flex-direction: column; gap: 0.75rem; justify-content: flex-start; }
.professional-type-status-grid .form-group-inline,
.professional-type-status-grid .form-group-checkbox { margin: 0; }
.professional-type-status-grid .form-group-checkbox { display: flex; align-items: center; }
.professional-type-status-grid .form-group-checkbox input[type="checkbox"] { margin-right: 8px; width: auto; }
.professional-type-status-grid .form-group-checkbox label { margin-bottom: 0; font-weight: normal; }
.professional-type-status-grid .base-fare-display { font-weight: 500; padding: 8px 0; color: var(--dark-gray); min-height: 37.5px; box-sizing: border-box; }
.professional-type-status-grid textarea.passenger-remarks { width: 100%; padding: 8px; border: 1px solid var(--medium-gray); border-radius: 4px; box-sizing: border-box; font-family: inherit; font-size: 1em; resize: vertical; }

/* MANIFEST & OFP PRINT STYLES */
.modal-content.print-modal-content { max-width: 8.5in; font-family: Arial, sans-serif; color: #000; }
.print-actions { margin-top: 20px; text-align: right; display: flex; justify-content: flex-end; gap: 10px; }
.manifest-container, .ofp-container { border: 2px solid black; padding: 10px; font-size: 10px; background: white; }
.manifest-title { text-align: center; font-size: 16px; font-weight: bold; margin-bottom: 10px; text-transform: uppercase; }
.manifest-header-table, .manifest-main-table, .manifest-summary-table, .manifest-signature-table, .ofp-header-table, .ofp-leg-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.manifest-header-table td, .manifest-main-table td, .manifest-main-table th, .manifest-summary-table td, .ofp-header-table td, .ofp-leg-table td, .ofp-leg-table th { border: 1px solid black; padding: 2px 4px; vertical-align: middle; }
.manifest-main-table th { font-weight: bold; }
.manifest-header-table .label, .manifest-main-table .label { font-weight: bold; }
.manifest-header-table .value { font-weight: normal; text-align: center; }
.manifest-main-table .section-header { background-color: #e0e0e0; font-weight: bold; text-align: left; }
.manifest-main-table .section-header .note { font-weight: normal; text-align: right; }
.manifest-main-table .col-headers th { text-align: center; font-weight: bold; }
.manifest-main-table td.center { text-align: center; }
.manifest-signature-table { margin-top: 20px; }
.manifest-signature-table td { width: 50%; padding-top: 20px; vertical-align: bottom; }
.manifest-signature-table span { display: block; border-top: 1px solid black; margin-top: 25px; }
.manifest-summary-table { font-size: 11px; }
.manifest-summary-table td { border: 1px solid black; padding: 4px 6px; }
.manifest-summary-table .label { font-weight: bold; width: 30%; }
.manifest-summary-table .value { text-align: right; width: 20%; }
.manifest-summary-table .total-payload { text-align: center; font-weight: bold; padding: 6px; }
.manifest-main-table .infant-row { background-color: #f8f9fa; font-style: italic; }
.ofp-header-table, .ofp-leg-table { border: 2px solid black; }
.ofp-header-table .label, .ofp-leg-table th { font-weight: bold; background-color: #E0E0E0; font-size: 7pt; }
.ofp-header-table .text-left { text-align: left; }
.ofp-header-table .header-separator { border-top: 2px solid black; padding: 0; height: 1px; }
.ofp-header-table .no-border { border: none; }
.ofp-leg-table th { font-size: 8pt; }
.ofp-leg-table .total-row td { font-weight: bold; background-color: #F0F0F0; }
.ofp-leg-table .from-to-cell { text-align: left; }
.ofp-flight-separator { border-bottom: 2px dashed black; margin: 20px 0; }

/* FLIGHT CARD STYLES */
.flight-card { background-color: var(--white); border-radius: 8px; margin-bottom: 20px; box-shadow: 0 4px 8px rgba(0,0,0,0.08); border: 1px solid var(--medium-gray); overflow: hidden; }
.flight-card-status-bar { padding: 8px 20px; background-color: #f2f2f2; font-weight: 500; text-align: center; border-bottom: 1px solid var(--medium-gray); color: var(--dark-gray); }
.flight-card-content { padding: 20px; }
.flight-card-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 240px; grid-template-rows: auto auto auto; gap: 4px 15px; align-items: center; }
.grid-flight-title { grid-column: 1 / 4; grid-row: 1; margin: 0; font-size: 1.4em; color: var(--dark-gray); }
.grid-main-action { grid-column: 4 / 5; grid-row: 1; width: 100%; margin: 0; }
.grid-label-from, .grid-label-to, .grid-label-etd { grid-row: 2; font-size: 0.8em; color: #888; text-transform: uppercase; margin-top: 10px; }
.grid-data-from, .grid-data-to, .grid-data-etd { grid-row: 3; margin: 0; font-size: 1.2em; font-weight: 500; }
.grid-sub-actions { grid-column: 4 / 5; grid-row: 2 / 4; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.grid-sub-actions button { width: 100%; margin: 0; }
.grid-main-action.edit-btn { background-color: #224471 !important; color: #ffffff !important; }
.grid-main-action.edit-btn:hover { background-color: #1a3356 !important; }
.grid-sub-actions .docs-btn { background-color: #0372a1; color: white; }
.grid-sub-actions .docs-btn:hover { background-color: #025c82; }

/* Calendar Styles */
.calendar-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; margin-top: 10px; }
.calendar-header button { background: none; border: 1px solid var(--medium-gray); cursor: pointer; border-radius: 4px; padding: 5px 10px; font-weight: bold; }
.calendar-header span { font-weight: 600; font-size: 1.1em; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; background-color: #f8f9fa; padding: 10px; border: 1px solid var(--medium-gray); border-radius: 4px; }
.calendar-grid .weekday { font-weight: 600; color: var(--dark-gray); font-size: 0.9em; }
.calendar-grid .day { padding: 8px; cursor: pointer; border-radius: 50%; transition: background-color 0.2s, color 0.2s; }
.calendar-grid .day:not(.empty):hover { background-color: #e9e9e9; }
.calendar-grid .day.selected { background-color: var(--primary-blue); color: var(--white); font-weight: bold; }
.calendar-grid .day.empty { cursor: default; }

/* Pilot Card Styles */
.pilot-card { display: flex; align-items: center; margin-bottom: 15px; background: #fff; padding: 15px; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.pilot-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-right: 15px; }
.pilot-photo-placeholder { display: none; width: 80px; height: 80px; border-radius: 50%; background: #eee; color: #777; align-items: center; justify-content: center; font-size: 12px; margin-right: 15px; text-align: center; }
.pilot-info { flex-grow: 1; }
.pilot-actions { display: flex; gap: 10px; }
.remove-rating-btn { background-color: var(--danger); color: white; border: none; border-radius: 50%; width: 25px; height: 25px; line-height: 25px; text-align: center; padding: 0; cursor: pointer; font-weight: bold; font-size: 14px; flex-shrink: 0; }
.remove-rating-btn:hover { background-color: #a71d2a; }

/* OFP MODAL STYLES */
#ofpLegsContainer { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; }
.ofp-leg-row { display: grid; grid-template-columns: auto 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: center; background-color: #f9f9f9; padding: 10px; border-radius: 4px; }
.ofp-leg-row label { font-weight: bold; text-align: right; }
.ofp-leg-row input[type="text"] { text-transform: uppercase; }
.ofp-leg-row .add-leg-checkbox { margin-left: 10px; }

/* ===== PATCH: role-based UI, stub modules, mobile touch targets ===== */
body:not(.role-administrator) .admin-only { display: none !important; }
.nav-item.coming-soon { display: none; }              /* remove this rule when the module is built */
.change-password-link { display: inline-block; margin-top: 4px; font-size: 0.85em; color: #cfd8e3; text-decoration: underline; cursor: pointer; }
.change-password-link:hover { color: #fff; }
.crew-warning { background: #fff3cd; border: 1px solid #ffe69c; color: #664d03; padding: 8px 12px; border-radius: 6px; margin-top: 10px; }
@media (max-width: 768px) {
    .professional-type-status-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .form-button, button.edit-btn, button.delete-btn, .grid-main-action, .grid-sub-actions button { min-height: 44px; }
    .modal-content { width: 96%; max-width: 96%; margin: 2% auto; }
    .seat-plan { overflow-x: auto; }
    .booking-filter-form, .locator-form { display: grid; grid-template-columns: 1fr; gap: 8px; }
}

/* ===== Baggage / cargo pieces, payment, fares, sales, tags ===== */
.section-hint { color: #555; margin: -6px 0 14px; }
.baggage-fieldset, .rate-fieldset { border: 1px solid #e0e0e0; border-radius: 4px; padding: 1rem; margin-bottom: 1rem; background: var(--white); }
.piece-list-header, .piece-row { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr 40px; gap: 8px; align-items: center; }
.piece-list-header { font-size: 0.8em; color: #555; font-weight: 600; margin-bottom: 4px; }
.piece-row { margin-bottom: 6px; }
.piece-row input, .piece-row select { width: 100%; padding: 8px; border: 1px solid var(--medium-gray); border-radius: 4px; box-sizing: border-box; }
.piece-row .piece-readonly { padding: 8px; background: #f5f5f5; border-radius: 4px; text-align: right; }
.piece-row .remove-piece-btn { background: #fff; border: 1px solid #ccc; border-radius: 4px; height: 36px; cursor: pointer; color: var(--danger, #c62828); font-size: 1.2em; }
.piece-list-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; flex-wrap: wrap; }
.piece-totals { font-size: 1.05em; }
.rate-header-3, .rate-row-3 { grid-template-columns: 2fr 1fr 1fr 40px; }
.rate-header-2, .rate-row-2 { grid-template-columns: 2fr 1fr 40px; }
.payment-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.payment-table th, .payment-table td { border-bottom: 1px solid #e5e5e5; padding: 6px 8px; text-align: left; font-size: 0.95em; }
.payment-table td.num, .payment-table th.num { text-align: right; white-space: nowrap; }
.payment-table tr.pax-head td { background: #f4f7fb; font-weight: 600; }
.payment-table tr.grand td { font-size: 1.15em; font-weight: 700; border-top: 2px solid #333; }
.sales-summary { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 16px; }
.sales-summary .stat { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 10px 14px; min-width: 130px; }
.sales-summary .stat small { display: block; color: #666; font-size: 0.8em; }
.sales-summary .stat strong { font-size: 1.25em; }
.sales-filter-form label { display: flex; align-items: center; gap: 6px; font-size: 0.9em; }
.data-table td.num { text-align: right; white-space: nowrap; }
.data-table tfoot td { font-weight: 700; background: #f4f7fb; }
.tag-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tag-card { border: 2px solid #000; border-radius: 6px; padding: 10px 12px; font-family: Arial, sans-serif; color: #000; background: #fff; }
.tag-card .tag-brand { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #000; padding-bottom: 6px; margin-bottom: 6px; }
.tag-card .tag-brand img { height: 26px; }
.tag-card .tag-brand span { font-weight: 700; font-size: 0.85em; letter-spacing: 0.5px; }
.tag-card .tag-code { font-family: 'Courier New', monospace; font-size: 1.15em; font-weight: 700; }
.tag-card .tag-route { font-size: 1.9em; font-weight: 800; line-height: 1.1; }
.tag-card .tag-weight { font-size: 1.5em; font-weight: 700; }
.tag-card .tag-meta { font-size: 0.85em; line-height: 1.4; }
.manifest-logo-header { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 6px; }
.manifest-logo-header img { height: 42px; }
.manifest-logo-header .company-name { font-weight: 700; font-size: 12px; letter-spacing: 1px; }
@media (max-width: 768px) {
    .piece-list-header { display: none; }
    .piece-row { grid-template-columns: 1fr 1fr; }
    .tag-sheet { grid-template-columns: 1fr; }
}

/* ===== v3: VAT row, manifest logos, daily financial report ===== */
.vat-row { display: flex; gap: 8px; } .vat-row input { flex: 1; }
.payment-total-line { text-align: right; font-size: 1.2em; font-weight: 700; margin: 6px 0 10px; }
.manifest-logo-header { flex-direction: column; gap: 4px; }
.manifest-logo-header img.main-logo { height: 46px; }
.manifest-logo-header .operated-by { display: flex; align-items: center; gap: 6px; font-size: 9px; color: #333; }
.manifest-logo-header .operated-by img { height: 22px; }
.dfr { font-family: Arial, Helvetica, sans-serif; color: #111; font-size: 11px; max-width: 800px; margin: 0 auto; }
.dfr-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #1b2a4a; padding-bottom: 6px; margin-bottom: 8px; }
.dfr-head img { height: 44px; } .dfr-head .addr { font-size: 9px; color: #444; margin-top: 4px; letter-spacing: 0.3px; }
.dfr-head .title { text-align: right; } .dfr-head .title h1 { margin: 0; font-size: 18px; color: #1b2a4a; letter-spacing: 1px; } .dfr-head .title .date { font-size: 11px; color: #444; }
.dfr-box { border: 1px solid #cfd6e4; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
.dfr-box h3 { margin: 0 0 6px; font-size: 10.5px; letter-spacing: 0.5px; color: #1b2a4a; border-bottom: 1px solid #e3e8f0; padding-bottom: 4px; }
.dfr-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .dfr-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dfr-stat { text-align: center; } .dfr-stat small { display: block; font-size: 9px; color: #555; letter-spacing: 0.5px; } .dfr-stat strong { font-size: 16px; color: #1b2a4a; }
.dfr-stat strong.neg { color: #c62828; } .dfr-stat strong.pos { color: #2e7d32; }
.dfr-line { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dotted #e0e0e0; } .dfr-line small { color: #666; font-size: 9px; }
.dfr-line .v { font-weight: 700; } .dfr-line .v.neg { color: #c62828; } .dfr-line .v.blue { color: #1e40af; }
.dfr table { width: 100%; border-collapse: collapse; font-size: 10px; } .dfr th, .dfr td { padding: 3px 5px; border-bottom: 1px solid #e3e8f0; text-align: left; }
.dfr th { background: #f1f4f9; font-size: 9px; letter-spacing: 0.4px; } .dfr td.num, .dfr th.num { text-align: right; white-space: nowrap; }
.dfr .remarks ol { margin: 4px 0 0 16px; padding: 0; } .dfr .remarks li { margin-bottom: 2px; text-transform: uppercase; font-size: 9.5px; }
.dfr-sign { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; text-align: center; font-size: 9px; }
.dfr-sign div { border-top: 1px solid #111; padding-top: 4px; } .dfr-sign small { display: block; color: #666; margin-bottom: 22px; }
.dfr h2.dm { font-size: 13px; letter-spacing: 1px; color: #1b2a4a; margin: 14px 0 6px; border-bottom: 2px solid #1b2a4a; }
.dfr h4.ac { background: #1b2a4a; color: #fff; padding: 3px 8px; margin: 10px 0 4px; font-size: 11px; }
.dfr .leg { font-weight: 700; font-size: 10px; margin: 6px 0 2px; color: #1b2a4a; }
.dfr tr.sub td { font-weight: 700; background: #f7f9fc; }
@media (max-width: 768px) { .dfr-3, .dfr-2, .dfr-sign { grid-template-columns: 1fr 1fr; } }

/* ===== v4: presets, flight status, employee profiles, calendar, dashboard, QSM ===== */
.preset-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 10px; background: #f4f7fb; border-radius: 6px; }
.preset-bar select { flex: 1; min-width: 200px; padding: 8px; }
.fp-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; } .fp-actions button { flex: 1; }
.flight-card-status-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.flight-status-select { padding: 6px 10px; border-radius: 6px; border: 1px solid #b8c2d0; font-weight: 600; background: #fff; }
.flight-times { font-size: 0.85em; color: #444; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.8em; font-weight: 700; color: #fff; background: #607d8b; }
.status-pill.s-scheduled { background: #607d8b; } .status-pill.s-boarding { background: #f59e0b; } .status-pill.s-departed { background: #2563eb; } .status-pill.s-landed { background: #16a34a; } .status-pill.s-cancelled { background: #c62828; }
.profile-photo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 10px; }
.form-group-full { grid-column: 1 / -1; }
.emp-cell { display: flex; align-items: center; gap: 10px; } .emp-cell img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.calendar-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .cal-dow { text-align: center; font-size: 0.75em; font-weight: 700; color: #555; padding: 4px 0; }
.cal-grid .cal-day { min-height: 58px; border: 1px solid #e3e8f0; border-radius: 6px; padding: 4px; cursor: pointer; font-size: 0.8em; background: #fff; position: relative; }
.cal-grid .cal-day:hover { background: #f4f7fb; } .cal-grid .cal-day.empty { background: transparent; border: none; cursor: default; }
.cal-grid .cal-day.today { outline: 2px solid #224471; }
.cal-grid .cal-day .d { font-weight: 700; } .cal-grid .cal-ev { display: block; font-size: 0.72em; padding: 1px 4px; border-radius: 3px; color: #fff; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.t-regular { background: #c62828; } .t-special { background: #f59e0b; } .t-working { background: #2563eb; } .t-company { background: #16a34a; }
.cal-list-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #eee; font-size: 0.9em; gap: 8px; }
.dashboard-date { color: #555; font-weight: 600; }
.dashboard-banners { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.dash-banner { padding: 10px 14px; border-radius: 8px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.dash-banner.holiday { background: #fdecea; color: #8a1c1c; border: 1px solid #f5c2c0; } .dash-banner.special { background: #fff4e0; color: #7a4a00; border: 1px solid #fcd9a0; } .dash-banner.company { background: #e8f5e9; color: #1b5e20; border: 1px solid #b7dfba; } .dash-banner.birthday { background: #fce4ec; color: #880e4f; border: 1px solid #f8bbd0; } .dash-banner.anniv { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.dash-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 14px 16px; } .dash-card h3 { margin: 0 0 10px; font-size: 1.05em; color: #224471; }
.dash-flights { grid-row: span 3; }
.dash-flight { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 10px 0; border-bottom: 1px solid #eee; }
.dash-flight .route { font-size: 1.1em; font-weight: 700; } .dash-flight .meta { color: #555; font-size: 0.85em; }
.dash-person { display: flex; align-items: center; gap: 10px; padding: 6px 0; } .dash-person img, .dash-person .ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #e3e8f0; display: inline-flex; align-items: center; justify-content: center; color: #555; font-weight: 700; }
.dash-glance { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .dash-glance div { background: #f4f7fb; border-radius: 8px; padding: 8px; text-align: center; } .dash-glance strong { display: block; font-size: 1.4em; color: #224471; }
.wip-box { text-align: center; padding: 40px 20px; background: #fff; border: 1px dashed #b8c2d0; border-radius: 10px; } .wip-box img { max-height: 70px; margin-bottom: 10px; }
@media (max-width: 992px) { .dashboard-grid, .calendar-layout { grid-template-columns: 1fr; } .dash-flights { grid-row: auto; } }

/* ===== v5: payments window, void, label-printer tags ===== */
.form-button.pay-btn { background-color: #7b1fa2; color: #fff; } .form-button.pay-btn:hover { background-color: #6a1b9a; }
.tag-buttons { display: flex; flex-direction: column; gap: 10px; } .tag-buttons button { width: 100%; }
.pay-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 6px; border-bottom: 1px solid #eee; }
.pay-row .amt { font-weight: 700; white-space: nowrap; } .pay-row small { color: #555; }
.pay-row.paid { grid-template-columns: 1fr auto auto; }
.tag-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
/* Thermal label layout moved to tag-labels.css (shared with the print document) */
@media print {
    #tagPrintModal .tag-toolbar { display: none !important; }
    .tag-lbl-sheet { gap: 0; } .tag-lbl { border: none; }
}

/* ===== v6: mobile pass ===== */
@media (max-width: 768px) {
    .modal { padding: 0; }
    .modal-content, .modal-content.wide, .modal-content.small { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; overflow-y: auto; padding: 14px 14px 90px; box-sizing: border-box; }
    .modal-content > .close-btn { position: sticky; top: 0; float: right; z-index: 5; font-size: 32px; padding: 4px 10px; background: rgba(255,255,255,0.9); border-radius: 50%; }
    .modal-content .modal-actions, .modal-content form > .full-width-btn, .modal-content form > .modal-actions, .modal-content .fp-actions { position: sticky; bottom: 0; background: #fff; padding: 10px 0 12px; margin: 10px -14px 0; padding-left: 14px; padding-right: 14px; box-shadow: 0 -4px 12px rgba(0,0,0,0.08); z-index: 4; }
    .modal-content form > .full-width-btn { width: calc(100% - 28px); margin-left: 14px; margin-right: 14px; }
    .manifest-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .manifest-actions button { width: 100%; margin: 0; }
    .manifest-preview-content { overflow-x: auto; -webkit-overflow-scrolling: touch; } .manifest-container { min-width: 720px; }
    .manifest-preview-header { flex-wrap: wrap; gap: 8px; }
    .content-header { flex-wrap: wrap; gap: 8px; } .content-header > div { display: flex; gap: 6px; flex-wrap: wrap; }
    .form-grid, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr !important; }
    .pay-row { grid-template-columns: 24px 1fr; } .pay-row .amt { grid-column: 2; text-align: left; } .pay-row.paid { grid-template-columns: 1fr; } .pay-row.paid button { justify-self: start; }
    .print-modal-content { padding-bottom: 90px; }
    .tag-toolbar { flex-direction: column; align-items: flex-start; }
    input, select, textarea { font-size: 16px; }  /* stops iOS zooming into fields */
    .sales-filter-form { grid-template-columns: 1fr 1fr; }
    .calendar-layout { grid-template-columns: 1fr; } .cal-grid .cal-day { min-height: 44px; }
    .data-table th { display: none; }
}
@media (display-mode: standalone) { body { padding-top: env(safe-area-inset-top); } }
.pdf-mobile-actions { display: none; padding: 20px; text-align: center; }
.pdf-mobile-actions a { display: inline-block; margin: 8px; }
@media (max-width: 768px) { #pdfViewer { display: none; } .pdf-mobile-actions { display: block; } }
.signature-preview { max-height: 60px; max-width: 220px; border: 1px solid #ddd; border-radius: 4px; padding: 4px; background: #fff; }
.prep-signature { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); height: 40px; opacity: 0.85; pointer-events: none; }
.dfr-sign .sig { height: 26px; display: block; margin: 0 auto -6px; }

/* ===== v7: portal management, employee licenses ===== */
.portal-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
.pm-user-list { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow-y: auto; }
.pm-user { text-align: left; background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 8px 10px; cursor: pointer; }
.pm-user:hover { background: #f4f7fb; } .pm-user.active { border-color: #224471; background: #eaf0f8; }
.pm-user small { display: block; color: #555; } .pm-badge { float: right; font-size: 0.7em; background: #7b1fa2; color: #fff; border-radius: 10px; padding: 1px 7px; }
.pm-group { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
.pm-group h5 { margin: 0 0 6px; color: #224471; } .pm-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; } .pm-item.child { margin-left: 26px; }
.pm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.emp-license { border: 1px solid #e0e0e0; border-radius: 6px; padding: 10px; margin-bottom: 8px; background: #fafbfd; }
.emp-license .form-grid { gap: 8px; } .emp-license .lic-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-weight: 600; }
.lic-expired { color: #c62828; font-weight: 700; } .lic-soon { color: #b45309; font-weight: 700; }
.dash-banner.pilot { background: #e8eaf6; color: #1a237e; border: 1px solid #c5cae9; font-size: 1.05em; }
.dash-banner.license { background: #fff8e1; color: #6d4c00; border: 1px solid #ffe082; }
@media (max-width: 992px) { .portal-layout { grid-template-columns: 1fr; } .pm-user-list { max-height: 30vh; } }

/* ===== v8: locked flights, records, seat plan, alerts ===== */
.flight-card.locked .grid-main-action { background-color: #455a64 !important; }
.flight-card.locked .delete-btn { display: none; }
.lock-note { font-size: 0.85em; color: #6d4c00; background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px; padding: 6px 10px; margin: 8px 0; }
.dash-banner.assist { background: #fff8e1; color: #6d4c00; border: 1px solid #ffe082; }
.dash-banner.vip { background: #f3e5f5; color: #4a148c; border: 1px solid #ce93d8; }
.rec-docs { display: flex; gap: 6px; flex-wrap: wrap; } .rec-docs button { white-space: nowrap; }
.seat-legend { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; font-size: 0.8em; margin-top: 10px; color: #555; }
.seat-legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.seat-legend .lg-vip::before { background: #7b1fa2; } .seat-legend .lg-prio::before { background: #b45309; } .seat-legend .lg-assist::before { background: #fff; box-shadow: inset 0 0 0 3px #ffc107; } .seat-legend .lg-noseat::before { background: #e0e0e0; }
.no-seat-list { text-align: center; font-size: 0.9em; color: #555; margin-top: 8px; }
.dfr .paid-names { font-size: 9.5px; color: #333; margin: 2px 0 4px; } .dfr .paid-names strong { color: #1b2a4a; }

/* ===== v9: records hub, claim, swipe sidebar, locator filters ===== */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 900; }
@media (max-width: 992px) { .sidebar { z-index: 1000; transition: transform 0.25s ease; } .sidebar.open ~ .sidebar-backdrop, .sidebar-backdrop.show { display: block; } .locator-form { grid-template-columns: 1fr 1fr; } }
.age-groups { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.age-groups .ag { background: #fff; border: 1px solid #e0e0e0; border-radius: 20px; padding: 4px 12px; font-size: 0.85em; } .age-groups .ag strong { color: #224471; }
.rec-archived { font-size: 0.8em; color: #555; }
.flight-card .send-records-btn { background: #2e7d32; color: #fff; }
.claim-info { background: #e8f5e9; border: 1px solid #b7dfba; border-radius: 6px; padding: 8px 10px; margin-top: 8px; font-size: 0.92em; }
.fin-row-actions { display: flex; gap: 6px; }

/* ===== v11: two-leg flight times, print documents ===== */
.ft-leg { border: 1px solid #e0e0e0; border-radius: 8px; padding: 10px 12px 2px; margin-bottom: 12px; }
.ft-leg-title { margin: 0 0 8px; font-size: 0.95em; color: var(--primary-blue, #1e3a8a); }
.ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ft-grid label .req { color: #b91c1c; }
.flight-times { font-size: 0.85em; color: #333; text-align: right; line-height: 1.35; }
.flight-times .leg { display: block; }
.flight-times { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.times-btn { width: auto; min-height: 0; background: #fff; border: 1px solid #94a3b8; color: #1e293b; border-radius: 6px; padding: 3px 10px; font-size: 0.85em; cursor: pointer; margin: 2px 0 0; }
.times-btn:hover { background: #f1f5f9; }

/* ===== v12: capped lists ===== */
.list-notice { background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; border-radius: 6px; padding: 8px 12px; margin: 0 0 10px; font-size: 0.9em; }

/* ===== v13: rotations / legs ===== */
.legs-options { display: flex; gap: 24px; flex-wrap: wrap; margin: 6px 0 10px; }
.legs-options .chk { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.legs-preview table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.legs-preview th, .legs-preview td { border: 1px solid #e2e8f0; padding: 6px 8px; text-align: left; font-size: 0.92em; }
.legs-preview th { background: #f1f5f9; }
.legs-preview input, .legs-preview select { width: 100%; padding: 6px; }
.legs-preview .leg-no { font-weight: 700; white-space: nowrap; }
.rotation-group { border: 1px solid #cbd5e1; border-radius: 10px; margin-bottom: 18px; overflow: hidden; }
.rotation-header { background: #1e3a5f; color: #fff; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.rotation-header .route { font-weight: 700; letter-spacing: 0.3px; }
.rotation-header .meta { font-size: 0.9em; opacity: 0.9; }
.rotation-group .flight-card { margin: 10px; }
.leg-badge { display: inline-block; background: #e0f2fe; color: #075985; border-radius: 12px; padding: 2px 9px; font-size: 0.8em; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.leg-capacity { margin-top: 10px; }
.leg-capacity table { width: 100%; border-collapse: collapse; font-size: 0.85em; }
.leg-capacity th, .leg-capacity td { border-bottom: 1px solid #e2e8f0; padding: 4px 6px; text-align: right; }
.leg-capacity th:first-child, .leg-capacity td:first-child { text-align: left; }
.leg-capacity tr.current { background: #fff7ed; font-weight: 700; }
.leg-capacity .neg { color: #b91c1c; }
.seat.transit { background: #e2e8f0; border-color: #94a3b8; color: #1e293b; }
.seat.transit .seat-pax-name, .seat.transit .seat-flags { color: #1e293b; }
.seat-legend .lg-transit::before { background: #e2e8f0; border: 1px solid #94a3b8; }
.seat.transit::after { content: 'TRANSIT'; display: block; font-size: 9px; color: #475569; }
#legsPayloadTable table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.9em; }
#legsPayloadTable th, #legsPayloadTable td { border: 1px solid #e2e8f0; padding: 6px; text-align: center; }
#legsPayloadTable th { background: #f1f5f9; }
#legsPayloadTable input[type=number] { width: 110px; padding: 5px; text-align: right; }
#legsPayloadTable .route { text-align: left; white-space: nowrap; }
#legsPayloadTable .avail.neg { color: #b91c1c; font-weight: 700; }
.transit-tag { font-size: 0.75em; background: #e2e8f0; color: #334155; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }

.wb-calculator-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); }
#legsPayloadTable { overflow-x: auto; }
#legsPayloadTable table { font-size: 0.85em; }
#legsPayloadTable input[type=number] { width: 90px; }
@media (max-width: 992px) { .wb-calculator-layout { grid-template-columns: 1fr; } }

/* ===== v14: records maintenance ===== */
.maint-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.maint-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 18px; background: #fff; }
.maint-card h3 { margin: 0 0 8px; }
.maint-card.danger { border-color: #fca5a5; background: #fff7f7; grid-column: 1 / -1; }
.maint-card.danger h3 { color: #b91c1c; }
.maint-actions { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.maint-actions .form-button { margin: 0; }
.rec-del-small { padding: 4px 10px; font-size: 0.8em; }
