:root {
    --brand-orange: #F05a24;
    --brand-dark: #000000;
    --brand-gray-dark: #404040;
    --brand-gray-med: #595959;
    --bg-light: #f4f6f8;
    --white: #ffffff;
    --text-light: #e0e0e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-light); color: var(--brand-dark); }

/* Visibility Classes */
.screen { display: none; }
.screen.active { display: flex; }

/* --- Login Screen --- */
#login-screen { height: 100vh; justify-content: center; align-items: center; background-color: var(--brand-gray-dark); }
.login-card { background: var(--white); padding: 40px; border-radius: 8px; text-align: center; width: 100%; max-width: 400px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.login-card .logo { max-width: 200px; margin-bottom: 20px; }
.login-card h2 { margin-bottom: 10px; color: var(--brand-gray-dark); }
.login-card p { margin-bottom: 20px; color: var(--brand-gray-med); font-size: 14px; }

/* Buttons */
button { display: block; width: 100%; padding: 12px; margin-bottom: 10px; border: none; border-radius: 4px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn-primary { background-color: var(--brand-orange); color: var(--white); }
.btn-primary:hover { background-color: #d1491b; }
.btn-secondary { background-color: var(--brand-gray-med); color: var(--white); }
.btn-secondary:hover { background-color: var(--brand-gray-dark); }
.btn-logout { background-color: transparent; color: var(--text-light); border: 1px solid var(--text-light); }
.btn-logout:hover { background-color: var(--brand-orange); color: var(--white); border-color: var(--brand-orange); }

/* --- Main Layout --- */
.layout { height: 100vh; width: 100vw; overflow: hidden; }

/* Sidebar */
.sidebar { width: 260px; background-color: var(--brand-dark); display: flex; flex-direction: column; color: var(--white); }
.sidebar-header { padding: 20px; background-color: var(--brand-gray-dark); display: flex; justify-content: center; }
.sidebar-header img { max-width: 150px; }
.nav-links { list-style: none; padding: 20px 0; flex: 1; }
.nav-links li { padding: 12px 20px; cursor: pointer; color: var(--text-light); transition: 0.2s; border-left: 4px solid transparent; }
.nav-links li:hover, .nav-links li.active { background-color: var(--brand-gray-dark); color: var(--brand-orange); border-left-color: var(--brand-orange); }
.sidebar-footer { padding: 20px; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.topbar { background-color: var(--white); padding: 20px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.badge { background-color: var(--brand-orange); color: var(--white); padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; text-transform: uppercase; }

/* Content Area */
.content-area { padding: 30px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.card { background: var(--white); padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border-top: 4px solid var(--brand-gray-med); }
.card.orange { border-top-color: var(--brand-orange); }
.card h3 { color: var(--brand-gray-dark); font-size: 14px; margin-bottom: 10px; text-transform: uppercase; }
.card .value { font-size: 32px; font-weight: 700; color: var(--brand-dark); }

/* Tables & Settings Stub */
.data-box { background: var(--white); padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); margin-bottom: 20px; }
.data-box h2 { margin-bottom: 15px; color: var(--brand-gray-dark); font-size: 18px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 600; color: var(--brand-gray-med); }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }

/* --- Tables --- */
.data-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 14px; }
.data-table th, .data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; }
.data-table th { background-color: var(--brand-gray-dark); color: var(--white); text-transform: uppercase; font-size: 12px; }
.data-table tr:hover { background-color: #f9f9f9; }

/* Status Badges */
.badge.pass { background-color: #28a745; }
.badge.fail { background-color: #dc3545; }
.badge.active { background-color: var(--brand-orange); }

/* --- Forms & Layouts --- */
.form-section { background: var(--bg-light); padding: 20px; border-radius: 6px; margin-bottom: 20px; border: 1px solid #e0e0e0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; background: var(--white); }

/* Two Column Layout for Admin Products */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Toggle Switch / Checkbox styling */
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee;}
.toggle-row label { font-size: 14px; color: var(--brand-gray-dark); font-weight: 600;}

/* --- Print Styles --- */
@media print {
    /* Hide everything except the content area */
    .sidebar, .topbar, button, .form-section { display: none !important; }
    .layout { height: auto; overflow: visible; }
    .main-content { overflow: visible; }
    .content-area { padding: 0; }
    body { background: var(--white); color: var(--brand-dark); }
    .data-box { box-shadow: none; border: none; padding: 0; }
}

/* --- Input Groups & Forms --- */
.input-group { display: flex; gap: 10px; margin-bottom: 15px; }
.input-group input, .input-group select { flex: 1; margin-bottom: 0; }
.input-group .btn-primary { width: auto; margin-bottom: 0; padding: 10px 20px; }

/* --- Sub-Tables & Component Lists --- */
.station-card { background: var(--white); border: 1px solid #ddd; border-radius: 8px; margin-bottom: 20px; overflow: hidden; }
.station-header { background: var(--brand-gray-dark); color: var(--white); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.station-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.station-body { padding: 20px; }
.qr-placeholder { background: #eee; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 24px; border-radius: 4px; }

/* --- Spill Log Badges --- */
.badge.high { background-color: #dc3545; } /* Red for High Severity */
.badge.med { background-color: #ffc107; color: #000; } /* Yellow for Medium */
.badge.low { background-color: #17a2b8; } /* Blue for Low */
.badge.resolved { background-color: #28a745; } /* Green for Resolved */