/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
    background: #F8F4E9;
    color: #2F3E46;
    min-height: 100vh;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(47,62,70,0.85) 0%, rgba(138,155,107,0.75) 100%), 
                url('/salescheck/assets/images/startup_image.jpg') center/cover no-repeat;
}

.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(47,62,70,0.25);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h1 { font-size: 24px; margin-bottom: 4px; color: #2F3E46; }
.login-subtitle { color: #A78A7F; margin-bottom: 24px; font-size: 13px; }
.login-form .form-group { margin-bottom: 16px; text-align: left; }
.login-form label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 13px; color: #2F3E46; }
.login-form input { width: 100%; padding: 10px 12px; border: 1px solid #D8CFC4; border-radius: 4px; font-size: 14px; transition: border-color 0.2s; }
.login-form input:focus { outline: none; border-color: #8A9B6B; }

/* ========== APP LAYOUT ========== */
.app-container { display: flex; min-height: 100vh; }

/* ========== SIDEBAR ========== */
.sidebar {
    width: 190px; background: #2F3E46; color: #F8F4E9;
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
}
.sidebar-header { padding: 18px 16px; border-bottom: 1px solid rgba(248,244,233,0.1); }
.sidebar-header h2 { font-size: 14px; font-weight: 600; color: #ae9f65; letter-spacing: 0.5px; }
.nav-list { list-style: none; padding: 12px 0; flex: 1; overflow-y: auto; }
.nav-item { margin: 1px 8px; }
.nav-link {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    color: rgba(248,244,233,0.75); text-decoration: none; border-radius: 4px;
    transition: all 0.2s; font-size: 11px; font-weight: 400;
}
.nav-link:hover { background: rgba(248,244,233,0.08); color: #F8F4E9; }
.nav-link.active { background: #ae9f65; color: #2F3E46; font-weight: 500; }
.nav-link i { width: 16px; text-align: center; font-size: 12px; }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(248,244,233,0.1); display: flex; flex-direction: column; gap: 8px; }
.user-info { font-size: 10px; color: rgba(248,244,233,0.55); display: flex; align-items: center; gap: 8px; }
.btn-logout {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: rgba(248,244,233,0.08); color: #F8F4E9; text-decoration: none;
    border-radius: 4px; font-size: 10px; text-align: center; transition: background 0.2s;
}
.btn-logout:hover { background: rgba(248,244,233,0.15); }

/* ========== MAIN CONTENT ========== */
.main-content { flex: 1; margin-left: 190px; padding: 28px; }

/* ========== BUTTONS ========== */
.btn {
    display: inline-block; padding: 8px 16px; border-radius: 4px;
    font-weight: 500; font-size: 11px; cursor: pointer; border: none;
    transition: all 0.2s; text-decoration: none; font-family: inherit;
}
.btn-primary { background: #8A9B6B; color: #fff; }
.btn-primary:hover { background: #6B8E6B; }
.btn-block { display: block; width: 100%; }
.btn-secondary { background: #EFEAE0; color: #2F3E46; padding: 8px 16px; }
.btn-secondary:hover { background: #E2DACC; }
.btn-success { background: #8A9B6B; color: #fff; padding: 12px 20px; font-size: 12px; font-weight: 500; }
.btn-success:hover { background: #6B8E6B; }
.btn-danger { background: transparent; color: #A78A7F; font-size: 11px; padding: 5px 10px; border: 1px solid #D8CFC4; }
.btn-danger:hover { background: #F5EEF0; }
.btn-sm { padding: 5px 10px; font-size: 10px; }

/* ========== ALERTS ========== */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 12px; }
.alert-error { background: #F5EEF0; color: #704776; border: 1px solid #E4D3D8; }
.alert-success { background: #F0F4EA; color: #6B8E6B; border: 1px solid #C8D5C0; }

/* ========== DASHBOARD ========== */
.page-header { margin-bottom: 20px; }
.page-header h1 { font-size: 20px; font-weight: 600; color: #2F3E46; }
.text-muted { color: #A78A7F; font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat-card {
    background: #fff; padding: 18px; border-radius: 6px;
    box-shadow: 0 1px 3px rgba(47,62,70,0.05); text-align: center;
    transition: transform 0.2s, box-shadow 0.2s; border: 1px solid #EFEAE0;
    text-decoration: none; color: inherit; display: block;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(47,62,70,0.08); }
.stat-card i { font-size: 22px; color: #8A9B6B; margin-bottom: 8px; }
.stat-card h3 { font-size: 14px; margin-bottom: 2px; color: #2F3E46; }
.stat-card p { color: #A78A7F; font-size: 11px; }
.live-stats { margin-top: 24px; }
.live-stats h3 { font-size: 14px; color: #2F3E46; margin-bottom: 10px; }
.stat-warning { border-color: #F5E8D0; }
.stat-warning i { color: #ae9f65 !important; }
.stat-warning h3 { color: #ae9f65 !important; }

/* ========== FORMS ========== */
.product-form {
    background: #fff; padding: 20px; border-radius: 6px;
    box-shadow: 0 1px 3px rgba(47,62,70,0.05); max-width: 600px; border: 1px solid #EFEAE0;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-weight: 500; font-size: 11px; margin-bottom: 3px; color: #2F3E46; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select, .form-group textarea {
    padding: 8px 10px; border: 1px solid #D8CFC4; border-radius: 4px;
    font-size: 12px; transition: border-color 0.2s; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #8A9B6B; }
.form-group small { color: #A78A7F; font-size: 10px; margin-top: 3px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.static-field { padding: 8px 10px; background: #F8F4E9; border-radius: 4px; font-family: 'Montserrat', monospace; font-size: 12px; color: #6B8E6B; margin: 0; }
.current-photo { width: 56px; height: 56px; border-radius: 4px; overflow: hidden; margin-bottom: 6px; border: 1px solid #D8CFC4; }
.current-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ========== DATALIST ========== */
datalist { max-width: 250px; }
input::-webkit-calendar-picker-indicator { opacity: 0.4; cursor: pointer; }
input:hover::-webkit-calendar-picker-indicator { opacity: 1; }

/* ========== POS SCREEN ========== */
.pos-container {
    display: flex;
    gap: 0;
    height: 100vh;
    margin: -28px;
    background: #F8F4E9;
    overflow: hidden;
}


/* PRODUCT LIST PANEL */
.pos-products {
    width: 58%;
    display: flex;
    flex-direction: column;
    background: #FFFF;
    overflow: hidden;
    border-right: 1px solid #EFEAE0;
}

.pos-products-header {
    padding: 14px 16px;
    border-bottom: 1px solid #EFEAE0;
    flex-shrink: 0;
    background: #fff;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #D8CFC4;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #8A9B6B;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 56px;
    overflow-y: auto;
}

.cat-tab {
    padding: 4px 10px;
    border: 1px solid #D8CFC4;
    border-radius: 14px;
    background: #fff;
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    color: #A78A7F;
    flex: 0 0 auto;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cat-tab:hover {
    border-color: #8A9B6B;
    color: #2F3E46;
}

.cat-tab.active {
    background: #8A9B6B;
    border-color: #8A9B6B;
    color: #fff;
}

.product-table-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    
}

.product-list {
    padding: 8px;
}

.product-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #EFEAE0;
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.12s;
    background: #fff;
}

.product-list-item:hover {
    border-color: #8A9B6B;
    background: #F8F4E9;
}

.product-list-img {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background: #F0F4EA;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.product-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-list-img i {
    font-size: 14px;
    color: #8A9B6B;
}

.product-list-info {
    flex: 1;
    min-width: 0;
}

.product-list-name {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #2F3E46;
    margin-bottom: 1px;
    line-height: 1.2;
}

.product-list-code {
    display: block;
    font-size: 9px;
    color: #A78A7F;
    line-height: 1.2;
}

.product-list-stock {
    display: block;
    font-size: 9px;
    font-weight: 500;
    color: #6B8E6B;
    margin-top: 1px;
}

.stock-low-text {
    color: #ae9f65;
    font-weight: 600;
}

.product-list-price {
    font-size: 11px;
    font-weight: 600;
    color: #8A9B6B;
    flex-shrink: 0;
}

/* CART PANEL */
.pos-cart {
    width: 42%;
    background: #F8F4E9;
    display: flex;
    flex-direction: column;
}

.pos-cart-header {
    padding: 14px 16px;
    border-bottom: 1px solid #EFEAE0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
}

.pos-cart-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #2F3E46;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 10px;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #A78A7F;
}

.cart-empty i {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
}

.cart-empty p {
    font-size: 12px;
}

.cart-item {
    background: #fff;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 6px;
    border: 1px solid #EFEAE0;
}

.cart-item-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cart-item-code {
    font-weight: 600;
    font-size: 11px;
    color: #2F3E46;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-qty {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    border: 1px solid #D8CFC4;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: #2F3E46;
}

.btn-qty:hover {
    background: #F0F4EA;
    border-color: #8A9B6B;
}

.btn-remove {
    background: none;
    border: none;
    color: #A78A7F;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background 0.15s;
}

.btn-remove:hover {
    background: #F5EEF0;
    color: #704776;
}

.cart-item-subtotal {
    font-weight: 600;
    font-size: 12px;
    color: #6B8E6B;
}

.cart-footer {
    padding: 14px 16px;
    border-top: 1px solid #EFEAE0;
    flex-shrink: 0;
    background: #fff;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2F3E46;
}

/* ========== CHECKOUT MODAL ========== */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; }
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(47,62,70,0.5); }
.modal-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 6px; padding: 20px; width: 380px; max-width: 90%; box-shadow: 0 20px 60px rgba(47,62,70,0.25); }
.modal-content h3 { font-size: 16px; margin-bottom: 14px; color: #2F3E46; font-weight: 600; }
.checkout-summary { background: #F8F4E9; padding: 10px; border-radius: 4px; margin-bottom: 14px; }
.checkout-summary p { margin: 3px 0; font-size: 12px; color: #2F3E46; }
.payment-options { display: flex; gap: 8px; }
.payment-option { flex: 1; padding: 8px; border: 1px solid #D8CFC4; border-radius: 4px; text-align: center; cursor: pointer; font-size: 11px; font-weight: 500; transition: all 0.2s; color: #2F3E46; }
.payment-option:hover { border-color: #8A9B6B; }
.payment-option input[type="radio"] { display: none; }
.payment-option:has(input:checked) { border-color: #8A9B6B; background: #F0F4EA; color: #2F3E46; }

/* ========== TABLES ========== */
.inventory-table-wrapper { background: #fff; border-radius: 4px; overflow-x: auto; border: 1px solid #EFEAE0; margin-top: 10px; }
.inventory-table { width: 100%; border-collapse: collapse; min-width: 650px; font-size: 11px; }
.inventory-table thead { background: #F8F4E9; }
.inventory-table th { padding: 8px 10px; text-align: left; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #A78A7F; border-bottom: 1px solid #EFEAE0; white-space: nowrap; }
.inventory-table td { padding: 7px 10px; font-size: 11px; border-bottom: 1px solid #F8F4E9; vertical-align: middle; color: #2F3E46; white-space: nowrap; }
.inventory-table tr:last-child td { border-bottom: none; }
.inventory-table tr:hover td { background: #FDFCFA; }
.inventory-table code { font-size: 10px; color: #6B8E6B; background: none; }
.inv-thumb { width: 28px; height: 28px; border-radius: 4px; background: #F0F4EA; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.inv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.inv-thumb i { font-size: 13px; color: #8A9B6B; }
.badge { display: inline-block; padding: 2px 8px; background: #F0F4EA; border-radius: 10px; font-size: 9px; font-weight: 500; color: #6B8E6B; }
.price-input { width: 70px; padding: 5px 6px; border: 1px solid #D8CFC4; border-radius: 3px; font-size: 11px; font-weight: 500; color: #2F3E46; text-align: right; transition: border-color 0.2s; }
.price-input:focus { outline: none; border-color: #8A9B6B; }
.stock-badge { display: inline-block; padding: 2px 8px; background: #F0F4EA; border-radius: 10px; font-size: 10px; font-weight: 600; color: #6B8E6B; }
.stock-badge.stock-low { background: #F5E8D0; color: #ae9f65; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 3px; color: #8A9B6B; text-decoration: none; transition: background 0.2s; font-size: 11px; }
.btn-icon:hover { background: #F0F4EA; }
.btn-icon-danger { color: #A78A7F; }
.btn-icon-danger:hover { background: #F5EEF0; }
.empty-table { text-align: center; padding: 25px !important; color: #A78A7F; }

/* ========== LOG TABLE ========== */
.log-table { width: 100%; border-collapse: collapse; }
.log-table th { text-align: left; padding: 6px 8px; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #A78A7F; border-bottom: 1px solid #EFEAE0; }
.log-table td { padding: 6px 8px; font-size: 11px; border-bottom: 1px solid #F8F4E9; color: #2F3E46; }
.log-table code { font-size: 10px; color: #6B8E6B; background: none; }

/* ========== STOCK IN ========== */
.stock-in-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.stock-in-form, .stock-in-log { background: #fff; padding: 16px; border-radius: 4px; border: 1px solid #EFEAE0; }
.stock-in-form h3, .stock-in-log h3 { font-size: 13px; color: #2F3E46; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #EFEAE0; font-weight: 600; }

/* ========== STOCK ADJUSTMENTS ========== */
.adjustment-form-wrapper { background: #fff; padding: 20px 24px; border-radius: 4px; border: 1px solid #EFEAE0; max-width: 550px; margin: 0 0 20px 0; }
.adjustment-form-wrapper h3 { font-size: 13px; color: #2F3E46; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #EFEAE0; font-weight: 600; }
.recent-adjustments { margin-top: 8px; }
.recent-adjustments h3 { font-size: 13px; color: #2F3E46; margin-bottom: 8px; font-weight: 600; }

/* ========== LOW STOCKS ========== */
.low-stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.low-stock-card { background: #fff; border-radius: 4px; padding: 14px; border: 1px solid #EFEAE0; transition: box-shadow 0.2s; }
.low-stock-card:hover { box-shadow: 0 2px 8px rgba(47,62,70,0.08); }
.lsc-header { display: flex; gap: 10px; margin-bottom: 10px; }
.lsc-img { width: 40px; height: 40px; border-radius: 4px; background: #F0F4EA; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.lsc-img img { width: 100%; height: 100%; object-fit: cover; }
.lsc-img i { font-size: 16px; color: #8A9B6B; }
.lsc-info { flex: 1; }
.lsc-stock { display: inline-block; padding: 2px 7px; background: #F5E8D0; color: #ae9f65; border-radius: 10px; font-size: 10px; font-weight: 600; margin-bottom: 3px; }
.lsc-stock.critical { background: #F5EEF0; color: #704776; }
.lsc-info code { display: block; font-size: 9px; color: #A78A7F; background: none; margin-bottom: 2px; }
.lsc-name { font-size: 11px; font-weight: 600; color: #2F3E46; }
.lsc-supplier { background: #F8F4E9; padding: 8px; border-radius: 4px; font-size: 10px; color: #2F3E46; margin-bottom: 10px; }
.lsc-supplier a { color: #8A9B6B; text-decoration: none; }
.lsc-supplier a:hover { text-decoration: underline; }
.no-supplier { color: #A78A7F; font-style: italic; }
.lsc-actions { display: flex; gap: 6px; }
.empty-state { text-align: center; padding: 50px 20px; color: #A78A7F; }
.empty-state i { font-size: 44px; margin-bottom: 10px; display: block; }
.empty-state p { font-size: 13px; }

/* ========== PAYMENTS ========== */
.filter-bar { background: #fff; padding: 12px 14px; border-radius: 4px; border: 1px solid #EFEAE0; margin-bottom: 12px; }
.filter-fields { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filter-fields .form-group { margin-bottom: 0; }
.filter-fields .form-group label { display: block; font-size: 9px; font-weight: 600; color: #A78A7F; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.filter-fields input[type="date"], .filter-fields select { padding: 6px 8px; border: 1px solid #D8CFC4; border-radius: 3px; font-size: 11px; color: #2F3E46; font-family: inherit; }
.summary-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
.summary-card { background: #fff; padding: 12px; border-radius: 4px; border: 1px solid #EFEAE0; text-align: center; }
.summary-label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: #A78A7F; margin-bottom: 3px; }
.summary-value { font-size: 14px; font-weight: 600; color: #2F3E46; }
.payment-badge { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 9px; font-weight: 600; }
.payment-badge.cash { background: #F0F4EA; color: #6B8E6B; }
.payment-badge.card { background: #EDF0F5; color: #4E6E8E; }
.payment-badge.snapscan { background: #F5EEF0; color: #704776; }
.total-col { font-weight: 600; color: #6B8E6B; }
.invoice-link { color: #2F3E46; text-decoration: none; }
.invoice-link:hover { text-decoration: underline; color: #8A9B6B; }
.invoice-detail { background: #fff; padding: 16px; border-radius: 4px; border: 1px solid #EFEAE0; margin-top: 12px; }
.invoice-detail h3 { font-size: 13px; color: #2F3E46; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #EFEAE0; font-weight: 600; }
.discount-note { color: #A78A7F; font-style: italic; font-size: 10px; }
.status-banner { background: #fff; padding: 16px; border-radius: 4px; border: 1px solid #EFEAE0; margin-bottom: 16px; }
.status-banner h3 { font-size: 14px; color: #2F3E46; font-weight: 500; }

/* ========== SUCCESS TOAST ========== */
.success-toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    background: #6B8E6B; color: #fff; padding: 14px 24px; border-radius: 4px;
    font-size: 13px; font-weight: 600; z-index: 2000;
    box-shadow: 0 8px 24px rgba(107,142,107,0.35);
    display: flex; align-items: center; gap: 10px; transition: opacity 0.3s;
    font-family: 'Montserrat', sans-serif;
}
.success-toast i { font-size: 18px; }

/* ========== STOCK COUNTS ========== */
.start-count-card { background: #fff; padding: 24px; border-radius: 4px; border: 1px solid #EFEAE0; text-align: center; max-width: 450px; }
.start-count-card h3 { color: #2F3E46; margin-bottom: 6px; font-weight: 600; }
.start-count-card p { color: #A78A7F; margin-bottom: 16px; font-size: 12px; }
.count-session h3 { color: #2F3E46; margin-bottom: 12px; font-weight: 600; }
.count-table-wrapper { background: #fff; border-radius: 4px; border: 1px solid #EFEAE0; overflow-x: auto; margin-bottom: 12px; }
.count-input { width: 60px; padding: 5px 6px; border: 1px solid #D8CFC4; border-radius: 3px; font-size: 11px; font-weight: 500; text-align: center; }
.count-notes { width: 100px; padding: 5px 6px; border: 1px solid #D8CFC4; border-radius: 3px; font-size: 10px; }
.variance-cell { font-weight: 600; font-size: 11px; }
.variance-warn { color: #704776; font-weight: 600; }
.recent-counts { margin-top: 20px; }
.recent-counts h3 { color: #2F3E46; margin-bottom: 8px; font-weight: 600; }

/* ========== REPORTS ========== */
.chart-container { background: #fff; padding: 16px; border-radius: 4px; border: 1px solid #EFEAE0; margin-bottom: 12px; }
.chart-container h3 { font-size: 13px; color: #2F3E46; margin-bottom: 10px; font-weight: 600; }
.chart-container canvas { max-height: 220px; }


/* Sidebar scrollbar */
.sidebar .nav-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar .nav-list::-webkit-scrollbar-track {
    background: #ae9f65;
}

.sidebar .nav-list::-webkit-scrollbar-thumb {
    background: grey;
    border-radius: 3px;
}

.sidebar .nav-list::-webkit-scrollbar-thumb:hover {
    background: #F8F4E9;
}

/* ========== PAYMENT FILTER TABS ========== */
.payment-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 12px 0;
    padding: 0;
}

.pay-tab {
    padding: 7px 16px;
    border: 1px solid #D8CFC4;
    background: #fff;
    color: #A78A7F;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pay-tab:hover {
    border-color: #8A9B6B;
    color: #2F3E46;
}

.pay-tab.active {
    background: #8A9B6B;
    color: #fff;
    border-color: #8A9B6B;
}

/* ========== IMAGE LIGHTBOX ========== */
.inv-thumb-clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.inv-thumb-clickable:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(47,62,70,0.15);
}

.img-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(47,62,70,0.75);
}
.img-lightbox-content {
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(47,62,70,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}
.img-lightbox-content img {
    max-width: 80vw;
    max-height: 70vh;
    border-radius: 4px;
    display: block;
    object-fit: contain;
}
.img-lightbox-caption {
    margin-top: 14px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}
.img-lightbox-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #2F3E46;
    margin-bottom: 3px;
}
.img-lightbox-code {
    display: block;
    font-size: 11px;
    color: #A78A7F;
    font-family: 'Courier New', monospace;
}
.img-lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #EFEAE0;
    color: #2F3E46;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.img-lightbox-close:hover {
    background: #D8CFC4;
}



/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .main-content { padding: 16px; }
    .pos-products { width: 55%; }
    .pos-cart { width: 45%; }
    .summary-row { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
    .summary-card { padding: 10px; }
    .summary-value { font-size: 12px; }
    .inventory-table-wrapper, .chart-container, .filter-bar, .invoice-detail,
    .adjustment-form-wrapper, .recent-adjustments, .count-table-wrapper {
        overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
}


/* ========== ONLINE ORDERS ========== */
.order-detail-info {
    background: #fff;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #2F3E46;
    line-height: 1.8;
}

.order-total-display {
    font-size: 16px;
    margin: 12px 0;
    text-align: right;
    color: #2F3E46;
    font-weight: 600;
}

@media (max-width: 768px) {
    .sidebar { width: 100%; position: relative; bottom: auto; }
    .main-content { margin-left: 0; padding: 14px; }
    .app-container { flex-direction: column; }
    .stock-in-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .pos-container { flex-direction: column; height: auto; margin: -14px; }
    .pos-products { width: 100%; max-height: 45vh; }
    .pos-cart { width: 100%; max-height: 50vh; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .low-stock-grid { grid-template-columns: 1fr; }
}

/* Large screens — laptop/desktop refinement */
@media (min-width: 1200px) {
    .main-content {
        padding: 36px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .text-muted {
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }

    .stat-card {
        padding: 24px;
    }

    .stat-card i {
        font-size: 28px;
    }

    .stat-card h3 {
        font-size: 16px;
    }

    .stat-card p {
        font-size: 12px;
    }

    .inventory-table {
        font-size: 12px;
    }

    .inventory-table th {
        font-size: 10px;
        padding: 10px 14px;
    }

    .inventory-table td {
        font-size: 12px;
        padding: 10px 14px;
    }

    .summary-row {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .summary-card {
        padding: 18px;
    }

    .summary-value {
        font-size: 18px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 12px;
    }

    .pos-products {
        width: 60%;
    }

    .pos-cart {
        width: 40%;
    }

    .product-list-item {
        padding: 10px 14px;
    }

    .product-list-name {
        font-size: 12px;
    }

    .product-list-price {
        font-size: 13px;
    }

    .cart-item {
        padding: 12px;
    }
}