/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

body {
    background: #eef1f5;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 55px;
    background: #1565c0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6px;
    gap: 1px;
    flex-shrink: 0;
    overflow-y: auto;
}

    .sidebar::-webkit-scrollbar {
        width: 0;
    }

.side-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    border: 2px solid transparent;
    margin: 1px 0;
    border-radius: 3px;
    transition: 0.15s;
    position: relative;
}

    .side-icon:hover {
        background: rgba(255,255,255,0.1);
    }

    .side-icon.active {
        border-color: #42a5f5;
        background: rgba(255,255,255,0.08);
    }

    .side-icon svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: #fff;
        stroke-width: 1.8px;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.topbar {
    height: 52px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.3px;
    height: 100%;
    border-right: 1px solid #eee;
}

    .topbar-brand .back-icon {
        font-size: 18px;
        color: #555;
        cursor: pointer;
        margin-right: 4px;
    }

.topbar-shop {
    flex: 1;
    background: #29b6f6;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.topbar-user {
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #777;
    font-size: 20px;
    border-left: 1px solid #eee;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f6f8;
    padding: 12px 14px 8px 14px;
    gap: 8px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.header-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

    .header-buttons button {
        background: #26a69a;
        color: #fff;
        border: none;
        padding: 7px 16px;
        border-radius: 3px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.15s;
        font-family: inherit;
    }

        .header-buttons button:hover {
            background: #1e8880;
        }

.form-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 14px;
    background: #fff;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .form-group label {
        font-size: 11.5px;
        color: #666;
        font-weight: 600;
    }

        .form-group label .key-hint {
            color: #999;
            font-weight: 400;
        }

    .form-group input {
        padding: 7px 10px;
        border: 1px solid #cfd8dc;
        border-radius: 3px;
        font-size: 13px;
        font-family: inherit;
        outline: none;
        transition: 0.15s;
        background: #fff;
    }

        .form-group input:focus {
            border-color: #29b6f6;
            box-shadow: 0 0 0 2px rgba(41,182,246,0.15);
        }

        .form-group input::placeholder {
            color: #b0bec5;
        }

.options-row {
    display: flex;
    gap: 24px;
    align-items: center;
    background: #fff;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: #333;
}

    .options-row label {
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        user-select: none;
    }

    .options-row input[type="checkbox"] {
        width: 15px;
        height: 15px;
        cursor: pointer;
        accent-color: #29b6f6;
    }

.table-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    max-height: 220px;
    overflow-y: auto;
}

    .table-wrapper::-webkit-scrollbar {
        width: 6px;
    }

    .table-wrapper::-webkit-scrollbar-thumb {
        background: #b0bec5;
        border-radius: 3px;
    }

table.invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    table.invoice-table thead th {
        background: #1976d2;
        color: #fff;
        padding: 8px 6px;
        text-align: left;
        font-weight: 600;
        font-size: 11.5px;
        white-space: nowrap;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    table.invoice-table tbody td {
        padding: 6px;
        border-bottom: 1px solid #eceff1;
        color: #333;
        vertical-align: middle;
        white-space: nowrap;
    }

    table.invoice-table tbody tr:last-child td {
        border-bottom: none;
    }

    table.invoice-table tbody tr:hover {
        background: #f5f9ff;
    }

    table.invoice-table td input {
        width: 100%;
        padding: 4px 6px;
        border: 1px solid #cfd8dc;
        border-radius: 3px;
        font-size: 12px;
        font-family: inherit;
        text-align: right;
        outline: none;
        background: #fafafa;
    }

        table.invoice-table td input:focus {
            border-color: #29b6f6;
            background: #fff;
            box-shadow: 0 0 0 2px rgba(41,182,246,0.15);
        }

    table.invoice-table .col-total {
        font-weight: 700;
        text-align: right;
        padding-right: 12px;
    }

    table.invoice-table .col-del {
        text-align: center;
        width: 35px;
    }

        table.invoice-table .col-del button {
            background: none;
            border: none;
            color: #e53935;
            font-size: 15px;
            cursor: pointer;
            padding: 2px 5px;
            border-radius: 3px;
        }

            table.invoice-table .col-del button:hover {
                background: #ffebee;
            }

.col-sr {
    width: 40px;
}

.col-code {
    width: 130px;
}

.col-name {
    min-width: 140px;
}

.col-pp {
    width: 90px;
    text-align: right;
}

.col-stock {
    width: 70px;
    text-align: right;
}

.col-sp {
    width: 80px;
    text-align: right;
    font-weight: 700;
    color: #1976d2;
}

.col-boxes {
    width: 90px;
}

.col-boxprice {
    width: 90px;
}

.col-qty {
    width: 80px;
}

.col-disc {
    width: 80px;
}

.col-total {
    width: 80px;
}

/* ============================================================
   NAYA CSS: DUAL INPUT CELLS FOR TAX & DISCOUNT
   ============================================================ */
.dual-input-cell {
    display: flex;
    gap: 4px;
    align-items: center;
    width: 100%;
    max-width: 130px;
    margin: 0 auto;
}

    .dual-input-cell input {
        width: 50%;
        text-align: center;
        height: 32px;
        border: 1px solid #cbd5e1;
        border-radius: 6px;
        font-size: 12px;
        padding: 0 4px;
        background: #f8fafc;
        outline: none;
    }

        .dual-input-cell input:focus {
            border-color: #29b6f6;
            background: #fff;
            box-shadow: 0 0 0 2px rgba(41,182,246,0.15);
        }

.cell-right {
    text-align: right !important;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   BOTTOM SECTION
   ============================================================ */
.bottom-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    flex-shrink: 0;
}

.bottom-row-1 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #eceff1;
    flex-wrap: wrap;
}

    .bottom-row-1 .search-input {
        width: 110px;
        padding: 6px 10px;
        border: 1px solid #cfd8dc;
        border-radius: 3px;
        font-size: 13px;
        font-family: inherit;
        outline: none;
    }

    .bottom-row-1 .search-btn {
        background: #26a69a;
        color: #fff;
        border: none;
        padding: 7px 20px;
        border-radius: 3px;
        font-size: 12.5px;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
    }

        .bottom-row-1 .search-btn:hover {
            background: #1e8880;
        }

    .bottom-row-1 .remarks-input {
        flex: 1;
        min-width: 150px;
        padding: 6px 10px;
        border: 1px solid #cfd8dc;
        border-radius: 3px;
        font-size: 13px;
        font-family: inherit;
        outline: none;
    }

    .bottom-row-1 .customer-pill {
        padding: 7px 18px;
        background: #eceff1;
        border-radius: 3px;
        font-size: 14px;
        font-weight: 600;
        color: #37474f;
        white-space: nowrap;
    }

    .bottom-row-1 .order-taker {
        width: 180px;
        padding: 6px 10px;
        border: 1px solid #cfd8dc;
        border-radius: 3px;
        font-size: 13px;
        font-family: inherit;
        outline: none;
    }

.bottom-row-2 {
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 8px 12px 12px 12px;
    flex-wrap: wrap;
}

.sum-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 90px;
}

    .sum-block .sum-label {
        font-size: 11px;
        color: #555;
        font-weight: 600;
        padding-left: 2px;
    }

.sum-value {
    background: #1a1a1a;
    color: #fff;
    padding: 10px 12px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    border-radius: 3px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.sum-inputs {
    display: flex;
    gap: 4px;
}

    .sum-inputs input {
        flex: 1;
        padding: 9px 10px;
        border: 1px solid #cfd8dc;
        border-radius: 3px;
        font-size: 14px;
        font-weight: 600;
        font-family: inherit;
        text-align: center;
        outline: none;
        min-height: 42px;
        background: #fff;
    }

        .sum-inputs input:focus {
            border-color: #29b6f6;
            box-shadow: 0 0 0 2px rgba(41,182,246,0.15);
        }

.sum-input-single {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cfd8dc;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    outline: none;
    min-height: 42px;
    background: #fff;
    font-weight: 600;
}

    .sum-input-single:focus {
        border-color: #29b6f6;
        box-shadow: 0 0 0 2px rgba(41,182,246,0.15);
    }

.action-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 14px 12px;
    background: #f5f6f8;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.action-btn {
    padding: 11px 32px;
    border: none;
    border-radius: 3px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
    transition: 0.15s;
    letter-spacing: 0.3px;
}

    .action-btn:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

    .action-btn:active {
        transform: translateY(0);
    }

.btn-hold {
    background: #26a69a;
}

.btn-pay {
    background: #2ecc71;
}

.btn-reset {
    background: #e53935;
}

.success-badge {
    position: fixed;
    top: 62px;
    right: 20px;
    background: #2ecc71;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(-10px);
    transition: 0.3s;
    pointer-events: none;
    z-index: 100;
}

    .success-badge.show {
        opacity: 1;
        transform: translateY(0);
    }

@media (max-width: 1100px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }

        .form-row .form-group:nth-child(3) {
            grid-column: 1 / -1;
        }

    .bottom-row-1 .order-taker {
        width: 100%;
    }
}

/* ============================================================
   MODERN FAST POS PRODUCT CATALOG
   ============================================================ */
body:has(.products-page) {
    height: auto;
    min-height: 100%;
    overflow: auto;
    background: #f4f7fb;
    color: #17233c;
}

    body:has(.products-page) > header {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(255,255,255,.94);
        border-bottom: 1px solid #e5eaf2;
        box-shadow: 0 3px 18px rgba(27,45,82,.04);
        backdrop-filter: blur(14px);
    }

        body:has(.products-page) > header nav {
            max-width: 1440px;
            min-height: 68px;
            margin: 0 auto;
            padding: 0 32px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

            body:has(.products-page) > header nav a {
                display: inline-flex;
                align-items: center;
                padding: 11px 17px;
                border-radius: 10px;
                color: #52617a;
                text-decoration: none;
                font-size: 14px;
                font-weight: 650;
                transition: background .18s ease, color .18s ease, transform .18s ease;
            }

                body:has(.products-page) > header nav a:hover {
                    background: #edf4ff;
                    color: #2459c4;
                    transform: translateY(-1px);
                }

                body:has(.products-page) > header nav a:nth-child(3) {
                    background: #eaf1ff;
                    color: #2459c4;
                }

    body:has(.products-page) > main {
        width: 100%;
        max-width: 1440px;
        margin: 0 auto;
        padding: 34px 32px 24px;
    }

.products-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.products-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.products-heading-copy .eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.65px;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3676e8;
    box-shadow: 0 0 0 4px #e3edff;
}

.products-heading h1 {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #17233c;
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1.2;
    letter-spacing: -1.1px;
    font-weight: 760;
}

.heading-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 31px;
    height: 26px;
    padding: 0 8px;
    border-radius: 8px;
    background: #e9f0ff;
    color: #3268d5;
    font-size: 13px;
    letter-spacing: 0;
}

.products-heading-copy > p {
    margin-top: 9px;
    color: #718099;
    font-size: 14px;
}

.product-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 45px;
    padding: 0 19px;
    border: 1px solid #2f62d5;
    border-radius: 12px;
    background: linear-gradient(135deg,#3979f6,#2858ce);
    box-shadow: 0 7px 16px rgba(49,100,216,.2);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease;
}

    .product-add-btn:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(49,100,216,.28);
    }

.add-symbol {
    font-size: 21px;
    line-height: 1;
    font-weight: 400;
}

.product-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border: 1px solid #bce8d0;
    border-radius: 12px;
    background: #effbf4;
    color: #167447;
    font-size: 13px;
}

.alert-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #d2f5e0;
    font-weight: 800;
}

.product-metrics {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 16px;
}

.metric-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    padding: 20px 18px;
    overflow: hidden;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(31,52,89,.035);
}

.metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    height: 43px;
    border-radius: 13px;
    font-size: 22px;
    font-weight: 700;
}

.metric-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

    .metric-copy > span {
        color: #718099;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
    }

    .metric-copy strong {
        color: #17233c;
        font-size: clamp(20px,2vw,26px);
        line-height: 1.15;
        letter-spacing: -.6px;
        overflow-wrap: anywhere;
    }

    .metric-copy small {
        color: #9aa6b8;
        font-size: 10px;
    }

.metric-mark {
    position: absolute;
    right: 13px;
    top: 11px;
    color: #d9e3f4;
    font-size: 24px;
}

.metric-blue .metric-icon {
    background: #eaf1ff;
    color: #3974e8;
}

.metric-violet .metric-icon {
    background: #f0eaff;
    color: #8154df;
}

.metric-amber .metric-icon {
    background: #fff4df;
    color: #d88a16;
}

.metric-green .metric-icon {
    background: #e2f8ed;
    color: #159663;
}

.products-panel {
    overflow: hidden;
    border: 1px solid #e6ebf3;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(31,52,89,.045);
}

.products-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
}

    .products-panel-header h2 {
        color: #1b2942;
        font-size: 17px;
        font-weight: 750;
        letter-spacing: -.3px;
    }

    .products-panel-header p {
        margin-top: 5px;
        color: #8995a9;
        font-size: 12px;
    }

.catalog-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #dce8ff;
    border-radius: 8px;
    background: #f5f8ff;
    color: #426dca;
    font-size: 11px;
    font-weight: 700;
}

    .catalog-pill span, .footer-live span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #38b879;
    }

.product-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px 20px;
}

.product-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 100px;
    height: 44px;
    padding: 0 13px;
    border: 1px solid #e0e6ef;
    border-radius: 11px;
    background: #f9fbfe;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

    .product-search-box:focus-within {
        border-color: #8bb0ff;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(57,121,246,.09);
    }

.search-icon {
    color: #8b9ab0;
    font-size: 25px;
    line-height: 1;
    transform: rotate(-20deg);
}

.product-search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #273752;
    font: inherit;
    font-size: 13px;
}

    .product-search-box input::placeholder {
        color: #a3aec0;
    }

.search-clear-inline {
    color: #8190a7;
    text-decoration: none;
    font-size: 21px;
}

.product-search-btn, .product-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #2f62d5;
    border-radius: 10px;
    background: #315fce;
    color: #fff;
    text-decoration: none;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s, transform .18s;
}

    .product-search-btn:hover {
        background: #244fb5;
        transform: translateY(-1px);
    }

    .product-search-btn span {
        font-size: 17px;
    }

.product-clear-btn {
    border-color: #e0e6ef;
    background: #fff;
    color: #65748b;
}

    .product-clear-btn:hover {
        background: #f5f7fb;
        color: #30425f;
    }

.products-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.modern-product-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    white-space: nowrap;
}

    .modern-product-table thead th {
        padding: 13px 17px;
        border-top: 1px solid #edf0f5;
        border-bottom: 1px solid #e8edf4;
        background: #f8faff;
        color: #8390a5;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .75px;
        text-align: left;
    }

        .modern-product-table thead th:first-child {
            padding-left: 24px;
        }

    .modern-product-table tbody td {
        padding: 15px 17px;
        border-bottom: 1px solid #eef1f6;
        color: #4d5b72;
        font-size: 12px;
        vertical-align: middle;
    }

    .modern-product-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .modern-product-table tbody tr {
        transition: background .15s ease;
    }

        .modern-product-table tbody tr:hover {
            background: #f9fbff;
        }

    .modern-product-table tbody td:first-child {
        padding-left: 24px;
    }

.product-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 185px;
}

.product-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 39px;
    height: 39px;
    border: 1px solid #dfe9ff;
    border-radius: 12px;
    background: linear-gradient(145deg,#eef4ff,#e2ebff);
    color: #376bd3;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.product-name-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .product-name-copy strong {
        max-width: 220px;
        overflow: hidden;
        color: #25344e;
        font-size: 12px;
        font-weight: 750;
        text-overflow: ellipsis;
    }

    .product-name-copy span {
        color: #9aa5b7;
        font-size: 10px;
    }

.barcode-chip {
    display: inline-block;
    padding: 6px 8px;
    border: 1px solid #e7ecf4;
    border-radius: 7px;
    background: #fafbfd;
    color: #64728a;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.category-text {
    color: #64738b;
}

.numeric-cell {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.price-cell {
    color: #68768c !important;
}

.sale-price-cell {
    color: #1c8a61 !important;
    font-weight: 750;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 70px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

    .stock-badge > span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
    }

.stock-good {
    background: #eaf9f0;
    color: #198555;
}

    .stock-good > span {
        background: #25b777;
    }

.stock-low {
    background: #fff3e7;
    color: #bf7418;
}

    .stock-low > span {
        background: #f0a23d;
    }

.actions-heading {
    text-align: right !important;
    padding-right: 24px !important;
}

.modern-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .table-action span {
        font-size: 14px;
    }

.edit-action {
    border-color: #dce7ff;
    background: #f3f7ff;
    color: #3569d0;
}

    .edit-action:hover {
        border-color: #b9ceff;
        background: #e9f0ff;
        color: #234fb0;
    }

.delete-action {
    width: 32px;
    padding: 0;
    border-color: #f3dddd;
    background: #fff8f8;
    color: #cf5c63;
}

    .delete-action:hover {
        border-color: #efc2c5;
        background: #fff0f1;
    }

.inline-form {
    display: inline-flex;
    margin: 0;
}

.products-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 235px;
    padding: 35px 20px;
    text-align: center;
    white-space: normal;
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 53px;
    height: 53px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: #edf3ff;
    color: #4777d7;
    font-size: 26px;
}

.products-empty strong {
    color: #26354f;
    font-size: 14px;
}

.products-empty p {
    max-width: 370px;
    margin: 7px 0 16px;
    color: #8b97aa;
    font-size: 12px;
    line-height: 1.6;
}

.empty-add {
    min-height: 37px;
    font-size: 11px;
}

.products-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid #edf0f5;
    background: #fcfdff;
    color: #8a96a9;
    font-size: 11px;
}

    .products-panel-footer strong {
        color: #53627a;
    }

.footer-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.products-footnote {
    padding: 0 2px 4px;
    color: #9aa5b6;
    font-size: 10px;
    letter-spacing: .2px;
}

    .products-footnote span {
        color: #62718a;
        font-weight: 800;
        letter-spacing: 1px;
    }

@media (max-width: 1050px) {
    body:has(.products-page) > main {
        padding: 25px 22px;
    }

    .product-metrics {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .metric-copy strong {
        font-size: 24px;
    }
}

@media (max-width: 640px) {
    body:has(.products-page) > header nav {
        min-height: 58px;
        padding: 0 9px;
        gap: 1px;
        overflow-x: auto;
    }

        body:has(.products-page) > header nav a {
            padding: 10px 11px;
            font-size: 12px;
        }

    body:has(.products-page) > main {
        padding: 22px 12px;
    }

    .products-page {
        gap: 17px;
    }

    .products-heading {
        align-items: flex-start;
        flex-direction: column;
    }

        .products-heading h1 {
            font-size: 28px;
        }

    .product-add-btn {
        min-height: 41px;
    }

    .product-metrics {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .metric-card {
        gap: 9px;
        padding: 14px 11px;
        border-radius: 13px;
    }

    .metric-icon {
        flex-basis: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 18px;
    }

    .metric-copy > span {
        font-size: 10px;
        white-space: normal;
    }

    .metric-copy strong {
        font-size: 19px;
    }

    .metric-copy small {
        font-size: 9px;
    }

    .products-panel-header {
        padding: 18px 15px 15px;
    }

    .product-search-form {
        align-items: stretch;
        flex-wrap: wrap;
        padding: 0 15px 16px;
    }

    .product-search-box {
        flex-basis: 100%;
    }

    .product-search-btn {
        flex: 1;
    }

    .modern-product-table thead th {
        padding: 12px;
    }

        .modern-product-table thead th:first-child, .modern-product-table tbody td:first-child {
            padding-left: 14px;
        }

    .modern-product-table tbody td {
        padding: 12px;
    }

    .products-panel-footer {
        padding: 13px 15px;
    }
}

/* Classic compact product catalog inspired by the supplied FAST POS reference */
body:has(.classic-products-page) {
    background: #edf3f5;
    overflow: auto;
}

    body:has(.classic-products-page) > main {
        padding: 0 16px 28px;
        max-width: none;
    }

    body:has(.classic-products-page) > header {
        background: #fff;
    }

        body:has(.classic-products-page) > header nav {
            min-height: 44px;
        }

.classic-products-page {
    position: relative;
    background: #fff;
    border: 1px solid #c9dadd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(20,50,60,.08);
    color: #25333a;
    min-width: 0;
}

.classic-products-toolbar {
    min-height: 42px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #d4e5e7;
    border-bottom: 1px solid #c5d8da;
}

.classic-page-title {
    font-size: 15px;
    font-weight: 600;
    color: #3d5157;
}

.classic-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.classic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 15px;
    border: 1px solid #00aaba;
    border-radius: 2px;
    background: #08b7c5;
    color: white;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

    .classic-btn:hover {
        background: #079baa;
        color: #fff;
    }

.classic-products-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 14px 8px;
}

.classic-search-form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
    min-width: 200px;
}

    .classic-search-form input, .classic-products-filters select {
        height: 35px;
        border: 1px solid #c8d1d8;
        border-radius: 2px;
        padding: 7px 10px;
        background: #fff;
        color: #38454a;
        font-size: 13px;
        outline: none;
    }

    .classic-search-form input {
        width: min(100%, 280px);
    }

        .classic-search-form input:focus, .classic-products-filters select:focus {
            border-color: #069bb5;
            box-shadow: 0 0 0 2px rgba(0,155,181,.10);
        }

.classic-products-filters select {
    width: min(100%, 235px);
}

.classic-btn-search {
    min-height: 35px;
}

.classic-btn-muted {
    background: #718087;
    border-color: #718087;
}

.classic-products-table-wrap {
    margin: 0 14px 12px;
    overflow-x: auto;
    border: 1px solid #d2d9dc;
}

.classic-products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
    font-size: 13px;
}

    .classic-products-table thead th {
        background: #0879aa;
        color: #fff;
        font-weight: 500;
        text-align: left;
        padding: 12px 11px;
        border-right: 1px solid rgba(255,255,255,.16);
        white-space: nowrap;
    }

    .classic-products-table tbody td {
        padding: 11px;
        border-right: 1px solid #d8dfe2;
        border-bottom: 1px solid #d2d9dc;
        color: #39444a;
        white-space: nowrap;
    }

    .classic-products-table tbody tr:nth-child(even) {
        background: #eceeef;
    }

    .classic-products-table tbody tr:nth-child(odd) {
        background: #fff;
    }

    .classic-products-table tbody tr:hover {
        background: #e1f5f7;
    }

    .classic-products-table tbody tr[hidden] {
        display: none;
    }

    .classic-products-table .classic-product-name {
        font-weight: 600;
        color: #263840;
    }

.classic-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 4px 13px;
    border-radius: 16px;
    background: #b7e2e8;
    color: #15515b;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

    .classic-edit-btn:hover {
        background: #87d1dc;
        color: #103c43;
    }

.classic-formula {
    color: #8b969a !important;
}

.classic-empty {
    text-align: center;
    padding: 28px !important;
    color: #68777c !important;
}

.classic-products-footer {
    display: flex;
    justify-content: space-between;
    padding: 0 15px 12px;
    color: #728087;
    font-size: 12px;
}

.classic-success {
    margin: 10px 14px 0;
    padding: 9px 12px;
    background: #e2f6e9;
    border: 1px solid #b9e7c8;
    color: #23663b;
    border-radius: 3px;
    font-size: 13px;
}

.classic-settings-popover {
    position: absolute;
    z-index: 5;
    right: 110px;
    top: 45px;
    width: 210px;
    padding: 13px;
    border: 1px solid #cbd6da;
    border-radius: 4px;
    background: white;
    box-shadow: 0 8px 22px rgba(20,45,55,.18);
    font-size: 12px;
}

    .classic-settings-popover label {
        display: block;
        margin: 12px 0 8px;
    }

    .classic-settings-popover p {
        color: #718087;
        line-height: 1.4;
    }

.classic-products-table.compact-rows tbody td {
    padding-top: 5px;
    padding-bottom: 5px;
}

@media (max-width: 650px) {
    body:has(.classic-products-page) > main {
        padding: 0 7px 20px;
    }

    .classic-products-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 9px;
    }

    .classic-toolbar-actions {
        width: 100%;
    }

    .classic-btn {
        padding: 7px 10px;
    }

    .classic-products-filters {
        align-items: stretch;
        flex-direction: column;
        padding: 10px 8px 7px;
    }

    .classic-search-form {
        flex-wrap: wrap;
    }

        .classic-search-form input {
            flex: 1;
            min-width: 120px;
        }

    .classic-products-filters select {
        width: 100%;
    }

    .classic-products-table-wrap {
        margin: 0 8px 10px;
    }
}

@media print {
    body:has(.classic-products-page) > header, .classic-products-toolbar, .classic-products-filters, .classic-products-footer, .classic-products-table th:last-child, .classic-products-table td:last-child {
        display: none !important;
    }

    body:has(.classic-products-page) > main {
        padding: 0;
    }

    .classic-products-page, .classic-products-table-wrap {
        border: 0;
        box-shadow: none;
        margin: 0;
    }

    .classic-products-table {
        min-width: 0;
    }
}

/* FAST POS: light-green top navigation for the classic Products screen */
body:has(.classic-products-page) > header {
    background: #dff4e4;
    border-bottom: 1px solid #b8dfc1;
    box-shadow: 0 2px 8px rgba(29, 93, 49, .06);
}

    body:has(.classic-products-page) > header nav {
        background: #dff4e4;
        padding: 0 24px;
        gap: 8px;
    }

        body:has(.classic-products-page) > header nav a {
            color: #245c36;
            border-radius: 7px;
            font-weight: 650;
            transition: background .15s ease, color .15s ease;
        }

            body:has(.classic-products-page) > header nav a:hover {
                background: #c9ebd1;
                color: #174526;
            }

            body:has(.classic-products-page) > header nav a:nth-child(3) {
                background: #bce5c6;
                color: #174526;
            }

.classic-product-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.classic-delete-form {
    display: inline-flex;
    margin: 0;
}

.classic-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 4px 12px;
    border: 1px solid #f0b9bd;
    border-radius: 16px;
    background: #fff0f1;
    color: #b4232e;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

    .classic-delete-btn:hover {
        background: #ffdfe2;
        border-color: #e99ba2;
    }

@media (max-width: 650px) {
    body:has(.classic-products-page) > header nav {
        padding: 0 8px;
    }

    .classic-product-actions {
        gap: 4px;
    }

    .classic-delete-btn {
        padding: 4px 9px;
    }
}
