/* ==========================================================================
   PANKH GOLD LAB V6 - DEDICATED MOBILE TOUCH UI STYLES
   Scope: Strictly applies to screens <= 768px OR when .mobile-mode is active.
   PC / Desktop (> 768px) is 100% UNTOUCHED and PRESERVED.
   ========================================================================== */

/* Base Mobile Layout Overrides - Applied when body has .mobile-mode OR screen <= 900px */
body.mobile-mode {
    padding-bottom: 72px !important; /* Space for fixed bottom navigation */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: #f1f5f9 !important;
    -webkit-tap-highlight-color: transparent;
}
@media (max-width: 900px) {
    body {
        padding-bottom: 72px !important; /* Space for fixed bottom navigation */
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
        background-color: #f1f5f9 !important;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Universal Mobile Cutoff Prevention */
html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}
body.mobile-mode {
    max-width: 100vw;
    overflow-x: hidden !important;
    position: relative;
    background: #f1f5f9;
}
body.mobile-mode #mainContainer {
    max-width: 100vw;
    overflow-x: hidden !important;
    box-sizing: border-box;
    padding-left: 8px !important;
    padding-right: 8px !important;
}
body.mobile-mode .mobile-list-container {
    max-width: 100%;
    overflow-x: hidden !important;
    box-sizing: border-box;
}

/* Hide complex desktop-only elements on mobile */
body.mobile-mode .app-header,
body.mobile-mode .pc-quick-ops-bar,
body.mobile-mode .top-nav-bar,
body.mobile-mode .sub-toolbar,
body.mobile-mode .entrance-top-controls,
body.mobile-mode .desktop-only-pane,
body.mobile-mode #billingHeaderActions,
body.mobile-mode #clinicEntranceOverlay,
body.mobile-mode #style-sales-statement-custom table thead th:nth-child(n+8),
body.mobile-mode #style-sales-statement-custom table tbody td:nth-child(n+8) {
    display: none !important;
}

/* Only hide complex desktop navigation elements when actively in MOBILE MODE */
body.mobile-mode .app-header,
body.mobile-mode .pc-quick-ops-bar,
body.mobile-mode .top-nav-bar,
body.mobile-mode .sub-toolbar,
body.mobile-mode .entrance-top-controls,
body.mobile-mode .desktop-only-pane,
body.mobile-mode #billingHeaderActions,
body.mobile-mode #style-sales-statement-custom table thead th:nth-child(n+8),
body.mobile-mode #style-sales-statement-custom table tbody td:nth-child(n+8) {
    display: none !important;
}

/* ==========================================================================
   1. MOBILE TOP APP BAR (Sticky Header - Anti-Cutoff & Touch-Optimized)
   ========================================================================== */
    .mobile-top-bar {
        position: sticky;
        top: 0;
        z-index: 1020;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        color: #ffffff;
        padding: 8px 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: hidden;
    }

    .mobile-top-bar .clinic-brand {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .mobile-top-bar .clinic-brand img {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        background: transparent;
        padding: 0;
        object-fit: contain;
        flex-shrink: 0;
        filter: drop-shadow(0 2px 6px rgba(132, 204, 22, 0.6));
    }

    .mobile-top-bar .clinic-title {
        font-size: 13.5px;
        font-weight: 700;
        line-height: 1.2;
        color: #ffffff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-top-bar .clinic-subtitle {
        font-size: 10px;
        color: #94a3b8;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-top-actions {
        display: flex;
        align-items: center;
        gap: 4px;
        flex: 0 0 auto;
        flex-shrink: 0;
    }

    .btn-mobile-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.18);
        font-size: 14px;
        flex-shrink: 0;
        padding: 0;
        transition: background 0.15s;
    }

    .btn-mobile-icon:active {
        background: rgba(255, 255, 255, 0.25);
    }

    /* ==========================================================================
       2. MOBILE BOTTOM NAVIGATION BAR (Fixed at bottom)
       ========================================================================== */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 62px;
        background: #0f172a;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 1040;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #94a3b8;
        text-decoration: none;
        font-size: 10px;
        font-weight: 600;
        padding: 6px 0;
        position: relative;
        transition: color 0.15s ease;
        -webkit-user-select: none;
        user-select: none;
    }

    .mobile-nav-item i {
        font-size: 19px;
        margin-bottom: 2px;
        transition: transform 0.15s ease;
    }

    .mobile-nav-item.active {
        color: #38bdf8;
    }

    .mobile-nav-item.active i {
        transform: translateY(-2px);
    }

    .mobile-nav-item.nav-billing-highlight {
        color: #ffffff;
    }

    .mobile-nav-item.nav-billing-highlight .billing-circle-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
        margin-top: -16px;
        margin-bottom: 2px;
        border: 2px solid #ffffff;
        font-size: 20px;
    }

    /* ==========================================================================
       3. MOBILE TOUCH BILLING INTERFACE
       ========================================================================== */
    .mobile-billing-container {
        padding: 10px 10px 110px 10px; /* bottom padding so checkout bar doesn't obscure content */
    }

    .mobile-card {
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
        padding: 14px;
        margin-bottom: 12px;
    }

    .mobile-card-title {
        font-size: 13.5px;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-form-label {
        font-size: 11.5px;
        font-weight: 600;
        color: #475569;
        margin-bottom: 4px;
        display: block;
    }

    .mobile-input {
        height: 44px; /* Touch target minimum */
        border-radius: 8px;
        border: 1px solid #cbd5e1;
        font-size: 15px;
        padding: 8px 12px;
        width: 100%;
        color: #0f172a;
    }

    .mobile-input:focus {
        border-color: #0284c7;
        box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
        outline: none;
    }

    /* Touch Pill Buttons for Quick Selection (Gender, Rate Type, Payment Mode) */
    .touch-pill-group {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }

    .touch-pill-btn {
        flex: 1;
        min-height: 38px;
        padding: 6px 10px;
        border-radius: 8px;
        border: 1px solid #cbd5e1;
        background: #f8fafc;
        color: #334155;
        font-size: 12.5px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .touch-pill-btn.active {
        background: #0284c7;
        color: #ffffff;
        border-color: #0284c7;
        box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
    }

    /* Test Search & Autocomplete in Mobile */
    .mobile-test-search-wrap {
        position: relative;
    }

    .mobile-test-search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        max-height: 240px;
        overflow-y: auto;
        z-index: 1050;
        margin-top: 4px;
        display: none;
    }

    .mobile-test-search-item {
        padding: 10px 12px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 13.5px;
    }

    .mobile-test-search-item:active {
        background: #e0f2fe;
    }

    /* Selected Test Touch Cards */
    .mobile-test-item-card {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 8px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .mobile-test-item-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-test-item-title {
        font-weight: 700;
        font-size: 13.5px;
        color: #0f172a;
    }

    .mobile-test-item-price {
        font-weight: 700;
        font-family: monospace;
        color: #0284c7;
        font-size: 14px;
    }

    .mobile-test-item-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
        color: #64748b;
    }

    /* ==========================================================================
       4. MOBILE FLOATING CHECKOUT & SUMMARY BAR
       ========================================================================== */
    .mobile-checkout-bar {
        position: fixed;
        bottom: 62px; /* Sits right on top of bottom navigation bar */
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
        padding: 8px 12px;
        z-index: 1030;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-checkout-total {
        display: flex;
        flex-direction: column;
    }

    .mobile-checkout-total .label {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        color: #64748b;
        letter-spacing: 0.5px;
    }

    .mobile-checkout-total .amount {
        font-size: 19px;
        font-weight: 800;
        color: #16a34a;
        font-family: monospace;
        line-height: 1.1;
    }

    .mobile-checkout-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .btn-mobile-summary {
        height: 42px;
        padding: 0 12px;
        border-radius: 8px;
        background: #f1f5f9;
        color: #0f172a;
        border: 1px solid #cbd5e1;
        font-size: 12px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .btn-mobile-pay {
        height: 42px;
        padding: 0 16px;
        border-radius: 8px;
        background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
        color: #ffffff;
        border: none;
        font-size: 13.5px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 3px 8px rgba(22, 163, 74, 0.35);
    }

    /* ==========================================================================
       5. SLIDE-UP BOTTOM SHEET (Full Bill Summary & Settlement)
       ========================================================================== */
    .mobile-bottom-sheet-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.65);
        z-index: 1060;
        display: none;
        backdrop-filter: blur(2px);
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .mobile-bottom-sheet-overlay.show,
    .mobile-bottom-sheet-overlay.open {
        display: block !important;
        opacity: 1 !important;
    }

    .mobile-bottom-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 90vh;
        background: #ffffff;
        border-radius: 20px 20px 0 0;
        z-index: 1070;
        overflow-y: auto;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
        transform: translateY(100%);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 16px 16px 30px 16px;
        display: none;
        flex-direction: column;
    }

    .mobile-bottom-sheet.open,
    .mobile-bottom-sheet.show {
        display: flex !important;
        transform: translateY(0) !important;
    }

    .bottom-sheet-handle {
        width: 40px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 4px;
        margin: 0 auto 12px auto;
    }

    .sheet-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13.5px;
    }

    .sheet-row.highlight {
        background: #f0fdf4;
        padding: 10px 12px;
        border-radius: 8px;
        border: 1px dashed #22c55e;
        color: #15803d;
        font-weight: 800;
        font-size: 16px;
        margin: 8px 0;
    }

    /* Mobile Age Triple Input */
    .mob-age-box {
        background: #fdf2f8 !important;
        border: 1px solid #f472b6 !important;
        color: #831843 !important;
        font-weight: 700 !important;
        text-align: center !important;
        font-family: monospace !important;
        font-size: 13px !important;
        height: 34px !important;
    }

    /* Mobile Bill No Lavender Box */
    .mob-billno-box {
        background: #f5f3ff !important;
        border: 1px solid #a78bfa !important;
        color: #5b21b6 !important;
        font-weight: 800 !important;
        font-family: monospace !important;
        font-size: 14px !important;
        height: 34px !important;
    }

    /* Mobile Token Day Badge */
    .mob-token-badge {
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        color: #1e40af;
        border-radius: 6px;
        padding: 4px 6px;
        font-size: 11px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        gap: 3px;
        height: 34px;
    }

    /* Mobile Billing Sub Tabs */
    .mob-billing-tabs {
        display: flex;
        gap: 6px;
        margin-bottom: 12px;
        background: #e2e8f0;
        padding: 3px;
        border-radius: 10px;
    }

    .mob-billing-tab {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        border-radius: 8px;
        font-size: 12.5px;
        font-weight: 700;
        border: none;
        background: transparent;
        color: #475569;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .mob-billing-tab.active {
        background: #ffffff;
        color: #0284c7;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

    /* WhatsApp Direct Share Button */
    .btn-mobile-whatsapp {
        width: 100%;
        height: 46px;
        background: #25d366;
        color: #ffffff;
        border: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
        margin-top: 10px;
    }

    .btn-mobile-whatsapp:active {
        background: #1eb956;
    }

    /* ==========================================================================
       6. MOBILE CARD LISTS (Recent Bills, Doctors, Patients, Tests)
       ========================================================================== */
    .mobile-list-container {
        padding: 10px 10px 80px 10px;
    }

    .mobile-bill-card {
        background: #ffffff;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
        padding: 12px;
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-bill-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 6px;
    }

    .mobile-bill-no {
        font-family: monospace;
        font-weight: 700;
        font-size: 14px;
        color: #0284c7;
    }

    .mobile-bill-patient {
        font-weight: 700;
        font-size: 14px;
        color: #0f172a;
    }

    .mobile-bill-meta {
        font-size: 12px;
        color: #64748b;
        display: flex;
        justify-content: space-between;
    }

    .mobile-bill-actions {
        display: flex;
        gap: 6px;
        margin-top: 4px;
    }

    .btn-mobile-action {
        flex: 1;
        height: 34px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 1px solid #cbd5e1;
        background: #ffffff;
        color: #334155;
    }

    /* ==========================================================================
       7. MOBILE CASH RECONCILIATION / GALLA VIEW
       ========================================================================== */
    .mobile-kpi-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 12px;
    }

    .mobile-mini-kpi-ribbon {
        background: #ffffff;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        border-left: 3.5px solid #0284c7 !important;
        padding: 6px 10px;
        margin-bottom: 10px;
        font-size: 11.5px;
        line-height: 1.25;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .mobile-kpi-card {
        background: #ffffff;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
        padding: 10px;
        text-align: center;
    }

    .mobile-kpi-title {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        color: #64748b;
    }

    .mobile-kpi-val {
        font-size: 16px;
        font-weight: 800;
        font-family: monospace;
        margin-top: 2px;
    }

    /* ==========================================================================
       8. MOBILE BILL SUMMARY STRIP & INLINE EDITING STYLES
       ========================================================================== */
    .mobile-bill-summary-strip {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        border: 1px solid #cbd5e1;
        border-radius: 10px;
        padding: 9px 12px;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        transition: transform 0.15s ease, background-color 0.15s ease;
    }

    .mobile-bill-summary-strip:active {
        transform: scale(0.99);
        background: #e2e8f0;
    }

    .mobile-item-inline-edit {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 6px 8px;
        margin-top: 6px;
    }

    .mobile-item-inline-edit input {
        font-size: 13px !important;
        height: 32px !important;
        border-radius: 6px !important;
    }

    /* ==========================================================================
       9. MOBILE REPORTS & DOCTOR BREAKDOWN STYLES
       ========================================================================== */
    .mobile-report-tabs {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 6px;
        margin-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-report-tab {
        flex: 1;
        min-width: 100px;
        text-align: center;
        padding: 8px 10px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        color: #475569;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .mobile-report-tab.active {
        background: #0284c7;
        color: #ffffff;
        border-color: #0284c7;
        box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
    }

    .mobile-doctor-card {
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        padding: 12px;
        margin-bottom: 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .mobile-doctor-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .mobile-doctor-stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        background: #f8fafc;
        border-radius: 8px;
        padding: 8px;
        margin-bottom: 8px;
        text-align: center;
    }

    .mobile-doctor-stat-val {
        font-family: monospace;
        font-weight: 700;
        font-size: 13px;
        margin-top: 2px;
    }

    .mobile-doctor-stat-label {
        font-size: 10px;
        color: #64748b;
        text-transform: uppercase;
        font-weight: 600;
    }

    /* 9 Reports Enhanced Tabs & Workload Styles */
    .mobile-report-tabs::-webkit-scrollbar {
        display: none;
    }
    .mobile-report-tabs {
        scrollbar-width: none;
    }
    .mobile-report-tab {
        flex: 0 0 auto;
        min-width: 90px;
        text-align: center;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 11.5px;
        font-weight: 600;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        color: #475569;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.15s ease;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
    }
    .mobile-report-tab .tab-hindi {
        font-size: 9.5px;
        opacity: 0.8;
        font-weight: 400;
    }
    .mobile-report-tab.active {
        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
        color: #ffffff;
        border-color: #0284c7;
        box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
    }
    .mobile-report-tab.active .tab-hindi {
        opacity: 0.95;
        color: #e0f2fe;
    }

    .mobile-workload-progress {
        height: 6px;
        border-radius: 3px;
        background: #e2e8f0;
        overflow: hidden;
        margin-top: 4px;
    }
    .mobile-workload-progress-bar {
        height: 100%;
        border-radius: 3px;
        transition: width 0.3s ease;
    }

    /* Modal Responsive Layouts for Mobile */
    body.mobile-mode .modal-dialog {
        margin: 8px !important;
        max-width: calc(100vw - 16px) !important;
    }

    body.mobile-mode #printableReceiptContent {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 6px !important;
    }

    /* Mobile Quick Operations Grid & 1-Tap Tiles */
    .mob-quick-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-top: 6px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .mob-quick-grid > * {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .mob-quick-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 8px 4px;
        text-align: center;
        cursor: pointer;
        transition: all 0.15s ease;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 76px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    .mob-quick-card:active {
        transform: scale(0.96);
        background: #f1f5f9;
    }
    .mob-quick-icon-wrap {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 17px;
        margin-bottom: 4px;
        flex-shrink: 0;
    }
    .mob-quick-title {
        font-size: 10.5px;
        font-weight: 700;
        color: #0f172a;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .mob-quick-sub {
        font-size: 8.5px;
        color: #64748b;
        line-height: 1.1;
        margin-top: 1px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Mobile Quick Operations Bottom Sheet Drawer */
    #mobQuickOpsSheet {
        z-index: 1095;
    }
    #mobQuickOpsOverlay {
        z-index: 1090;
    }
    .mobile-sheet-drag-handle {
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background: #cbd5e1;
        margin: 8px auto 4px auto;
    }

    /* Print Preview Fullscreen Modal */
    #mobilePrintPreviewModal .modal-content {
        height: 100vh;
        border: none;
        border-radius: 0;
    }

    #mobilePrintArea {
        display: none;
    }

    @media print {
        :root, html, body {
            color-scheme: only light !important;
            supported-color-schemes: light !important;
        }
        * {
            color-scheme: only light !important;
            -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
        }
        body.printing-report {
            background: #ffffff !important;
            background-color: #ffffff !important;
            color: #000000 !important;
            padding: 0 !important;
            margin: 0 !important;
            width: 100% !important;
        }
        body.printing-report > *:not(#mobilePrintArea) {
            display: none !important;
            visibility: hidden !important;
        }
        body.printing-report #mobilePrintArea {
            display: block !important;
            visibility: visible !important;
            position: static !important;
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            background: #ffffff !important;
            background-color: #ffffff !important;
            color: #000000 !important;
            z-index: 9999999 !important;
        }
        body.printing-report #mobilePrintArea * {
            visibility: visible !important;
            color-scheme: only light !important;
        }
    }

/* ==========================================================================
   DESKTOP VIEW MODE OVERRIDE
   When user is on PC or explicitly switches to desktop mode:
   Hide mobile bars, show full desktop workspace.
   ========================================================================== */
body:not(.mobile-mode) .mobile-top-bar,
body:not(.mobile-mode) .mobile-bottom-nav,
body:not(.mobile-mode) .mobile-checkout-bar,
body:not(.mobile-mode) .mobile-bottom-sheet,
body:not(.mobile-mode) .mobile-bottom-sheet-overlay {
    display: none !important;
}

/* ==========================================================================
   MOBILE SMOOTH MICRO-ANIMATIONS & TOUCH POLISH
   ========================================================================== */

/* 1. Mobile Container & List Slide Up */
@keyframes mobileViewSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-list-container,
.mobile-card,
.mobile-kpi-grid,
.mob-quick-grid {
    animation: mobileViewSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 2. Touch Tap Feedback for Mobile Cards & Buttons */
.mob-quick-card,
.mobile-kpi-card,
.btn-sm,
.btn-xs,
.mobile-report-tab {
    transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, box-shadow 0.15s ease !important;
}

.mob-quick-card:active,
.mobile-kpi-card:active,
.mobile-report-tab:active {
    transform: scale(0.96) !important;
}

/* 3. Bottom Sheet Slide Up Animation */
@keyframes sheetSlideUp {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(0);
    }
}

.mobile-bottom-sheet.open {
    animation: sheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 4. Smooth Bottom Nav Item Pop */
.mobile-nav-item {
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.mobile-nav-item.active {
    transform: translateY(-2px);
}

.mobile-nav-item:active {
    transform: scale(0.92);
}

/* 5. Mobile DOS Terminal View Container */
.dos-terminal-wrapper {
    animation: mobileViewSlideIn 0.22s ease-out;
    border-radius: 8px;
    overflow-x: auto;
}

/* 6. Mobile Floating Action Circle Breathing Pulse */
@keyframes billingFabPulse {
    0% {
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
        transform: translateY(0) scale(1);
    }
    50% {
        box-shadow: 0 6px 18px rgba(2, 132, 199, 0.65);
        transform: translateY(-2px) scale(1.05);
    }
    100% {
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
        transform: translateY(0) scale(1);
    }
}

.billing-circle-btn {
    animation: billingFabPulse 2.8s infinite ease-in-out;
    transition: transform 0.15s ease !important;
}

.billing-circle-btn:active {
    transform: scale(0.9) !important;
}

/* 7. Quick Operations Card Staggered Pop */
@keyframes mobileGridCardPop {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mob-quick-grid .mob-quick-card {
    animation: mobileGridCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mob-quick-grid .mob-quick-card:nth-child(1) { animation-delay: 0.02s; }
.mob-quick-grid .mob-quick-card:nth-child(2) { animation-delay: 0.04s; }
.mob-quick-grid .mob-quick-card:nth-child(3) { animation-delay: 0.06s; }
.mob-quick-grid .mob-quick-card:nth-child(4) { animation-delay: 0.08s; }
.mob-quick-grid .mob-quick-card:nth-child(5) { animation-delay: 0.10s; }
.mob-quick-grid .mob-quick-card:nth-child(6) { animation-delay: 0.12s; }
.mob-quick-grid .mob-quick-card:nth-child(7) { animation-delay: 0.14s; }
.mob-quick-grid .mob-quick-card:nth-child(8) { animation-delay: 0.16s; }
.mob-quick-grid .mob-quick-card:nth-child(9) { animation-delay: 0.18s; }
.mob-quick-grid .mob-quick-card:nth-child(10) { animation-delay: 0.20s; }
.mob-quick-grid .mob-quick-card:nth-child(11) { animation-delay: 0.22s; }
.mob-quick-grid .mob-quick-card:nth-child(12) { animation-delay: 0.24s; }

/* 8. Floating Persistent Switcher to Mobile View when in PC View */
.floating-mobile-switch-pill {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 99999;
    background: linear-gradient(135deg, #091e3a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
    border: 2px solid #38bdf8;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    animation: bounceInPill 0.4s ease;
}

@keyframes bounceInPill {
    0% { transform: scale(0.6) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.floating-mobile-switch-pill:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.6);
}

.floating-mobile-switch-pill:active {
    transform: scale(0.94);
}

body.mobile-mode .floating-mobile-switch-pill,
body.modal-open .floating-mobile-switch-pill {
    display: none !important;
}

/* ==========================================================================
   9. MOBILE PANKH LUXURY 3D DASHBOARD & FLOATING AMBIENCE
   ========================================================================== */
.mobile-pankh-stage {
    position: relative;
    background: radial-gradient(120% 120% at 20% 20%, #0d1e3a 0%, #081226 50%, #020610 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    overflow: hidden;
    padding: 14px 12px;
    margin-bottom: 12px;
}

.mobile-brand-logo-3d {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(132, 204, 22, 0.55));
    transition: transform 0.25s ease, filter 0.25s ease;
}
.mobile-brand-logo-3d:active {
    transform: scale(0.96) rotate(-2deg);
}

.mobile-hindi-tagline {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mobile-quote-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fef08a;
    letter-spacing: 0.3px;
    line-height: 1.4;
    text-shadow: 0 1px 8px rgba(250, 204, 21, 0.35);
}

.mobile-analytics-panel {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.mobile-glass-kpi {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
}
.mobile-glass-kpi .kpi-lbl {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.mobile-glass-kpi .kpi-num {
    font-size: 17px;
    font-weight: 800;
    font-family: monospace;
    line-height: 1.1;
}

.mob-quick-grid-glossy {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.mob-quick-card-glossy {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.mob-quick-card-glossy:active {
    transform: scale(0.94);
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(56, 189, 248, 0.4);
}
.mob-quick-card-glossy .mob-quick-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 4px;
}
.mob-quick-card-glossy .mob-quick-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.2;
}
.mob-quick-card-glossy .mob-quick-sub {
    font-size: 9.5px;
    color: #94a3b8;
    line-height: 1.1;
    margin-top: 1px;
}
