/* Global Typography & Base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    font-size: 0.92rem;
    overflow-x: hidden;
}

/* Header & Menubar */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1060 !important;
    overflow: visible !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* ====================================================
   UNIFIED TOP NAVBAR ACTION BUTTONS & MENUS (COMFORTABLE FONT & 35px HEIGHT)
   ==================================================== */
.menu-btn,
.top-nav-btn {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 0 12px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    flex-shrink: 0 !important;
}

.menu-btn {
    border-color: rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

.menu-btn:hover, .menu-btn:focus, .menu-btn.show {
    background-color: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.top-nav-bar {
    position: relative !important;
    z-index: 1060 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
}

.top-nav-bar .dropdown {
    position: relative !important;
    z-index: 1070 !important;
}

.top-nav-bar .dropdown-menu {
    z-index: 999999 !important;
    position: absolute !important;
    top: 100% !important;
    margin-top: 4px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
    font-size: 0.85rem !important;
}

.top-nav-bar .dropdown-menu.dropdown-menu-end,
.top-nav-bar .dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
}

.main-menu-nav .dropdown-menu {
    position: absolute !important;
    z-index: 999999 !important;
    top: 100% !important;
    left: 0 !important;
    margin-top: 4px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
}

.top-nav-bar::-webkit-scrollbar {
    display: none !important;
}

.main-menu-nav {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
}

.top-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

.top-nav-btn-billing {
    background: #f59e0b !important;
    color: #1c1917 !important;
    border-color: #d97706 !important;
    font-weight: 700 !important;
}

.top-nav-btn-billing:hover {
    background: #d97706 !important;
    color: #ffffff !important;
}

.top-nav-btn-mode-offline {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #a7f3d0 !important;
}

.top-nav-btn-mode-offline:hover {
    background: rgba(16, 185, 129, 0.35) !important;
    border-color: rgba(16, 185, 129, 0.75) !important;
    color: #ffffff !important;
}

.top-nav-btn-mode-online {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.45) !important;
    color: #bfdbfe !important;
}

.top-nav-btn-mode-online:hover {
    background: rgba(59, 130, 246, 0.35) !important;
    border-color: rgba(59, 130, 246, 0.75) !important;
    color: #ffffff !important;
}

.top-nav-btn-showcase {
    background: rgba(245, 158, 11, 0.18) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: #fde68a !important;
}

.top-nav-btn-showcase:hover {
    background: rgba(245, 158, 11, 0.3) !important;
    border-color: rgba(245, 158, 11, 0.75) !important;
    color: #ffffff !important;
}

.top-nav-btn-fullscreen {
    background: rgba(99, 102, 241, 0.18) !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
    color: #c7d2fe !important;
}

.top-nav-btn-fullscreen:hover {
    background: rgba(99, 102, 241, 0.3) !important;
    border-color: rgba(99, 102, 241, 0.75) !important;
    color: #ffffff !important;
}

.top-nav-btn-install {
    background: rgba(20, 184, 166, 0.2) !important;
    border-color: rgba(20, 184, 166, 0.45) !important;
    color: #99f6e4 !important;
}

.top-nav-btn-install:hover {
    background: rgba(20, 184, 166, 0.35) !important;
    border-color: rgba(20, 184, 166, 0.75) !important;
    color: #ffffff !important;
}

.top-nav-btn-user {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #f8fafc !important;
}

.top-nav-btn-user:hover {
    background: rgba(255, 255, 255, 0.22) !important;
}

.dropdown-menu {
    border-radius: 6px;
    font-size: 0.83rem;
    min-width: 220px;
    padding: 0.4rem 0;
}

.dropdown-item {
    transition: background 0.12s ease;
}

.dropdown-item:hover {
    background-color: #0d6efd;
    color: #fff !important;
}

.dropdown-item:hover i {
    color: #fff !important;
}

/* ====================================================
   SUB-TOOLBAR (LOCK 38px HEIGHT, EQUAL BUTTONS, 0 WRAP)
   ==================================================== */
.sub-toolbar {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    position: relative !important;
    z-index: 1000 !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-width: none !important;
}

.sub-toolbar::-webkit-scrollbar {
    display: none !important;
}

.sub-toolbar > div {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    height: 100% !important;
}

.sub-toolbar .btn,
.sub-toolbar button,
.sub-toolbar .btn-group > .btn,
.sub-toolbar-btn {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 0 9px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.sub-toolbar .badge {
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 8px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.sub-toolbar #closeScreenToolbarBtn {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #f87171 !important;
    font-weight: 700 !important;
}

.sub-toolbar #closeScreenToolbarBtn:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.sub-toolbar .dropdown-menu {
    z-index: 1050 !important;
}

/* ====================================================
   MODALS: ALWAYS ABOVE APP HEADER & PROPER POSITIONING
   ==================================================== */
.modal {
    z-index: 1070 !important;
}

.modal-backdrop {
    z-index: 1065 !important;
}

#billingHistoryModal .modal-dialog {
    max-width: 96vw !important;
    width: 96vw !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

#billingHistoryModal .modal-content {
    max-height: calc(100vh - 30px) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

#billingHistoryModal .modal-header {
    flex-shrink: 0 !important;
}

#billingHistoryModal .modal-body {
    overflow-y: auto !important;
    max-height: calc(100vh - 100px) !important;
}

/* ==========================================================================
   UNIFIED PROFESSIONAL REPORT ACTIONS TOOLBAR (EQUAL HEIGHT, ALIGNED & POLISHED)
   ========================================================================== */
.report-actions-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-wrap: wrap !important;
}

.report-actions-toolbar .btn,
.report-actions-toolbar button,
.report-actions-toolbar .btn-dos-toggle-pill,
.report-actions-toolbar .form-control,
.report-toolbar-btn {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    line-height: 1 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    transition: all 0.15s ease-in-out !important;
}

.report-actions-toolbar .btn-icon-sq {
    width: 31px !important;
    min-width: 31px !important;
    max-width: 31px !important;
    padding: 0 !important;
}

.report-search-input {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    border-color: #cbd5e1 !important;
}

.report-search-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* Professional Harmonious Action Palette */
.report-btn-filter {
    background: #f0f7ff !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
}
.report-btn-filter:hover, .report-btn-filter.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
}

.report-btn-cards {
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}
.report-btn-cards:hover, .report-btn-cards.active {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.report-btn-exp {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}
.report-btn-exp:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.report-btn-ret {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}
.report-btn-ret:hover {
    background: #d97706 !important;
    color: #ffffff !important;
}

.report-btn-excel {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border: 1px solid #bbf7d0 !important;
}
.report-btn-excel:hover {
    background: #16a34a !important;
    color: #ffffff !important;
}

.report-btn-print {
    background: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid #1e293b !important;
}
.report-btn-print:hover {
    background: #1e293b !important;
    color: #38bdf8 !important;
}

.report-btn-close {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}
.report-btn-close:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}

.report-actions-toolbar .btn-dos-toggle-pill {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    padding: 0 10px !important;
    font-size: 0.76rem !important;
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

/* Cards & Tables */
.card {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    color: #475569;
    background-color: #f8fafc;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    box-sizing: border-box;
}

.table td {
    vertical-align: middle;
    font-size: 0.84rem;
    padding: 0.45rem 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    box-sizing: border-box;
    color: #1e293b;
}

.table-hover tbody tr:hover {
    background-color: #f0f7ff;
}

/* Quick Action Badges */
.badge-pill {
    padding: 0.25rem 0.55rem;
    border-radius: 50rem;
    font-size: 0.72rem;
}

/* Form Controls */
.form-control-sm, .form-select-sm {
    font-size: 0.82rem;
    border-radius: 4px;
    border-color: #cbd5e1;
}

.form-control-sm:focus, .form-select-sm:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Parameter Grid in Test Master */
.param-table th {
    font-size: 0.7rem;
    padding: 0.35rem;
}

.param-table td {
    padding: 0.25rem;
}

/* Custom scrollbars - Enhanced Visibility */
::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}
/* Dynamic Text Casing for All Applications */
body.app-uppercase input:not([type="password"]):not([type="email"]):not([type="color"]):not([type="date"]),
body.app-uppercase textarea,
body.app-uppercase select {
    text-transform: uppercase;
}

body.app-lowercase input:not([type="password"]):not([type="color"]):not([type="date"]),
body.app-lowercase textarea {
    text-transform: lowercase;
}

/* Preserve exact case on Login, Passwords & Usernames even when Show Password is toggled */
body.app-uppercase #loginScreen input,
body.app-lowercase #loginScreen input,
body.app-uppercase #loginPassword,
body.app-lowercase #loginPassword,
body.app-uppercase #loginUsername,
body.app-lowercase #loginUsername,
body.app-uppercase #newStaffUsername,
body.app-lowercase #newStaffUsername,
body.app-uppercase #newStaffPassword,
body.app-lowercase #newStaffPassword,
body.app-uppercase #newStaffConfirmPassword,
body.app-lowercase #newStaffConfirmPassword,
[data-no-case="true"] {
    text-transform: none !important;
}

/* Dynamic Column Resizing on Table Headers */
.table th {
    position: relative;
}

.col-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 15;
    transition: background-color 0.15s ease;
}

.col-resize-handle::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 25%;
    height: 50%;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 1px;
}

.table-light .col-resize-handle::after,
.table thead:not([class*="bg-"]) .col-resize-handle::after {
    background-color: rgba(0, 0, 0, 0.25);
}

.col-resize-handle:hover,
.col-resize-handle.active {
    background-color: rgba(255, 255, 255, 0.45);
    border-right: 3px solid #ffc107 !important; /* Golden yellow resize active indicator */
}

body.resizing-column,
body.resizing-column * {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Active / Selected row in Table for Keyboard Navigation & F7 Edit */
.table tbody tr {
    cursor: pointer;
}

.table tbody tr.selected-row td {
    background-color: #fef08a !important; /* Soft golden alert tone */
    color: #0f172a !important;
    font-weight: 600;
    box-shadow: inset 0 1px 0 #eab308, inset 0 -1px 0 #eab308;
}

kbd {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.72rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* ====================================================
   PREMIUM LOGIN INTERFACE
   ==================================================== */
.login-screen-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 15%, #1e293b 0%, #0f172a 55%, #020617 100%);
    overflow: hidden;
}

.login-orb-1 {
    position: absolute;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.16), transparent 70%);
    top: -120px;
    left: -100px;
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.login-orb-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.15), transparent 70%);
    bottom: -140px;
    right: -100px;
    border-radius: 50%;
    filter: blur(55px);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    box-shadow: 0 25px 65px -15px rgba(0, 0, 0, 0.75), 0 0 35px rgba(132, 204, 22, 0.1);
    color: #f8fafc;
    position: relative;
    z-index: 10;
}

.login-logo-container {
    width: 88px;
    height: 88px;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem auto;
    padding: 0;
    filter: drop-shadow(0 8px 24px rgba(132, 204, 22, 0.6));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.login-logo-container:hover {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 12px 30px rgba(132, 204, 22, 0.85));
}

.login-input-group {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.login-input-group:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
    background: rgba(30, 41, 59, 0.95);
}

.login-input-group .form-control {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
}

.login-input-group .form-control:focus {
    box-shadow: none;
    background: transparent;
    color: #ffffff;
}

.login-input-group .input-group-text {
    background: transparent;
    border: none;
    color: #94a3b8;
}

.login-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border: none;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
    transition: all 0.2s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.6);
    transform: translateY(-1px);
    color: #fff;
}

.login-btn:active {
    transform: translateY(0);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.shake-animation {
    animation: shake 0.4s ease-in-out;
}

/* ========================================================
   CINEMATIC CLINIC ENTRANCE & GATE OPENING ANIMATION
   ======================================================== */
.clinic-entrance-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: #030712;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.clinic-entrance-overlay.active {
    display: flex;
    opacity: 1;
}

.entrance-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1400px;
}

.entrance-camera {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    transform-origin: 42% 65.5%;
    transition: transform 2.4s cubic-bezier(0.25, 1, 0.4, 1);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.95);
    background: #000;
}

.entrance-camera.zooming {
    transform: scale(4.5);
}

.entrance-camera img {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Signboard Neon Backlight in Entrance Screen */
.entrance-signboard-glow {
    position: absolute;
    top: 37.4%;
    left: 14.2%;
    width: 64%;
    height: 7.8%;
    border-radius: 4px;
    border: 2px solid rgba(56, 189, 248, 0.9);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.95), inset 0 0 20px rgba(56, 189, 248, 0.8);
    pointer-events: none;
}

/* Door Frame & Sliding Glass Doors (Dynamically scaled & centered at DoorX/DoorY) */
.entrance-door-frame {
    position: absolute;
    top: 65.5%;
    left: 42%;
    transform: translate(-50%, -50%);
    width: 10.2%;
    height: 16.4%;
    display: flex;
    border: 1.5px solid rgba(34, 197, 94, 0.85);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.7);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.45);
    z-index: 10;
    border-radius: 3px;
    backdrop-filter: blur(1.5px);
}

.gate-door-left, .gate-door-right {
    width: 50%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(56, 189, 248, 0.3) 50%, rgba(14, 116, 144, 0.5) 100%);
    backdrop-filter: blur(2px);
    transition: transform 1.2s cubic-bezier(0.3, 0, 0.2, 1);
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.gate-door-left {
    border-right: 1.5px solid #ffffff;
    justify-content: flex-end;
    padding-right: 2px;
}

.gate-door-right {
    border-left: 1.5px solid #ffffff;
    justify-content: flex-start;
    padding-left: 2px;
}

.door-handle {
    width: 2px;
    height: 35%;
    background: #ffffff;
    box-shadow: 0 0 6px #38bdf8;
    border-radius: 2px;
}

.door-cross {
    position: absolute;
    top: 30%;
    font-size: 8px;
    color: #22c55e;
    filter: drop-shadow(0 0 4px #22c55e);
}

.gate-door-left .door-cross { right: 5px; }
.gate-door-right .door-cross { left: 5px; }

/* Doors Open State */
.entrance-door-frame.doors-open .gate-door-left {
    transform: translateX(-110%);
}

.entrance-door-frame.doors-open .gate-door-right {
    transform: translateX(110%);
}

/* Interior Radiant Light Portal */
.gate-interior-light {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 1) 0%, rgba(56, 189, 248, 0.9) 35%, rgba(14, 165, 233, 0) 70%);
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.8s ease, transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    z-index: 5;
}

.entrance-door-frame.doors-open .gate-interior-light {
    opacity: 1;
    transform: scale(4);
}

/* Entrance Scanning Laser Beam */
.entrance-scan-line {
    position: absolute;
    inset-x: 0;
    top: 50%;
    height: 2px;
    background: #22c55e;
    box-shadow: 0 0 15px #22c55e;
    z-index: 12;
    transition: opacity 0.4s ease;
}

/* HUD Text and Overlay Information */
.entrance-hud {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 30;
    width: 90%;
    max-width: 600px;
    pointer-events: none;
}

.entrance-hud-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.entrance-top-controls {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
}

.entrance-ctrl-btn, .entrance-skip-btn {
    background: rgba(15, 23, 42, 0.75);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.entrance-ctrl-btn:hover, .entrance-skip-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    color: #38bdf8;
    border-color: #38bdf8;
    transform: translateY(-1px);
}

/* ========================================== */
/* LAB BILLING & INVOICE RECEIPT SYSTEM */
/* ========================================== */
.billing-container {
    background: #f8fafc;
    border-radius: 8px;
}

.billing-header-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ====================================================
   EXCEL SPREADSHEET LAB BILLING UI (EXACT SCREENSHOT LAYOUT)
   ==================================================== */
.excel-sheet-card {
    background: #ffffff;
    border: 1.5px solid #475569;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    padding: 16px 20px;
    margin: 0 auto;
    max-width: 1320px;
}

/* Header Table (Exact 6 columns, 4 rows as in Excel) */
.excel-header-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    border: 1.5px solid #000000;
    table-layout: fixed;
}

.excel-header-table td {
    border: 1px solid #94a3b8;
    padding: 0;
    vertical-align: middle;
    height: 32px;
}

.excel-header-table .excel-label-cell {
    background-color: #f1f5f9;
    font-weight: 800;
    font-size: 0.76rem;
    color: #0f172a;
    padding: 4px 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-right: 1px solid #64748b;
    white-space: nowrap;
    user-select: none;
}

.excel-header-table .excel-input-cell {
    padding: 2px 6px;
    background: #ffffff;
}

.excel-header-table .excel-input-cell input,
.excel-header-table .excel-input-cell select {
    width: 100%;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    padding: 1px 5px;
    outline: none;
    transition: all 0.12s ease;
}

.excel-header-table .excel-input-cell input:focus,
.excel-header-table .excel-input-cell select:focus {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* Items Grid Table (Exact Row 7 from Screenshot) */
.excel-items-wrapper {
    background: #ffffff;
    border: 1.5px solid #000000;
    overflow-x: auto;
    margin-bottom: 12px;
}

.excel-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.excel-items-table th {
    background-color: #f1f5f9;
    color: #000000;
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: 1px solid #475569;
    padding: 6px 8px;
    vertical-align: middle;
    user-select: none;
}

.excel-items-table td {
    border: 1px solid #cbd5e1;
    padding: 0;
    height: 31px;
    vertical-align: middle;
    background: #ffffff;
}

.excel-items-table tr:hover td {
    background-color: #f8fafc;
}

.excel-items-table input {
    width: 100%;
    height: 29px;
    border: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    font-size: 0.84rem;
    padding: 2px 6px;
    outline: none;
    font-family: inherit;
    transition: all 0.1s ease;
}

.excel-items-table input:focus {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: inset 0 0 0 2px #2563eb;
    font-weight: 600;
}

.excel-items-table .cell-sno {
    text-align: center;
    font-weight: 700;
    color: #475569;
    font-size: 0.8rem;
    background-color: #f8fafc;
    width: 45px;
    user-select: none;
}

/* Summary Grid (Exact Excel Placement) */
.excel-summary-table {
    border-collapse: collapse;
    border: 1.5px solid #000000;
    width: 100%;
    max-width: 330px;
    margin-left: auto;
    background: #ffffff;
}

.excel-summary-table td {
    border: 1px solid #94a3b8;
    padding: 4px 10px;
    height: 32px;
    vertical-align: middle;
}

.excel-summary-table .sum-label {
    background-color: #f1f5f9;
    font-weight: 800;
    font-size: 0.78rem;
    color: #0f172a;
    text-transform: uppercase;
    width: 135px;
    border-right: 1px solid #64748b;
    letter-spacing: 0.3px;
}

.excel-summary-table .sum-value {
    text-align: right;
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.95rem;
}

.excel-summary-table .sum-net-row td {
    background-color: #ecfdf5;
    color: #065f46;
    font-weight: 800;
    border-top: 2px solid #059669;
    border-bottom: 2px solid #059669;
}

.billing-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.shortcut-kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-family: monospace;
    line-height: 1;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.65);
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* ====================================================
   SUNSHINE HOSPITAL / RETRO ERP BILLING LAYOUT
   ==================================================== */
.billing-command-ribbon {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 3px 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.billing-ribbon-btn {
    height: 26px;
    padding: 0 10px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #94a3b8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    line-height: 1;
}

.billing-ribbon-btn:hover {
    background: #f1f5f9;
    border-color: #64748b;
}

.billing-ribbon-btn:active {
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

/* Patient Header Table / Form */
.patient-header-grid {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1.5px solid #7f9db9;
    margin-bottom: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.patient-header-grid td {
    padding: 2px 4px;
    border: 1px solid #cbd5e1;
    font-size: 0.77rem;
    vertical-align: middle;
}

.patient-header-grid .hdr-lbl {
    font-weight: 800;
    color: #0f172a;
    background-color: #f1f5f9;
    white-space: nowrap;
}

.patient-header-grid input,
.patient-header-grid select {
    height: 23px;
    border: 1px solid #7f9db9;
    padding: 1px 4px;
    font-size: 0.78rem;
    border-radius: 1px;
    width: 100%;
    background: #ffffff;
    outline: none;
}

.patient-header-grid input:focus {
    background-color: #eff6ff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25) !important;
    outline: none !important;
}

.patient-header-grid select:focus,
#billRelationTypeSelect:focus,
#billTitleSelect:focus,
#billPatientTypeSelect:focus,
#billGenderSelect:focus {
    background-color: #fef08a !important;
    color: #0f172a !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4) !important;
    outline: none !important;
    font-weight: 800 !important;
}

#billRelationTypeSelect {
    cursor: pointer;
    font-weight: 800;
    transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

/* Soft Lavender Bill No Box (Exact Match to Screenshot 2) */
.billno-lavender-box {
    background-color: #eeddff !important;
    color: #4c1d95 !important;
    font-weight: 800 !important;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem !important;
    text-align: center;
}

/* Soft Pink Age Box (Exact Match to Screenshot 2) */
.age-pink-box {
    background-color: #fae8ff !important;
    color: #701a75 !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    text-align: center;
}

/* Quick OPD / IPD Buttons (Exact Match to Screenshot 2) */
.btn-opd-quick {
    background-color: #22c55e !important;
    color: #052e16 !important;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 1px 6px;
    border: 1px solid #15803d;
    box-shadow: 1px 1px 0px #888;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 2px;
}

.btn-ipd-quick {
    background-color: #facc15 !important;
    color: #422006 !important;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 1px 6px;
    border: 1px solid #ca8a04;
    box-shadow: 1px 1px 0px #888;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 2px;
}

.btn-pndt-quick {
    background: linear-gradient(135deg, #be185d 0%, #db2777 100%) !important;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 1px 7px;
    border: 1px solid #9d174d;
    box-shadow: 1px 1px 0px #888;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-pndt-quick:hover {
    background: linear-gradient(135deg, #9d174d 0%, #be185d 100%) !important;
    color: #fff !important;
}

.pndt-chip {
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    font-size: 0.68rem;
    padding: 2px 5px;
}
.pndt-chip:hover {
    background-color: #be185d !important;
    color: #fff !important;
    border-color: #9d174d !important;
}

/* The Liner (Test Grid) - Auto Expanding Height to Fill Screen */
.liner-table-wrapper {
    flex: 1 1 0%;
    min-height: 240px;
    height: auto;
    max-height: none;
    overflow-y: auto;
    overflow-x: auto;
    background: #ffffff;
    border: 1.5px solid #005b5b;
    margin-bottom: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.liner-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.liner-table th {
    background-color: #005b5b;
    color: #ffffff;
    font-weight: 800;
    padding: 4px 6px;
    border: 1px solid #004343;
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.77rem;
    letter-spacing: 0.3px;
}

.liner-table td {
    padding: 2px 4px;
    border: 1px solid #cbd5e1;
    height: 25px;
    vertical-align: middle;
}

.liner-table input {
    height: 22px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 3px;
    font-size: 0.8rem;
    outline: none;
}

.liner-table input:focus {
    background-color: #eff6ff;
    box-shadow: inset 0 0 0 1.5px #2563eb;
    border-radius: 1px;
}

.liner-table tr:hover {
    background-color: #f0fdfa;
}

.liner-table tr.active-row {
    background-color: #e0f2fe;
}

.liner-table-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.liner-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.liner-table-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}
.liner-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Compact Controls Under Liner */
.liner-bottom-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 0;
    flex-shrink: 0;
}

.liner-btn-retro {
    height: 24px;
    padding: 0 8px;
    font-size: 0.74rem;
    font-weight: 700;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #64748b;
    box-shadow: 1px 1px 0px #94a3b8;
    cursor: pointer;
    line-height: 22px;
    border-radius: 2px;
}

.liner-btn-retro:hover {
    background: #f1f5f9;
}

#mainContainer {
    padding: 3px 6px !important;
}

.billing-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 84px);
    min-height: 480px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden !important; /* CRITICAL: Eliminate bottom horizontal scrollbar */
    padding: 1px 2px;
}

body.quick-ops-open .billing-container {
    height: calc(100vh - 122px) !important;
}

.billing-split-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex: 1 1 0%;
    min-height: 0;
}

.billing-main-pane {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.side-billing-summary-panel {
    width: clamp(340px, 28vw, 495px);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    transition: all 0.2s ease;
}

.side-billing-summary-panel.collapsed {
    display: none !important;
}

@media (max-width: 880px) {
    .billing-container {
        height: auto;
        overflow: visible;
    }
    .billing-split-wrapper {
        flex-direction: column;
    }
    .side-billing-summary-panel {
        width: 100% !important;
    }
}

/* ====================================================
   ZOOM & COMPACT SCREEN AUTO-ADJUST (Ctrl + / Ctrl -)
   ==================================================== */
@media (max-height: 850px), (max-width: 1366px) {
    .excel-header-table td {
        height: 24px;
    }
    .excel-header-table .excel-label-cell {
        font-size: 0.72rem;
        padding: 2px 5px;
    }
    .excel-header-table .excel-input-cell input,
    .excel-header-table .excel-input-cell select {
        height: 22px;
        font-size: 0.78rem;
        padding: 0 4px;
    }
    .age-pink-box {
        height: 20px !important;
        font-size: 0.74rem !important;
    }
    .billno-lavender-box {
        height: 20px !important;
        font-size: 0.78rem !important;
    }
    .btn-opd-quick, .btn-ipd-quick {
        padding: 1px 6px;
        font-size: 0.68rem;
    }
    .liner-table th {
        padding: 3px 5px;
        font-size: 0.72rem;
    }
    .liner-table td {
        height: 25px;
    }
    .liner-table input {
        height: 23px;
        font-size: 0.78rem;
    }
    .liner-bottom-controls {
        padding: 2px 0;
    }
    .liner-btn-retro {
        height: 23px;
        font-size: 0.72rem;
        padding: 0 6px;
    }
    .side-summary-table th {
        padding: 2px 4px;
        font-size: 0.7rem;
    }
    .side-summary-table td {
        height: 22px;
        font-size: 0.72rem;
    }
    .settlement-row {
        margin-bottom: 2px;
        font-size: 0.7rem;
    }
    .settlement-val-box {
        width: 75px;
        height: 19px;
        font-size: 0.74rem;
        line-height: 17px;
    }
    .net-red-box {
        height: 34px !important;
        line-height: 28px !important;
        font-size: 1.38rem !important;
        padding: 1px 8px !important;
    }
    .settlement-paid-input {
        height: 30px;
        font-size: 1.22rem;
    }
    .settlement-due-box {
        height: 29px;
        font-size: 1.18rem;
        line-height: 25px;
    }
    .btn-action-save, .btn-action-delete, .btn-action-print, .btn-action-reset, .btn-action-exit {
        height: 24px;
        line-height: 22px;
        font-size: 0.72rem;
    }
    .btn-aux-action {
        height: 22px;
        line-height: 20px;
        font-size: 0.67rem;
    }
    .today-collection-banner {
        padding: 2px 6px;
        font-size: 0.78rem;
    }
    .liner-table-wrapper {
        min-height: 140px;
    }
    .side-summary-table-container {
        min-height: 120px;
    }
}

@media (max-height: 680px) {
    .liner-table-wrapper {
        min-height: 100px;
    }
    .side-summary-table-container {
        min-height: 80px;
    }
}

.side-summary-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border: 1.5px solid #005b5b;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 91, 91, 0.1);
}

.side-summary-top-bar {
    background-color: #f1f5f9;
    padding: 4px 6px;
    border-bottom: 1.5px solid #005b5b;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.side-date-input {
    height: 24px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #000000;
    padding: 1px 4px;
    width: 125px;
    background: #ffffff;
    color: #000000;
    outline: none;
}

.side-date-yellow {
    background-color: #ffff00 !important;
    color: #000000 !important;
    font-weight: 800;
}

.side-btn-show, .side-btn-xl {
    height: 24px;
    padding: 0 9px;
    font-size: 0.8rem;
    font-weight: 700;
    background: #ffffff;
    color: #000000;
    border: 1.5px solid #000000;
    box-shadow: 1px 1px 0px #888888;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    user-select: none;
}

.side-btn-show:hover, .side-btn-xl:hover {
    background: #f8fafc;
}

.side-btn-show:active, .side-btn-xl:active {
    box-shadow: inset 1px 1px 1px #888888;
}

.side-summary-table-container {
    flex: 1 1 0%;
    min-height: 180px;
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: auto;
    background-color: #edfafa;
    border-bottom: 1.5px solid #005b5b;
}

/* Green Bar Above Lower Settlement (Exact match to Screenshot 2) */
.summary-green-bar {
    background-color: #86efac;
    color: #064e3b;
    border-top: 1px solid #005b5b;
    border-bottom: 1px solid #4ade80;
    padding: 3px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.4px;
}

/* Lower Settlement Box (Right Side under Summary) */
.settlement-card {
    background: #ffffff;
    padding: 5px 8px;
    margin-top: auto;
    flex-shrink: 0;
}

.settlement-grid {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.settlement-left-col {
    flex: 1 1 0%;
}

.settlement-right-col {
    width: 175px;
    flex-shrink: 0;
}

.settlement-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 3px;
    font-size: 0.74rem;
}

.settlement-lbl {
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.settlement-val-box {
    width: 85px;
    height: 21px;
    border: 1px solid #7f9db9;
    background: #ffffff;
    text-align: right;
    padding: 0 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 800;
    font-size: 0.8rem;
    line-height: 19px;
}

/* Big Bright 3D Red Box for Net Amount */
.net-red-box {
    background: linear-gradient(180deg, #ff3b3b 0%, #e60000 52%, #b80000 100%) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 1.55rem !important;
    font-family: 'Consolas', 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    text-align: right;
    padding: 2px 10px;
    height: 38px;
    line-height: 32px;
    border: 2px solid #7f1d1d;
    border-radius: 5px;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.7), 0 0 6px rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.45), 0 3px 6px rgba(185, 28, 28, 0.42);
}

.settlement-paid-input {
    width: 100%;
    height: 34px;
    border: 2px solid #1d4ed8;
    border-radius: 5px;
    background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
    color: #1e3a8a;
    font-family: 'Consolas', 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    font-size: 1.35rem;
    text-align: right;
    padding: 0 8px;
    outline: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 3px rgba(30, 64, 175, 0.25);
    box-shadow: inset 0 2px 4px rgba(30, 58, 138, 0.22), inset 0 -1px 0 rgba(255, 255, 255, 0.85), 0 2px 5px rgba(37, 99, 235, 0.25);
}

.settlement-due-box {
    width: 100%;
    height: 32px;
    border: 2px solid #b91c1c;
    border-radius: 5px;
    background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%);
    font-family: 'Consolas', 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    font-size: 1.3rem;
    text-align: right;
    padding: 0 8px;
    line-height: 28px;
    text-shadow: 0 1px 0 #ffffff, 0 2px 3px rgba(153, 27, 27, 0.25);
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.9), inset 0 -2px 3px rgba(185, 28, 28, 0.18), 0 2px 4px rgba(0, 0, 0, 0.16);
}

/* Bottom Action Buttons (Exact match to Screenshot 2) */
.billing-actions-row {
    display: flex;
    gap: 3px;
    margin-top: 4px;
}

.billing-actions-row button {
    white-space: nowrap;
    padding: 0 3px;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-action-save {
    flex: 1 1 0%;
    height: 27px;
    background: #16a34a;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid #15803d;
    box-shadow: 1px 1px 0px #888;
    cursor: pointer;
    line-height: 25px;
    text-align: center;
    border-radius: 2px;
}
.btn-action-save:hover { background: #15803d; }

.btn-action-delete {
    flex: 1 1 0%;
    height: 27px;
    background: #dc2626;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid #b91c1c;
    box-shadow: 1px 1px 0px #888;
    cursor: pointer;
    line-height: 25px;
    text-align: center;
    border-radius: 2px;
}
.btn-action-delete:hover { background: #b91c1c; }

.btn-action-print {
    flex: 1 1 0%;
    height: 27px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid #000000;
    box-shadow: 1px 1px 0px #888;
    cursor: pointer;
    line-height: 25px;
    text-align: center;
    border-radius: 2px;
}
.btn-action-print:hover { background: #f8fafc; }

.btn-action-reset {
    flex: 1 1 0%;
    height: 27px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid #000000;
    box-shadow: 1px 1px 0px #888;
    cursor: pointer;
    line-height: 25px;
    text-align: center;
    border-radius: 2px;
}
.btn-action-reset:hover { background: #f8fafc; }

.btn-action-exit {
    flex: 1 1 0%;
    height: 27px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid #000000;
    box-shadow: 1px 1px 0px #888;
    cursor: pointer;
    line-height: 25px;
    text-align: center;
    border-radius: 2px;
}
.btn-action-exit:hover { background: #f8fafc; }
.btn-action-exit:active { box-shadow: inset 1px 1px 1px #888; }

/* Auxiliary Action Buttons Under Main Billing Actions */
.billing-aux-actions-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    margin-top: 5px;
    padding-top: 4px;
    border-top: 1px dashed #cbd5e1;
}

.btn-aux-action {
    height: 25px;
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.71rem;
    border: 1px solid #94a3b8;
    box-shadow: 1px 1px 0px #cbd5e1;
    cursor: pointer;
    line-height: 23px;
    text-align: center;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.btn-aux-action:hover {
    background: #e2e8f0;
    border-color: #64748b;
}
.btn-aux-action:active {
    box-shadow: inset 1px 1px 1px #94a3b8;
}

/* Full-Width Bottom Cyan Banner (Exact match to Screenshot 2) */
.today-collection-banner {
    background: #2dd4bf;
    color: #004d40;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 3px 8px;
    border: 1px solid #0d9488;
    border-radius: 2px;
    margin-top: 3px;
    margin-bottom: 0;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.side-summary-table-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.side-summary-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

.side-summary-table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border: 2px solid #f1f5f9;
}

.side-summary-table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.side-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
    white-space: nowrap;
}

.side-summary-table th, .side-summary-table td {
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    height: 26px;
    vertical-align: middle;
}

/* Dark Teal Header (Exact Match to Screenshot) */
.side-th-teal th {
    background-color: #005b5b !important;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    border: 1px solid #004343;
    position: sticky;
    top: 0;
    z-index: 3;
}

/* Navy Blue Total Row (Row 2 in Screenshot) */
.side-tr-navy-total td {
    background-color: #000080 !important;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid #000066;
    position: sticky;
    top: 26px;
    z-index: 2;
}

.side-summary-table tfoot .side-tr-navy-total td {
    position: sticky;
    bottom: 0;
    top: auto;
    z-index: 2;
}

.side-summary-table tbody tr {
    cursor: pointer;
    background-color: #ffffff;
    transition: background-color 0.1s ease;
}

.side-summary-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.side-summary-table tbody tr:hover {
    background-color: #e0f2fe !important;
}

.side-summary-table tbody tr.active-summary-bill {
    background-color: #fef08a !important;
    font-weight: 700;
}

/* DUAL 4x6 RECEIPT STYLING (MATCHING EXACT LAB PRINT FORMAT) */
.dual-receipt-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    color: #000;
}

.receipt-slip-box {
    width: 395px;
    max-width: 410px;
    min-width: 360px;
    min-height: 560px;
    height: 560px;
    border: 1.2px solid #000;
    padding: 12px 14px;
    box-sizing: border-box;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.receipt-slip-box.no-border {
    border: 1px dashed #94a3b8 !important;
    box-shadow: none !important;
}

.rcpt-field-switch,
.rcpt-field-switch + label {
    cursor: pointer;
}

@media (max-width: 768px) {
    .dual-receipt-wrapper {
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px !important;
        width: 100% !important;
    }
    .receipt-slip-box {
        width: 100% !important;
        max-width: 360px !important;
        min-height: auto !important;
        height: auto !important;
    }
}

.rcpt-copy-tag {
    font-size: 10px;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    padding: 1px 6px;
    margin-left: 6px;
    letter-spacing: 0.5px;
    display: inline-block;
}

.rcpt-page-num {
    font-size: 9px;
    color: #475569;
    font-weight: 700;
    margin-left: 3px;
    letter-spacing: 0.2px;
}

.dual-receipt-page {
    width: 100%;
    box-sizing: border-box;
}

.print-perforated-cut {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
    margin: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
}
.print-perforated-cut .cut-scissors {
    font-size: 13px;
}
.print-perforated-cut .cut-dashed-line {
    letter-spacing: 2px;
    font-family: monospace;
    opacity: 0.6;
}
.print-perforated-cut .cut-text {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 9.5px;
    letter-spacing: 0.5px;
    padding: 0 4px;
}

.receipt-top-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    line-height: 1.1;
    margin-bottom: 2px;
}

.rcpt-lbl {
    flex: 1;
    text-align: left;
    font-size: 11px;
    font-weight: 500;
}

.rcpt-paymode {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.rcpt-daycount {
    flex: 1;
    text-align: right;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.receipt-center-hdr {
    text-align: center;
    margin-top: 1px;
    margin-bottom: 3px;
}

.clinic-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.15;
}

.clinic-loc {
    font-size: 10px;
    font-weight: 500;
    color: #111;
    line-height: 1.15;
}

.rcpt-dotted-line {
    border-top: 1px dotted #333;
    margin: 3px 0;
}

.rcpt-solid-line {
    border-top: 0.8px solid #000;
    margin: 3px 0;
}

.rcpt-meta-tbl {
    width: 100%;
    font-size: 10px;
    border-collapse: collapse;
    line-height: 1.25;
}

.rcpt-meta-tbl td {
    padding: 0.5px 0;
    vertical-align: top;
}

.rcpt-items-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    margin: 2px 0;
}

.rcpt-items-hdr th {
    padding: 2px 0;
    font-weight: bold;
    font-size: 10px;
    border-bottom: 0.8px solid #000;
}

.rcpt-tbl-dotted-sep {
    border-top: 1px dotted #000;
    padding: 0;
    height: 1px;
}

.rcpt-items-body {
    min-height: 130px;
}

.rcpt-items-body td {
    padding: 2px 0;
    line-height: 1.2;
}

.rcpt-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: auto;
    padding-top: 3px;
}

.rcpt-footer-left {
    width: 50%;
    font-size: 9.5px;
}

.rcpt-words {
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.rcpt-paid-due-box {
    border: 0.8px solid #000;
    padding: 3px 6px;
    width: 100%;
    max-width: 130px;
    font-size: 10px;
    box-sizing: border-box;
    line-height: 1.25;
}

.rcpt-footer-right {
    width: 48%;
    font-size: 10px;
    text-align: right;
}

.rcpt-totals-tbl {
    line-height: 1.3;
}

.rcpt-signatory {
    margin-top: 18px;
    font-size: 9.5px;
    font-weight: 500;
    text-align: right;
}

/* PAYMENT MODE CHOICES */
.pay-mode-choice-btn {
    border-width: 1.5px;
    border-radius: 8px;
    transition: all 0.15s ease-in-out;
}

.pay-mode-choice-btn:hover, .pay-mode-choice-btn:focus {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
}

/* PRINT INVOICE STYLING (A4 PORTRAIT) */
@media print {
    :root, html, body {
        color-scheme: only light !important;
        supported-color-schemes: light !important;
    }
    @page {
        size: A4 portrait;
        margin-top: 1mm !important;
        margin-right: 4mm !important;
        margin-bottom: 0mm !important;
        margin-left: 4mm !important;
        margin: 1mm 4mm 0mm 4mm !important;
    }
    *, *::before, *::after {
        box-shadow: none !important;
        text-shadow: none !important;
        color-scheme: only light !important;
    }
    html, body {
        width: 210mm !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        background-color: #ffffff !important;
        color: #000000 !important;
        font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    body {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    body * {
        visibility: hidden !important;
    }
    #printableReceiptModal, #printableReceiptModal *,
    #mobilePrintArea, #mobilePrintArea *,
    body.printing-report #mobilePrintArea, body.printing-report #mobilePrintArea * {
        visibility: visible !important;
    }
    body.printing-report {
        background: #ffffff !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;
        z-index: 9999999 !important;
    }
    body.printing-report #printableReceiptModal {
        display: none !important;
        visibility: hidden !important;
    }
    #printableReceiptModal {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        width: 202mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        background: #fff !important;
        display: block !important;
    }
    #printableReceiptModal .modal-dialog-centered,
    .modal-dialog-centered {
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
        align-items: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
    #printableReceiptModal .modal-dialog {
        display: block !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        transform: none !important;
    }
    #printableReceiptModal .modal-content {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }
    #printableReceiptModal .modal-body {
        margin: 0 !important;
        padding: 0 !important;
    }
    .dual-receipt-wrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 202mm !important;
        max-width: 202mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        gap: 4mm !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .receipt-slip-box {
        width: 98mm !important;
        max-width: 98mm !important;
        min-width: 98mm !important;
        height: 148mm !important;
        min-height: 148mm !important;
        max-height: 148mm !important;
        margin-top: 0 !important;
        padding: 2.5mm 3.5mm !important;
        border: 1px solid #000 !important;
        box-sizing: border-box !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        background: #fff !important;
        overflow: hidden !important;
    }
    .receipt-slip-box.no-border {
        border: none !important;
        box-shadow: none !important;
    }
    .receipt-top-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: baseline !important;
        line-height: 1.1 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 1.5mm !important;
    }
    .rcpt-lbl {
        flex: 1 !important;
        text-align: left !important;
        font-size: 10px !important;
        font-weight: 500 !important;
    }
    .rcpt-paymode {
        flex: 1 !important;
        text-align: center !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
        text-transform: uppercase !important;
    }
    .rcpt-daycount {
        flex: 1 !important;
        text-align: right !important;
        font-size: 15px !important;
        font-weight: 900 !important;
        line-height: 1 !important;
    }
    .receipt-center-hdr {
        text-align: center !important;
        margin-top: 1px !important;
        margin-bottom: 2mm !important;
    }
    .clinic-title {
        font-family: 'Times New Roman', Times, serif !important;
        font-size: 13.5px !important;
        font-weight: 900 !important;
        letter-spacing: 0.2px !important;
        text-transform: uppercase !important;
        line-height: 1.1 !important;
    }
    .clinic-loc {
        font-size: 9px !important;
        font-weight: 500 !important;
        color: #111 !important;
        line-height: 1.1 !important;
    }
    .rcpt-dotted-line {
        border-top: 1px dotted #333 !important;
        margin: 2mm 0 !important;
    }
    .rcpt-solid-line {
        border-top: 0.8px solid #000 !important;
        margin: 2mm 0 !important;
    }
    .rcpt-meta-tbl {
        width: 100% !important;
        font-size: 9px !important;
        border-collapse: collapse !important;
        line-height: 1.22 !important;
    }
    .rcpt-meta-tbl td {
        padding: 0.3mm 0 !important;
        vertical-align: top !important;
    }
    .rcpt-items-tbl {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 9px !important;
        margin: 1.5mm 0 !important;
    }
    .rcpt-items-hdr th {
        padding: 1.5mm 0 !important;
        font-weight: bold !important;
        font-size: 9px !important;
        border-bottom: 0.8px solid #000 !important;
    }
    .rcpt-items-body td {
        padding: 1mm 0 !important;
        line-height: 1.18 !important;
    }
    .rcpt-footer-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        margin-top: auto !important;
        padding-top: 2mm !important;
    }
    .rcpt-footer-left {
        width: 50% !important;
        font-size: 8.5px !important;
    }
    .rcpt-words {
        font-size: 8px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        line-height: 1.15 !important;
        margin-bottom: 2mm !important;
        word-wrap: break-word !important;
    }
    .rcpt-paid-due-box {
        border: 0.8px solid #000 !important;
        padding: 2mm 2.5mm !important;
        width: 100% !important;
        max-width: 120px !important;
        font-size: 9px !important;
        box-sizing: border-box !important;
        line-height: 1.2 !important;
    }
    .rcpt-footer-right {
        width: 48% !important;
        font-size: 9px !important;
        text-align: right !important;
    }
    .rcpt-totals-tbl {
        line-height: 1.2 !important;
    }
    .rcpt-signatory {
        margin-top: 14mm !important;
        font-size: 9px !important;
        font-weight: 500 !important;
        text-align: right !important;
    }
    .print-perforated-cut, .no-print, .btn, .modal-header, .modal-footer {
        display: none !important;
    }
}

/* QUICK MASTER CARDS STYLING */
.hover-elevate {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.hover-elevate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}
.master-card-item .card {
    border-radius: 6px;
    background: #ffffff;
}
.cursor-pointer {
    cursor: pointer;
}

/* PRINT CONFIRMATION PROMPT MODAL STYLES */
#printConfirmPromptModal .modal-content {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25) !important;
    animation: promptModalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes promptModalScale {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#btnPromptPrintYes:focus {
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.4) !important;
    transform: scale(1.03);
    outline: none;
}

#btnPromptPrintNo:focus {
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.4) !important;
    transform: scale(1.03);
    outline: none;
}

/* ========================================================
   BILLING TEST DROPDOWN AUTOCOMPLETE POPUP (MAX 15 TESTS)
   ======================================================== */
.billing-test-dropdown-popup {
    background: #ffffff;
    border: 1.5px solid #2563eb;
    border-radius: 6px;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.28), 0 8px 12px -6px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: inherit;
    animation: fadeInDownFast 0.12s ease-out;
}

@keyframes fadeInDownFast {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.test-dropdown-header {
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: #334155;
    font-weight: 600;
}

.test-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 2px 0;
}

.test-dropdown-item {
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid #cbd5e1; /* Ek line ki copy jesi crisp divider line */
    transition: background 0.08s ease, color 0.08s ease;
    display: flex;
    align-items: center;
    font-size: 0.82rem;
    background-color: #ffffff;
}

.test-dropdown-item:nth-child(even) {
    background-color: #f8fafc;
}

.test-dropdown-item:hover,
.test-dropdown-item.selected {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.test-dropdown-item.selected .test-item-name,
.test-dropdown-item:hover .test-item-name {
    color: #ffffff !important;
}

.test-dropdown-item.selected .test-item-rate,
.test-dropdown-item:hover .test-item-rate {
    color: #fef08a !important; /* bright gold text on blue */
}

.test-dropdown-item.selected .badge,
.test-dropdown-item:hover .badge {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* HIGH-CONTRAST STOCK & OUTSOURCE BADGES (Always visible across Light, Dark & Monochrome themes) */
.badge.inv-stock-pill-ok,
.billing-test-dropdown-popup .badge.inv-stock-pill-ok,
body.listing-theme-black .billing-test-dropdown-popup .badge.inv-stock-pill-ok,
body.listing-theme-monochrome .billing-test-dropdown-popup .badge.inv-stock-pill-ok {
    background: #16a34a !important;
    color: #ffffff !important;
    border: 1px solid #4ade80 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.45) !important;
}
.badge.inv-stock-pill-low,
.billing-test-dropdown-popup .badge.inv-stock-pill-low,
body.listing-theme-black .billing-test-dropdown-popup .badge.inv-stock-pill-low,
body.listing-theme-monochrome .billing-test-dropdown-popup .badge.inv-stock-pill-low {
    background: #f59e0b !important;
    color: #000000 !important;
    border: 1px solid #fde047 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.65) !important;
}
.badge.inv-stock-pill-out,
.billing-test-dropdown-popup .badge.inv-stock-pill-out,
body.listing-theme-black .billing-test-dropdown-popup .badge.inv-stock-pill-out,
body.listing-theme-monochrome .billing-test-dropdown-popup .badge.inv-stock-pill-out {
    background: #dc2626 !important;
    color: #ffffff !important;
    border: 1px solid #fca5a5 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.65) !important;
}
.badge.inv-outsource-pill,
.billing-test-dropdown-popup .badge.inv-outsource-pill,
body.listing-theme-black .billing-test-dropdown-popup .badge.inv-outsource-pill,
body.listing-theme-monochrome .billing-test-dropdown-popup .badge.inv-outsource-pill {
    background: #7c3aed !important;
    color: #ffffff !important;
    border: 1px solid #c4b5fd !important;
    font-weight: 700 !important;
}

tr.billing-row-outsourced td {
    background-color: #f5f3ff !important;
}
tr.billing-row-outsourced input.row-test-name {
    color: #5b21b6 !important;
}

.btn-edit-test {
    background-color: #fef3c7 !important;
    border: 1px solid #f59e0b !important;
    color: #92400e !important;
    border-radius: 3px;
    padding: 1px 6px !important;
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
    transition: all 0.12s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.btn-edit-test:hover {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

.row-test-clear-btn {
    background-color: #fee2e2 !important;
    border: 1px solid #f87171 !important;
    color: #dc2626 !important;
    border-radius: 3px !important;
    padding: 0 4px !important;
    height: 20px !important;
    line-height: 1 !important;
    font-size: 0.72rem !important;
    cursor: pointer;
    transition: all 0.12s ease;
}

.row-test-clear-btn:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

.row-test-edit-btn {
    background-color: #fef3c7 !important;
    border: 1px solid #fbbf24 !important;
    color: #b45309 !important;
    border-radius: 3px !important;
    padding: 0 4px !important;
    height: 20px !important;
    line-height: 1 !important;
    font-size: 0.72rem !important;
    cursor: pointer;
    transition: all 0.12s ease;
}

.row-test-edit-btn:hover {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

.test-dropdown-item.selected .btn-edit-test,
.test-dropdown-item:hover .btn-edit-test {
    background-color: #ffffff !important;
    border-color: #ffffff !important;
    color: #0369a1 !important;
}

.test-dropdown-item.selected .btn-edit-test:hover,
.test-dropdown-item:hover .btn-edit-test:hover {
    background-color: #fef08a !important;
    color: #854d0e !important;
}

.test-dropdown-empty {
    padding: 14px 10px;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
}

.test-match-highlight {
    background: rgba(254, 240, 138, 0.6);
    color: #000;
    border-radius: 2px;
    padding: 0 1px;
}
.test-dropdown-item.selected .test-match-highlight,
.test-dropdown-item:hover .test-match-highlight {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* ========================================================
   DOCTOR DROPDOWN TWO-LINE CLEAN CARD STYLES
   ======================================================== */
.doc-dropdown-item {
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid #cbd5e1; /* Ruled copy divider line */
    transition: background 0.08s ease, color 0.08s ease;
    background-color: #ffffff;
}

.doc-dropdown-item:nth-child(even) {
    background-color: #f8fafc;
}

.doc-dropdown-item:hover,
.doc-dropdown-item.selected {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.doc-dropdown-item.selected .doc-item-title,
.doc-dropdown-item:hover .doc-item-title {
    color: #ffffff !important;
}

.doc-dropdown-item.selected .doc-item-title i,
.doc-dropdown-item:hover .doc-item-title i {
    color: #fef08a !important;
}

.doc-dropdown-item.selected .doc-item-meta,
.doc-dropdown-item:hover .doc-item-meta {
    color: #e0f2fe !important;
}

.doc-dropdown-item.selected .badge,
.doc-dropdown-item:hover .badge {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.doc-dropdown-item.selected .text-muted,
.doc-dropdown-item:hover .text-muted {
    color: #e0f2fe !important;
}

.doc-dropdown-item.selected .test-match-highlight,
.doc-dropdown-item:hover .test-match-highlight {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* ========================================================
   LAB TO LAB DROPDOWN ITEM STYLES
   ======================================================== */
.ltl-dropdown-item {
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid #cbd5e1;
    transition: background 0.08s ease, color 0.08s ease;
    background-color: #ffffff;
}

.ltl-dropdown-item:nth-child(even) {
    background-color: #f8fafc;
}

.ltl-dropdown-item:hover,
.ltl-dropdown-item.selected {
    background: #1e40af !important;
    color: #ffffff !important;
}

.ltl-dropdown-item.selected .ltl-item-title,
.ltl-dropdown-item:hover .ltl-item-title {
    color: #ffffff !important;
}

.ltl-dropdown-item.selected .ltl-item-title i,
.ltl-dropdown-item:hover .ltl-item-title i {
    color: #fef08a !important;
}

.ltl-dropdown-item.selected .ltl-item-meta,
.ltl-dropdown-item:hover .ltl-item-meta {
    color: #e0e7ff !important;
}

.ltl-dropdown-item.selected .badge,
.ltl-dropdown-item:hover .badge {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.ltl-dropdown-item.selected .text-muted,
.ltl-dropdown-item:hover .text-muted {
    color: #e0e7ff !important;
}

.ltl-dropdown-item.selected .test-match-highlight,
.ltl-dropdown-item:hover .test-match-highlight {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* ========================================================
   PATIENT DROPDOWN TWO-LINE CLEAN CARD STYLES
   ======================================================== */
.pat-dropdown-item {
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid #cbd5e1;
    transition: background 0.08s ease, color 0.08s ease;
    background-color: #ffffff;
}
.pat-dropdown-item:nth-child(even) {
    background-color: #f8fafc;
}
.pat-dropdown-item:hover,
.pat-dropdown-item.selected {
    background: #0284c7 !important;
    color: #ffffff !important;
}
.pat-dropdown-item.selected .pat-item-title,
.pat-dropdown-item:hover .pat-item-title {
    color: #ffffff !important;
}
.pat-dropdown-item.selected .pat-item-title i,
.pat-dropdown-item:hover .pat-item-title i {
    color: #fef08a !important;
}
.pat-dropdown-item.selected .pat-item-meta,
.pat-dropdown-item:hover .pat-item-meta {
    color: #e0f2fe !important;
}
.pat-dropdown-item.selected .badge,
.pat-dropdown-item:hover .badge {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* ========================================================
   USER SETTING FOR LISTING: EXECUTIVE OBSIDIAN DARK PRO
   (Professional Dark Mode - Eye-Comfort & Modern Typography)
   ======================================================== */
body.listing-theme-black .billing-test-dropdown-popup {
    background: #0f172a !important; /* Deep Obsidian Slate */
    border: 1.5px solid #334155 !important;
    border-radius: 8px !important;
    box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    overflow: hidden !important;
    font-family: inherit;
}

body.listing-theme-black .test-dropdown-header {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom: 1px solid #334155 !important;
    padding: 6px 12px !important;
    color: #f8fafc !important;
    font-size: 0.74rem !important;
}
body.listing-theme-black .test-dropdown-header span,
body.listing-theme-black .test-dropdown-header b {
    color: #ffffff !important;
}
body.listing-theme-black .test-dropdown-header small {
    color: #94a3b8 !important;
}

body.listing-theme-black .test-dropdown-list {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0f172a;
}
body.listing-theme-black .test-dropdown-list::-webkit-scrollbar {
    width: 6px;
}
body.listing-theme-black .test-dropdown-list::-webkit-scrollbar-track {
    background: #0f172a;
}
body.listing-theme-black .test-dropdown-list::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* Dropdown Rows: Rich Obsidian with 1px hairline divider */
body.listing-theme-black .test-dropdown-item,
body.listing-theme-black .doc-dropdown-item,
body.listing-theme-black .ltl-dropdown-item,
body.listing-theme-black .pat-dropdown-item {
    background-color: #0f172a !important;
    color: #ffffff !important;
    border-bottom: 1px solid #1e293b !important;
    border-left: 3.5px solid transparent !important;
    padding: 7px 12px !important;
    transition: background 0.08s ease, border-color 0.08s ease !important;
}

body.listing-theme-black .test-dropdown-item:nth-child(even),
body.listing-theme-black .doc-dropdown-item:nth-child(even),
body.listing-theme-black .ltl-dropdown-item:nth-child(even),
body.listing-theme-black .pat-dropdown-item:nth-child(even) {
    background-color: #141f32 !important; /* Gentle dark alternation */
}

/* Keyboard Selected & Hover Row: Sleek Royal Blue Gradient with Cyan Accent Bar */
body.listing-theme-black .test-dropdown-item:hover,
body.listing-theme-black .test-dropdown-item.selected,
body.listing-theme-black .doc-dropdown-item:hover,
body.listing-theme-black .doc-dropdown-item.selected,
body.listing-theme-black .ltl-dropdown-item:hover,
body.listing-theme-black .ltl-dropdown-item.selected,
body.listing-theme-black .pat-dropdown-item:hover,
body.listing-theme-black .pat-dropdown-item.selected {
    background: linear-gradient(90deg, #1e3a8a 0%, #1e40af 100%) !important;
    border-left: 3.5px solid #38bdf8 !important; /* Luminous Cyan indicator */
    color: #ffffff !important;
}

/* Titles / Record Names: Pure Crisp White with smooth weight */
body.listing-theme-black .test-item-name,
body.listing-theme-black .doc-item-title,
body.listing-theme-black .ltl-item-title,
body.listing-theme-black .pat-item-title {
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
}
body.listing-theme-black .doc-item-title i,
body.listing-theme-black .pat-item-title i {
    color: #38bdf8 !important;
}

body.listing-theme-black .test-dropdown-item.selected .test-item-name,
body.listing-theme-black .test-dropdown-item:hover .test-item-name,
body.listing-theme-black .doc-dropdown-item.selected .doc-item-title,
body.listing-theme-black .doc-dropdown-item:hover .doc-item-title,
body.listing-theme-black .ltl-dropdown-item.selected .ltl-item-title,
body.listing-theme-black .ltl-dropdown-item:hover .ltl-item-title,
body.listing-theme-black .pat-dropdown-item.selected .pat-item-title,
body.listing-theme-black .pat-dropdown-item:hover .pat-item-title {
    color: #ffffff !important;
}

/* Rates & Amounts: Modern Mint Emerald on dark, Warm Gold on active */
body.listing-theme-black .test-item-rate {
    color: #34d399 !important; /* Mint Emerald */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
}
body.listing-theme-black .test-dropdown-item.selected .test-item-rate,
body.listing-theme-black .test-dropdown-item:hover .test-item-rate {
    color: #fde047 !important; /* Soft Champagne Gold */
}

/* Secondary Meta: Soft Slate / Platinum */
body.listing-theme-black .doc-item-meta,
body.listing-theme-black .ltl-item-meta,
body.listing-theme-black .pat-item-meta,
body.listing-theme-black .billing-test-dropdown-popup .text-muted {
    color: #94a3b8 !important;
    font-size: 0.72rem !important;
}

/* Glassmorphic Dark Badges */
body.listing-theme-black .billing-test-dropdown-popup .badge {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
}
body.listing-theme-black .billing-test-dropdown-popup .selected .badge,
body.listing-theme-black .billing-test-dropdown-popup :hover .badge {
    background-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Search match highlights: Elegant subtle amber pill */
body.listing-theme-black .test-match-highlight {
    background: rgba(245, 158, 11, 0.25) !important;
    color: #fde047 !important;
    border-bottom: 2px solid #f59e0b !important;
    font-weight: 700 !important;
    border-radius: 2px !important;
    padding: 0 2px !important;
}

/* Empty search result */
body.listing-theme-black .test-dropdown-empty {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

/* Edit button inside test row */
body.listing-theme-black .btn-edit-test {
    background-color: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #fde68a !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
}
body.listing-theme-black .btn-edit-test i,
body.listing-theme-black .btn-edit-test span {
    color: #fde68a !important;
}
body.listing-theme-black .btn-edit-test:hover {
    background-color: #f59e0b !important;
    color: #000000 !important;
}
body.listing-theme-black .btn-edit-test:hover i,
body.listing-theme-black .btn-edit-test:hover span {
    color: #000000 !important;
}

/* Universal High-Contrast Table & Modal Grid Guards */
#billingHistoryTable,
#packageBillTable,
#packageBillTestsTable,
#findBillByNoModal table,
#billingItemsTable,
#sideSummaryTable,
.table-excel-grid,
.table {
    background-color: #ffffff !important;
}

#billingHistoryTable tbody td,
#packageBillTable tbody td,
#packageBillTestsTable tbody td,
#findBillByNoModal table tbody td,
#billingItemsTable tbody td,
#sideSummaryTable tbody td,
.table tbody td {
    color: #0f172a !important;
    background-color: #ffffff;
}

#billingHistoryTable tbody tr:nth-child(even) td,
#packageBillTable tbody tr:nth-child(even) td,
#packageBillTestsTable tbody tr:nth-child(even) td,
.table tbody tr:nth-child(even) td {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

#billingHistoryTable tbody tr:hover td,
#packageBillTable tbody tr:hover td,
#packageBillTestsTable tbody tr:hover td,
#findBillByNoModal table tbody tr:hover td,
.table tbody tr:hover td {
    background-color: #e0f2fe !important;
    color: #0f172a !important;
}

#billingHistoryTable tbody tr.selected-row td {
    background-color: #fef08a !important;
    color: #0f172a !important;
}

#billingHistoryTable td.text-primary,
#billingHistoryTable td .text-primary {
    color: #0d6efd !important;
}

#billingHistoryTable td.text-success,
#billingHistoryTable td .text-success {
    color: #16a34a !important;
}

#billingHistoryTable td.text-danger,
#billingHistoryTable td .text-danger {
    color: #dc2626 !important;
}

#billingHistoryTable td.text-secondary,
#billingHistoryTable td.text-muted,
#billingHistoryTable td .text-secondary,
#billingHistoryTable td .text-muted {
    color: #475569 !important;
}

#billingHistoryTable td.text-dark,
#billingHistoryTable td .text-dark {
    color: #0f172a !important;
}

/* Sales Statement & Cash Reconciliation Contrast Guards */
.sales-statement-view .table-excel-grid thead th,
.sales-statement-view .table-excel-grid thead th span,
.sales-statement-view .table-excel-grid thead th * {
    color: #0f172a !important;
}

.sales-reconciliation-header,
.sales-reconciliation-header span,
.sales-reconciliation-header i {
    color: #0f172a !important;
}

body.listing-theme-black #quickTestPickerGrid .card {
    background: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid #1e293b !important;
}
body.listing-theme-black #quickTestPickerGrid .card:hover {
    border-color: #38bdf8 !important;
    background: #141f32 !important;
}
body.listing-theme-black #quickTestPickerGrid .card.border-primary {
    background: #1e3a8a !important;
    border-color: #38bdf8 !important;
}
body.listing-theme-black #quickTestPickerGrid .card .fw-bold {
    color: #ffffff !important;
}

/* ========================================================
   USER SETTING FOR LISTING: PURE MONOCHROME B&W
   (High-Contrast Pure Black & Pure White - Minimalist)
   ======================================================== */
body.listing-theme-monochrome .billing-test-dropdown-popup {
    background: #000000 !important;
    border: 1.5px solid #4b5563 !important;
    border-radius: 6px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8) !important;
}
body.listing-theme-monochrome .test-dropdown-header {
    background: #111827 !important;
    border-bottom: 1px solid #374151 !important;
    color: #ffffff !important;
}
body.listing-theme-monochrome .test-dropdown-header span,
body.listing-theme-monochrome .test-dropdown-header b {
    color: #ffffff !important;
}
body.listing-theme-monochrome .test-dropdown-item,
body.listing-theme-monochrome .doc-dropdown-item,
body.listing-theme-monochrome .ltl-dropdown-item,
body.listing-theme-monochrome .pat-dropdown-item {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #27272a !important;
    border-left: 3px solid transparent !important;
    padding: 7px 12px !important;
}
body.listing-theme-monochrome .test-dropdown-item:nth-child(even),
body.listing-theme-monochrome .doc-dropdown-item:nth-child(even),
body.listing-theme-monochrome .ltl-dropdown-item:nth-child(even),
body.listing-theme-monochrome .pat-dropdown-item:nth-child(even) {
    background-color: #09090b !important;
}
body.listing-theme-monochrome .test-dropdown-item:hover,
body.listing-theme-monochrome .test-dropdown-item.selected,
body.listing-theme-monochrome .doc-dropdown-item:hover,
body.listing-theme-monochrome .doc-dropdown-item.selected,
body.listing-theme-monochrome .ltl-dropdown-item:hover,
body.listing-theme-monochrome .ltl-dropdown-item.selected,
body.listing-theme-monochrome .pat-dropdown-item:hover,
body.listing-theme-monochrome .pat-dropdown-item.selected {
    background: #27272a !important;
    color: #ffffff !important;
    border-left: 3px solid #ffffff !important;
}
body.listing-theme-monochrome .test-item-name,
body.listing-theme-monochrome .doc-item-title,
body.listing-theme-monochrome .ltl-item-title,
body.listing-theme-monochrome .pat-item-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}
body.listing-theme-monochrome .test-item-rate {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-family: monospace !important;
}
body.listing-theme-monochrome .doc-item-meta,
body.listing-theme-monochrome .ltl-item-meta,
body.listing-theme-monochrome .pat-item-meta,
body.listing-theme-monochrome .billing-test-dropdown-popup .text-muted {
    color: #a1a1aa !important;
}
body.listing-theme-monochrome .billing-test-dropdown-popup .badge {
    background: #18181b !important;
    color: #ffffff !important;
    border: 1px solid #3f3f46 !important;
}
body.listing-theme-monochrome .test-match-highlight {
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: bold;
}

/* Card hover inside User Setting For Listing Modal */
.listing-theme-card:hover {
    border-color: #2563eb !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15) !important;
}

/* ========================================================
   LINER GRID SCHEME THEMES (B2B, RGHS, MAA VOUCHER)
   ======================================================== */
.liner-table-wrapper.b2b-active-mode {
    border: 2px solid #2563eb !important;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.25) !important;
}
.liner-table-wrapper.b2b-active-mode #billingItemsTable thead th {
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    border-color: #1e3a8a !important;
}
.liner-table-wrapper.b2b-active-mode #billingItemsTable tbody tr:hover td {
    background-color: #e0e7ff !important;
}

.liner-table-wrapper.rghs-active-mode {
    border: 2px solid #dc2626 !important;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.25) !important;
}
.liner-table-wrapper.rghs-active-mode #billingItemsTable thead th {
    background: linear-gradient(180deg, #991b1b 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border-color: #7f1d1d !important;
}
.liner-table-wrapper.rghs-active-mode #billingItemsTable tbody tr:hover td {
    background-color: #fee2e2 !important;
}

.liner-table-wrapper.maa-active-mode {
    border: 2px solid #d97706 !important;
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.25) !important;
}
.liner-table-wrapper.maa-active-mode #billingItemsTable thead th {
    background: linear-gradient(180deg, #b45309 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border-color: #92400e !important;
}
.liner-table-wrapper.maa-active-mode #billingItemsTable tbody tr:hover td {
    background-color: #fef3c7 !important;
}

.liner-mode-banner {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    animation: fadeInModeBanner 0.15s ease-in-out;
}
@keyframes fadeInModeBanner {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   MOBILE & TABLET SLIDE-BAR RESPONSIVE LAYOUT (<= 992px)
   STRICT RULE: Only applies to mobile devices, tablets & narrow windows.
   PC / Laptop full layout (width > 992px) is 100% UNTOUCHED and fully preserved.
   ============================================================================ */
@media (max-width: 992px) {
    /* 1. App Header & Top Navigation Bar: Smooth Horizontal Slide Bar */
    .top-nav-bar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 5px 8px !important;
        gap: 8px !important;
        scrollbar-width: thin !important;
        scrollbar-color: #0284c7 #0f172a !important;
    }
    .top-nav-bar > * {
        flex-shrink: 0 !important;
    }
    .main-menu-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        gap: 5px !important;
    }
    .main-menu-nav > * {
        flex-shrink: 0 !important;
    }
    .top-nav-btn, .menu-btn {
        padding: 5px 9px !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .top-nav-bar .brand-badge {
        width: 32px !important;
        height: 32px !important;
    }
    .top-nav-bar .brand-title {
        font-size: 0.95rem !important;
        white-space: nowrap !important;
    }
    .top-nav-bar small {
        display: none !important; /* Hide long subtitle on mobile/narrow screen to save slide width */
    }
    .top-nav-btn-fullscreen,
    .top-nav-btn-showcase,
    #liveClock {
        display: none !important;
    }
    #modeStatusBadge {
        padding: 4px 8px !important;
    }
    #modeStatusText {
        font-size: 0.68rem !important;
    }

    /* Fixed positioned full-width mobile dropdown sheet for top menus */
    .main-menu-nav .dropdown-menu.show {
        position: fixed !important;
        top: 48px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        z-index: 99999 !important;
        box-shadow: 0 12px 30px rgba(0,0,0,0.6) !important;
        border-radius: 8px !important;
    }

    /* Top Nav Slide Bar Custom Scrollbar */
    .top-nav-bar::-webkit-scrollbar {
        height: 5px !important;
    }
    .top-nav-bar::-webkit-scrollbar-track {
        background: #0f172a !important;
        border-radius: 4px !important;
    }
    .top-nav-bar::-webkit-scrollbar-thumb {
        background: #0284c7 !important;
        border-radius: 4px !important;
    }

    /* 2. Sub-Toolbar & Shortcuts: Smooth Horizontal Slide Bar */
    .sub-toolbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 4px 8px !important;
        gap: 8px !important;
        scrollbar-width: thin !important;
        scrollbar-color: #3b82f6 #f1f5f9 !important;
    }
    .sub-toolbar > * {
        flex-shrink: 0 !important;
    }
    .sub-toolbar .d-flex {
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
        gap: 6px !important;
    }
    .sub-toolbar .btn-group {
        flex-shrink: 0 !important;
    }
    #billingHeaderActions {
        display: none !important; /* Hide keyboard shortcut text on mobile to avoid clutter */
    }
    .pc-quick-ops-bar {
        display: none !important;
    }

    /* Sub Toolbar Slide Bar Custom Scrollbar */
    .sub-toolbar::-webkit-scrollbar {
        height: 5px !important;
    }
    .sub-toolbar::-webkit-scrollbar-track {
        background: #e2e8f0 !important;
        border-radius: 4px !important;
    }
    .sub-toolbar::-webkit-scrollbar-thumb {
        background: #3b82f6 !important;
        border-radius: 4px !important;
    }

    /* 3. Lab Billing Screen */
    .billing-container {
        height: auto !important;
        min-height: auto !important;
        padding: 4px 2px !important;
        overflow: visible !important;
    }
    .billing-split-wrapper {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .billing-main-pane {
        width: 100% !important;
        flex: none !important;
    }
    .side-billing-summary-panel {
        width: 100% !important;
        flex: none !important;
    }

    /* Patient Header Grid Table on Mobile */
    .patient-header-grid {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 6px !important;
    }
    .patient-header-grid tbody {
        display: table !important;
        min-width: 620px !important;
    }
    .patient-header-grid td {
        padding: 4px 6px !important;
        font-size: 13px !important;
    }
    .patient-header-grid input,
    .patient-header-grid select {
        height: 30px !important;
        font-size: 13px !important;
        padding: 2px 6px !important;
    }

    /* Test Grid (Liner) on Mobile */
    .liner-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: 48vh !important;
        min-height: 180px !important;
        border: 1.5px solid #2563eb !important;
        border-radius: 6px !important;
    }
    .liner-table {
        min-width: 650px !important;
    }
    .liner-table th, .liner-table td {
        padding: 6px 8px !important;
        font-size: 13px !important;
    }
    .liner-table input, .liner-table select {
        height: 28px !important;
        font-size: 13px !important;
    }

    /* Liner Bottom Controls on Mobile */
    .liner-bottom-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
    }
    .liner-bottom-controls > .d-flex {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .liner-btn-retro {
        flex: 1 1 calc(33% - 4px) !important;
        text-align: center !important;
        padding: 7px 6px !important;
        font-size: 12px !important;
    }

    /* Side Summary Table & Settlement on Mobile */
    .side-summary-table-container {
        max-height: 220px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .side-summary-table {
        min-width: 560px !important;
    }
    .settlement-grid {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .settlement-left-col, .settlement-right-col {
        width: 100% !important;
    }
    .settlement-paid-input {
        height: 42px !important;
        font-size: 18px !important;
    }
    .net-red-box {
        height: 42px !important;
        font-size: 22px !important;
    }
    .settlement-due-box {
        height: 38px !important;
        font-size: 18px !important;
    }
    .billing-actions-row {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    .billing-actions-row button {
        padding: 10px 4px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        height: auto !important;
    }
    .billing-aux-actions-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    .billing-aux-actions-row button {
        flex: 1 1 calc(50% - 4px) !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
    }

    /* 4. Lab Billing Reports Screen on Mobile */
    .lab-billing-reports-view {
        padding: 6px 4px !important;
    }
    .lab-billing-reports-view .card-header .d-flex {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .lab-billing-reports-view .btn-group {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        scrollbar-width: none !important;
    }
    .lab-billing-reports-view .btn-group::-webkit-scrollbar {
        display: none !important;
    }
    .lab-billing-reports-view .btn-group button {
        flex: 1 0 auto !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    #docRepKpiContainer {
        margin-bottom: 8px !important;
    }
    #docRepKpiContainer .col-6 {
        padding: 3px !important;
    }
    #docRepKpiContainer .card {
        padding: 8px 6px !important;
    }
    #docRepKpiContainer .fs-5 {
        font-size: 1.05rem !important;
    }
    #docRepKpiContainer .fs-6 {
        font-size: 0.9rem !important;
    }
    #docRepTableContainer {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        border-radius: 6px !important;
    }
    .table-excel-grid {
        min-width: 820px !important;
    }
    .table-excel-grid thead th {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
    .table-excel-grid tbody td {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
    #docRepNatureFilterBar {
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 4px 2px !important;
        scrollbar-width: none !important;
    }
    #docRepNatureFilterBar::-webkit-scrollbar {
        display: none !important;
    }

    /* 5. Modals on Mobile */
    .modal-dialog {
        margin: 8px auto !important;
        max-width: 96vw !important;
        width: 96vw !important;
    }
    .modal-content {
        border-radius: 12px !important;
    }
    .modal-header {
        padding: 10px 14px !important;
    }
    .modal-body {
        padding: 12px 14px !important;
        max-height: calc(100vh - 140px) !important;
        overflow-y: auto !important;
    }
    .modal-footer {
        padding: 8px 12px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    .modal-footer button {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    #editReportTestModal .modal-dialog,
    #editClubBillModal .modal-dialog,
    #findBillModal .modal-dialog {
        max-width: 96vw !important;
        margin: 10px auto !important;
    }
    #editReportTestModal input,
    #editReportTestModal select {
        height: 38px !important;
        font-size: 15px !important;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .brand-title {
        font-size: 0.95rem !important;
    }
    .top-nav-btn span, .menu-btn span {
        font-size: 0.72rem !important;
    }
    .billing-actions-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    #btnSaveBillPrimary {
        grid-column: span 2 !important;
    }
}




/* ==========================================================================
   Sales Statement & Daily Cash Reconciliation View Styles
   ========================================================================== */
.sales-statement-view {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.sales-statement-view .table-excel-grid,
.ledger-statement-view .table-excel-grid {
    border-collapse: collapse !important;
    font-family: 'Segoe UI', Calibri, Arial, sans-serif !important;
    font-size: 13px !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}
.sales-statement-view .table-excel-grid thead th,
.ledger-statement-view .table-excel-grid thead th,
#salesStatementTable thead th,
#ledgerStatementTable thead th {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    padding: 6px 6px !important;
    border: 1px solid #cbd5e1 !important;
    border-bottom: 2px solid #0284c7 !important;
    white-space: nowrap !important;
    letter-spacing: 0.2px !important;
    user-select: none;
    text-transform: uppercase;
}
.sales-statement-view .table-excel-grid thead th *,
.ledger-statement-view .table-excel-grid thead th *,
#salesStatementTable thead th *,
#ledgerStatementTable thead th * {
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: inherit !important;
}
.sales-statement-view .table-excel-grid thead th .col-resize-handle,
.ledger-statement-view .table-excel-grid thead th .col-resize-handle,
#salesStatementTable thead th .col-resize-handle,
#ledgerStatementTable thead th .col-resize-handle {
    width: 6px !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    cursor: col-resize !important;
}
.sales-statement-view .table-excel-grid tbody td,
.ledger-statement-view .table-excel-grid tbody td {
    padding: 5px 9px !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    line-height: 1.35 !important;
}
.sales-statement-view .table-excel-grid tbody tr:nth-child(even) td,
.ledger-statement-view .table-excel-grid tbody tr:nth-child(even) td {
    background-color: #f8fafc !important;
}
.sales-statement-view .table-excel-grid tbody tr:hover td,
.ledger-statement-view .table-excel-grid tbody tr:hover td {
    background-color: #e0f2fe !important;
}
.sales-reconciliation-card {
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 76, 129, 0.12);
}
.sales-recon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* ==========================================================================
   PC MODERN QUICK OPERATIONS TOOLBAR (1-CLICK DIRECT ACCESS - ON DEMAND)
   ========================================================================== */
.pc-quick-ops-bar {
    display: none; /* Collapsed by default for clean on-demand workspace */
    background: #f8fafc;
    border-bottom: 1px solid #cbd5e1;
    padding: 3px 14px;
    height: 38px;
    min-height: 38px;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 1020;
}
.pc-quick-ops-bar.show {
    display: flex !important;
    animation: slideDownQuickOps 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDownQuickOps {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.pc-quick-ops-bar::-webkit-scrollbar {
    display: none;
}
.btn-quick-op {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn-quick-op:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.btn-quick-op.op-new-bill {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}
.btn-quick-op.op-new-bill:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.45);
}
.btn-quick-op.op-sales {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.btn-quick-op.op-sales:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}
.btn-quick-op.op-ledger {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}
.btn-quick-op.op-ledger:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
.btn-quick-op.op-club {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.btn-quick-op.op-club:hover {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
}
.btn-quick-op.op-details {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
}
.btn-quick-op.op-details:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}
.btn-quick-op.op-patient {
    background: #f0fdfa;
    color: #0f766e;
    border-color: #99f6e4;
}
.btn-quick-op.op-patient:hover {
    background: #0d9488;
    color: #ffffff;
    border-color: #0d9488;
}
.btn-quick-op.op-cash {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.btn-quick-op.op-cash:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}
.btn-quick-op.op-doctor {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}
.btn-quick-op.op-doctor:hover {
    background: #e11d48;
    color: #ffffff;
    border-color: #e11d48;
}
.btn-quick-op.op-workload {
    background: #faf5ff;
    color: #7e22ce;
    border-color: #e9d5ff;
}
.btn-quick-op.op-workload:hover {
    background: #9333ea;
    color: #ffffff;
    border-color: #9333ea;
}
.btn-quick-op.op-due {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.btn-quick-op.op-due:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}
.btn-quick-op.op-expense {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}
.btn-quick-op.op-expense:hover {
    background: #b91c1c;
    color: #ffffff;
    border-color: #b91c1c;
}
.btn-quick-op.op-return {
    background: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
}
.btn-quick-op.op-return:hover {
    background: #b45309;
    color: #ffffff;
    border-color: #b45309;
}
.btn-quick-op.op-masters {
    background: #f8fafc;
    color: #1e293b;
    border-color: #94a3b8;
}
.btn-quick-op.op-masters:hover {
    background: #1e293b;
    color: #ffffff;
    border-color: #1e293b;
}


/* ==========================================================================
   RETRO DOS MODE & TERMINAL REPORT VIEWER (MAST WALA LOOK)
   ========================================================================== */

/* 1. DOS Setting in Form Setup Modal */
.dos-setup-card {
    background: linear-gradient(145deg, #090d16 0%, #030712 100%) !important;
    border: 2px solid #0284c7 !important;
    box-shadow: 0 8px 30px rgba(2, 132, 199, 0.25), inset 0 0 15px rgba(2, 132, 199, 0.15) !important;
    border-radius: 12px !important;
    color: #e2e8f0 !important;
    position: relative;
    overflow: hidden;
}

.dos-setup-card::before {
    content: "C:\\> SYS_CONFIG.EXE --REPORT_MODE";
    position: absolute;
    top: 6px;
    right: 14px;
    font-family: 'Lucida Console', Consolas, monospace;
    font-size: 10px;
    color: #38bdf8;
    opacity: 0.6;
    letter-spacing: 1px;
}

.dos-mode-switch-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-dos-choice {
    flex: 1;
    padding: 12px 16px;
    font-family: 'Lucida Console', Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    border: 2px solid #334155;
    background: #0f172a;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-dos-choice:hover {
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.btn-dos-choice.active-yes {
    background: linear-gradient(135deg, #042f1f 0%, #021a11 100%) !important;
    border-color: #00ff66 !important;
    color: #00ff66 !important;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.4), inset 0 0 10px rgba(0, 255, 102, 0.2) !important;
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.7);
}

.btn-dos-choice.active-no {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35) !important;
}

.dos-theme-picker-btn {
    padding: 6px 12px;
    font-family: 'Lucida Console', Consolas, monospace;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.dos-theme-picker-btn.active {
    box-shadow: 0 0 12px currentColor !important;
    transform: scale(1.04);
}

/* 2. Interactive Terminal Container on Report Screens */
.dos-terminal-wrapper {
    width: 100%;
    margin-top: 4px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

/* Terminal Header Toolbar */
.dos-terminal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    background: #020617;
    border-bottom: 2px solid #1e293b;
    font-family: 'Lucida Console', Consolas, monospace;
    font-size: 12px;
    color: #94a3b8;
    flex-wrap: wrap;
    gap: 8px;
    user-select: none;
}

.dos-topbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dos-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-dos-terminal-action {
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-family: 'Lucida Console', Consolas, monospace;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-dos-terminal-action:hover {
    background: #1e293b;
    color: #ffffff;
    border-color: #64748b;
    transform: translateY(-1px);
}

.btn-dos-terminal-action.btn-dos-exit {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #ffffff;
}

.btn-dos-terminal-action.btn-dos-exit:hover {
    background: #991b1b;
}

/* The Screen Area */
.dos-terminal-screen {
    padding: 16px 20px;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 165px);
    font-family: 'Lucida Console', Consolas, 'Courier New', Courier, monospace !important;
    font-size: 12.5px;
    line-height: 1.32;
    letter-spacing: 0.4px;
    white-space: pre !important;
    position: relative;
    user-select: text;
    -webkit-font-smoothing: antialiased;
}

/* 3. DOS Color Themes */
/* 3A. Matrix Green Phosphor */
.dos-theme-green {
    background-color: #060a06 !important;
    color: #00ff66 !important;
    border-color: #00aa44 !important;
    text-shadow: 0 0 2px rgba(0, 255, 102, 0.45);
}
.dos-theme-green .dos-terminal-topbar {
    background-color: #030803 !important;
    border-bottom-color: #00ff66 !important;
    color: #00ff66 !important;
}
.dos-theme-green .btn-dos-terminal-action {
    background: #081408;
    border-color: #00ff66;
    color: #00ff66;
}
.dos-theme-green .btn-dos-terminal-action:hover {
    background: #00ff66;
    color: #000000;
    box-shadow: 0 0 10px #00ff66;
}

/* 3B. Classic DOS / FoxPro Blue */
.dos-theme-blue {
    background-color: #000080 !important;
    color: #ffffff !important;
    border-color: #00aaff !important;
    text-shadow: none;
}
.dos-theme-blue .dos-terminal-topbar {
    background-color: #000055 !important;
    border-bottom-color: #ffff55 !important;
    color: #ffff55 !important;
}
.dos-theme-blue .btn-dos-terminal-action {
    background: #0000aa;
    border-color: #ffff55;
    color: #ffff55;
}
.dos-theme-blue .btn-dos-terminal-action:hover {
    background: #ffff55;
    color: #000080;
    box-shadow: 0 0 10px #ffff55;
}

/* 3C. Amber Phosphor CRT */
.dos-theme-amber {
    background-color: #120800 !important;
    color: #ffaa00 !important;
    border-color: #ffaa00 !important;
    text-shadow: 0 0 2px rgba(255, 170, 0, 0.4);
}
.dos-theme-amber .dos-terminal-topbar {
    background-color: #0a0400 !important;
    border-bottom-color: #ffaa00 !important;
    color: #ffaa00 !important;
}
.dos-theme-amber .btn-dos-terminal-action {
    background: #241100;
    border-color: #ffaa00;
    color: #ffaa00;
}
.dos-theme-amber .btn-dos-terminal-action:hover {
    background: #ffaa00;
    color: #000000;
    box-shadow: 0 0 10px #ffaa00;
}

/* 3D. Continuous Dot Matrix Paper White */
.dos-theme-paper {
    background-color: #fbfbf6 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    text-shadow: none;
}
.dos-theme-paper .dos-terminal-topbar {
    background-color: #e2e8f0 !important;
    border-bottom-color: #94a3b8 !important;
    color: #0f172a !important;
}
.dos-theme-paper .btn-dos-terminal-action {
    background: #ffffff;
    border-color: #94a3b8;
    color: #1e293b;
}
.dos-theme-paper .btn-dos-terminal-action:hover {
    background: #0f172a;
    color: #ffffff;
}

/* 4. DOS Toolbar Button on Normal Report Screens */
.btn-dos-toggle-pill {
    background: #0f172a !important;
    color: #38bdf8 !important;
    border: 1px solid #0284c7 !important;
    font-family: 'Lucida Console', Consolas, monospace !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: all 0.18s ease;
}

.btn-dos-toggle-pill:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
}

.btn-dos-toggle-pill.active {
    background: #022c22 !important;
    color: #00ff66 !important;
    border-color: #00ff66 !important;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.45) !important;
}

/* 5. Blinking Cursor Animation */
@keyframes dosBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.dos-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background-color: currentColor;
    vertical-align: -2px;
    margin-left: 2px;
    animation: dosBlink 1s infinite;
}

/* ============================================================================
   GLOBAL SMOOTH MICRO-ANIMATIONS & GPU-ACCELERATED TRANSITIONS (PC & MOBILE)
   ============================================================================ */

/* 1. Main Content & Screens Smooth Entry Fade */
@keyframes smoothFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#mainContainer > div,
.excel-theme-wrapper,
.card-hero-banner {
    animation: smoothFadeInUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 2. Interactive Card Lift & Hover Glow */
.card,
.card-smooth-hover,
.summary-kpi-card {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card:hover,
.card-smooth-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

/* 3. Tactile Button Tap / Press Feedback */
.btn,
.btn-press-anim,
.btn-dos-toggle-pill {
    transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:active,
.btn-press-anim:active {
    transform: scale(0.96) !important;
}

/* 4. Table Row Entry Subtle Fade & Interactive Hover */
.excel-theme-table tbody tr,
.table-hover tbody tr {
    transition: background-color 0.12s ease;
}

.excel-theme-table tbody tr:hover {
    background-color: #f0fdf4 !important;
}

/* 5. Smooth Modal Dialog Scale In */
.modal.fade .modal-dialog {
    transform: scale(0.95) translateY(-8px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* 6. Shimmer Loading Animation */
@keyframes shimmerAnim {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmerAnim 1.6s infinite ease-in-out;
    border-radius: 4px;
}

/* 7. Pill & Badge Pulse for Live Updates */
@keyframes badgePopAnim {
    0% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

.badge-pop-anim {
    animation: badgePopAnim 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================================
   8. VISUAL MICRO-ANIMATIONS & INTERACTION POLISH (PC & DESKTOP)
   ============================================================================ */

/* A. Animated Identity Hero Banner with Glass Sweep */
.card-hero-banner {
    position: relative;
    background: linear-gradient(135deg, #091e3a 0%, #102a4e 50%, #0c213d 100%);
    background-size: 200% 200%;
    animation: heroGradientShift 14s ease infinite;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25), 0 8px 10px -6px rgba(15, 23, 42, 0.2) !important;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hero-banner:hover {
    box-shadow: 0 14px 28px -4px rgba(14, 165, 233, 0.2), 0 10px 14px -6px rgba(15, 23, 42, 0.3) !important;
}

@keyframes heroGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.card-hero-banner::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.07) 50%, transparent 60%);
    transform: rotate(25deg);
    animation: heroGlassSweep 8s infinite ease-in-out;
    pointer-events: none;
}

@keyframes heroGlassSweep {
    0% { transform: translateX(-100%) rotate(25deg); }
    35%, 100% { transform: translateX(100%) rotate(25deg); }
}

/* B. Live Online / Active Green Breathing Pulse Dot */
.live-pulse-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    margin-right: 6px;
    position: relative;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: liveDotPulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
    vertical-align: middle;
}

@keyframes liveDotPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* C. Staggered Cascade Entrance for Dashboard KPI Cards */
@keyframes kpiPopEntrance {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.kpi-stagger-1 { animation: kpiPopEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.05s; }
.kpi-stagger-2 { animation: kpiPopEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.12s; }
.kpi-stagger-3 { animation: kpiPopEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.19s; }
.kpi-stagger-4 { animation: kpiPopEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: 0.26s; }

/* D. Rich Colored Hover Glow & Lift for KPI Cards */
.card-kpi-patient,
.card-kpi-doctor,
.card-kpi-test,
.card-kpi-head {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.card-kpi-patient:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 14px 26px -6px rgba(14, 165, 233, 0.35) !important;
}

.card-kpi-doctor:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 14px 26px -6px rgba(239, 68, 68, 0.35) !important;
}

.card-kpi-test:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 14px 26px -6px rgba(245, 158, 11, 0.35) !important;
}

.card-kpi-head:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 14px 26px -6px rgba(34, 197, 94, 0.35) !important;
}

/* E. Tactile Button Press Feedback */
.btn-press-anim {
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-press-anim:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.22) !important;
}

.btn-press-anim:active {
    transform: scale(0.95) !important;
}

/* F. Master Management Hub Buttons */
.master-hub-btn {
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background-color 0.15s ease;
    border-radius: 8px;
}

.master-hub-btn:hover {
    transform: translateY(-3px) translateX(2px);
    box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.14) !important;
}

/* G. Top Navigation & Quick Ops Bar Interactive Feedback */
.top-nav-btn {
    transition: transform 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.top-nav-btn:hover {
    transform: translateY(-1px);
}

.top-nav-btn:active {
    transform: scale(0.94);
}

.sub-toolbar-btn {
    transition: transform 0.12s ease, background-color 0.12s ease;
}

.sub-toolbar-btn:active {
    transform: scale(0.95);
}

/* Floating Mobile Switcher Pill */
.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;
}

/* Dedicated Connection Setup Wizard & Modal */
#connectionSetupModal {
    z-index: 100005 !important;
}
#connectionSetupModal .modal-dialog {
    z-index: 100006 !important;
}
.modal-backdrop.show:has(+ #connectionSetupModal),
.connection-modal-backdrop {
    z-index: 100000 !important;
}
#cardOptOnline:hover, #cardOptOffline:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Package Bill Modal Styling */
#packageBillModal .table th {
    font-size: 0.76rem;
    letter-spacing: 0.3px;
}
.pkg-test-rate-input:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.25) !important;
    background-color: #fffbeb !important;
}

/* ============================================================================
   9. EXECUTIVE MEDICAL SUITE DASHBOARD (ULTRA-CLEAN, MODERN & INTERNATIONAL)
   ============================================================================ */

/* A. Executive Hero Card */
.dash-exec-hero {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden;
}

.dash-exec-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 35%, #10b981 70%, #8b5cf6 100%);
    pointer-events: none;
}

.dash-clinic-avatar {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #f8fafc;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.dash-clinic-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
    border-color: #3b82f6;
}

/* Digital Live Clock Card */
.dash-clock-widget {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 8px 16px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #334155;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
}
.dash-clock-time {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #38bdf8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.dash-clock-date {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Language Switcher Pill */
.dash-lang-switcher {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    gap: 2px;
}
.dash-lang-btn {
    border: none;
    background: transparent;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.18s ease;
}
.dash-lang-btn.active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.dash-lang-btn:hover:not(.active) {
    color: #0f172a;
    background: #e2e8f0;
}

/* Executive Action Buttons */
.dash-hero-btn {
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.84rem;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dash-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.dash-hero-btn:active {
    transform: scale(0.96);
}

.dash-hero-btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}
.dash-hero-btn-blue {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
}
.dash-hero-btn-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff;
}
.dash-hero-btn-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

/* B. Modern KPI Cards */
.dash-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 6px 20px -3px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.dash-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: var(--kpi-accent, #3b82f6);
}
.dash-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -6px var(--kpi-glow, rgba(59, 130, 246, 0.25));
    border-color: var(--kpi-accent, #3b82f6);
}

.dash-kpi-blue {
    --kpi-accent: #2563eb;
    --kpi-glow: rgba(37, 99, 235, 0.22);
}
.dash-kpi-rose {
    --kpi-accent: #e11d48;
    --kpi-glow: rgba(225, 29, 72, 0.22);
}
.dash-kpi-amber {
    --kpi-accent: #f59e0b;
    --kpi-glow: rgba(245, 158, 11, 0.22);
}
.dash-kpi-emerald {
    --kpi-accent: #10b981;
    --kpi-glow: rgba(16, 185, 129, 0.22);
}

.dash-kpi-icon-pill {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* C. Modern Workflow Action Cards */
.dash-action-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}
.dash-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -5px rgba(37, 99, 235, 0.15);
    border-color: #3b82f6;
}
.dash-action-card:active {
    transform: scale(0.98);
}

.dash-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.dash-action-arrow {
    margin-left: auto;
    font-size: 1.1rem;
    color: #cbd5e1;
    transition: transform 0.2s ease, color 0.2s ease;
}
.dash-action-card:hover .dash-action-arrow {
    transform: translateX(4px);
    color: #2563eb;
}

/* Keyboard Keycap Badge */
.dash-kbd {
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-bottom: 2.5px solid #94a3b8;
    border-radius: 6px;
    padding: 2px 7px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.72rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    display: inline-block;
    line-height: 1.2;
}

/* D. Master Pill */
.dash-master-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none !important;
}
.dash-master-pill:hover {
    transform: translateY(-2px);
    border-color: #2563eb;
    box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.14);
    background: #f8fafc;
}

/* E. Panels */
.dash-glossy-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}
.dash-panel-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================================================
   10. PANKH GOLD AUTHENTIC GLOSSY DASHBOARD & SELF-CUSTOMIZABLE SHORTCUTS
   ============================================================================ */

.pankh-gold-stage {
    position: relative;
    height: calc(100vh - 86px);
    min-height: 580px;
    display: flex;
    flex-direction: column;
    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 25px 60px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

/* Top Clinic Status Strip */
.pankh-status-strip {
    background: rgba(10, 18, 36, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 18px;
    flex-shrink: 0;
}

/* Left Hero & Analytics Workspace Area */
.pankh-left-workspace {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 24px;
    overflow-y: auto;
    position: relative;
    background: radial-gradient(circle at 10% 40%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
}

/* Poetic Hindi Tagline */
.pankh-hindi-tagline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 40px;
    padding: 8px 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.12);
}
.pankh-quote-text {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    background: linear-gradient(90deg, #fef08a 0%, #fbbf24 50%, #4ade80 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(251, 191, 36, 0.2);
}

/* Executive Analytics Panels */
.pankh-analytics-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 14px 18px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}
.pankh-analytics-panel:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.045);
}

/* Right Glossy Shortcuts Dock (Two-Column Layout: Shortcuts + System Details) */
.pankh-shortcuts-dock {
    width: 530px;
    max-width: 48vw;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: row;
    gap: 12px;
    background: linear-gradient(180deg, rgba(13, 22, 38, 0.96) 0%, rgba(6, 11, 20, 0.98) 100%);
    backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 14px;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.45);
}

.pankh-dock-col-shortcuts {
    flex: 1 1 255px;
    min-width: 220px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pankh-dock-col-details {
    flex: 1 1 245px;
    min-width: 220px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.pankh-info-pill {
    background: linear-gradient(90deg, #86efac 0%, #a7f3d0 100%);
    color: #064e3b;
    font-weight: 800;
    font-size: 0.76rem;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    margin-bottom: 2px;
    user-select: none;
}

.pankh-info-val {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.82rem;
    text-align: right;
    letter-spacing: 0.3px;
    padding-right: 4px;
    margin-bottom: 7px;
}

@media (max-width: 1280px) {
    .pankh-shortcuts-dock {
        width: 310px;
        flex-direction: column;
    }
    .pankh-dock-col-details {
        display: none !important;
    }
}

/* Authentic Glossy Pankh Buttons */
.pankh-glossy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(180deg, #3d4654 0%, #252c37 50%, #171d26 52%, #10151c 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.4px;
    text-align: center;
    padding: 9px 12px;
    margin-bottom: 7px;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.pankh-glossy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 5px 5px 0 0;
    pointer-events: none;
}

.pankh-glossy-btn:hover {
    transform: translateX(-3px) scale(1.015);
    border-color: #84cc16;
    box-shadow: 0 0 18px rgba(132, 204, 22, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    color: #ffffff !important;
}

.pankh-glossy-btn:active {
    transform: scale(0.97);
}

/* Primary Green Highlight Button (like LAB(s) Billing in user's image) */
.pankh-glossy-btn-active {
    background: linear-gradient(180deg, #dcfce7 0%, #a7f3d0 48%, #86efac 52%, #4ade80 100%) !important;
    color: #064e3b !important;
    border: 2px solid #22c55e !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.45), inset 0 1px 2px #ffffff !important;
}
.pankh-glossy-btn-active::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
}
.pankh-glossy-btn-active:hover {
    background: linear-gradient(180deg, #bbf7d0 0%, #6ee7b7 50%, #22c55e 100%) !important;
    color: #022c22 !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.65), inset 0 1px 2px #ffffff !important;
}

/* Drag and Drop Helpers */
.drag-handle {
    cursor: grab;
}
.drag-handle:active {
    cursor: grabbing;
}
tr.dragging-row {
    opacity: 0.4;
    background: #e0f2fe !important;
}
tr.drag-over-target {
    border-top: 3px solid #2563eb !important;
}
.dock-drop-target {
    border-top: 3px solid #84cc16 !important;
}

/* Ambient Floating Background Elements (Medicines & Molecular Parallax) */
.pankh-floating-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.pankh-float-item {
    position: absolute;
    pointer-events: none;
    user-select: none;
    opacity: 0.22;
    filter: drop-shadow(0 6px 18px rgba(56, 189, 248, 0.35));
    transition: opacity 0.3s ease;
    will-change: transform;
}

@keyframes floatDrift1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(18px, -26px) rotate(10deg); }
    66% { transform: translate(-14px, -48px) rotate(-6deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes floatDrift2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-22px, -30px) rotate(-12deg); }
    66% { transform: translate(16px, -52px) rotate(12deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes floatDrift3 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    50% { transform: translate(14px, -36px) rotate(16deg) scale(1.05); }
    100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes floatDrift4 {
    0% { transform: translate(0, 0) rotate(0deg); }
    40% { transform: translate(-24px, -20px) rotate(-10deg); }
    80% { transform: translate(12px, -42px) rotate(8deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes floatDrift5 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    50% { transform: translate(-16px, 34px) rotate(-14deg) scale(0.96); }
    100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

.float-anim-1 { animation: floatDrift1 24s ease-in-out infinite; }
.float-anim-2 { animation: floatDrift2 30s ease-in-out infinite; }
.float-anim-3 { animation: floatDrift3 26s ease-in-out infinite; }
.float-anim-4 { animation: floatDrift4 34s ease-in-out infinite; }
.float-anim-5 { animation: floatDrift5 28s ease-in-out infinite; }

.pankh-brand-logo-3d {
    height: 72px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(132, 204, 22, 0.5));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
    cursor: pointer;
}
.pankh-brand-logo-3d:hover {
    transform: scale(1.07) rotate(-2deg);
    filter: drop-shadow(0 12px 28px rgba(132, 204, 22, 0.8));
}

/* ========================================================
   MODERN PANKH GOLD LUXURY INTRO OVERLAY (SMOKE, BLUR, 3D LOGO & HINDI TAGLINE)
   ======================================================== */
.pankh-modern-splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: radial-gradient(ellipse at 50% 35%, rgba(13, 27, 54, 0.95) 0%, rgba(5, 12, 26, 0.98) 65%, #01040a 100%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.pankh-modern-splash-overlay.active {
    display: flex;
    opacity: 1;
}

/* Ambient Floating Smoke Mist System */
.splash-smoke-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.splash-smoke-cloud {
    position: absolute;
    border-radius: 50%;
    filter: blur(65px);
    opacity: 0.28;
    mix-blend-mode: screen;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.splash-smoke-cloud-1 {
    width: 600px;
    height: 450px;
    background: radial-gradient(circle, #38bdf8 0%, rgba(56, 189, 248, 0) 70%);
    top: 10%;
    left: -100px;
    animation: smokeDrift1 14s infinite alternate;
}

.splash-smoke-cloud-2 {
    width: 650px;
    height: 500px;
    background: radial-gradient(circle, #4ade80 0%, rgba(74, 222, 128, 0) 70%);
    bottom: -100px;
    right: -100px;
    animation: smokeDrift2 16s infinite alternate;
}

.splash-smoke-cloud-3 {
    width: 500px;
    height: 400px;
    background: radial-gradient(circle, #fbbf24 0%, rgba(251, 191, 36, 0) 70%);
    top: 35%;
    left: 35%;
    opacity: 0.20;
    animation: smokeDrift3 12s infinite alternate;
}

.splash-smoke-cloud-4 {
    width: 550px;
    height: 450px;
    background: radial-gradient(circle, #818cf8 0%, rgba(129, 140, 248, 0) 70%);
    bottom: 10%;
    left: 15%;
    opacity: 0.22;
    animation: smokeDrift1 18s infinite alternate-reverse;
}

@keyframes smokeDrift1 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(120px, 40px) scale(1.15) rotate(15deg); }
    100% { transform: translate(40px, -60px) scale(0.95) rotate(-10deg); }
}

@keyframes smokeDrift2 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(-100px, -50px) scale(1.2) rotate(-18deg); }
    100% { transform: translate(-30px, 40px) scale(0.9) rotate(12deg); }
}

@keyframes smokeDrift3 {
    0% { transform: translate(0, 0) scale(0.9); opacity: 0.14; }
    50% { transform: translate(50px, -30px) scale(1.25); opacity: 0.26; }
    100% { transform: translate(-40px, 20px) scale(1.05); opacity: 0.20; }
}

/* Splash Showcase Central Card */
.pankh-splash-card {
    position: relative;
    z-index: 10;
    max-width: 860px;
    width: 92%;
    padding: 38px 42px;
    background: rgba(10, 20, 38, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 60px rgba(56, 189, 248, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.25);
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: splashCardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes splashCardAppear {
    0% { opacity: 0; transform: scale(0.88) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 3D Logo Emblem Aura & Float */
.splash-logo-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 14px;
}

.splash-logo-img {
    height: 125px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 35px rgba(132, 204, 22, 0.55)) drop-shadow(0 0 15px rgba(250, 204, 21, 0.35));
    animation: splashLogoFloat 3s ease-in-out infinite alternate;
}

@keyframes splashLogoFloat {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.03); }
}

.splash-logo-aura {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(132, 204, 22, 0.3) 0%, transparent 70%);
    filter: blur(20px);
    z-index: -1;
    animation: auraPulse 2.5s infinite alternate;
}

@keyframes auraPulse {
    0% { transform: scale(0.85); opacity: 0.4; }
    100% { transform: scale(1.2); opacity: 0.8; }
}

/* Brand Title & Subtitle */
.splash-brand-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #ffffff;
    margin-bottom: 4px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.splash-brand-sub {
    font-size: 0.86rem;
    color: #94a3b8;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 22px;
}

/* Poetic Hindi Tagline Box */
.splash-tagline-capsule {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(90deg, rgba(254, 240, 138, 0.08) 0%, rgba(251, 191, 36, 0.15) 50%, rgba(74, 222, 128, 0.08) 100%);
    border: 1.5px solid rgba(251, 191, 36, 0.55);
    border-radius: 50px;
    padding: 12px 32px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.3), 0 0 25px rgba(251, 191, 36, 0.25);
    margin-bottom: 24px;
    max-width: 100%;
}

.splash-hindi-line {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #fef08a 0%, #fbbf24 45%, #4ade80 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 18px rgba(251, 191, 36, 0.35);
}

/* Welcome Badge */
.splash-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    padding: 6px 18px;
    font-size: 0.82rem;
    color: #e2e8f0;
    margin-bottom: 18px;
}

/* Loading Progress Line */
.splash-progress-track {
    width: 220px;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
}

.splash-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8 0%, #4ade80 50%, #fbbf24 100%);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
    animation: splashProgressFill 5.2s ease-in-out forwards;
}

@keyframes splashProgressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@media (max-width: 768px) {
    .pankh-splash-card {
        padding: 24px 18px;
    }
    .splash-logo-img {
        height: 85px;
    }
    .splash-brand-title {
        font-size: 1.5rem;
    }
    .splash-hindi-line {
        font-size: 0.95rem;
    }
    .splash-tagline-capsule {
        padding: 8px 16px;
        gap: 8px;
    }
}

/* Client Production Build Security: hide password reveal eyes (custom + Edge native ::-ms-reveal) */
html.pankh-client-build input[type="password"]::-ms-reveal,
html.pankh-client-build input[type="password"]::-ms-clear {
    display: none !important;
}
html.pankh-client-build #togglePwdBtn,
html.pankh-client-build #newStaffPwdEye1,
html.pankh-client-build #newStaffPwdEye2,
html.pankh-client-build button[onclick*="toggleLoginPasswordVis"],
html.pankh-client-build button[onclick*="toggleStaffPwdVis"] {
    display: none !important;
}
