/* GLOBAL VARIABLES */
:root {
    --ul-primary: #004d4d;
    /* Dark Teal */
    --ul-primary-dark: #003333;
    /* Darker Teal */
    --ul-accent: #d11241;
    /* Red */
    --bg-gray: #f2f2f2;
    --text-dark: #212529;
    --white: #ffffff;
}

html,
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-gray);
    height: 100vh;
    /* NEW: Locks the browser window */
    overflow: hidden;
    /* NEW: Kills the main browser scrollbar */
}

/* UTILITIES */
.ul-btn {
    background-color: var(--ul-primary);
    color: white;
    border: none;
    padding: 12px 0;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: 0.3s;
}

.ul-btn:hover {
    background-color: var(--ul-primary-dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
}

/* ========================================= */
/* FIGMA LOGIN SCREEN STYLES                 */
/* ========================================= */

.login-page-wrapper {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('/images/login-bg.png') no-repeat center center;
    background-size: cover;
    position: relative;
}

/* Optional dark overlay if your image needs it */
.login-page-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.login-card {
    background: #ffffff;
    width: 420px;
    padding: 40px 45px;
    border-radius: 6px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 2;
}

.login-header {
    margin-bottom: 25px;
}

.login-main-icon {
    width: 80px;
    margin-bottom: 15px;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 1000;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0;
}

.login-logo-title {
    display: block;
    height: 65px;
    margin: 15px auto 0 auto;
    object-fit: contain;
}

.login-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.login-divider .line {
    flex: 1;
    height: 1px;
    background-color: #e5e7eb;
}

.login-divider .text {
    padding: 0 15px;
    color: #004d4d;
    font-size: 1.35rem;
}

.login-divider .text strong {
    font-weight: 800;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
    color: #888;
}

.input-wrapper .form-control {
    width: 100%;
    /* CHANGED: Increased right padding from 14px to 45px to make room for the eye icon */
    padding: 14px 45px 14px 45px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333;
    transition: 0.2s;
    margin-bottom: 0;
}

.input-wrapper .form-control:focus {
    border-color: #004d4d;
    box-shadow: 0 0 0 3px rgba(0, 77, 77, 0.1);
    outline: none;
}

/* NEW: Styling for the Eye Icon button */
.toggle-password-btn {
    position: absolute;
    right: 15px;
    /* Sticks it to the right side of the input box */
    background: none;
    border: none;
    padding: 0;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password-btn:hover {
    color: #004d4d;
    /* Turns SriLankan Teal when hovered */
}

.toggle-password-btn svg {
    width: 18px;
    height: 18px;
}

.ul-login-btn {
    background-color: #004d4d;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 4px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 5px;
    transition: background-color 0.2s;
}

.ul-login-btn:hover {
    background-color: #003333;
}

.login-footer {
    margin-top: 40px;
}

.login-footer img {
    height: 55px;
    opacity: 0.99;
}

/* ========================================= */
/* MOBILE RESPONSIVE TWEAKS FOR LOGIN        */
/* ========================================= */
@media screen and (max-width: 500px) {
    .login-card {
        width: 100%;
        max-width: 360px;
        padding: 30px 25px;
        margin: 20px;
        box-sizing: border-box;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-main-icon {
        width: 65px;
        margin-bottom: 10px;
    }

    .login-page-wrapper {
        align-items: center;
        overflow-y: auto;
    }
}

/* Fix for very short screens (Landscape phones) */
@media screen and (max-height: 600px) {
    .login-page-wrapper {
        align-items: flex-start;
        padding-top: 20px;
        overflow-y: auto;
    }
}

/* --- MAIN LAYOUT SHELL --- */
.app-wrapper {
    display: flex;
    flex-direction: column;
    /* Stacks header on top */
    height: 100vh;
    overflow: hidden;
}

/* ============================ */
/* TOP HEADER (FIGMA PERFECT)   */
/* ============================ */
.top-header {
    height: 90px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px 0 0;
    /* Left padding is 0 to align logo perfectly */
    border-bottom: 2px solid #e5e7eb;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 70px;
    width: 90px;
    /* Matches the exact 90px width of the Sidebar below it */
    object-fit: contain;
    padding: 10px;
    background: white;
    box-sizing: border-box;
    border-right: 1px solid #e5e7eb;
    /* Subtle divider from Figma */
}

.header-title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.header-logo-title {
    height: 65px;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    text-align: right;
    line-height: 1.1;
    margin-right: 15px;
}

.user-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #000;
}

.user-id {
    font-size: 0.8rem;
    color: #666;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
}

.ad-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e0e0e0;
}

.change-service-btn {
    background: #0b454a;
    color: white;
    border: none;
    padding: 9px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}

.change-service-btn:hover {
    background: #083337;
}

/* ============================ */
/* BOTTOM AREA (SIDEBAR + MAIN) */
/* ============================ */
.bottom-area {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* SIDEBAR FIX */
.sidebar {
    width: 90px;
    background-color: #0b454a;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    padding-top: 15px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.nav-links {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    border-left: 4px solid transparent;
    transition: 0.2s;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: white;
    background-color: rgba(0, 0, 0, 0.2);
    border-left: 4px solid white;
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* MAIN CONTENT */
/* MAIN CONTENT */
.main-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #e6e9ec;
    overflow: hidden;
    /* CHANGED: Was overflow-y: auto */
}

.content-body {
    flex: 1;
    overflow-y: auto;
    /* NEW: Only this area is allowed to scroll */
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.bottom-footer {
    background-color: #0b454a;
    color: white;
    text-align: right;
    padding: 10px 30px;
    font-size: 0.8rem;
}

/* --- HEADER RIGHT ALIGNMENT --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* --- 3-LINE USER DETAILS --- */
.user-info-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-right: 20px;
    border-right: 1px solid #d1d5db;
    /* Adds a clean divider between user info and buttons */
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Right-aligns the text */
    line-height: 1.3;
}

.ud-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a1a1a;
}

.ud-title,
.ud-role {
    font-size: 0.8rem;
    color: #555;
    font-weight: 500;
}

/* --- LARGER AVATAR --- */
.user-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-color: #e6e9ec;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #114b53;
}

.ad-photo-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- HEADER BUTTONS --- */
.header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.logout-btn {
    background: #B56007;
    border: 1px solid #B56007;
    /* Changed to dark teal */
    color: white;
    /* Changed to dark teal */
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease-in-out;
}

.logout-btn:hover {
    background: transparent;
    /* Changed to dark teal */
    color: #B56007;
}

/* --- COPYRIGHT TEXT --- */
.copyright-text {
    font-size: 0.75rem;
    color: #888;
    margin-top: 5px;
    margin-bottom: 0;
    font-weight: 500;
}

/* ========================================= */
/* NOTIFLIX GLOBAL UI FIXES                  */
/* ========================================= */

/* 1. Remove Underlines from all Notiflix Buttons (They use <a> tags) */
div[id^="Notiflix"] a,
div[id^="NXConfirm"] a,
.nx-report-button,
.nx-confirm-button {
    text-decoration: none !important;
}

/* 2. Change Success Color to Dark Teal (#0b454a) */
.nx-report-success .nx-report-button {
    background-color: #0b454a !important;
}

.nx-report-success .nx-report-svg svg path {
    fill: #0b454a !important;
}

.nx-report-success .nx-report-svg svg circle,
.nx-report-success .nx-report-svg svg polygon,
.nx-report-success .nx-report-svg svg polyline {
    stroke: #0b454a !important;
}

/* Also targets the Confirm 'Yes' button color */
.nx-confirm-success .nx-confirm-button-ok,
div[id^="NXConfirm"] a.nx-confirm-button-ok {
    background-color: #0b454a !important;
}

/* 3. Fix Confirm Box Text Wrapping & Width */
div[id^="NXConfirm"]>div,
.nx-confirm {
    width: 480px !important;
    max-width: 95vw !important;
    height: auto !important;
}

.nx-confirm-message,
div[id^="NXConfirm"] p {
    white-space: pre-wrap !important;
    /* Preserves \n as line breaks! */
    word-break: break-word !important;
    text-overflow: clip !important;
    overflow: visible !important;
    line-height: 1.5 !important;
    font-size: 1.05rem !important;
    color: #333 !important;
    padding-bottom: 15px !important;
}

/* Force all Notiflix anchor tags to never have underlines */
a[class*="nx-"],
a[class*="notiflix"] {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Ensure the confirm message handles the line breaks perfectly */
[id^="NXConfirm"] p,
.nx-confirm-message {
    white-space: pre-wrap !important;
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
}

/* ========================================= */
/* VOUCHER SCANNING LAYOUT                   */
/* ========================================= */

.voucher-scan-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px 30px;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #e6e9ec;
}

/* THE 3 MAIN PANELS (This creates the divided white card look!) */
.vs-left-col,
.vs-mid-col,
.vs-right-col {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.vs-left-col {
    flex: 0 0 26%;
    overflow-y: auto;
    /* Allows flight cards to scroll inside the white panel */
}

.vs-mid-col {
    flex: 1;
    overflow: hidden;
    /* Prevents column scroll, delegates to the inner table */
}

.vs-right-col {
    flex: 0 0 16%;
}

.vs-col-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    flex-shrink: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    /* Adds a nice separator line under the left title */
}

/* LEFT FLIGHT CARDS (FIGMA PERFECT) */
.vs-flight-card {
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 10px;
    padding: 18px 20px;
    /* Tighter padding to match Figma ratio */
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vs-flight-card.active {
    background: #0b454a;
    border-color: #0b454a;
    box-shadow: 0 6px 12px rgba(11, 69, 74, 0.25);
}

/* INACTIVE STATE COLORS */
.vs-flight-card .fc-meal-type,
.vs-flight-card .fc-stn,
.vs-flight-card .fc-time,
.vs-flight-card .fc-flt-no,
.vs-flight-card .stat-val {
    color: #1a1a1a;
}

.vs-flight-card .fc-lbl,
.vs-flight-card .fc-date,
.vs-flight-card .stat-title {
    color: #666666;
}

.vs-flight-card .fc-plane-icon {
    color: #888888;
}

/* ACTIVE STATE COLORS */
.vs-flight-card.active .fc-meal-type,
.vs-flight-card.active .fc-stn,
.vs-flight-card.active .fc-time,
.vs-flight-card.active .fc-flt-no,
.vs-flight-card.active .stat-val,
.vs-flight-card.active .fc-date,
.vs-flight-card.active .fc-lbl,
.vs-flight-card.active .fc-plane-icon {
    color: #ffffff !important;
}

.vs-flight-card.active .stat-title {
    color: #e0e0e0 !important;
}

/* TYPOGRAPHY & LAYOUT */
.fc-meal-type {
    font-weight: 700;
    font-size: 1.1rem;
    /* Dialed back from 1.25rem */
    margin-bottom: 15px;
}

.fc-route-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    /* Tighter spacing */
}

.fc-col {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.fc-col.center {
    align-items: center;
    text-align: center;
}

.fc-col.right {
    align-items: flex-end;
    text-align: right;
}

.fc-stn {
    font-size: 1.5rem;
    /* Perfect match for Figma CMB/DXB size */
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.fc-time,
.fc-flt-no {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.fc-lbl,
.fc-date {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.fc-plane-icon {
    width: 26px;
    /* Scaled down perfectly */
    height: 26px;
    margin-bottom: 4px;
    transform: rotate(45deg);
}

.fc-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Keeps bottom numbers aligned */
}

.fc-stat {
    display: flex;
    flex-direction: column;
}

/* PERFECT FIGMA ALIGNMENTS */
.fc-stat:nth-child(1) {
    align-items: flex-start;
    text-align: left;
}

.fc-stat:nth-child(2) {
    align-items: center;
    text-align: center;
}

/* Fixed right alignment */

.stat-title {
    font-size: 0.8rem;
    margin-bottom: 2px;
    font-weight: 500;
}

.stat-val {
    font-size: 1.4rem;
    /* Perfect match for Figma bottom numbers */
    font-weight: 800;
}

/* --- MIDDLE COLUMN: TABLE & HEADER --- */
.mid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.mid-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

/* FIXED: The Scanning Input Box */
.vs-search-box {
    width: 350px !important;
    /* Wider so it's easy to read long barcodes */
    margin: 0 !important;
    padding: 12px 15px !important;
    /* Thicker padding for a "Main Action" feel */
    border: 2px solid #ced4da !important;
    /* Thicker default border */
    border-radius: 6px !important;
    font-size: 1rem !important;
    background-color: #f8f9fa !important;
    /* Slight grey background */
    transition: all 0.2s ease !important;
}

/* When the user clicks into the box, or when it auto-focuses */
.vs-search-box:focus {
    background-color: #ffffff !important;
    border-color: #0b454a !important;
    /* Changes to SriLankan Teal */
    box-shadow: 0 0 0 4px rgba(11, 69, 74, 0.1) !important;
    /* Soft glowing ring */
    outline: none !important;
}

.vs-search-box:disabled {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
    color: #adb5bd !important;
}

.vs-table-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    border: 1px solid #e5e7eb;
    /* Adds a clean box around the table */
    border-radius: 6px;
}

/* TABLE STYLING */
.vs-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.vs-table th {
    background-color: #0b454a;
    color: #ffffff;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.vs-table td {
    background-color: #ffffff;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #333;
}

/* EMPTY STATE STYLING */
.vs-empty-state {
    text-align: center;
    padding: 80px 0;
    opacity: 0.5;
}

.vs-empty-state img {
    width: 120px;
    margin-bottom: 15px;
}

.vs-empty-state p {
    font-size: 1.1rem;
    font-style: italic;
    margin: 0;
}

/* --- RIGHT COLUMN: SUMMARY CARDS --- */
.vs-summary-card {
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vs-summary-card.dark {
    background-color: #0b454a;
    color: white;
}

.vs-summary-card.light {
    background-color: white;
    border: 2px solid #0b454a;
    color: #0b454a;
}

.sm-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.sm-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.btn-complete-dark {
    width: 100%;
    background-color: #114b53;
    color: #ffffff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-complete-dark:hover {
    background-color: #0b363c;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn-complete-dark:disabled {
    background-color: #6c757d !important;
    color: #e9ecef !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.8;
}

/* ========================= */
/* PRELOADER / LOGIN LOADER  */
/* ========================= */

.preloader-wrapper {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* High z-index to sit on top of everything */
    background: rgba(255, 255, 255, 0.9);
    /* Slight transparency */
    backdrop-filter: blur(2px);
    /* Modern blur effect */
}

.svg-loader {
    display: flex;
    align-items: center;
    width: 230px;
    height: 230px;
    transform-origin: 115px 115px;
    animation: 1.4s linear infinite loader-spin;
}

.loader__plane {
    fill: #004d4d;
    /* CHANGED: Yellow -> Your Accent Red */
}

.loader__path {
    stroke: #004d4d;
    /* CHANGED: Blue -> Your Primary Dark Teal */
    animation: 1.4s ease-in-out infinite loader-path;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loader-path {
    0% {
        stroke-dasharray: 0, 580, 0, 0, 0, 0, 0, 0, 0;
    }

    50% {
        stroke-dasharray: 0, 450, 10, 30, 10, 30, 10, 30, 10;
    }

    100% {
        stroke-dasharray: 0, 580, 0, 0, 0, 0, 0, 0, 0;
    }
}

.btn-back-to-list {
    display: none; /* Hidden on desktop view */
}

.vs-complete-wrapper {
    margin-top: auto;
    padding-top: 30px;
}

/* ========================================= */
/* MOBILE RESPONSIVENESS OVERRIDES           */
/* ========================================= */
@media (max-width: 900px) {

    /* 1. LAYOUT & NAVIGATION */
    .top-header {
        height: 55px !important;
        min-height: 55px !important;
        padding: 5px 15px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .header-left {
        width: auto !important;
        display: flex !important;
        align-items: center !important;
    }

    .header-logo-title {
        display: block !important;
        height: 22px !important;
        width: auto !important;
        margin-left: 0 !important;
    }

    .header-logo {
        display: none !important;
    }

    .header-title {
        display: none !important; /* Hide header text if any on mobile scan view */
    }

    .header-right {
        width: auto !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 10px !important;
        border-top: none !important;
        padding-top: 0 !important;
        margin: 0 !important;
    }

    /* 1) User Details Grouping (Left block) */
    .user-info-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        border-right: none !important;
        padding-right: 0 !important;
        gap: 5px !important;
    }

    .user-details {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
        overflow: hidden;
    }

    .ud-name {
        font-size: 0.8rem !important;
        font-weight: 700;
        color: #000;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 110px !important; /* Limit width to avoid overflow */
    }

    .ud-title,
    .ud-role {
        display: none !important; /* Hide details on small screens */
    }

    .user-avatar-large {
        display: none !important; /* Hide avatar on small screens */
    }

    /* 2) Action Buttons Grouping (Inline row side-by-side) */
    .header-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .change-service-btn,
    .logout-btn {
        width: auto !important;
        padding: 6px 10px !important;
        /* Scaled down padding */
        font-size: 0.75rem !important;
        /* Scaled down text */
        justify-content: center;
        text-align: center;
        border-radius: 4px;
        /* Slightly softer for mobile */
        white-space: nowrap;
        /* Don't wrap text inside buttons */
    }

    .bottom-area {
        flex-direction: column;
    }

    /* Convert left sidebar to fixed bottom navigation */
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        flex-direction: row;
        justify-content: space-around;
        padding-top: 0;
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links {
        flex-direction: row;
        justify-content: space-around;
        height: 100%;
        margin: 0;
    }

    .nav-link {
        flex: 1;
        padding: 8px 0;
        border-left: none !important;
        border-top: 4px solid transparent;
    }

    .nav-link.active {
        border-left: none !important;
        border-top: 4px solid white;
    }

    .nav-icon {
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    .main-content-area {
        padding-bottom: 70px;
        /* Offset to prevent content hiding under bottom nav */
    }

    .bottom-footer {
        display: none;
        /* Hide footer on mobile entirely */
    }

    /* 2. LOGIN PAGE */
    .login-card {
        width: 90%;
        padding: 30px 20px;
    }

    .login-title {
        font-size: 1.4rem;
    }

    /* 3. VOUCHER SCAN SCREEN - Handheld Optimized */
    .voucher-scan-container {
        flex-direction: column !important;
        overflow: visible !important;
        /* THE FIX: Removes the desktop scroll lock */
        height: auto !important;
        /* THE FIX: Allows the page to grow downwards endlessly */
        min-height: 100%;
        padding: 15px 15px 95px 15px !important; /* Reclaims space above bottom fixed navbar */
        gap: 20px !important;
    }

    /* Allow the 3 main columns to break and stack naturally */
    .vs-left-col,
    .vs-mid-col,
    .vs-right-col {
        flex: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        /* Stop clipping inner content */
        padding: 15px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }

    .vs-right-col {
        margin-bottom: 110px !important; /* Forces the right column to scroll completely clear of the fixed bottom navbar */
    }

    /* Hide flight list when a flight is selected on mobile */
    .voucher-scan-container.has-selection .vs-left-col {
        display: none !important;
    }

    .btn-back-to-list {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background-color: #0b454a;
        color: #ffffff;
        border: none;
        padding: 10px 15px;
        border-radius: 6px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .vs-left-col {
        max-height: 280px !important;
        /* Contains the flight list so it doesn't push the scanner off screen */
        overflow-y: auto !important;
        /* Allows scrolling inside the flight list */
        border: 1px solid #ced4da !important;
    }

    .vs-flight-card {
        padding: 22px 20px;
        /* Taller touch target */
        margin-bottom: 12px;
    }

    .mid-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .mid-header h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    /* Search Box Takes Full Width & Higher Contrast */
    .vs-search-box {
        width: 100% !important;
        font-size: 1.1rem !important;
        padding: 15px !important;
        border: 2px solid #0b454a !important;
        /* Force teal border on mobile for prominence */
    }

    /* Data Table Responsiveness & Max Height Scroll */
    .vs-table-wrapper {
        overflow-x: auto !important;
        /* Allows users to swipe the table left/right */
        overflow-y: auto !important;
        max-height: 250px !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        border: 1px solid #dee2e6;
    }

    .vs-table td {
        padding: 15px 10px;
        /* Taller rows for touch */
        font-size: 0.9rem;
    }

    .vs-table th {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    /* Summary Cards Stacked & Large */
    .vs-summary-card {
        padding: 15px !important;
    }

    .sm-value {
        font-size: 2.2rem !important;
    }

    .btn-complete-dark {
        padding: 20px;
        /* Huge touch target */
        font-size: 1.2rem;
        margin-top: 10px;
    }

    .vs-complete-wrapper {
        margin-top: 20px !important;
        padding-top: 0 !important;
        padding-bottom: 20px !important;
    }

    .fc-route-row,
    .fc-stats-row {
        gap: 10px;
    }

    /* 4. MODALS */
    .custom-modal-content {
        width: 95%;
        margin: 10px;
    }

    .cm-input-btn-row {
        flex-direction: column;
    }

    .cm-update-btn {
        width: 100%;
    }
}

.btn-scan-submit {
    background-color: #114b53;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-scan-submit:hover {
    background-color: #0b363c;
}

.btn-scan-submit:disabled {
    background-color: #ced4da !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
}