/* ===== container ===== */
.low-stock-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== back to main link ===== */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #9ab3c7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: #e4b363;
}

body.light-theme .back-link {
    color: #5a6a7a;
}

body.light-theme .back-link:hover {
    color: #c0392b;
}

/* ===== header ===== */
.low-stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #3e5568;
}

.low-stock-header h1 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eef4ff;
}

.low-stock-header .badge {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

body.light-theme .low-stock-header {
    border-bottom-color: #d0d5dd;
}

body.light-theme .low-stock-header h1 {
    color: #1a1a2e;
}

/* ===== filter ===== */
.filter-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-section select,
.filter-section input {
    padding: 8px 16px;
    border: 1px solid #3e5a6b;
    border-radius: 60px;
    background: rgba(15, 26, 31, 0.8);
    color: #f0f3f8;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.filter-section select:focus,
.filter-section input:focus {
    border-color: #e4b363;
    box-shadow: 0 0 0 3px rgba(228, 179, 99, 0.3);
}

body.light-theme .filter-section select,
body.light-theme .filter-section input {
    background: #f5f7fa;
    border: 1px solid #d0d5dd;
    color: #1a1a2e;
}

body.light-theme .filter-section select:focus,
body.light-theme .filter-section input:focus {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.2);
}

/* ===== stats bar ===== */
.stats-bar {
    display: flex;
    gap: 30px;
    padding: 16px 20px;
    background: rgba(25, 38, 46, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 60px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border: 1px solid rgba(228, 179, 99, 0.25);
}

.stats-bar .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ab3c7;
}

.stats-bar .stat-item .number {
    font-weight: 700;
    font-size: 1.2rem;
    color: #eef4ff;
}

body.light-theme .stats-bar {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(14px);
}

body.light-theme .stats-bar .stat-item {
    color: #5a6a7a;
}

body.light-theme .stats-bar .stat-item .number {
    color: #1a1a2e;
}

/* ===== table ===== */
.stock-table-wrapper {
    background: rgba(25, 38, 46, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 28px;
    border: 1px solid rgba(228, 179, 99, 0.25);
    overflow: hidden;
    overflow-x: auto;
    flex: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.stock-table thead {
    background: #1e2f3a;
    border-bottom: 2px solid #3a5468;
}

.stock-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #eef4ff;
    white-space: nowrap;
}

.stock-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #2a3b44;
    color: #b9cfdf;
}

.stock-table tbody tr:hover {
    background: rgba(30, 47, 58, 0.5);
    transition: background 0.2s;
}

.stock-table .quantity-cell {
    font-weight: 600;
    text-align: center;
}

.stock-table .quantity-low {
    color: #dc3545;
}

.stock-table .quantity-medium {
    color: #ffc107;
}

.stock-table .quantity-high {
    color: #28a745;
}

.stock-table .type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #1e2f3a;
    color: #b9cfdf;
}

/* ===== light theme - table ===== */
body.light-theme .stock-table-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

body.light-theme .stock-table thead {
    background: #e8eaed;
    border-bottom-color: #d0d5dd;
}

body.light-theme .stock-table th {
    color: #1a1a2e;
}

body.light-theme .stock-table td {
    color: #3a4a5a;
    border-bottom-color: #e8eaed;
}

body.light-theme .stock-table tbody tr:hover {
    background: #f5f7fa;
}

body.light-theme .stock-table .type-badge {
    background: #e8eaed;
    color: #1a1a2e;
}

/* ===== empty and loading ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #7e95ab;
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #eef4ff;
    margin-bottom: 10px;
}

.empty-state p {
    color: #9ab3c7;
}

body.light-theme .empty-state h3 {
    color: #1a1a2e;
}

body.light-theme .empty-state p {
    color: #3a4a5a;
}

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner i {
    font-size: 3rem;
    color: #e4b363;
}

/* ===== lowstock buttons ===== */
.search-action-btn {
    background: #e4b363;
    color: #1c2a32;
    box-shadow: 0 4px 12px rgba(228, 179, 99, 0.3);
}

.search-action-btn:hover {
    background: #f5cd8c;
}

.reset-action-btn {
    background: #2a3b44;
    color: #eef4ff;
    border: 1px solid #4f6e82;
}

.reset-action-btn:hover {
    background: #3e5664;
}

body.light-theme .search-action-btn {
    background: #c0392b;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

body.light-theme .search-action-btn:hover {
    background: #e74c3c;
}

body.light-theme .reset-action-btn {
    background: #e8eaed;
    color: #1a1a2e;
    border: 1px solid #d0d5dd;
}

body.light-theme .reset-action-btn:hover {
    background: #d5d8dd;
}

/* ===== back to main link ===== */
.back-to-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cdd6f4;
}

.back-to-main:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-main:active {
    transform: scale(0.97);
}

.back-to-main i:first-child {
    transition: transform 0.3s ease;
}

.back-to-main:hover i:first-child {
    transform: translateX(-4px);
}

body.light-theme .back-to-main {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #45475a;
}

body.light-theme .back-to-main:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== responsive design ===== */
@media (max-width: 768px) {
    .low-stock-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stock-table th,
    .stock-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 15px;
        border-radius: 28px;
    }

    .back-to-main {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .back-to-main span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .back-to-main {
        padding: 10px 14px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .back-to-main span {
        font-size: 0.85rem;
    }
}