h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* SAFE AREA & TOP NOTCH ENGINE FOR MOBILE DEVICES (ANDROID & IOS) */
.status-bar-safe-area {
    display: block;
    position: sticky;
    top: 0;
    height: env(safe-area-inset-top, 0px);
    background-color: #1a1a2e;
    width: 100%;
    z-index: 99999;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top, 20px);
        background-color: #1a1a2e;
        width: 100%;
        z-index: 99999;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
}
.border-left-primary {
    border-left: 5px solid var(--mud-palette-primary);
}

.border-left-success {
    border-left: 5px solid var(--mud-palette-success);
}

.border-left-info {
    border-left: 5px solid var(--mud-palette-info);
}

.border-left-warning {
    border-left: 5px solid var(--mud-palette-warning);
}

/* ========================================================================= */
/* UNIVERSAL MATERIAL 3 MOBILE DESIGN SYSTEM (ANDROID / SCREENS <= 768px)    */
/* Transforms all 300+ pages into native Android cards, sheets & touch views */
/* ========================================================================= */
@media (max-width: 768px) {
    /* --- 1. UNIVERSAL MATERIAL 3 CARDS FOR ALL TABLES & DATAGRIDS --- */
    .mud-table:not(.table-keep-grid) .mud-table-head,
    .mud-table-responsive .mud-table-head,
    .mud-data-grid:not(.table-keep-grid) .mud-table-head,
    .mud-data-grid:not(.table-keep-grid) thead {
        display: none !important;
    }

    .mud-table:not(.table-keep-grid) .mud-table-root,
    .mud-table-responsive .mud-table-root,
    .mud-data-grid:not(.table-keep-grid) table,
    .mud-data-grid:not(.table-keep-grid) .mud-table-root {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .mud-table:not(.table-keep-grid) .mud-table-body,
    .mud-table-responsive .mud-table-body,
    .mud-data-grid:not(.table-keep-grid) tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 4px 0 !important;
        background: transparent !important;
        width: 100% !important;
    }

    .mud-table:not(.table-keep-grid) .mud-table-row,
    .mud-table-responsive .mud-table-row,
    .mud-data-grid:not(.table-keep-grid) tr.mud-table-row,
    .mud-data-grid:not(.table-keep-grid) tr {
        display: block !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
        padding: 12px 14px !important;
        margin-bottom: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Primary column header / first cell inside card */
    .mud-table:not(.table-keep-grid) .mud-table-row .mud-table-cell:first-child,
    .mud-data-grid:not(.table-keep-grid) tr td:first-child {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border: none !important;
        border-bottom: 2px solid #f1f5f9 !important;
        padding: 0 0 8px 0 !important;
        margin-bottom: 6px !important;
        font-weight: 700 !important;
        font-size: 0.95rem !important;
        color: #0f172a !important;
        text-align: left !important;
    }

    /* Intermediate data cells inside card: Stack label cleanly on top of value to prevent horizontal collisions */
    .mud-table:not(.table-keep-grid) .mud-table-row .mud-table-cell:not(:first-child):not(:last-child),
    .mud-table-responsive .mud-table-cell:not(:first-child):not(:last-child),
    .mud-data-grid:not(.table-keep-grid) tr td:not(:first-child):not(:last-child) {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        border: none !important;
        padding: 6px 0 !important;
        border-bottom: 1px dashed #f1f5f9 !important;
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .mud-table:not(.table-keep-grid) .mud-table-row .mud-table-cell:not(:first-child):not(:last-child)::before,
    .mud-table-responsive .mud-table-cell:not(:first-child):not(:last-child)::before,
    .mud-data-grid:not(.table-keep-grid) tr td:not(:first-child):not(:last-child)::before {
        content: attr(data-label);
        display: block !important;
        font-weight: 700 !important;
        font-size: 0.70rem !important;
        color: #64748b !important;
        text-transform: uppercase !important;
        letter-spacing: 0.4px !important;
        margin-bottom: 2px !important;
        text-align: left !important;
    }

    /* Action buttons docked at bottom of card */
    .mud-table:not(.table-keep-grid) .mud-table-row .mud-table-cell:last-child,
    .mud-data-grid:not(.table-keep-grid) tr td:last-child {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        border: none !important;
        border-top: 1px solid #e2e8f0 !important;
        padding: 10px 0 2px 0 !important;
        margin-top: 8px !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }

    .mud-table:not(.table-keep-grid) .mud-table-row .mud-table-cell:last-child::before,
    .mud-data-grid:not(.table-keep-grid) tr td:last-child::before {
        display: none !important;
    }

    /* Pager exclusion: Never treat table pagination as a card */
    .mud-table-pagination,
    .mud-table-pager,
    .mud-table-pagination .mud-table-cell,
    .mud-table-pager .mud-table-cell {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        margin: 8px 0 !important;
        padding: 4px !important;
    }

    .mud-table-pagination .mud-table-cell::before,
    .mud-table-pager .mud-table-cell::before {
        display: none !important;
    }

    .mud-table-container,
    .mud-data-grid {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* --- 2. UNIVERSAL MOBILE MODALS & DIALOGS --- */
    .mud-dialog-container {
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .mud-dialog {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 48px) !important;
        margin: auto !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .mud-dialog.mud-dialog-fullscreen {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .mud-dialog-title {
        padding: 14px 16px !important;
        background: #f8fafc !important;
        border-bottom: 1px solid #e2e8f0 !important;
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        flex-shrink: 0 !important;
    }

    .mud-dialog-content {
        flex: 1 1 auto !important;
        padding: 20px 16px 16px 16px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .mud-dialog-content > form > .mud-grid,
    .mud-dialog-content > .mud-grid {
        margin-top: 0 !important;
    }

    /* Convert cramped 2-column fields in dialogs to full width on mobile */
    .mud-dialog .mud-grid-item-xs-6,
    .mud-dialog .mud-item-xs-6 {
        flex-basis: 100% !important;
        max-width: 100% !important;
    }

    .mud-dialog-actions {
        padding: 12px 16px !important;
        background: #f8fafc !important;
        border-top: 1px solid #e2e8f0 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        justify-content: stretch !important;
    }

    .mud-dialog-actions .mud-button,
    .mud-dialog-content .d-flex.justify-end .mud-button {
        flex: 1 1 auto !important;
        min-height: 44px !important;
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
    }

    /* AppBar must always remain a single, clean horizontal bar without wrapping */
    .custom-appbar,
    .custom-appbar .d-flex {
        flex-wrap: nowrap !important;
    }

    .custom-appbar {
        height: 48px !important;
        max-height: 48px !important;
        overflow: hidden !important;
    }

    /* Floating Chat Indicator: Elevate above bottom actions, hide completely during modals */
    .mobile-chat-fab-badge {
        position: fixed !important;
        bottom: 76px !important;
        right: 14px !important;
        z-index: 1200 !important;
    }

    .mobile-chat-fab-badge .mud-fab {
        width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
    }

    body:has(.mud-dialog-container) .mobile-chat-fab-badge,
    body:has(.mud-overlay) .mobile-chat-fab-badge,
    .mud-dialog-container ~ .mobile-chat-fab-badge,
    .mud-overlay ~ .mobile-chat-fab-badge {
        display: none !important;
    }

    .mobile-chat-window {
        width: calc(100vw - 24px) !important;
        max-width: 100vw !important;
        height: 70vh !important;
        right: 12px !important;
        bottom: 75px !important;
    }

    /* --- 3. UNIVERSAL PAGE HEADERS & TOOLBARS --- */
    .mud-container > .d-flex.justify-space-between.align-center,
    .mud-container > div > .d-flex.justify-space-between.align-center,
    .mud-paper.d-flex.align-center.justify-space-between {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px !important;
    }

    .mud-table-toolbar,
    .mud-toolbar {
        flex-wrap: wrap !important;
        padding: 8px 10px !important;
        gap: 8px !important;
        height: auto !important;
        min-height: 48px !important;
    }

    .mud-table-toolbar .mud-input-control,
    .mud-toolbar .mud-input-control {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .mud-container > .d-flex > .mud-button,
    .mud-container > div > .d-flex > .mud-button,
    .mud-paper > .mud-button {
        width: 100% !important;
        height: 44px !important;
        border-radius: 8px !important;
        font-weight: 700 !important;
        font-size: 0.88rem !important;
        justify-content: center !important;
    }

    /* --- 4. TOUCH-FIRST FORM INPUTS --- */
    .mud-input-outlined .mud-input-outlined-input {
        padding: 10px 14px !important;
        min-height: 44px !important;
        font-size: 15px !important;
    }

    .mud-select .mud-select-input {
        min-height: 44px !important;
    }

    /* --- 5. COMPACT MOBILE CARDS & DASHBOARD WIDGETS --- */
    .mud-card {
        border-radius: 12px !important;
        margin-bottom: 10px !important;
    }

    .glass-section-card {
        padding: 14px !important;
        border-radius: 12px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Safe clearance & symmetric gutters for mobile content */
    .mud-main-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 96px !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Universal symmetric margin engine for mobile pages */
    .mud-container,
    .mud-container.px-2,
    .mud-container-maxwidth-false {
        padding-left: 12px !important;
        padding-right: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Prevent double-padding on nested containers */
    .mud-container .mud-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* CRITICAL FIX: Eliminate MudGrid negative horizontal margins that pull mobile cards into negative X */
    .mud-grid,
    .mud-grid-spacing-xs-1,
    .mud-grid-spacing-xs-2,
    .mud-grid-spacing-xs-3,
    .mud-grid-spacing-xs-4,
    .mud-grid-spacing-xs-5,
    .mud-grid-spacing-xs-6,
    .mud-grid-spacing-xs-7,
    .mud-grid-spacing-xs-8,
    .mud-grid-spacing-xs-9,
    .mud-grid-spacing-xs-10 {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
    }

    .mud-grid > .mud-grid-item {
        padding-left: 4px !important;
        padding-right: 4px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        box-sizing: border-box !important;
    }

    .mud-grid > .mud-grid-item-xs-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* --- 6. DRAWER RESPONSIVENESS (Clamp to viewport & prevent cutoff) --- */
    .mud-drawer-temporary,
    .mud-drawer.mud-drawer-anchor-right,
    .mud-drawer.mud-drawer-anchor-end,
    .mud-drawer.mud-drawer-anchor-left,
    .mud-drawer.mud-drawer-anchor-start {
        max-width: 100vw !important;
        width: 100vw !important;
    }

    /* --- 7. PREVENT TITLE & CARD CONGESTION --- */
    .d-flex.justify-space-between,
    .d-flex.justify-between {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    /* Remove fixed height clipping on mobile cards */
    div[style*="max-height: 400px"],
    div[style*="max-height:400px"],
    div[style*="max-height: 500px"],
    div[style*="max-height:500px"] {
        max-height: none !important;
        overflow: visible !important;
    }

    /* Suppress empty layout floating pill when on POS screens */
    body:has(.pos-master-container) .empty-layout-mobile-nav,
    body:has(.pos-top-header) .empty-layout-mobile-nav,
    .pos-master-container ~ .empty-layout-mobile-nav,
    .pos-top-header ~ .empty-layout-mobile-nav {
        display: none !important;
    }
}

/* ========================================================================= */
/* UNIVERSAL POS TOUCH ENGINE (< 900px)                                      */
/* Applies to Retail POS, Pharmacy POS, Jewellery POS, Restaurant KOT        */
/* ========================================================================= */
@media (max-width: 900px) {
    body {
        overflow-y: auto !important;
    }

    .pos-master-container {
        height: auto !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .pos-top-header {
        height: auto !important;
        min-height: 48px !important;
        padding: 8px 12px !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .classic-workspace {
        display: flex !important;
        flex-direction: column !important;
        overflow: visible !important;
        padding: 8px !important;
        gap: 10px !important;
        padding-bottom: 90px !important;
    }

    /* 1. SEARCH STRIP AT TOP FOR IMMEDIATE SCANNING */
    .classic-search-strip {
        order: 1 !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 8px 10px !important;
        background: #ffffff !important;
        border-radius: 8px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    }

    .classic-search-strip .dense-autocomplete,
    .classic-search-strip .mud-autocomplete {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .classic-search-strip .classic-qp-btn {
        width: 100% !important;
        height: 42px !important;
        font-size: 14px !important;
    }

    /* 2. CART ITEMS GRID IMMEDIATELY VISIBLE UNDER SEARCH */
    .classic-bottom-row {
        order: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: visible !important;
        gap: 12px !important;
    }

    .classic-grid-container {
        width: 100% !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        background: transparent !important;
        border: none !important;
    }

    .classic-table {
        min-width: 0 !important;
        width: 100% !important;
        display: block !important;
    }

    .classic-table thead {
        display: none !important;
    }

    .classic-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .classic-table tbody tr {
        display: flex !important;
        flex-direction: column !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        padding: 10px 12px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
        position: relative !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Product Name (3rd cell) - bold title */
    .classic-table tbody tr td:nth-child(3) {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        padding: 2px 36px 6px 0 !important;
        line-height: 1.3 !important;
    }

    /* Code (2nd cell) - monospace code */
    .classic-table tbody tr td:nth-child(2) {
        font-size: 11px !important;
        color: #64748b !important;
        font-family: monospace !important;
        padding: 0 !important;
    }

    /* Row number (1st cell) - hidden on mobile cards */
    .classic-table tbody tr td:nth-child(1) {
        display: none !important;
    }

    /* Delete Button (last cell) - pinned top right */
    .classic-table tbody tr td:last-child {
        position: absolute !important;
        top: 6px !important;
        right: 6px !important;
        padding: 0 !important;
        display: block !important;
    }

    /* Quantity stepper (4th cell) */
    .classic-table tbody tr td:nth-child(4) {
        display: flex !important;
        align-items: center !important;
        padding-top: 8px !important;
        border-top: 1px dashed #e2e8f0 !important;
        margin-top: 4px !important;
        margin-bottom: 4px !important;
    }

    .classic-table tbody tr td:nth-child(4) button {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
        border-radius: 4px !important;
    }

    .classic-table tbody tr td:nth-child(4) input {
        height: 32px !important;
        font-size: 14px !important;
    }

    /* Rate cell (5th cell) */
    .classic-table tbody tr td:nth-child(5) {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 12px !important;
        color: #475569 !important;
        padding: 2px 0 !important;
        border: none !important;
    }

    .classic-table tbody tr td:nth-child(5)::before {
        content: "Rate:" !important;
        font-weight: 600 !important;
        color: #94a3b8 !important;
        font-size: 11px !important;
    }

    .classic-table tbody tr td:nth-child(5) input {
        height: 28px !important;
        border-radius: 4px !important;
        font-size: 12px !important;
    }

    /* Intermediate tax & discount cells (neither first, code, name, qty, rate, total, nor delete) */
    .classic-table tbody tr td:not(:first-child):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)):not(:nth-child(5)):not(:nth-last-child(2)):not(:last-child) {
        display: inline-block !important;
        font-size: 11px !important;
        color: #64748b !important;
        padding: 2px 10px 2px 0 !important;
        margin: 0 !important;
        border: none !important;
    }

    /* Total Amount (2nd to last cell) - bold price on bottom right */
    .classic-table tbody tr td:nth-last-child(2) {
        font-size: 16px !important;
        font-weight: 800 !important;
        color: var(--pos-primary, #004A99) !important;
        text-align: right !important;
        align-self: flex-end !important;
        padding: 4px 0 0 0 !important;
        margin: 0 !important;
        border: none !important;
    }

    .classic-table tbody tr td:nth-last-child(2)::before {
        content: "Total: " !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #64748b !important;
    }

    /* 3. KEYPAD ACTION BUTTONS (CLEAN 2-COLUMN, NO OVERLAPPING ICONS) */
    .classic-keypad {
        width: 100% !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .classic-keypad .kbtn {
        height: auto !important;
        min-height: 48px !important;
        padding: 8px 12px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
    }

    .classic-keypad .kbtn .mud-icon-root {
        font-size: 18px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .classic-keypad .kbtn span:not(.kbtn-shortcut) {
        font-size: 13px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }

    .classic-keypad .kbtn .kbtn-shortcut {
        display: none !important;
    }

    /* 4. TOTALS & INVOICE DETAILS COLLAPSIBLE/BELOW */
    .classic-top-row {
        order: 3 !important;
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        gap: 10px !important;
    }

    .classic-panel {
        padding: 10px 12px !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    }

    .classic-meta {
        width: 100% !important;
        flex: none !important;
        grid-template-columns: 90px 1fr !important;
        gap: 6px !important;
    }

    .classic-meta .classic-input,
    .classic-meta select {
        height: 38px !important;
        border-radius: 6px !important;
        font-size: 13px !important;
    }

    .classic-totals {
        width: 100% !important;
        flex: none !important;
        grid-template-columns: 110px 1fr !important;
        gap: 6px !important;
    }

    .pos-grand-label,
    .pos-grand-val {
        font-size: 18px !important;
        font-weight: 800 !important;
        color: var(--pos-primary, #004A99) !important;
    }
}