/* =======================================================
   MY ACCOUNT PAGE STYLES (REBRANDED & WITH FINAL RESPONSIVE FIX)
   ======================================================= */

/* --- Page Wrapper --- */
.account-page-wrapper {
    background-color: var(--body-bg, #f4f4f4);
    padding: 200px 20px 40px 20px;
}

.account-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* --- Sidebar (Left Column) --- */
.account-sidebar {
    background-color: var(--white, #ffffff);
    border-radius: var(--border-radius-lg, 16px);
    border: 1px solid var(--border-color, #e0e0e0);
    padding: 25px;
    position: sticky;
    top: 100px;
}

.sidebar-user-info {
    text-align: center;
    margin-bottom: 20px;
}
.user-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background-color: var(--primary-cyan); color: var(--white);
    display: inline-flex; justify-content: center; align-items: center;
    font-size: 2.5rem; font-weight: 600; margin-bottom: 15px;
}
.sidebar-user-info h3 { margin: 0 0 5px; color: var(--text-dark, #333); }
.sidebar-user-info p { margin: 0; font-size: 0.9rem; color: var(--text-light, #666); }
.account-sidebar hr { border: none; height: 1px; background-color: var(--border-color, #e0e0e0); margin: 0 0 20px; }

.account-nav-list { list-style: none; padding: 0; margin: 0; }
.account-nav-link {
    display: flex; align-items: center; gap: 15px; padding: 12px 15px;
    border-radius: 8px; text-decoration: none; color: var(--text-dark, #333);
    font-weight: 500; transition: all 0.3s ease; margin-bottom: 5px;
}
.account-nav-link i { width: 20px; text-align: center; color: var(--text-light, #666); transition: color 0.3s ease; }
.account-nav-link:hover, .account-nav-link.active {
    background-color: var(--light-cyan-bg); color: var(--primary-cyan);
}
.account-nav-link:hover i, .account-nav-link.active i { color: var(--primary-cyan); }
.logout-link { margin-top: 15px; border-top: 1px solid var(--border-color, #e0e0e0); padding-top: 15px; }
.logout-link:hover { color: var(--danger-red, #e53935); background-color: #FFF0F1; }
.logout-link:hover i { color: var(--danger-red, #e53935); }

/* --- Content Area (Right Column) --- */
.account-content .content-card {
    background-color: var(--white, #ffffff);
    border-radius: var(--border-radius-lg, 16px);
    border: 1px solid var(--border-color, #e0e0e0);
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.content-card h2 { margin: 0 0 10px; display: flex; align-items: center; gap: 12px; color: var(--text-dark, #333); }
.content-card h2 i { color: var(--primary-cyan); }
.content-card .content-description { margin: 0 0 30px; color: var(--text-light, #666); line-height: 1.6; }

/* --- Table Styling for Bookings --- */
.table-responsive {
    overflow-x: auto; /* This is the key for mobile */
}
.bookings-table {
    width: 100%;
    border-collapse: collapse;
    /* NEW: Set a minimum width to ensure it scrolls when needed */
    min-width: 600px;
}
.bookings-table th, .bookings-table td {
    padding: 15px;
    text-align: left;
    white-space: nowrap; /* Prevents text from wrapping awkwardly */
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}
.bookings-table thead th {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light, #666);
    text-transform: uppercase;
}
.bookings-table tbody tr:hover { background-color: #f8f9fa; }
.bookings-table tbody td { font-size: 0.95rem; vertical-align: middle; }
.no-bookings-found { text-align: center; padding: 40px; color: var(--text-light, #666); }

/* --- Status Badges --- */
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; text-transform: capitalize; }
.status-pending { background-color: #fde7ff; color: var(--accent-magenta); }
.status-confirmed { background-color: var(--light-cyan-bg); color: #00636e; }
.status-cancelled { background-color: #FFF0F1; color: var(--danger-red, #e53935); }

/* =======================================================
   THE BULLETPROOF RESPONSIVE FIX
   ======================================================= */
@media (max-width: 992px) {
    /* Step 1: Stack the main container items */
    .account-container {
        grid-template-columns: 1fr;
    }

    /* Step 2: Unstick the sidebar so it sits cleanly on top */
    .account-sidebar {
        position: static;
        top: auto;
    }

    /* Step 3: Ensure the content card doesn't overflow */
    .account-content .content-card {
        /* This is crucial. It forces the content card to respect the screen boundaries */
        overflow: hidden;
    }
}

@media (max-width: 576px) {
    .account-page-wrapper {
        padding: 100px 15px 20px 15px;
    }
    .account-sidebar, .account-content .content-card {
        padding: 20px;
    }
    .bookings-table {
        /* Reduce padding on very small screens to save space */
        min-width: 500px;
    }
    .bookings-table th, .bookings-table td {
        padding: 12px 10px;
    }
}













































/* =======================================================
   CSS for NEW MINIMAL & MODERN BOOKING MODAL
   ======================================================= */

.bookings-table tbody .booking-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.bookings-table tbody .booking-row:hover {
    background-color: #fcfcfc;
}

/* --- Modal Overlay & Content Box --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    padding: 20px; box-sizing: border-box;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.modal-overlay.is-visible {
    opacity: 1; visibility: visible;
    transition: opacity 0.3s ease;
}
.modal-content {
    position: relative; background: #f9f9f9; /* A slightly off-white background */
    border-radius: 12px; padding: 0;
    width: 100%; max-width: 750px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95); transition: transform 0.3s ease;
}
.modal-overlay.is-visible .modal-content {
    transform: scale(1);
}

/* --- Modal Close Button --- */
.modal-close-btn {
    position: absolute; top: 15px; right: 15px;
    background: #e9ecef; border: none;
    width: 35px; height: 35px; border-radius: 50%;
    font-size: 1rem; cursor: pointer; color: var(--text-light);
    transition: all 0.3s ease; z-index: 10;
}
.modal-close-btn:hover {
    background: var(--danger-bg); color: var(--danger-text);
    transform: rotate(90deg);
}

/* --- Modal Header --- */
.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 12px 12px 0 0;
}
.modal-header h2 { margin: 0; font-size: 1.6rem; color: var(--primary-dark); }
.modal-booking-ref {
    display: inline-block; margin-top: 5px;
    color: var(--text-light); font-weight: 500; font-size: 0.9rem;
}

/* --- Modal Body Content and Cards --- */
.modal-body-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.modal-itinerary-card, .modal-passengers-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}
#modal-body h3 {
    margin: 0 0 20px; font-size: 1.1rem;
    font-weight: 600; color: var(--primary-dark);
    display: flex; align-items: center; gap: 10px;
}
#modal-body h3 i { color: var(--primary-gold); }

/* --- Itinerary Styling --- */
.journey-card { margin-bottom: 15px; }
.journey-card:last-child { margin-bottom: 0; }
.journey-title { font-weight: 500; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }

.segment-block { margin-bottom: 15px; }
.segment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.segment-header img { width: 32px; height: 32px; border-radius: 50%; }
.segment-header strong { display: block; line-height: 1.2; }
.segment-header span { font-size: 0.8rem; color: var(--text-light); }

.segment-path { display: flex; align-items: center; margin-left: 10px; }
.path-point { flex-shrink: 0; text-align: center; }
.path-point strong { font-size: 1.2rem; display: block; }
.path-point span { font-size: 0.9rem; color: var(--text-light); }

.path-line {
    flex-grow: 1; height: 1px;
    background-image: linear-gradient(to right, var(--border-color) 60%, transparent 40%);
    background-size: 8px 1px;
    margin: 0 20px;
    position: relative; text-align: center;
}
.path-line .duration {
    background: var(--white);
    padding: 0 8px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.layover-block {
    text-align: center; font-size: 0.85rem;
    color: var(--text-light); background-color: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 8px; padding: 8px; margin: 10px 0;
}
.layover-block i { margin-right: 8px; color: var(--primary-gold); }

/* --- Passenger List Styling --- */
.passenger-list-ul {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.passenger-list-li {
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border-radius: 6px;
    background-color: var(--light-bg);
}
.passenger-list-li i { font-size: 1.5rem; color: var(--primary-gold); }
.passenger-list-li strong { font-weight: 500; }
.passenger-list-li span { font-size: 0.85rem; color: var(--text-light); margin-left: 5px; }

/* =======================================================
   IMPROVED RESPONSIVE STYLES FOR BOOKING MODAL
   ======================================================= */

@media (max-width: 576px) {
    .modal-content {
        max-height: 95vh; /* Allow a bit more height on small screens */
    }
    .modal-header {
        padding: 20px;
    }
    .modal-header h2 {
        font-size: 1.3rem; /* Smaller heading */
    }
    .modal-body-content {
        padding: 20px;
        gap: 20px;
    }
    .modal-itinerary-card, .modal-passengers-card {
        padding: 15px;
    }
    #modal-body h3 {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    /* --- THE DEFINITIVE FIX FOR THE FLIGHT PATH --- */
    .segment-path {
        /* Remove flexbox and let items stack naturally */
        display: block;
        margin-left: 0;
        padding-left: 25px; /* Indent the path points */
        position: relative;
    }

    /* This pseudo-element creates the vertical line */
    .segment-path::before {
        content: '';
        position: absolute;
        left: 2px;
        top: 20px;
        bottom: 20px;
        width: 2px;
        background-color: var(--border-color);
    }
    
    .path-point {
        text-align: left; /* Align text to the left */
        position: relative;
    }

    /* This creates the dot on the vertical line */
    .path-point::before {
        content: '';
        position: absolute;
        left: -27px; /* Align with the vertical line */
        top: 50%;
        transform: translateY(-50%);
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: var(--primary-gold);
    }

    .path-point:first-child::before {
        top: 20px; /* Align with the top */
    }
    .path-point:last-child::before {
        top: 20px; /* Align with the top */
    }

    /* Hide the horizontal line and its contents completely */
    .path-line {
        display: none;
    }

    /* Style the layover block to fit the new vertical layout */
    .layover-block {
        margin: 15px 0;
        text-align: left;
        padding-left: 10px;
    }
}











































/* =======================================================
   EDIT PROFILE PAGE CSS (REBRANDED FOR Bin Rafiq)
   ======================================================= */

.account-form {
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 8px;
}
.form-group input {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--white);
    transition: all 0.3s ease;
}
.form-group input:disabled {
    background-color: #f8f9fa; /* Consistent disabled background */
    cursor: not-allowed;
    color: var(--text-light);
}
.form-group input:focus {
    outline: none;
    /* UPDATED: Focus state now uses your primary cyan */
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px var(--light-cyan-bg);
}

.form-footer {
    text-align: right;
    margin-top: 10px;
}

/* --- Rebranded Button --- */
.btn-primary {
    /* UPDATED: Button now uses your primary cyan */
    background-color: var(--primary-cyan);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    filter: brightness(90%); /* A simple, effective hover state */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 209, 224, 0.3); /* Cyan glow effect */
}

/* --- Rebranded Form Messages --- */
.form-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}
.form-message.success {
    /* UPDATED: Success message now uses your light cyan background */
    background-color: var(--light-cyan-bg);
    color: #00636e; /* A dark, readable cyan */
}
.form-message.error {
    background-color: #FFF0F1;
    color: var(--danger-red, #e53935);
}

/* Responsive adjustments for the form */
@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

































/* =======================================================
   CSS for Edit Company Profile Page
   ======================================================= */

/* This will style the textarea to match the other input fields */
.form-group textarea {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif; /* Ensures consistent font */
    background-color: var(--white);
    transition: all 0.3s ease;
    resize: vertical; /* Allows vertical resizing but not horizontal */
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(204, 162, 87, 0.2);
}





















































/* =======================================================
   INVOICE/VOUCHER MODAL CSS (REBRANDED FOR Bin Rafiq)
   ======================================================= */

.bookings-table tbody .booking-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.bookings-table tbody .booking-row:hover {
    background-color: #fcfcfc;
}

/* --- Modal Overlay & Content Box --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.modal-overlay.is-visible {
    opacity: 1; visibility: visible;
    transition: opacity 0.3s ease;
}
.modal-content {
    background: var(--white, #fff); border-radius: 12px;
    width: 90%; max-width: 800px; max-height: 90vh;
    display: flex; flex-direction: column; position: relative;
    transform: scale(0.95); transition: transform 0.3s ease;
}
.modal-overlay.is-visible .modal-content { transform: scale(1); }
.modal-close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 1.8rem; color: #aaa; cursor: pointer; }
.modal-body { overflow-y: auto; padding: 2rem; font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--text-dark); }
.modal-body .invoice-wrapper { position: relative; }
.modal-body table { width: 100%; border-collapse: collapse; }
.modal-body td, .modal-body th { padding: 5px; vertical-align: middle; }
.modal-body .header-table { margin-bottom: 2rem; }
.modal-body .header-table td { border: none; vertical-align: top; }
.modal-body .company-logo-container { text-align: center; }
.modal-body .company-logo-container img { max-height: 80px; }
.modal-body .company-details { font-size: 12px; line-height: 1.5; color: var(--text-light); }
.modal-body .meta-table { border: 1px solid var(--border-color); }
.modal-body .meta-table td { padding: 8px; border-bottom: 1px solid var(--border-color); }
.modal-body .meta-table tr:last-child td { border-bottom: none; }
.modal-body .meta-table td:first-child { font-weight: 600; color: var(--text-light); width: 100px; }
.modal-body .meta-table td:last-child { font-weight: 600; }

/* UPDATED: Section title now uses your primary violet */
.modal-body .section-title { 
    background-color: var(--primary-violet); 
    color: var(--white); 
    font-weight: 600; text-align: center; 
    padding: 8px; margin-top: 1.5rem; 
    border-radius: 6px 6px 0 0; 
}

.modal-body .detail-table { border: 1px solid var(--border-color); }
.modal-body .detail-table th { background-color: #f8f9fa; border: 1px solid var(--border-color); font-weight: 600; padding: 8px; font-size: 12px; text-transform: uppercase; }
.modal-body .detail-table td { border: 1px solid var(--border-color); padding: 8px; text-align: center; font-size: 13px; }
.modal-body .detail-table .text-left { text-align: left; }

.modal-body .fare-breakdown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; padding: 1rem; }
.modal-body .fare-box { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.modal-body .fare-box-header { background-color: #f8f9fa; padding: 8px; font-weight: 600; text-align: center; }
.modal-body .fare-box-content { padding: 1rem; display: flex; justify-content: space-around; }
.modal-body .fare-detail .label { color: var(--text-light); font-size: 12px; }
.modal-body .fare-detail .value { font-weight: 600; font-size: 16px; }

.modal-body .footer-container { padding-top: 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.modal-body .footer-notes { flex: 1 1 55%; font-size: 12px; line-height: 1.6; color: var(--text-light); }
.modal-body .footer-notes h4 { margin-top: 0; color: var(--text-dark); }
.modal-body .summary-totals { flex: 0 0 40%; min-width: 280px; }
.modal-body .summary-totals table td { border: 1px solid var(--border-color); padding: 8px; }
.modal-body .summary-totals table td:first-child { font-weight: 600; }
.modal-body .summary-totals table td:last-child { text-align: right; }

/* UPDATED: Grand total now uses your primary violet */
.modal-body .summary-totals .grand-total td { 
    background-color: var(--primary-violet); 
    color: var(--white); 
    font-weight: 700; font-size: 16px; 
}
.modal-body .payment-received-row td { 
    color: #10b981; 
}
/* UPDATED: Remaining amount now uses your accent magenta */
.modal-body .remaining-amount-row td { 
    background-color: #fde7ff; /* A light magenta */
    color: var(--accent-magenta); 
    font-weight: 700; 
}