/* PREMIUM THEME FOR SG CA CANH POS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --border-color: rgba(212, 175, 55, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #d4af37;
    --primary-hover: #b8860b;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Outfit', sans-serif; }
body { background: var(--bg-color); color: var(--text-primary); min-height: 100vh; display: flex; overflow-x: hidden; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.5); border-radius: 10px; }

/* Utilities */
.glass { 
    background: var(--surface-color); 
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px); 
    border: 1px solid var(--border-color); 
    border-radius: 16px; 
    box-shadow: var(--shadow-premium); 
}

.app-container { display: flex; width: 100%; max-width: 1600px; margin: 0 auto; }

/* Desktop Sidebar */
.sidebar { width: 250px; padding: 24px; display: flex; flex-direction: column; margin: 16px; height: calc(100vh - 32px); position: sticky; top: 16px; z-index: 50;}
.logo h2 { font-weight: 700; color: var(--primary-color); margin-bottom: 32px; text-align: center; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 0 10px rgba(212,175,55,0.3);}
.nav-menu { display: flex; flex-direction: column; gap: 12px; }
.nav-btn { background: transparent; color: var(--text-secondary); border: none; padding: 14px 20px; border-radius: 12px; text-align: left; font-size: 16px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-weight: 500;}
.nav-btn:not(.active):hover { background: rgba(212, 175, 55, 0.1); color: var(--primary-color); transform: translateX(5px);}
.nav-btn.active { background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: #000; font-weight: 700; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4); transform: translateX(5px);}

/* Main Content */
.main-content { flex: 1; padding: 16px 32px 32px 16px; overflow-y: auto; height: 100vh; padding-bottom: 100px;}
.view { display: none; animation: scaleIn 0.3s ease-out forwards; opacity: 0;}
.view.active { display: block; }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.98) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 10px;}
h1 { font-weight: 600; font-size: 28px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5);}

/* Buttons */
.btn-primary { background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: #000; border: none; padding: 12px 24px; border-radius: 10px; cursor: pointer; font-weight: 600; transition: all 0.3s; text-transform: uppercase; font-size: 14px; letter-spacing: 0.5px;}
.btn-primary:hover { box-shadow: 0 4px 15px rgba(212, 175, 55, 0.5); transform: translateY(-2px);}
.btn-secondary { background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: var(--text-primary); padding: 12px 24px; border-radius: 10px; cursor: pointer; transition: 0.3s; }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); color: white; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.3s; }
.btn-danger:hover { box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); transform: translateY(-2px);}

/* Dashboard Cards */
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.card { padding: 24px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.3s;}
.card:hover { transform: translateY(-5px); }
.card h3 { font-weight: 500; color: var(--text-secondary); font-size: 15px; text-transform: uppercase; letter-spacing: 1px;}
.card p { font-size: 28px; font-weight: 700; color: #fff;}
.card.highlight { border-color: var(--success-color); background: rgba(16, 185, 129, 0.1);}
.card.highlight p { color: var(--success-color); text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);}

/* Tables */
.table-container { padding: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 600px;}
th, td { padding: 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 15px;}
th { color: var(--primary-color); font-weight: 600; text-transform: uppercase; font-size: 13px; letter-spacing: 1px;}
tbody tr { transition: background 0.2s; }
tbody tr:hover { background: rgba(212, 175, 55, 0.05); }
.low-stock { color: var(--danger-color); font-weight: bold; }
.cancelled-row { opacity: 0.4; text-decoration: line-through; }

/* POS View */
.pos-container { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.pos-products, .pos-cart { padding: 24px; display: flex; flex-direction: column; gap: 20px; }

/* Search & Categories */
.pos-search-wrapper { display: flex; gap: 10px; margin-bottom: 15px; width: 100%; }
#pos-search { width: 0; flex: 1; min-width: 100px; padding: 14px 20px; border-radius: 12px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.2); color: white; font-size: 16px; outline: none; transition: 0.3s;}
#pos-search:focus { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(212,175,55,0.2);}
#pos-search::placeholder { color: var(--text-secondary); }

.pos-categories { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.pos-categories::-webkit-scrollbar { display: none; }
.cat-filter-btn { padding: 10px 20px; border: 1px solid var(--border-color); border-radius: 30px; background: rgba(255,255,255,0.03); color: var(--text-secondary); cursor: pointer; white-space: nowrap; font-weight: 500; transition: 0.3s;}
.cat-filter-btn:hover { background: rgba(212,175,55,0.1); color: #fff;}
.cat-filter-btn.active { background: var(--primary-color); color: #000; border-color: var(--primary-color); font-weight: 700; box-shadow: 0 4px 10px rgba(212,175,55,0.3);}

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; overflow-y: auto; max-height: calc(100vh - 250px); padding-right: 5px;}
.product-item { 
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9)); 
    border: 1px solid rgba(255,255,255,0.08); 
    border-top: 1px solid rgba(255,255,255,0.15); 
    border-radius: 14px; 
    padding: 16px; 
    cursor: pointer; 
    transition: all 0.15s ease-out; 
    text-align: center; 
    position: relative;
    box-shadow: 0 6px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.product-item:hover { 
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 1));
    border-color: var(--primary-color); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.product-item:active {
    transform: translateY(4px) scale(0.98);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 3px 8px rgba(0,0,0,0.6), 0 0 15px rgba(245, 158, 11, 0.5);
    border-color: rgba(245, 158, 11, 0.5);
}
.product-item h4 { margin-bottom: 10px; font-size: 14px; font-weight: 500; line-height: 1.4; text-shadow: 0 1px 2px rgba(0,0,0,0.8);}
.product-item p { color: var(--primary-color); font-weight: 700; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,0.8);}
.hot-badge { position: absolute; top: -8px; right: -8px; background: linear-gradient(135deg, #ef4444, #f97316); color: white; font-size: 11px; padding: 4px 8px; border-radius: 20px; font-weight: 800; box-shadow: 0 2px 10px rgba(239,68,68,0.5);}

/* Cart */
.cart-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 350px); padding-right: 5px;}
.cart-item { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.2); padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05);}
.cart-item > div:first-child { flex: 1; min-width: 0; margin-right: 8px; }
.cart-item h4 { font-size: 14px; margin-bottom: 4px; font-weight: 500; white-space: normal; word-break: break-word;}
.cart-item small { color: var(--primary-color); font-weight: 600;}
.cart-item-qty { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.3); padding: 4px; border-radius: 8px; flex-shrink: 0;}
.cart-item-qty button { background: transparent; border: none; color: var(--primary-color); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 18px; font-weight: bold; transition: 0.2s;}
.cart-item-qty button:hover { background: rgba(212,175,55,0.2); }

.cart-customer { padding: 16px 0; border-top: 1px solid var(--border-color); margin-top: auto;}
.cart-customer input { width: 100%; padding: 14px; border-radius: 10px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.2); color: white; margin-bottom: 10px; outline: none;}
.cart-customer input:focus { border-color: var(--primary-color); }
.cart-total { display: flex; justify-content: space-between; font-size: 22px; font-weight: bold; padding: 16px 0; border-top: 1px solid var(--border-color); color: var(--primary-color);}
.btn-checkout { background: linear-gradient(135deg, var(--success-color), #059669); color: white; border: none; padding: 18px; border-radius: 12px; font-size: 20px; font-weight: 800; cursor: pointer; transition: 0.3s; width: 100%; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 4px 15px rgba(16,185,129,0.3);}
.btn-checkout:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16,185,129,0.5);}

/* MOBILE APP RESPONSIVE */
@media (max-width: 900px) {
    body { flex-direction: column; width: 100%; max-width: 100vw; overflow-x: hidden; height: auto; min-height: 100vh; overflow-y: auto; }
    .app-container { flex-direction: column; width: 100%; max-width: 100%; overflow-x: hidden; height: auto; }
    
    /* Bottom Navigation Bar - Scrollable */
    .sidebar { position: fixed; bottom: 0; top: auto; left: 0; width: 100%; height: 75px; flex-direction: row; justify-content: flex-start; padding: 0; margin: 0; z-index: 1000; border-radius: 20px 20px 0 0; border: none; border-top: 1px solid var(--border-color); background: rgba(15, 23, 42, 0.95); box-shadow: 0 -5px 20px rgba(0,0,0,0.5); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;}
    .sidebar::-webkit-scrollbar { display: none; }
    .logo { display: none; }
    .nav-menu { flex-direction: row; width: max-content; justify-content: flex-start; align-items: center; gap: 8px; padding: 0 10px; height: 100%; }
    .nav-btn { flex: 0 0 auto; min-width: 80px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 8px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 50px; margin-top: 12px;}
    .nav-btn.active { background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: #000; border: none; transform: translateY(-4px); box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3); height: 55px; margin-top: 5px;}
    .nav-btn:not(.active):hover { transform: translateY(-2px); background: rgba(255,255,255,0.1); }

    .main-content { padding: 15px 15px 95px 15px; height: auto; overflow: visible; width: 100%; max-width: 100%; overflow-x: hidden;}
    h1 { font-size: 22px; }
    
    /* POS Layout - Compacted for mobile */
    .pos-container { grid-template-columns: 1fr; gap: 15px; min-width: 0; max-width: 100%; }
    .pos-products, .pos-cart { padding: 10px; min-width: 0; max-width: 100%; }
    .pos-search-wrapper { flex-direction: column; gap: 8px; }
    .pos-search-wrapper #pos-search { width: 100%; }
    .pos-search-wrapper button { width: 100%; }
    
    /* Small items to fit 3-4 columns on mobile */
    .product-grid { max-height: 45vh; overflow-y: auto; grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; margin-bottom: 10px;}
    .product-item { padding: 8px; border-radius: 8px; }
    .product-item h4 { font-size: 11px; margin-bottom: 4px; line-height: 1.2; font-weight: 500; }
    .product-item p { font-size: 12px; }
    .product-item small { font-size: 9px; opacity: 0.7; }
    .hot-badge { font-size: 8px; padding: 1px 4px; top: -5px; right: -5px; }
    
    /* Small Cart Items & Inputs */
    .cart-items { max-height: none; }
    .cart-item { padding: 8px; border-radius: 8px; margin-bottom: 2px;}
    .cart-item h4 { font-size: 12px; }
    .cart-item-qty { gap: 6px; padding: 2px; }
    .cart-item-qty button { width: 22px; height: 22px; font-size: 14px; }
    
    .cart-customer { padding: 8px 0; }
    .cart-customer input { padding: 8px; font-size: 12px; margin-bottom: 6px; border-radius: 6px; }
    .cart-total { font-size: 16px; padding: 8px 0; }
    .btn-checkout { padding: 10px; font-size: 15px; border-radius: 8px; margin-top: 5px;}
    
    .dashboard-cards { grid-template-columns: 1fr 1fr; gap: 12px;}
    .card { padding: 16px; }
    .card p { font-size: 20px; }
    
    /* Hide Khu vuc and Tinh phi in Shippers table on mobile */
    #shippers-table th:nth-child(2),
    #shippers-table td:nth-child(2),
    #shippers-table th:nth-child(3),
    #shippers-table td:nth-child(3) {
        display: none;
    }

    /* OPTIMIZED FOR MOBILE SCREEN (SMARTPHONE UI) */
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
    
    /* Chuyển bảng Lịch sử Hóa đơn thành dạng Thẻ Card dọc siêu thoáng trên điện thoại */
    #supplier-invoices-table, #supplier-invoices-table thead, #supplier-invoices-table tbody, #supplier-invoices-table th, #supplier-invoices-table td, #supplier-invoices-table tr {
        display: block;
    }
    #supplier-invoices-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    #supplier-invoices-table tr {
        background: rgba(15, 23, 42, 0.7);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    #supplier-invoices-table td {
        border: none;
        position: relative;
        padding: 6px 0 6px 110px;
        text-align: right;
        font-size: 13px;
        border-bottom: 1px dashed rgba(255,255,255,0.08);
    }
    #supplier-invoices-table td:last-child {
        border-bottom: none;
        padding-top: 10px;
    }
    #supplier-invoices-table td:before {
        position: absolute;
        top: 6px;
        left: 0;
        width: 100px;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--primary-color);
        font-size: 12px;
    }
    #supplier-invoices-table td:nth-of-type(1):before { content: "Ngày Nhập:"; }
    #supplier-invoices-table td:nth-of-type(2):before { content: "Đại Lý:"; }
    #supplier-invoices-table td:nth-of-type(3):before { content: "Mặt Hàng:"; }
    #supplier-invoices-table td:nth-of-type(4):before { content: "Tổng Tiền:"; }
    #supplier-invoices-table td:nth-of-type(5):before { content: "Đã Trả:"; }
    #supplier-invoices-table td:nth-of-type(6):before { content: "Còn Nợ:"; }
    #supplier-invoices-table td:nth-of-type(7):before { content: "Hóa Đơn:"; }

    /* Fix Nhà cung cấp Table trên mobile */
    #suppliers-table th, #suppliers-table td { font-size: 12px; padding: 8px 6px; }
}

/* Modals */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 2000; align-items: center; justify-content: center; padding: 15px; backdrop-filter: blur(5px);}
.modal.active { display: flex; animation: fadeIn 0.3s; }
.modal-content { width: 100%; max-width: 500px; padding: 30px; }
form { display: flex; flex-direction: column; gap: 16px; }
form label { color: var(--text-secondary); font-size: 14px; font-weight: 500; margin-bottom: -8px;}
form input, form select { padding: 14px; border-radius: 10px; border: 1px solid var(--border-color); background: rgba(0,0,0,0.2); color: white; outline: none; font-size: 16px;}
form input:focus, form select:focus { border-color: var(--primary-color); }
.modal-actions { display: flex; justify-content: flex-end; gap: 15px; margin-top: 25px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Loading overlay */
#loading-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.9); z-index: 9999; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--primary-color); flex-direction: column; gap: 15px;}
#loading-overlay::after { content: ''; width: 40px; height: 40px; border: 4px solid rgba(212, 175, 55, 0.2); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loading-overlay.active { display: flex; }

/* LOGIN SCREEN */
#login-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-color); z-index: 10000; display: flex; justify-content: center; align-items: center; padding: 20px; background-image: radial-gradient(circle at top right, rgba(212,175,55,0.1), transparent 50%);}
.login-box { padding: 40px; width: 100%; max-width: 400px; text-align: center; }
.login-box h2 { margin-bottom: 30px; color: var(--primary-color); font-size: 28px; text-transform: uppercase; letter-spacing: 2px;}
.login-box input { width: 100%; padding: 16px; margin-bottom: 20px; background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); color: white; border-radius: 12px; font-size: 16px; outline: none; transition: 0.3s;}
.login-box input:focus { border-color: var(--primary-color); box-shadow: 0 0 15px rgba(212,175,55,0.2);}
.login-box button { width: 100%; background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: #000; border: none; padding: 16px; border-radius: 12px; cursor: pointer; font-weight: 700; font-size: 18px; transition: 0.3s; text-transform: uppercase; letter-spacing: 1px;}
.login-box button:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(212,175,55,0.4);}

/* Suggestions Dropdown for customer auto-fill */
.suggestions-dropdown {
    position: absolute;
    top: 45px;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    transition: background 0.2s;
    text-align: left;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--primary-color);
}

/* LANDSCAPE ORIENTATION FIXES FOR MOBILE */
@media (max-width: 900px) and (orientation: landscape) {
    .sidebar { height: 50px; }
    .nav-btn { height: 40px; font-size: 10px; padding: 2px; }
    .main-content { padding-bottom: 70px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}

/* INVENTORY & RESTOCK GRID STYLES */
#inventory-grid, #restock-grid, #all-restock-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
}
.restock-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 15px;
    position: relative;
    transition: all 0.15s ease-out;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.restock-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.restock-card.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}
.restock-card h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #f1f5f9;
}
.restock-card .stock-info {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
}
.restock-card .stock-info span {
    font-weight: bold;
    color: #ef4444;
}
.restock-card .order-input {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 4px;
    margin-top: auto;
}
.restock-card .order-input button {
    background: none;
    border: none;
    color: #f1f5f9;
    font-size: 16px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}
.restock-card .order-input button:hover {
    background: rgba(255,255,255,0.1);
}
.restock-card .order-input input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    outline: none;
    width: 40px;
    -moz-appearance: textfield;
}
.restock-card .order-input input::-webkit-outer-spin-button,
.restock-card .order-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
@media (max-width: 900px) {
    #inventory-grid, #restock-grid, #all-restock-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    #inventory-grid, #restock-grid, #all-restock-grid { grid-template-columns: repeat(2, 1fr); gap: 8px;}
    .restock-card { padding: 10px; }
    .restock-card h4 { font-size: 13px; }
}

