/* ============================
   Factory Batch Tracking System
   ============================ */

/* Sidebar */
.sidebar {
    width: 250px;
    min-height: calc(100vh - 56px);
    position: fixed;
    left: 0;
    top: 56px;
    overflow-y: auto;
    z-index: 1040;
    transition: left 0.3s ease, transform 0.3s ease;
}

.sidebar .nav-link {
    border-radius: 8px;
    margin-bottom: 4px;
    padding: 10px 15px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1030;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Main content */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: calc(100vh - 56px);
    background-color: #f8f9fa;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Dashboard cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Tables */
.table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Verification page */
.verify-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    padding: 2rem;
}

.verify-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
}

.status-valid {
    background-color: #d4edda;
    color: #155724;
}

.status-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.status-rejected {
    background-color: #fff3cd;
    color: #856404;
}

/* QR Code */
.qr-container {
    display: inline-block;
    padding: 12px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
}

/* Report filters */
.table-container form .form-label {
    margin-bottom: 0.25rem;
}

/* Timeline */
.timeline-list .stat-icon {
    min-width: 40px;
}

/* Print styles */
@media print {
    .sidebar, .sidebar-overlay, .navbar, .btn, form, .alert, .sidebar-toggle {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .table-container {
        box-shadow: none;
        padding: 0;
    }
}

/* Responsive — Tablet */
@media (max-width: 991.98px) {
    .sidebar {
        left: -250px;
    }
    .sidebar.active {
        left: 0;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* Responsive — Mobile */
@media (max-width: 575.98px) {
    .main-content {
        padding: 1rem !important;
    }
    .stat-card .stat-value {
        font-size: 1.4rem;
    }
    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .table-container {
        padding: 1rem;
        border-radius: 8px;
    }
    .verify-card {
        padding: 1.5rem;
    }
    .login-card {
        padding: 1.5rem;
        margin: 1rem;
    }
}
