:root {
    /* Color Palette - Wusum Hotel Branding */
    --primary-red: #EE3239;
    --secondary-green: #2E7D32;
    --accent-gold: #FFD700;

    --primary-gradient: linear-gradient(135deg, #EE3239 0%, #b31d23 100%);
    --secondary-gradient: linear-gradient(135deg, #2E7D32 0%, #1b5e20 100%);
    --primary-dark: #b31d23;
    --primary-light: #ff5f65;

    --accent-gradient: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    --success-gradient: linear-gradient(135deg, #2E7D32 0%, #43a047 100%);
    --warning-gradient: linear-gradient(135deg, #FFD700 0%, #fbc02d 100%);
    --danger-gradient: linear-gradient(135deg, #EE3239 0%, #d32f2f 100%);
    --info-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    --info-blue: #0284c7;
    --warning-yellow: #f59e0b;

    /* Neutral Colors - Light Theme (Logo Background) */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;

    /* Text Colors - Dark for contrast */
    --text-primary: #1a1a2e;
    --text-secondary: #495057;
    --text-muted: #adb5bd;

    /* Status Colors */
    --status-adequate: #2E7D32;
    --status-warning: #f59e0b;
    --status-low: #d97706;
    --status-critical: #EE3239;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);

    /* Glassmorphism - Adjusted for Light Theme */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(238, 50, 57, 0.1);
    --glass-blur: blur(10px);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background - Using Logo Colors (Red & Green) */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(238, 50, 57, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(46, 125, 50, 0.08) 0%, transparent 50%);
    animation: bgRotate 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes bgRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.login-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-xl);
    animation: fadeSlideUp 0.6s ease-out;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-md);
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: var(--shadow-lg);
    animation: pulse 2s ease-in-out infinite;
    overflow: hidden;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.login-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 0.875rem var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-base);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(238, 50, 57, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    gap: var(--spacing-xs);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
}

/* Sidebar */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.sidebar-logo-icon {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.sidebar-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-logo-text h2 {
    font-size: 1.25rem;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-logo-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-details h4 {
    font-size: 0.9rem;
    margin: 0;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.nav-menu {
    flex: 1;
    padding: var(--spacing-lg);
    padding-bottom: 120px;
    /* Add extra breathing room so the last items are visible when scrolled on mobile */
    list-style: none;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: var(--spacing-lg) 0 var(--spacing-sm);
    letter-spacing: 0.1em;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 0.75rem var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(238, 50, 57, 0.05);
    color: var(--primary-red);
}

.nav-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-icon {
    font-size: 0.65rem;
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.nav-link.active .nav-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-badge {
    margin-left: auto;
    background: var(--primary-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: var(--spacing-2xl);
    min-height: 100vh;
    overflow-x: auto;
    max-width: calc(100vw - 280px);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-2xl);
}

.page-title {
    font-size: 2rem;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Cards & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.stat-card {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-red);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-xl);
}

.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: var(--spacing-lg);
}

/* Tables */
/* Charts */
.chart-container {
    height: 300px;
    width: 100%;
    margin-top: var(--spacing-md);
}

.chart-card {
    grid-column: span 2;
}

.table-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: var(--spacing-lg);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-primary);
}

/* Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-adequate {
    background: rgba(46, 125, 50, 0.1);
    color: var(--secondary-green);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-low {
    background: rgba(238, 50, 57, 0.1);
    color: var(--primary-red);
}

.badge-critical {
    background: var(--primary-red);
    color: white;
}

.badge-pending {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

.badge-approved {
    background: rgba(46, 125, 50, 0.1);
    color: var(--secondary-green);
}

.badge-rejected {
    background: rgba(238, 50, 57, 0.1);
    color: var(--primary-red);
}

.badge-sent_to_finance {
    background: rgba(2, 132, 199, 0.1);
    color: var(--info-blue);
}

.badge-received {
    background: rgba(46, 125, 50, 0.1);
    color: var(--secondary-green);
    border: 1px solid var(--secondary-green);
}

.badge-cancelled {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
}

/* Item Type Specifics */
.muted-input {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted);
    font-style: italic;
}

/* Alerts */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: rgba(46, 125, 50, 0.1);
    color: var(--secondary-green);
    border-left: 4px solid var(--secondary-green);
}

.alert-danger {
    background: rgba(238, 50, 57, 0.1);
    color: var(--primary-red);
    border-left: 4px solid var(--primary-red);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-left: 4px solid #d97706;
}

/* Timeline Component */
.timeline-container {
    margin: 2rem 0;
    padding: 1rem 0;
    overflow-x: auto;
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    min-width: 600px;
    padding: 0 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 4rem;
    right: 4rem;
    height: 3px;
    background: var(--bg-tertiary);
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.timeline-dot {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border: 3px solid var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: all var(--transition-base);
    margin-bottom: 0.75rem;
    position: relative;
}

.timeline-step.active .timeline-dot {
    background: var(--primary-gradient);
    border-color: var(--primary-red);
    color: white;
    box-shadow: 0 0 15px rgba(238, 50, 57, 0.3);
}

.timeline-step.completed .timeline-dot {
    background: var(--secondary-gradient);
    border-color: var(--secondary-green);
    color: white;
}

.timeline-step.rejected .timeline-dot {
    background: var(--danger-gradient);
    border-color: var(--primary-red);
    color: white;
}

.timeline-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-step.active .timeline-label {
    color: var(--primary-red);
}

.timeline-step.completed .timeline-label {
    color: var(--secondary-green);
}

/* Timeline Tooltips */
.timeline-dot:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    padding: var(--spacing-lg);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    width: 100%;
    max-width: 550px;
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: all var(--transition-base);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* Category Sections */
.category-header-banner {
    background: var(--bg-tertiary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--primary-red);
}

.category-header-banner h3 {
    font-size: 1.1rem;
    margin: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(238, 50, 57, 0.1);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Utilities */
.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.mb-4 {
    margin-bottom: var(--spacing-xl);
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mt-4 {
    margin-top: var(--spacing-xl);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--bg-secondary);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background var(--transition-fast);
}

.dropdown-content a:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-red);
}

.dropdown:hover .dropdown-content,
.dropdown-content.show {
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   Responsive Design & Mobile Optimization
   ============================================ */

/* Mobile Header (Hidden by default) */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1001;
    padding: 0 var(--spacing-md);
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.mobile-logo img {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.mobile-logo span {
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 3px;
    transition: all var(--transition-base);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

/* Responsive Overrides */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        width: 260px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 80px var(--spacing-md) var(--spacing-xl);
        /* Top padding for mobile header */
        max-width: 100%;
    }

    .mobile-header {
        display: flex;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .page-title {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .chart-card {
        grid-column: span 1;
    }

    .modal-content {
        padding: var(--spacing-lg);
        margin: 0 var(--spacing-sm);
    }

    /* Table Responsiveness */
    .table-container {
        border-radius: var(--radius-md);
    }

    table {
        min-width: 600px;
        /* Still allow some horizontal scroll for complex tables */
    }

    th,
    td {
        padding: var(--spacing-md);
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: var(--spacing-lg);
        margin: 0 var(--spacing-sm);
    }

    .login-logo {
        width: 100px;
        height: 100px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .timeline {
        min-width: 100%;
        flex-direction: column;
        gap: 1.5rem;
        padding-left: 1rem;
    }

    .timeline::before {
        display: none;
    }

    .timeline-step {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }

    .timeline-dot {
        width: 40px;
        height: 40px;
        margin-bottom: 0;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
}

/* ==============================================================
   PRINT STYLES
   ============================================================== */
@media print {
    @page {
        margin: 8mm;
        size: landscape;
    }

    body,
    .main-content {
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #000 !important;
        box-shadow: none !important;
        font-size: 9pt !important;
    }

    /* Hide unnecessary UI elements */
    .sidebar,
    .btn,
    .alert,
    button,
    .dropdown,
    #exportOptions,
    select,
    input[type="date"],
    .form-group,
    .form-label,
    .form-input,
    .page-header,
    .nav-menu,
    .nav-link,
    #closingReportsSection,
    body::before {
        display: none !important;
    }

    /* Expand main content to full width */
    .app-container {
        display: block !important;
    }

    .main-content {
        margin-left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* Card styling for print */
    .card,
    .table-container {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        overflow: visible !important;
    }

    /* Remove min-width so table fits the page */
    table {
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: collapse !important;
        table-layout: auto !important;
        font-size: 8pt !important;
    }

    th,
    td {
        border: 1px solid #ccc !important;
        padding: 4px 6px !important;
        font-size: 8pt !important;
        color: #000 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 150px !important;
    }

    th {
        background-color: #f2f2f2 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 7pt !important;
        text-transform: uppercase;
    }

    /* FIFO Batches details - hide on print for cleaner output */
    td div[style*="border:1px dashed"],
    td div[style*="border: 1px dashed"] {
        display: none !important;
    }

    /* Badges - compact for print */
    .badge {
        border: 1px solid #999 !important;
        background: transparent !important;
        color: #000 !important;
        font-size: 7pt !important;
        padding: 1px 4px !important;
    }

    .badge-adequate {
        color: #2E7D32 !important;
    }

    .badge-warning,
    .badge-low {
        color: #d97706 !important;
    }

    .badge-critical,
    .badge-rejected {
        color: #EE3239 !important;
    }

    /* Summary stat cards for print - full width, even spacing */
    .print-summary-stats {
        display: flex !important;
        width: 100% !important;
        gap: 0 !important;
        padding: 0 !important;
        margin-bottom: 8px !important;
        border: 1px solid #333 !important;
    }

    .print-stat-card {
        flex: 1 !important;
        background: transparent !important;
        border-right: 1px solid #333 !important;
        border-radius: 0 !important;
        padding: 8px 4px !important;
        text-align: center !important;
    }

    .print-stat-card:last-child {
        border-right: none !important;
    }

    .print-stat-value {
        font-size: 14pt !important;
        font-weight: 700 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-stat-label {
        font-size: 7pt !important;
        color: #555 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Avoid breaking rows across pages */
    tr {
        page-break-inside: avoid;
    }

    /* Card header - hide on print, show print-only header instead */
    .card-header {
        display: none !important;
    }

    .print-report-header {
        display: block !important;
        background: #fff !important;
    }

    .print-report-header h2,
    .print-report-header h3,
    .print-report-header p,
    .print-report-header span,
    .print-report-header * {
        color: #000 !important;
        background: transparent !important;
    }

    .print-report-header p {
        color: #555 !important;
    }

    .card-header .badge {
        font-size: 9pt !important;
        border: 1px solid #333 !important;
        padding: 2px 8px !important;
    }

    /* GLOBAL NUCLEAR OVERRIDE - force ALL text visible on print */
    *:not(th):not(.badge):not(.badge-adequate):not(.badge-warning):not(.badge-low):not(.badge-critical):not(.badge-rejected) {
        transition: none !important;
        animation: none !important;
    }

    /* Force all text to black and all backgrounds to transparent */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    div,
    label,
    strong,
    b,
    em,
    i,
    a,
    .card-title,
    .card-header *,
    [style*="color:"],
    [style*="color: "] {
        color: #000 !important;
    }

    /* Override CSS custom properties for print */
    :root {
        --text-primary: #000 !important;
        --text-secondary: #333 !important;
        --text-muted: #555 !important;
        --primary-blue: #000 !important;
        --primary-red: #000 !important;
        --secondary-green: #000 !important;
        --bg-primary: #fff !important;
        --bg-secondary: #fff !important;
        --bg-tertiary: #f5f5f5 !important;
    }

    /* Force all div backgrounds to transparent */
    div {
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
    }
}