:root {
    color-scheme: dark;
    --bg: #08111a;
    --bg-2: #101b25;
    --panel: rgba(17, 27, 38, 0.9);
    --panel-edge: rgba(164, 190, 201, 0.13);
    --text: #eef4f7;
    --muted: #96a7b2;
    --accent: #d3c24d;
    --green: #75d16a;
    --red: #d46963;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #eef3f5;
    --bg-2: #dfe7eb;
    --panel: rgba(244, 248, 250, 0.96);
    --panel-edge: rgba(20, 31, 40, 0.26);
    --text: #111820;
    --muted: #53626d;
    --accent: #9b8c19;
    --green: #2f8f43;
    --red: #b13d35;
    --shadow: 0 20px 48px rgba(20, 31, 40, 0.24);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(113, 137, 156, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(211, 194, 77, 0.08), transparent 26%),
        linear-gradient(180deg, #0b141d 0%, #081018 100%);
    color: var(--text);
    font-family: "Manrope", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.015)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 5px);
    mix-blend-mode: soft-light;
    pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    padding: 32px;
    gap: 28px;
}

.brand-panel, .auth-card, .panel, .sidebar, .topbar, .metric-card, .hero-panel {
    border: 1px solid var(--panel-edge);
    background: linear-gradient(180deg, rgba(29, 42, 55, 0.94), rgba(10, 18, 27, 0.95));
    box-shadow: var(--shadow);
}

.brand-panel {
    border-radius: 28px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -10% -20% 30%;
    height: 240px;
    background: radial-gradient(circle, rgba(211, 194, 77, 0.18), transparent 60%);
}

.brand-mark img {
    width: 320px;
    max-width: 80%;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.45));
}

.brand-kicker, .panel-label, .eyebrow, .status-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: #9bb0bc;
}

.brand-copy h1, .topbar h1, .hero-copy h2, .auth-header h2, .status-card h1 {
    font-family: "Rajdhani", sans-serif;
    letter-spacing: 0.03em;
    margin: 12px 0;
}

.brand-copy h1 { font-size: clamp(2.7rem, 5vw, 4.5rem); }
.brand-copy p, .panel-copy, .auth-header p, .insight-card p, .status-card p, .auth-switch, .form-response { color: var(--muted); line-height: 1.7; }

.brand-pulse-card {
    margin-top: 42px;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid rgba(211, 194, 77, 0.15);
    background: rgba(8, 14, 22, 0.65);
}

.brand-pulse-line {
    height: 70px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent, rgba(117, 209, 106, 0.32), transparent),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
    position: relative;
    overflow: hidden;
}

.brand-pulse-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 45%, transparent 55%);
    animation: sweep 3.2s linear infinite;
}

.brand-pulse-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 22px;
}

.brand-pulse-metrics strong, .metric-card strong, .status-top strong, .sidebar-brand strong, .sidebar-footer strong {
    display: block;
    font-family: "Rajdhani", sans-serif;
}

.auth-card {
    align-self: center;
    border-radius: 28px;
    padding: 34px;
}

.auth-form, .settings-form, .sidebar-nav, .status-list, .insight-grid, .content-area, .overview-grid, .manager-grid {
    display: grid;
    gap: 18px;
}

.auth-form label, .settings-form label { display: grid; gap: 8px; }
.auth-form span, .settings-form span { font-size: 0.88rem; color: #c2d0d8; }

input, select, textarea {
    width: 100%;
    border: 1px solid rgba(160, 181, 192, 0.18);
    background: rgba(6, 13, 20, 0.82);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    outline: none;
}

textarea {
    min-height: 132px;
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    border-color: rgba(211, 194, 77, 0.55);
    box-shadow: 0 0 0 4px rgba(211, 194, 77, 0.12);
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 14px 18px;
    font: 700 0.95rem "Rajdhani", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-primary { color: #071118; background: linear-gradient(135deg, #d9cb60 0%, #84d873 100%); }
.btn-secondary { color: var(--text); background: linear-gradient(135deg, rgba(74, 95, 114, 0.9), rgba(34, 50, 62, 0.95)); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); padding: 10px 14px; }

.setup-alert, .flash, .update-console { border-radius: 16px; padding: 14px 16px; }
.setup-alert, .flash-error { background: rgba(193, 87, 78, 0.14); border: 1px solid rgba(212, 105, 99, 0.35); }
.flash-success { background: rgba(117, 209, 106, 0.14); border: 1px solid rgba(117, 209, 106, 0.35); }
.flash-stack { display: grid; gap: 12px; margin-bottom: 18px; }
.form-response.success { color: #99ee95; }

.app-frame {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    gap: 14px;
    padding: 14px;
}

.sidebar {
    border-radius: 22px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-brand {
    display: grid;
    place-items: center;
    padding: 6px 4px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand img {
    width: min(100%, 185px);
    max-height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.38));
}

.sidebar-footer span { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; }

.nav-link {
    padding: 11px 14px;
    border-radius: 12px;
    color: #dbe5ea;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.92rem;
}

.nav-group {
    display: grid;
    gap: 10px;
}

.nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 4px 6px;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    color: #92a5b1;
    font-family: inherit;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.nav-group-title:hover { color: #c7d6df; }

.nav-group-caret {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.nav-group--collapsed .nav-group-caret { transform: rotate(-90deg); }

.nav-group-links { display: grid; gap: 10px; }

.nav-group--collapsed .nav-group-links { display: none; }

.nav-link.active, .nav-link:hover {
    border: 1px solid rgba(211, 194, 77, 0.32);
    background: linear-gradient(135deg, rgba(211, 194, 77, 0.16), rgba(117, 209, 106, 0.08));
}

/* Standalone V-Sense logo button — white in every theme, logo only (no text) */
.nav-link--vsense {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.nav-link--vsense img {
    display: block;
    width: auto;
    height: auto;
    max-height: 24px;
    max-width: 100%;
}

.nav-link--vsense:hover {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.nav-link--vsense.active {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.22);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.12);
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px;
    border-radius: 16px;
    background: rgba(5, 10, 16, 0.45);
}

.main-shell { display: grid; grid-template-rows: auto 1fr; gap: 14px; }

.mobile-menu-toggle,
.mobile-nav-backdrop {
    display: none;
}

.topbar {
    border-radius: 20px;
    padding: 18px 24px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto minmax(120px, auto);
    gap: 14px;
    align-items: center;
}

.topbar h1 { margin: 4px 0 0; font-size: clamp(1.65rem, 2.6vw, 2.35rem); }

.topbar.no-header-tools {
    grid-template-columns: minmax(220px, 1fr) auto minmax(120px, auto);
}

.topbar-tools {
    position: relative;
    justify-self: center;
    z-index: 30;
}

.topbar-actions {
    justify-self: end;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(164, 190, 201, 0.16);
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(34, 45, 57, 0.92), rgba(11, 17, 25, 0.94));
    color: #eef4f7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: rgba(211, 194, 77, 0.45);
    color: #f0e18d;
}

.theme-toggle-icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle-icon-moon {
    display: none;
}

:root[data-theme="light"] .theme-toggle-icon-sun {
    display: none;
}

:root[data-theme="light"] .theme-toggle-icon-moon {
    display: block;
}

.time-filter-card {
    min-width: 290px;
    display: grid;
    gap: 10px;
}

.time-filter-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(48px, auto)) minmax(112px, auto);
    gap: 6px;
    padding: 7px;
    border: 1px solid rgba(164, 190, 201, 0.16);
    border-radius: 15px;
    background:
        linear-gradient(180deg, rgba(34, 45, 57, 0.92), rgba(11, 17, 25, 0.94)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 5px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.time-filter-tab,
.time-filter-export,
.time-range-picker-tabs button,
.time-range-calendar-head button,
.time-range-days button,
.time-range-actions button {
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: #eef4f7;
    cursor: pointer;
    font-family: "Rajdhani", sans-serif;
    font-weight: 700;
}

.time-filter-tab {
    min-height: 32px;
    border-radius: 10px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.time-filter-tab.active {
    border-color: rgba(117, 209, 106, 0.5);
    background: linear-gradient(180deg, rgba(39, 95, 87, 0.74), rgba(16, 45, 46, 0.9));
    box-shadow: inset 0 0 0 1px rgba(117, 209, 106, 0.18);
    color: #ecfff1;
}

.time-filter-export {
    min-height: 42px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(73, 103, 121, 0.98), rgba(117, 209, 106, 0.78));
    color: #071118;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.time-filter-export:hover {
    filter: brightness(1.06);
}

.time-range-popover {
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%);
    z-index: 80;
    width: min(360px, calc(100vw - 32px));
    border: 1px solid rgba(164, 190, 201, 0.22);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(28, 37, 48, 0.99), rgba(9, 14, 22, 0.99)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 5px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
    padding: 12px;
}

.time-range-copy {
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
}

.time-range-copy strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 1rem;
}

.time-range-copy span,
.time-range-fields span,
.time-range-message {
    color: #a8b7c1;
    font-size: 0.78rem;
}

.time-range-fields {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.time-range-fields label {
    display: grid;
    gap: 5px;
}

.time-range-fields input {
    border-radius: 10px;
    padding: 10px 11px;
    font-size: 0.9rem;
}

.time-range-picker {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 13px;
    padding: 9px;
    background: rgba(4, 8, 14, 0.32);
}

.time-range-picker-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.time-range-picker-tabs button {
    border-radius: 8px;
    padding: 4px 9px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
}

.time-range-picker-tabs button.active {
    border-color: rgba(117, 209, 106, 0.55);
    color: #e9fff0;
}

.time-range-calendar-head {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.time-range-calendar-head strong {
    text-align: center;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.05rem;
}

.time-range-calendar-head button {
    height: 32px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.045);
}

.time-range-weekdays,
.time-range-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.time-range-weekdays {
    margin-bottom: 5px;
}

.time-range-weekdays span {
    text-align: center;
    color: #a3b1ba;
    font-size: 0.72rem;
    font-weight: 700;
}

.time-range-days button {
    position: relative;
    z-index: 1;
    aspect-ratio: 1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.82rem;
    pointer-events: auto;
}

.time-range-days button.muted {
    opacity: 0.38;
}

.time-range-days button.in-range {
    background: rgba(117, 209, 106, 0.1);
}

.time-range-days button.preview-range {
    border-color: rgba(117, 209, 106, 0.28);
    background: rgba(117, 209, 106, 0.16);
}

.time-range-days button.selected,
.time-range-days button.from-selected,
.time-range-days button.to-selected {
    border-color: rgba(211, 194, 77, 0.72);
    box-shadow: inset 0 0 0 1px rgba(211, 194, 77, 0.3);
    color: #f6e886;
}

.time-range-days button.from-selected::after,
.time-range-days button.to-selected::after {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    margin: 1px auto 0;
    border-radius: 50%;
    background: #d3c24d;
}

.time-range-actions {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.time-range-message.error {
    color: #ef9a92;
}

.time-range-actions button {
    min-height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(211, 194, 77, 0.2), rgba(117, 209, 106, 0.16));
}

.account-menu { position: relative; }

.account-trigger {
    border: 0;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 12px 8px 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.account-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #d7ca61, #7fd773);
    color: #081118;
    font-weight: 800;
}

.account-meta small { display: block; color: var(--muted); }

.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: rgba(8, 14, 22, 0.98);
    border: 1px solid rgba(160, 181, 192, 0.15);
    border-radius: 16px;
    padding: 8px;
    display: none;
    box-shadow: var(--shadow);
}

.account-menu.open .account-dropdown { display: grid; }
.account-dropdown a { padding: 12px 14px; border-radius: 12px; }
.account-dropdown a:hover { background: rgba(255, 255, 255, 0.05); }

.overview-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr); }

.empty-overview-panel {
    min-height: 72vh;
}

.uploads-placeholder-panel {
    min-height: 72vh;
}

.uploads-placeholder-copy {
    color: var(--muted);
    line-height: 1.7;
}

.daily-plant-overview-2-layout {
    display: grid;
    gap: 14px;
    width: 100%;
}

.maintenance-overview-layout {
    display: grid;
    gap: 14px;
}

.maintenance-hero {
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(37, 46, 57, 0.98), rgba(9, 15, 23, 0.98)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 6px);
}

.maintenance-hero-head,
.maintenance-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0));
}

.maintenance-hero-head h2 {
    margin: 4px 0 0;
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    letter-spacing: 0.02em;
}

.maintenance-incident-summary {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.maintenance-total {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.maintenance-total strong {
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 0.9;
}

.maintenance-total span,
.maintenance-panel-note,
.maintenance-empty,
.maintenance-alert small,
.maintenance-upcoming-item span,
.maintenance-kpi span {
    color: var(--muted);
}

.maintenance-priority-strip {
    display: grid;
    grid-template-columns: 0.9fr 1.15fr 2fr;
    gap: 1px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
}

.maintenance-priority {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

.maintenance-priority.high { background-color: rgba(150, 44, 55, 0.34); }
.maintenance-priority.medium { background-color: rgba(188, 151, 52, 0.22); }
.maintenance-priority.low { background-color: rgba(68, 144, 139, 0.22); }

.maintenance-priority strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 2rem;
}

.maintenance-priority span:last-child {
    color: #e9eef0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.maintenance-priority-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff5b9;
    font: 800 0.82rem "Rajdhani", sans-serif;
}

.maintenance-grid {
    display: grid;
    grid-template-columns: minmax(420px, 1.28fr) minmax(300px, 0.78fr) minmax(300px, 0.82fr);
    gap: 14px;
}

.maintenance-card {
    padding: 0;
    overflow: hidden;
}

.maintenance-incidents-card,
.maintenance-bypass-card {
    grid-row: span 2;
}

.maintenance-upcoming-card {
    grid-column: span 2;
}

.maintenance-table,
.maintenance-alert-list,
.maintenance-bar-chart,
.maintenance-mix,
.maintenance-upcoming-grid {
    padding: 12px 14px 14px;
}

.maintenance-table-head,
.maintenance-table-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) minmax(92px, 0.55fr) 70px;
    gap: 12px;
    align-items: center;
}

.maintenance-table-head {
    padding: 8px 11px 10px;
    color: #aebbc4;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.maintenance-table-row,
.maintenance-alert,
.maintenance-upcoming-item,
.maintenance-kpi,
.maintenance-skeleton {
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
        rgba(7, 13, 20, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.maintenance-table-row {
    min-height: 56px;
    margin-bottom: 7px;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.maintenance-equipment {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.maintenance-equipment,
.maintenance-table-row > span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.maintenance-equipment > span {
    min-width: 0;
}

.maintenance-equipment strong,
.maintenance-equipment small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.maintenance-equipment small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
}

.maintenance-severity-dot {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.maintenance-severity-dot::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 16px currentColor;
}

.maintenance-severity-dot.high { color: #ff6d68; background: rgba(196, 57, 65, 0.34); }
.maintenance-severity-dot.medium { color: #f2d067; background: rgba(204, 158, 45, 0.26); }
.maintenance-severity-dot.low { color: #8ce194; background: rgba(89, 171, 127, 0.22); }

.maintenance-status,
.maintenance-upcoming-item mark {
    display: inline-grid;
    min-width: 86px;
    min-height: 28px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 6px;
    padding: 4px 8px;
    color: #f3f7f8;
    background: rgba(255, 255, 255, 0.08);
    font: 700 0.78rem "Rajdhani", sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.maintenance-status.high { background: rgba(196, 57, 65, 0.3); }
.maintenance-status.medium { background: rgba(204, 158, 45, 0.26); }
.maintenance-status.low { background: rgba(89, 171, 127, 0.22); }

.maintenance-alert-list {
    display: grid;
    gap: 10px;
}

.maintenance-alert {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 13px;
    border-radius: 8px;
}

.maintenance-alert strong,
.maintenance-upcoming-item strong {
    display: block;
    margin-bottom: 4px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.2rem;
}

.maintenance-alert span,
.maintenance-alert small {
    display: block;
}

.maintenance-bars {
    min-height: 190px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
    align-items: end;
    padding-top: 12px;
}

.maintenance-bar-item {
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 6px;
    min-width: 0;
    text-align: center;
}

.maintenance-bar-track {
    height: 142px;
    display: flex;
    align-items: end;
    border-radius: 6px;
    overflow: hidden;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 28px),
        rgba(255, 255, 255, 0.035);
}

.maintenance-bar-track span {
    width: 100%;
    display: block;
    background: linear-gradient(180deg, rgba(226, 205, 102, 0.95), rgba(75, 111, 127, 0.86));
}

.maintenance-bar-item strong {
    font-family: "Rajdhani", sans-serif;
}

.maintenance-bar-item small {
    overflow: hidden;
    color: #bec9d0;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.maintenance-mix {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 15px;
    align-items: center;
}

.maintenance-gauge {
    aspect-ratio: 1;
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: 50%;
    border: 13px solid rgba(211, 194, 77, 0.22);
    background: radial-gradient(circle, rgba(117, 209, 106, 0.1), rgba(255, 255, 255, 0.02) 62%);
}

.maintenance-gauge strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 2.2rem;
    line-height: 1;
}

.maintenance-gauge span {
    color: var(--muted);
    font-size: 0.72rem;
}

.maintenance-mix-list,
.maintenance-distribution-list {
    display: grid;
    gap: 10px;
}

.maintenance-progress-row {
    display: grid;
    grid-template-columns: minmax(96px, 0.8fr) minmax(110px, 1fr) 34px;
    gap: 10px;
    align-items: center;
    font-size: 0.82rem;
}

.maintenance-progress-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.maintenance-progress-row div {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.maintenance-progress-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.maintenance-progress-row i.danger { background: #d46963; }
.maintenance-progress-row i.warning { background: #d3c24d; }
.maintenance-progress-row i.ok { background: #75d16a; }
.maintenance-progress-row i.neutral { background: #8ea3b0; }

.maintenance-timeline {
    min-height: 190px;
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    width: 100%;
}

.maintenance-timeline article {
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 6px;
    text-align: center;
}

.maintenance-timeline article > div {
    height: 136px;
    display: flex;
    align-items: end;
    overflow: hidden;
    border-radius: 6px;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 27px),
        rgba(255, 255, 255, 0.035);
}

.maintenance-timeline article > div span {
    display: block;
    width: 100%;
    background: linear-gradient(180deg, rgba(117, 209, 106, 0.95), rgba(54, 104, 119, 0.9));
}

.maintenance-timeline strong {
    font-family: "Rajdhani", sans-serif;
}

.maintenance-timeline small {
    overflow: hidden;
    color: #bec9d0;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.maintenance-upcoming-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.maintenance-upcoming-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    padding: 12px;
    border-radius: 8px;
}

.maintenance-upcoming-item span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.maintenance-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.maintenance-kpi {
    min-height: 92px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 18px 24px;
    border-width: 0 1px 0 0;
    border-radius: 0;
}

.maintenance-kpi:last-child {
    border-right: 0;
}

.maintenance-kpi strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 2.15rem;
    line-height: 1;
}

.maintenance-kpi.danger strong { color: #ff8b84; }
.maintenance-kpi.warning strong { color: #efe082; }
.maintenance-kpi.ok strong { color: #9ceb93; }

.maintenance-mini-tabs {
    display: flex;
    gap: 5px;
}

.maintenance-mini-tabs span {
    min-width: 42px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #b9c6cd;
    background: rgba(255, 255, 255, 0.045);
    font: 700 0.75rem "Rajdhani", sans-serif;
    text-align: center;
}

.maintenance-summary-loading,
.maintenance-skeleton {
    display: grid;
    gap: 8px;
}

.maintenance-summary-loading {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.maintenance-summary-loading span,
.maintenance-skeleton span {
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.maintenance-summary-loading span {
    min-height: 68px;
}

.maintenance-skeleton {
    min-height: 52px;
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 8px;
}

.maintenance-skeleton span:last-child {
    width: 62%;
}

.production-summary-shell {
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(46, 54, 64, 0.98), rgba(18, 24, 32, 1)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 6px);
}

.production-summary-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 11px 18px;
    margin: 8px 10px 0;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018), transparent 55%);
}

.production-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 10px 10px;
    margin: 0 10px 10px;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(34, 41, 50, 0.98), rgba(18, 23, 31, 1)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012), transparent 45%);
}

.production-stat-card {
    position: relative;
    min-height: 88px;
    padding: 13px 18px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    display: grid;
    align-content: start;
    gap: 12px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(33, 40, 49, 0.82), rgba(21, 27, 35, 0.92)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.014), transparent 50%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 0 -10px 24px rgba(0, 0, 0, 0.16);
}

.production-stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
        radial-gradient(circle at 50% 115%, rgba(211, 194, 77, 0.06), transparent 42%);
    pointer-events: none;
}

.production-stat-card::after {
    content: "";
    position: absolute;
    left: 20px;
    width: 52px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(211, 194, 77, 0.72), rgba(117, 209, 106, 0.12));
    opacity: 0.95;
}

.production-stat-card-loading,
.plant-card-loading,
.variance-section-loading {
    pointer-events: none;
}

.skeleton-line {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
}

.skeleton-line::after,
.production-chart-skeleton span::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    animation: skeletonSweep 1.2s ease-in-out infinite;
}

.skeleton-line.short {
    width: 44%;
    height: 12px;
}

.skeleton-line.value {
    width: 62%;
    height: 34px;
}

.skeleton-line.legend {
    width: 150px;
    height: 12px;
}

.skeleton-line.status-table-heading {
    width: 58%;
    height: 11px;
    margin: 0 auto;
}

.skeleton-line.status-label {
    width: 68%;
    height: 13px;
}

.skeleton-line.status-subtle {
    width: 46%;
    height: 10px;
}

.skeleton-line.status-value {
    width: 52%;
    height: 26px;
}

.skeleton-line.status-stat {
    width: 66%;
    height: 18px;
    margin: 0 auto;
}

.skeleton-line.status-pill {
    width: 48px;
    height: 16px;
}

.production-chart-skeleton {
    height: min(48vh, 470px);
    min-height: 260px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008)),
        repeating-linear-gradient(90deg, transparent, transparent 15%, rgba(255, 255, 255, 0.035) 15.1%, transparent 15.4%);
}

.production-chart-skeleton span {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(117, 209, 106, 0.12), rgba(117, 209, 106, 0.02)),
        rgba(255, 255, 255, 0.035);
}

.status-chart-skeleton {
    height: 78px;
    min-height: 78px;
    margin-top: 10px;
    padding: 10px;
}

.production-stat-label,
.production-stat-value-line {
    position: relative;
    z-index: 1;
}

.production-stat-label {
    font-family: "Rajdhani", sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #aeb7bf;
    line-height: 1;
}

.production-stat-value-line {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.production-stat-value {
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(1.8rem, 2.2vw, 2.55rem);
    line-height: 0.9;
    font-weight: 700;
    letter-spacing: 0.015em;
    color: #f1f4f6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.production-stat-unit {
    padding-bottom: 4px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #c5cdd3;
    text-transform: lowercase;
}

.production-summary-topline .panel-label {
    color: #9db0bb;
}

.production-summary-topline .panel-tag {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(74, 84, 96, 0.34), rgba(43, 52, 64, 0.34));
    color: #d9e0e4;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
}

.production-trend-shell {
    padding: 12px 16px 14px;
    background:
        linear-gradient(180deg, rgba(41, 49, 59, 0.98), rgba(16, 22, 29, 1)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 6px);
}

.production-trend-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 8px;
}

.production-trend-head h3 {
    margin: 4px 0 0;
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(1.25rem, 1.7vw, 1.65rem);
    letter-spacing: 0.03em;
}

.production-trend-range-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(53, 62, 73, 0.5), rgba(29, 36, 45, 0.5));
}

.production-trend-tab {
    border: 0;
    min-width: 54px;
    padding: 7px 12px;
    border-radius: 9px;
    background: transparent;
    color: #c8d1d6;
    font-family: "Rajdhani", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.production-trend-tab.active {
    background: linear-gradient(180deg, rgba(116, 126, 138, 0.5), rgba(67, 76, 87, 0.72));
    color: #f2f5f7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.production-trend-tab:hover {
    color: #f2f5f7;
}

.production-trend-chart-wrap {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(23, 30, 39, 0.96), rgba(12, 17, 24, 0.98)),
        radial-gradient(circle at 50% 100%, rgba(117, 209, 106, 0.08), transparent 48%);
    padding: 8px 10px 6px;
    overflow: hidden;
}

.production-trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 0 4px 10px;
    color: #cbd4da;
    font-size: 0.84rem;
}

.production-trend-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.production-trend-swatch {
    width: 26px;
    height: 3px;
    border-radius: 999px;
    display: inline-block;
}

.production-trend-swatch.flow {
    background: linear-gradient(90deg, #92d87a, #6fbe68);
}

.production-trend-swatch.mass {
    background: linear-gradient(90deg, #dec76b, #f0db85);
}

.production-trend-svg {
    width: 100%;
    height: min(48vh, 470px);
    display: block;
}

.header-with-info {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.info-tip {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(178, 194, 205, 0.38);
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(54, 66, 79, 0.88), rgba(24, 32, 42, 0.94));
    color: #d9e1e6;
    font: 700 0.72rem/1 "Manrope", sans-serif;
    cursor: help;
    padding: 0;
}

.info-tip::after {
    content: attr(data-info);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translate(-50%, 4px);
    width: max-content;
    max-width: 260px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(178, 194, 205, 0.2);
    background: rgba(7, 12, 18, 0.98);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
    color: #e9eef1;
    font: 500 0.76rem/1.45 "Manrope", sans-serif;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.info-tip:hover,
.info-tip:focus-visible {
    border-color: rgba(211, 194, 77, 0.55);
    color: #f0e18d;
}

.info-tip:hover::after,
.info-tip:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.production-summary-shell,
.production-summary-strip,
.production-stat-card,
.plant-card-grid,
.variance-section {
    overflow: visible;
}

.shift-table-col.header-with-info,
.variance-section-columns.header-with-info {
    justify-content: center;
}

.production-trend-grid-row line,
.production-trend-grid-col line {
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 1;
}

.production-trend-grid-row text,
.production-trend-grid-col text {
    fill: #9eacb5;
    font-size: 12px;
    font-family: "Manrope", sans-serif;
}

.production-trend-axis {
    stroke: rgba(255, 255, 255, 0.24);
    stroke-width: 1.25;
}

.production-trend-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
}

.production-trend-line.flow {
    stroke: url(#productionChartFlowStroke);
}

.production-trend-line.mass {
    stroke: url(#productionChartMassStroke);
}

.production-trend-area {
    stroke: none;
    opacity: 0.85;
}

.production-trend-area.flow {
    fill: url(#productionChartFlowFill);
}

.production-trend-area.mass {
    fill: url(#productionChartMassFill);
}

.production-trend-hover-point {
    cursor: crosshair;
    outline: none;
}

.production-trend-hit {
    fill: transparent;
    pointer-events: all;
}

.production-trend-marker {
    opacity: 0;
    stroke: #071118;
    stroke-width: 2;
    transition: opacity 120ms ease, r 120ms ease;
}

.production-trend-hover-point.flow .production-trend-marker {
    fill: #92d87a;
}

.production-trend-hover-point.mass .production-trend-marker {
    fill: #f0db85;
}

.production-trend-tooltip {
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.production-trend-tooltip rect {
    fill: rgba(7, 12, 18, 0.96);
    stroke: rgba(178, 194, 205, 0.26);
    stroke-width: 1;
}

.production-trend-tooltip text {
    fill: #edf4f7;
    font-family: "Manrope", sans-serif;
    font-size: 11px;
}

.production-trend-tooltip text:first-of-type {
    fill: #a8b7c1;
    font-weight: 700;
}

.production-trend-tooltip-value {
    font-weight: 700;
}

.production-trend-tooltip-time {
    fill: #a8b7c1;
}

.production-trend-hover-point:hover .production-trend-marker,
.production-trend-hover-point:focus .production-trend-marker {
    opacity: 1;
    r: 5.4;
}

.production-trend-hover-point:hover .production-trend-tooltip,
.production-trend-hover-point:focus .production-trend-tooltip {
    opacity: 1;
}

.production-trend-axis-title {
    fill: #dbe3e8;
    font-family: "Rajdhani", sans-serif;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.daily-plant-overview-2-control-room {
    display: grid;
    gap: 18px;
}

.control-room-feed-strip,
.control-room-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.control-feed-item,
.control-summary-stat {
    padding: 18px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(43, 50, 59, 0.96), rgba(23, 29, 37, 0.98)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 6px);
}

.control-feed-item:last-child,
.control-summary-stat:last-child {
    border-right: 0;
}

.control-feed-item {
    display: grid;
    gap: 8px;
    align-content: center;
    position: relative;
    padding-left: 56px;
}

.control-feed-kicker {
    color: #c5d0d6;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.control-feed-item strong,
.control-summary-stat strong {
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
}

.control-feed-item small,
.control-summary-stat small {
    font-size: 0.54em;
    color: #d6dce0;
}

.control-feed-item.tone-green strong {
    color: #97e48f;
}

.control-feed-item.tone-slate strong {
    color: #d3dae0;
}

.control-room-preview-btn {
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(43, 50, 59, 0.96), rgba(23, 29, 37, 0.98)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 6px);
    color: #f1f4f6;
    font-family: "Rajdhani", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.control-feed-icon,
.control-shift-icon,
.control-summary-icon,
.control-gauge-icon {
    display: inline-block;
    position: relative;
}

.control-feed-icon {
    position: absolute;
    left: 18px;
    top: 18px;
    width: 24px;
    height: 24px;
}

.icon-feed-rate::before,
.icon-feed-rate::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 5px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(180deg, #95d97e, #6fbe68);
}

.icon-feed-rate::before {
    left: 4px;
    height: 14px;
}

.icon-feed-rate::after {
    left: 13px;
    height: 20px;
}

.icon-drop::before,
.icon-recovery::before {
    content: "";
    position: absolute;
    inset: 1px 5px 3px;
    border-radius: 50% 50% 52% 52% / 58% 58% 42% 42%;
    transform: rotate(45deg);
}

.icon-drop::before {
    background: linear-gradient(180deg, #87dc78, #56a85b);
}

.icon-recovery::before {
    background: linear-gradient(180deg, #a5afbc, #6a7787);
}

.control-room-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 18px;
}

.control-room-panel {
    padding: 18px 18px 16px;
    background:
        linear-gradient(180deg, rgba(41, 48, 57, 0.98), rgba(17, 22, 29, 0.98)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 6px);
}

.control-room-panel-title {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: "Rajdhani", sans-serif;
    font-size: 1.12rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ccd4d9;
}

.control-reagents-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 18px;
    align-items: stretch;
}

.control-reagents-copy {
    display: grid;
    gap: 16px;
}

.control-reagents-primary span,
.control-reagents-secondary span {
    color: #aab7be;
}

.control-reagents-primary strong {
    display: block;
    margin-top: 6px;
    font-family: "Rajdhani", sans-serif;
    font-size: 2rem;
}

.control-reagents-secondary {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.control-reagents-secondary strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 1.8rem;
}

.control-alert-banner {
    padding: 16px 18px;
    border: 1px solid rgba(212, 105, 99, 0.3);
    background: linear-gradient(180deg, rgba(156, 57, 52, 0.34), rgba(73, 28, 29, 0.28));
    color: #ffb8b1;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.08rem;
    letter-spacing: 0.04em;
}

.control-reagents-chart {
    position: relative;
    padding: 18px 14px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(20, 26, 33, 0.98), rgba(13, 18, 24, 1));
}

.control-reagents-cap {
    position: absolute;
    top: 14px;
    right: 16px;
    color: #d5df9a;
    font-size: 0.9rem;
}

.control-reagents-bars {
    height: 190px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    padding-top: 20px;
}

.control-reagents-bar-col {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.control-reagents-bar {
    width: 100%;
    min-height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, #c9c45c, #7d874f);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.control-reagents-bar.gold {
    background: linear-gradient(180deg, #dedb7f, #b3a94a);
}

.control-reagents-bar.olive {
    background: linear-gradient(180deg, #97b974, #58704f);
}

.control-reagents-bar.muted {
    background: linear-gradient(180deg, #78818a, #40474d);
}

.control-reagents-bar-col span {
    color: #aeb8c0;
    font-size: 0.84rem;
    text-transform: uppercase;
}

.control-bypass-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}

.control-bypass-copy {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(38, 45, 55, 0.96), rgba(19, 24, 32, 0.98));
}

.control-bypass-target-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-gauge-icon {
    width: 34px;
    height: 20px;
    border-radius: 34px 34px 0 0;
    background:
        conic-gradient(from 180deg, #7bd46f 0deg 65deg, #e1cf74 65deg 120deg, #5f6d78 120deg 180deg);
    overflow: hidden;
}

.control-gauge-icon::after {
    content: "";
    position: absolute;
    inset: 6px 6px 0;
    border-radius: 20px 20px 0 0;
    background: #1b2430;
}

.control-gauge-icon::before {
    content: "";
    position: absolute;
    left: 16px;
    bottom: 1px;
    width: 2px;
    height: 12px;
    background: #e6d781;
    transform-origin: bottom center;
    transform: rotate(-48deg);
    z-index: 1;
}

.control-bypass-target-label,
.control-bypass-events {
    color: #aeb8c0;
}

.control-bypass-copy strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 2.5rem;
    line-height: 1;
}

.control-bypass-mini-chart {
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(18, 24, 32, 0.98), rgba(12, 17, 24, 1)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 6px);
    padding: 12px;
}

.control-bypass-spark {
    width: 100%;
    height: auto;
    display: block;
}

.control-bypass-area {
    fill: rgba(141, 214, 120, 0.16);
}

.control-bypass-line {
    fill: none;
    stroke: #98d97b;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.control-shift-performance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.control-shift-performance-card {
    padding: 10px 18px 4px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 10px;
    position: relative;
    padding-left: 56px;
}

.control-shift-performance-card:last-child {
    border-right: 0;
}

.control-shift-performance-card span,
.control-shift-performance-card em {
    color: #aeb8c0;
    font-style: normal;
}

.control-shift-performance-card strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 2.3rem;
    line-height: 1;
}

.control-shift-icon {
    position: absolute;
    left: 18px;
    top: 16px;
    width: 24px;
    height: 24px;
}

.control-shift-icon.throughput::before,
.control-shift-icon.bypass-rate::before,
.control-shift-icon.recovery::before {
    content: "";
    position: absolute;
}

.control-shift-icon.throughput::before {
    inset: 4px 2px 4px 2px;
    background:
        linear-gradient(180deg, #7fd56e, #67b65d) 0 100% / 5px 12px no-repeat,
        linear-gradient(180deg, #d9cf74, #baac57) 9px 100% / 5px 18px no-repeat,
        linear-gradient(180deg, #798695, #5f6b79) 18px 100% / 5px 9px no-repeat;
}

.control-shift-icon.bypass-rate::before {
    inset: 2px;
    border-radius: 50%;
    border: 3px solid #8f9db0;
    border-top-color: #d2c161;
    border-right-color: #d2c161;
}

.control-shift-icon.recovery::before {
    inset: 2px 6px 4px;
    border-radius: 50% 50% 52% 52% / 58% 58% 42% 42%;
    transform: rotate(45deg);
    background: linear-gradient(180deg, #aab4c0, #6c7785);
}

.control-summary-stat {
    display: grid;
    gap: 6px;
    align-content: center;
    position: relative;
    padding-left: 62px;
}

.control-summary-stat span {
    color: #aeb8c0;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.control-summary-icon {
    position: absolute;
    left: 18px;
    top: 22px;
    width: 28px;
    height: 28px;
}

.control-summary-icon.dosage-efficiency::before,
.control-summary-icon.cost-ppf-ton::before,
.control-summary-icon.total-plant-downtime::before,
.control-summary-icon.active-pm-tasks::before {
    content: "";
    position: absolute;
}

.control-summary-icon.dosage-efficiency::before {
    inset: 2px;
    border-radius: 50%;
    border: 3px solid #85da7b;
    box-shadow: inset 0 0 0 2px rgba(133, 218, 123, 0.12);
}

.control-summary-icon.cost-ppf-ton::before {
    inset: 5px 3px;
    background:
        linear-gradient(180deg, #aab4c0, #798594) 0 0 / 22px 6px no-repeat,
        linear-gradient(180deg, #aab4c0, #798594) 0 9px / 22px 6px no-repeat,
        linear-gradient(180deg, #aab4c0, #798594) 0 18px / 22px 6px no-repeat;
    border-radius: 999px;
}

.control-summary-icon.total-plant-downtime::before {
    inset: 2px;
    border-radius: 50%;
    border: 3px solid #dccc74;
}

.control-summary-icon.active-pm-tasks::before {
    inset: 2px 4px;
    border: 2px solid #d9dfe4;
    border-radius: 2px;
}

.control-room-tab-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.control-room-tab {
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(41, 48, 57, 0.98), rgba(17, 22, 29, 0.98));
    color: #cdd6db;
    min-height: 52px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
}

.control-room-tab.active {
    border-color: rgba(211, 194, 77, 0.35);
    color: #f2f5f7;
    box-shadow: inset 0 0 0 1px rgba(211, 194, 77, 0.12);
}

.control-room-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.control-room-snapshot-card {
    padding: 18px;
}

.control-room-snapshot-list {
    margin: 12px 0 0;
    display: grid;
    gap: 12px;
}

.control-room-snapshot-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.control-room-snapshot-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.control-room-snapshot-list dt {
    color: #9fb0ba;
}

.control-room-snapshot-list dd {
    margin: 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.25rem;
}

.pps-upload-shell {
    width: min(100%, 940px);
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.pps-upload-card {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(49, 58, 69, 0.96), rgba(17, 23, 31, 0.98)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 55%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.pps-upload-copy {
    max-width: 720px;
    margin: 0 auto 24px;
    text-align: center;
}

.pps-upload-copy h4 {
    margin: 8px 0 12px;
    font-family: "Rajdhani", sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: #f3f6f8;
}

.pps-upload-form {
    display: grid;
    gap: 18px;
    max-width: 640px;
    margin: 0 auto;
}

.pps-upload-form label {
    display: grid;
    gap: 8px;
}

.pps-upload-form span {
    color: #cfd7dd;
    font-size: 0.9rem;
}

.pps-upload-dropzone {
    position: relative;
    padding: 34px 24px;
    border: 1px dashed rgba(212, 191, 98, 0.4);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 5px);
    text-align: center;
    cursor: pointer;
}

.pps-upload-dropzone-title {
    display: block;
    margin-bottom: 8px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.4rem !important;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #f3f6f8 !important;
}

.pps-upload-dropzone-subtitle {
    display: block;
    max-width: 440px;
    margin: 0 auto;
    color: #9fb0ba !important;
}

.pps-upload-picker {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    min-width: min(100%, 460px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(15, 22, 30, 0.92), rgba(10, 15, 21, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 -1px 0 rgba(0, 0, 0, 0.28);
}

.pps-upload-picker-button {
    padding: 10px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(212, 191, 98, 0.18), rgba(126, 160, 86, 0.15));
    border: 1px solid rgba(212, 191, 98, 0.28);
    font-family: "Rajdhani", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f3f6f8;
}

.pps-upload-picker-name {
    color: #b8c6ce;
    font-size: 0.95rem;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pps-upload-native-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.daily-plant-layout {
    display: grid;
    gap: 14px;
}

.plant-summary-panel {
    padding: 14px 14px 10px;
    background:
        linear-gradient(180deg, rgba(41, 50, 61, 0.96), rgba(16, 22, 30, 0.98)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent);
}

.plant-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.plant-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
    padding: 8px 10px 10px;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(34, 41, 50, 0.98), rgba(18, 23, 31, 1)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012), transparent 45%);
}

.plant-card {
    position: relative;
    padding: 13px 18px 12px;
    min-height: 88px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    display: grid;
    align-content: start;
    gap: 12px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(33, 40, 49, 0.82), rgba(21, 27, 35, 0.92)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.014), transparent 50%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 0 -10px 24px rgba(0, 0, 0, 0.16);
}

.plant-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
        radial-gradient(circle at 50% 115%, rgba(211, 194, 77, 0.06), transparent 42%);
    pointer-events: none;
}

.plant-card::after {
    content: "";
    position: absolute;
    left: 20px;
    width: 52px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(211, 194, 77, 0.72), rgba(117, 209, 106, 0.12));
    opacity: 0.95;
}

.plant-card-title-wrap {
    position: relative;
    z-index: 1;
    color: #aeb8c0;
}

.plant-card-value-wrap {
    position: relative;
    z-index: 1;
    color: #f2f5f7;
}

.plant-card-title {
    text-align: left;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.86rem;
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.plant-card-value {
    text-align: left;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.8rem;
    line-height: 1.1;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.plant-card-value::after {
    display: none;
}

.shift-hours-panel {
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(39, 47, 58, 0.96), rgba(15, 21, 29, 0.98)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent);
}

.shift-hours-head {
    margin-bottom: 16px;
}

.shift-hours-head h3 {
    margin: 5px 0 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.45rem;
}

.shift-hours-table {
    display: grid;
    gap: 8px;
}

.shift-table-header,
.shift-table-row,
.shift-table-total {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.shift-table-col,
.shift-value-cell,
.shift-label-cell {
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(51, 60, 70, 0.7), rgba(20, 26, 34, 0.92)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 5px);
}

.shift-table-col {
    padding: 10px 12px;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #d8e1e5;
    text-align: center;
}

.shift-table-spacer {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.shift-label-cell {
    padding: 11px 14px;
    display: grid;
    gap: 4px;
}

.shift-label-cell strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 1.08rem;
    color: #f3f6f8;
}

.shift-label-cell span {
    color: #a9b6bf;
    font-size: 0.84rem;
}

.shift-value-cell {
    display: grid;
    place-items: center;
    min-height: 66px;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #f5f7f8;
}

.shift-table-total {
    margin-top: 6px;
}

.shift-label-cell.total,
.shift-value-cell.total {
    background:
        linear-gradient(180deg, rgba(71, 82, 95, 0.78), rgba(23, 30, 39, 0.96)),
        linear-gradient(90deg, rgba(212, 191, 98, 0.05), transparent);
}

.variance-panel {
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(39, 47, 58, 0.96), rgba(15, 21, 29, 0.98)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent);
}

.variance-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.status-rule-edit-btn {
    border: 1px solid rgba(211, 194, 77, 0.28);
    border-radius: 12px;
    padding: 9px 13px;
    background: linear-gradient(135deg, rgba(211, 194, 77, 0.16), rgba(117, 209, 106, 0.08));
    color: #eef4f7;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.status-rule-edit-btn:hover {
    border-color: rgba(211, 194, 77, 0.48);
    color: #f2e58c;
}

.variance-head h3 {
    margin: 5px 0 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.45rem;
}

.variance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.variance-section {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(37, 45, 55, 0.92), rgba(20, 26, 34, 0.96)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 5px);
}

.variance-section-head {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)) 0.7fr;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    align-items: center;
}

.variance-section-title {
    font-family: "Rajdhani", sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: #f3f6f8;
}

.variance-section-columns {
    font-family: "Rajdhani", sans-serif;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #cfd7dd;
    text-align: center;
}

.variance-metric-list {
    display: grid;
}

.variance-history {
    margin: 4px 14px 14px;
    padding: 10px 12px 10px;
    border-radius: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(18, 24, 32, 0.55), rgba(12, 17, 24, 0.18));
}

.variance-history-label {
    font-family: "Rajdhani", sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #b9c7d0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.variance-history-frame {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.variance-history-y-axis {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    align-items: center;
    justify-items: end;
    padding: 2px 0 18px;
    color: #8fa0ac;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.variance-history-plot {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0;
}

.variance-history-chart {
    display: block;
    width: 100%;
    height: 72px;
    border-radius: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.008));
}

.variance-history-grid {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 0.6;
    stroke-dasharray: 2 3;
}

.variance-history-line {
    fill: none;
    stroke: #87d66f;
    stroke-width: 1.05;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.92;
}

.variance-history-x-axis {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 6px;
    color: #8fa0ac;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.variance-row {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)) 0.7fr;
    gap: 10px;
    padding: 8px 12px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.variance-row:first-child {
    border-top: 0;
}

.variance-label {
    font-family: "Rajdhani", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #eef3f6;
}

.variance-stat {
    padding: 8px 7px;
    text-align: center;
    color: #f2f5f7;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-family: "Rajdhani", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.variance-status-wrap {
    display: grid;
    place-items: center;
}

.variance-status {
    width: 48px;
    height: 16px;
    border-radius: 999px;
    display: inline-block;
}

.variance-status.success {
    background: linear-gradient(90deg, #22ec39, #17cf2f);
}

.variance-status.danger {
    background: linear-gradient(90deg, #ff2014, #e80a00);
}

.variance-status.muted {
    background: linear-gradient(90deg, rgba(165, 177, 187, 0.45), rgba(99, 111, 122, 0.45));
}

.status-rule-modal[hidden] {
    display: none;
}

.status-rule-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 22px;
}

.status-rule-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 10, 0.72);
    backdrop-filter: blur(10px);
}

.status-rule-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    max-height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(164, 190, 201, 0.18);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(32, 42, 53, 0.98), rgba(10, 16, 24, 0.99)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 6px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
    overflow: hidden;
}

.status-rule-dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-rule-dialog-head h3 {
    margin: 4px 0 0;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.55rem;
}

.status-rule-icon-btn,
.status-rule-reset-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    color: #dce5ea;
    cursor: pointer;
}

.status-rule-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.35rem;
    line-height: 1;
}

.status-rule-dialog-copy {
    padding: 12px 20px;
    color: #aebbc4;
    font-size: 0.9rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.status-rule-list {
    display: grid;
    gap: 12px;
    padding: 16px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
}

.status-rule-group {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    overflow: visible;
}

.status-rule-group-title {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-family: "Rajdhani", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f1f4f6;
}

.status-rule-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.75fr) repeat(2, minmax(110px, 0.55fr)) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
    min-height: 76px;
}

.status-rule-row:first-of-type {
    border-top: 0;
}

.status-rule-row.has-error {
    background: rgba(212, 105, 99, 0.11);
    box-shadow: inset 3px 0 0 rgba(212, 105, 99, 0.75);
}

.status-rule-metric {
    display: grid;
    gap: 4px;
}

.status-rule-metric strong {
    font-family: "Rajdhani", sans-serif;
    font-size: 1.05rem;
}

.status-rule-metric span,
.status-rule-row label span {
    color: #9fb0ba;
    font-size: 0.78rem;
}

.status-rule-row label {
    display: grid;
    gap: 5px;
}

.status-rule-row input,
.status-rule-row select {
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 0.9rem;
}

.status-rule-row input:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.status-rule-row.is-custom input {
    border-color: rgba(211, 194, 77, 0.34);
    background: rgba(8, 14, 22, 0.94);
}

.status-rule-reset-btn {
    min-height: 38px;
    border-radius: 10px;
    padding: 8px 10px;
    font-family: "Rajdhani", sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-rule-dialog-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 9, 14, 0.34);
}

.status-rule-save-state {
    margin-right: auto;
    color: #9fb0ba;
    font-size: 0.88rem;
}

.status-rule-save-state.error {
    color: #ef9a92;
}

.plant-card-grid,
.variance-section {
    overflow: visible;
}

.hero-panel {
    grid-column: 1 / -1;
    border-radius: 26px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
}

.hero-copy h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); max-width: 14ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-badges span, .panel-tag {
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #d6dfdf;
    border: 1px solid rgba(160, 181, 192, 0.12);
}

.metrics-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-card, .panel { border-radius: 20px; padding: 18px; }
.metric-card span { color: var(--muted); }
.metric-card strong { font-size: 2.2rem; line-height: 1; margin: 12px 0 8px; }
.metric-card small { font-size: 1rem; margin-left: 6px; color: var(--muted); }
.metric-card em { font-style: normal; color: var(--green); }

.trend-panel { min-height: 420px; }

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 20px;
}

.panel-head h3, .insight-card h4 {
    margin: 8px 0 0;
    font-family: "Rajdhani", sans-serif;
}

.panel-head h3 { font-size: 1.8rem; }
.insight-card h4 { font-size: 1.35rem; }

.chart-stage {
    height: 320px;
    border-radius: 20px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(8, 14, 22, 0.25));
}

.chart-stage canvas { width: 100%; height: 100%; }
.status-item, .insight-card { padding: 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.04); }

.status-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.progress {
    height: 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.progress i { display: block; height: 100%; border-radius: inherit; }
.progress.green i { background: linear-gradient(90deg, #78d46e, #9ce98c); }
.progress.lime i { background: linear-gradient(90deg, #b5d24c, #78d46e); }
.progress.red i { background: linear-gradient(90deg, #b44747, #db7364); }
.progress.amber i { background: linear-gradient(90deg, #c38d42, #e2c84f); }

.account-panel, .manager-grid .panel { padding: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.report-comment-layout {
    display: grid;
    gap: 0;
    width: 100%;
    max-width: none;
    align-content: start;
}

.form-page-panel {
    align-self: start;
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(31, 48, 61, 0.92), rgba(11, 19, 27, 0.96)),
        var(--panel);
}

.report-comment-form {
    display: grid;
    gap: 18px;
    padding: 22px 24px 24px;
}

.report-comment-form .form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.report-comment-field {
    display: grid;
    grid-column: span 4;
    gap: 7px;
    align-self: start;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(160, 181, 192, 0.12);
    border-radius: 14px;
    background: rgba(3, 10, 15, 0.25);
}

.report-comment-field[hidden],
.report-comment-field.full[hidden],
[data-value-section][hidden],
[data-equipment-section][hidden] {
    display: none !important;
}

.report-comment-field span {
    color: #c2d0d8;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.report-comment-field.full {
    grid-column: 1 / -1;
}

.report-comment-field input,
.report-comment-field select,
.report-comment-field textarea {
    height: 38px;
    min-height: 38px;
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(2, 9, 14, 0.72);
}

.report-comment-field textarea {
    height: auto;
    min-height: 92px;
}

.report-comment-actions {
    display: flex;
    justify-content: center;
}

.report-comment-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 8px 12px;
    font-size: 0.78rem;
    line-height: 1;
}

.report-comment-entry-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-comment-entry-form .report-comment-field {
    grid-column: span 1;
}

.report-comment-entry-form .report-comment-field.full {
    grid-column: 1 / -1;
}

.report-comment-entry-form .report-comment-actions {
    justify-content: center;
}

.report-comment-entry-form .report-comment-actions .btn {
    width: 100%;
    min-height: 32px;
    padding: 8px 12px;
    font-size: 0.78rem;
}

.form-stack .form-grid {
    grid-template-columns: 1fr;
}

.form-stack .report-comment-field {
    grid-column: 1 / -1;
}

.dashboard-form {
    display: grid;
    gap: 10px;
    align-content: start;
    grid-auto-rows: max-content;
    padding: 12px 16px 14px;
}

.dashboard-form-grid {
    display: grid;
    gap: 10px;
    align-content: start;
    align-items: start;
    grid-auto-rows: max-content;
}

.dashboard-form-report > .dashboard-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 10px;
}

.dashboard-form-stack > .dashboard-form-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.dashboard-form-grid-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-form-field {
    display: grid;
    gap: 6px;
    align-self: start;
    min-width: 0;
    padding: 7px;
    border: 1px solid rgba(160, 181, 192, 0.12);
    border-radius: 12px;
    background: rgba(3, 10, 15, 0.25);
}

.dashboard-form-field.full {
    grid-column: 1 / -1;
}

.dashboard-form-field[hidden],
.dashboard-form-field.full[hidden],
[data-value-section][hidden],
[data-equipment-section][hidden],
[data-reagent-unit-field][hidden] {
    display: none !important;
}

.dashboard-form-field span {
    color: #c2d0d8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    line-height: 1;
    text-transform: uppercase;
}

.dashboard-form-field input,
.dashboard-form-field select,
.dashboard-form-field textarea {
    width: 100%;
    height: 52px !important;
    min-height: 52px !important;
    padding: 11px 14px !important;
    border-radius: 9px;
    background: rgba(2, 9, 14, 0.72);
}

.dashboard-form-field textarea {
    height: auto !important;
    min-height: 124px !important;
}

.dashboard-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.dashboard-form-submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 49px !important;
    min-height: 49px !important;
    max-height: 49px !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
    font-size: 0.76rem !important;
    line-height: 1 !important;
}

.update-console {
    min-height: 74px;
    display: flex;
    align-items: center;
    background: rgba(6, 11, 17, 0.6);
    border: 1px solid rgba(160, 181, 192, 0.12);
    color: #d5e2e8;
}

.user-table-wrap { margin-top: 20px; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    color: #a8bac4;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.status-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.status-card {
    width: min(100%, 440px);
    border-radius: 28px;
    padding: 36px;
    background: linear-gradient(180deg, rgba(22, 33, 44, 0.95), rgba(7, 12, 18, 0.98));
    border: 1px solid rgba(160, 181, 192, 0.15);
    text-align: center;
}

html[data-theme="light"],
html[data-theme="light"] body {
    background:
        radial-gradient(circle at top left, rgba(74, 104, 124, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(85, 98, 108, 0.16), transparent 28%),
        linear-gradient(180deg, #f0f4f6 0%, #dfe7eb 100%);
    color: var(--text);
}

:root[data-theme="light"] body::before {
    background:
        linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16));
    mix-blend-mode: normal;
}

:root[data-theme="light"] .brand-panel,
:root[data-theme="light"] .auth-card,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .sidebar,
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .hero-panel,
:root[data-theme="light"] .control-room-panel,
:root[data-theme="light"] .plant-summary-panel,
:root[data-theme="light"] .shift-hours-panel,
:root[data-theme="light"] .variance-panel,
:root[data-theme="light"] .production-summary-shell,
:root[data-theme="light"] .production-trend-shell,
:root[data-theme="light"] .status-card {
    border-color: rgba(20, 31, 40, 0.3);
    background:
        linear-gradient(180deg, rgba(248, 251, 252, 0.94), rgba(224, 233, 237, 0.94));
    color: var(--text);
    box-shadow:
        0 28px 62px rgba(20, 31, 40, 0.24),
        0 8px 20px rgba(20, 31, 40, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        inset 0 -1px 0 rgba(20, 31, 40, 0.08);
}

:root[data-theme="light"] .topbar {
    border-color: rgba(20, 31, 40, 0.34);
    background:
        linear-gradient(180deg, rgba(250, 252, 253, 0.96), rgba(219, 229, 234, 0.96));
    box-shadow:
        0 34px 76px rgba(20, 31, 40, 0.28),
        0 12px 24px rgba(20, 31, 40, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(20, 31, 40, 0.1);
}

:root[data-theme="light"] .brand-kicker,
:root[data-theme="light"] .panel-label,
:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .status-eyebrow,
:root[data-theme="light"] .nav-group-title,
:root[data-theme="light"] .production-stat-label,
:root[data-theme="light"] .production-summary-topline .panel-label,
:root[data-theme="light"] .production-trend-legend,
:root[data-theme="light"] .control-room-panel-title,
:root[data-theme="light"] .control-reagents-primary span,
:root[data-theme="light"] .control-reagents-secondary span,
:root[data-theme="light"] .control-bypass-target-label,
:root[data-theme="light"] .control-bypass-events,
:root[data-theme="light"] .control-shift-performance-card span,
:root[data-theme="light"] .control-shift-performance-card em,
:root[data-theme="light"] .plant-card-title-wrap,
:root[data-theme="light"] .shift-label-cell span,
:root[data-theme="light"] .time-range-copy span,
:root[data-theme="light"] .time-range-fields span,
:root[data-theme="light"] .time-range-message,
:root[data-theme="light"] .time-range-weekdays span,
:root[data-theme="light"] .control-feed-kicker,
:root[data-theme="light"] .control-feed-item small,
:root[data-theme="light"] .control-summary-stat small,
:root[data-theme="light"] .pps-upload-copy,
:root[data-theme="light"] .pps-upload-form span,
:root[data-theme="light"] .pps-upload-dropzone-subtitle,
:root[data-theme="light"] .pps-upload-picker-name,
:root[data-theme="light"] .data-table th {
    color: var(--muted);
}

:root[data-theme="light"] .topbar h1,
:root[data-theme="light"] .brand-copy h1,
:root[data-theme="light"] .hero-copy h2,
:root[data-theme="light"] .auth-header h2,
:root[data-theme="light"] .status-card h1,
:root[data-theme="light"] .production-trend-head h3,
:root[data-theme="light"] .production-stat-value,
:root[data-theme="light"] .plant-card-value-wrap,
:root[data-theme="light"] .shift-label-cell strong,
:root[data-theme="light"] .shift-value-cell,
:root[data-theme="light"] .variance-section-title,
:root[data-theme="light"] .variance-label,
:root[data-theme="light"] .variance-stat,
:root[data-theme="light"] .control-feed-item strong,
:root[data-theme="light"] .control-summary-stat strong,
:root[data-theme="light"] .control-room-preview-btn,
:root[data-theme="light"] .pps-upload-copy h4,
:root[data-theme="light"] .pps-upload-dropzone-title,
:root[data-theme="light"] .panel-head h3,
:root[data-theme="light"] .insight-card h4,
:root[data-theme="light"] .account-meta strong,
:root[data-theme="light"] .data-table td,
:root[data-theme="light"] .control-room-panel-title {
    color: #111820;
    text-shadow: none;
}

:root[data-theme="light"] .brand-copy p,
:root[data-theme="light"] .panel-copy,
:root[data-theme="light"] .auth-header p,
:root[data-theme="light"] .insight-card p,
:root[data-theme="light"] .status-card p,
:root[data-theme="light"] .auth-switch,
:root[data-theme="light"] .form-response,
:root[data-theme="light"] .account-meta small,
:root[data-theme="light"] .sidebar-footer span,
:root[data-theme="light"] .metric-card span,
:root[data-theme="light"] .metric-card small,
:root[data-theme="light"] .uploads-placeholder-copy {
    color: var(--muted);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
    border-color: rgba(20, 31, 40, 0.28);
    background: rgba(238, 244, 247, 0.96);
    color: #111820;
    box-shadow: inset 0 1px 2px rgba(20, 31, 40, 0.08);
}

:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder {
    color: #71808b;
}

:root[data-theme="light"] .report-comment-field span {
    color: var(--muted);
}

:root[data-theme="light"] .form-page-panel {
    background:
        radial-gradient(circle at top right, rgba(86, 104, 116, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(242, 247, 249, 0.96), rgba(219, 229, 234, 0.94));
    border-color: rgba(20, 31, 40, 0.32);
    box-shadow:
        0 30px 68px rgba(20, 31, 40, 0.25),
        0 10px 24px rgba(20, 31, 40, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        inset 0 -1px 0 rgba(20, 31, 40, 0.08);
}

:root[data-theme="light"] .dashboard-form-field,
:root[data-theme="light"] .report-comment-field {
    border-color: rgba(20, 31, 40, 0.22);
    background: linear-gradient(180deg, rgba(247, 250, 251, 0.84), rgba(229, 237, 241, 0.84));
    color: #111820;
    box-shadow:
        0 12px 24px rgba(20, 31, 40, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

:root[data-theme="light"] .dashboard-form-field span,
:root[data-theme="light"] .report-comment-field span {
    color: #43515c;
}

:root[data-theme="light"] .dashboard-form-field input,
:root[data-theme="light"] .dashboard-form-field select,
:root[data-theme="light"] .dashboard-form-field textarea,
:root[data-theme="light"] .report-comment-field input,
:root[data-theme="light"] .report-comment-field select,
:root[data-theme="light"] .report-comment-field textarea {
    border-color: rgba(20, 31, 40, 0.24);
    background: rgba(249, 251, 252, 0.9);
}

:root[data-theme="light"] .dashboard-form-field input:disabled,
:root[data-theme="light"] .dashboard-form-field select:disabled,
:root[data-theme="light"] .dashboard-form-field textarea:disabled {
    background: rgba(217, 226, 231, 0.82);
    color: #6b7983;
}

:root[data-theme="light"] .auth-form span,
:root[data-theme="light"] .settings-form span {
    color: #43515c;
}

:root[data-theme="light"] .btn-secondary,
:root[data-theme="light"] .btn-ghost,
:root[data-theme="light"] .status-rule-edit-btn {
    color: #111820;
    background: linear-gradient(135deg, rgba(226, 234, 238, 0.98), rgba(196, 209, 216, 0.98));
    border-color: rgba(20, 31, 40, 0.24);
    box-shadow: 0 8px 18px rgba(20, 31, 40, 0.12);
}

:root[data-theme="light"] .sidebar-brand,
:root[data-theme="light"] .shift-table-spacer,
:root[data-theme="light"] .variance-section-head,
:root[data-theme="light"] .control-room-panel-title,
:root[data-theme="light"] .data-table th,
:root[data-theme="light"] .data-table td {
    border-color: rgba(20, 31, 40, 0.18);
}

:root[data-theme="light"] .sidebar-footer,
:root[data-theme="light"] .brand-pulse-card,
:root[data-theme="light"] .time-filter-tabs,
:root[data-theme="light"] .time-range-picker,
:root[data-theme="light"] .pps-upload-card,
:root[data-theme="light"] .pps-upload-dropzone,
:root[data-theme="light"] .pps-upload-picker,
:root[data-theme="light"] .production-summary-topline,
:root[data-theme="light"] .production-summary-strip,
:root[data-theme="light"] .production-stat-card,
:root[data-theme="light"] .production-trend-chart-wrap,
:root[data-theme="light"] .production-chart-skeleton,
:root[data-theme="light"] .production-chart-skeleton span,
:root[data-theme="light"] .control-feed-item,
:root[data-theme="light"] .control-summary-stat,
:root[data-theme="light"] .control-room-tab,
:root[data-theme="light"] .control-room-snapshot-card,
:root[data-theme="light"] .control-room-snapshot-list div,
:root[data-theme="light"] .control-reagents-chart,
:root[data-theme="light"] .control-bypass-copy,
:root[data-theme="light"] .control-bypass-mini-chart,
:root[data-theme="light"] .plant-card-grid,
:root[data-theme="light"] .plant-card,
:root[data-theme="light"] .shift-table-col,
:root[data-theme="light"] .shift-value-cell,
:root[data-theme="light"] .shift-label-cell,
:root[data-theme="light"] .shift-label-cell.total,
:root[data-theme="light"] .shift-value-cell.total,
:root[data-theme="light"] .variance-section,
:root[data-theme="light"] .variance-row,
:root[data-theme="light"] .variance-stat,
:root[data-theme="light"] .variance-history,
:root[data-theme="light"] .variance-history-chart,
:root[data-theme="light"] .chart-stage,
:root[data-theme="light"] .status-item,
:root[data-theme="light"] .insight-card,
:root[data-theme="light"] .update-console {
    border-color: rgba(20, 31, 40, 0.22);
    background:
        linear-gradient(180deg, rgba(246, 249, 250, 0.92), rgba(224, 233, 237, 0.92));
    color: #111820;
    box-shadow:
        0 18px 38px rgba(20, 31, 40, 0.18),
        0 6px 14px rgba(20, 31, 40, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

:root[data-theme="light"] .panel,
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .sidebar,
:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .plant-card-grid,
:root[data-theme="light"] .plant-card,
:root[data-theme="light"] .production-stat-card,
:root[data-theme="light"] .production-trend-chart-wrap,
:root[data-theme="light"] .shift-table-col,
:root[data-theme="light"] .shift-value-cell,
:root[data-theme="light"] .shift-label-cell,
:root[data-theme="light"] .variance-section,
:root[data-theme="light"] .variance-stat,
:root[data-theme="light"] .control-room-panel,
:root[data-theme="light"] .control-feed-item,
:root[data-theme="light"] .control-summary-stat,
:root[data-theme="light"] .pps-upload-card,
:root[data-theme="light"] .pps-upload-dropzone,
:root[data-theme="light"] .pps-upload-picker {
    border-color: rgba(20, 31, 40, 0.28);
    box-shadow:
        0 22px 46px rgba(20, 31, 40, 0.2),
        0 7px 16px rgba(20, 31, 40, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(20, 31, 40, 0.08);
}

:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .hero-panel,
:root[data-theme="light"] .account-panel,
:root[data-theme="light"] .manager-grid .panel {
    box-shadow:
        0 30px 68px rgba(20, 31, 40, 0.24),
        0 10px 24px rgba(20, 31, 40, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        inset 0 -1px 0 rgba(20, 31, 40, 0.08);
}

:root[data-theme="light"] .production-stat-card,
:root[data-theme="light"] .plant-card,
:root[data-theme="light"] .shift-value-cell,
:root[data-theme="light"] .shift-label-cell,
:root[data-theme="light"] .variance-section,
:root[data-theme="light"] .control-feed-item,
:root[data-theme="light"] .control-summary-stat,
:root[data-theme="light"] .control-room-snapshot-card,
:root[data-theme="light"] .pps-upload-card {
    box-shadow:
        0 18px 40px rgba(20, 31, 40, 0.18),
        0 6px 14px rgba(20, 31, 40, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

:root[data-theme="light"] .variance-row {
    border-top-color: rgba(27, 43, 54, 0.14);
}

:root[data-theme="light"] .variance-stat {
    background: rgba(255, 255, 255, 0.82);
}

:root[data-theme="light"] .variance-section-columns,
:root[data-theme="light"] .variance-history-label,
:root[data-theme="light"] .variance-history-y-axis,
:root[data-theme="light"] .variance-history-x-axis {
    color: #53626d;
}

:root[data-theme="light"] .variance-history-grid {
    stroke: rgba(27, 43, 54, 0.14);
}

:root[data-theme="light"] .variance-history-chart {
    border-left-color: rgba(27, 43, 54, 0.22);
    border-bottom-color: rgba(27, 43, 54, 0.22);
}

:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .mobile-menu-toggle,
:root[data-theme="light"] .control-room-preview-btn,
:root[data-theme="light"] .pps-upload-picker-button,
:root[data-theme="light"] .time-filter-tab,
:root[data-theme="light"] .time-range-picker-tabs button,
:root[data-theme="light"] .time-range-calendar-head button,
:root[data-theme="light"] .time-range-days button,
:root[data-theme="light"] .time-range-actions button {
    border-color: rgba(20, 31, 40, 0.24);
    background: rgba(232, 240, 243, 0.9);
    color: #111820;
    box-shadow: 0 6px 14px rgba(20, 31, 40, 0.1);
}

:root[data-theme="light"] .time-filter-tab.active,
:root[data-theme="light"] .time-range-picker-tabs button.active {
    border-color: rgba(47, 143, 67, 0.42);
    background: linear-gradient(180deg, rgba(222, 243, 225, 0.95), rgba(198, 232, 205, 0.95));
    color: #0d3c1b;
}

:root[data-theme="light"] .time-filter-export,
:root[data-theme="light"] .btn-primary {
    color: #071118;
    background: linear-gradient(135deg, #c8b93f 0%, #62be60 100%);
}

:root[data-theme="light"] .time-range-popover,
:root[data-theme="light"] .account-dropdown,
:root[data-theme="light"] .info-tip::after,
:root[data-theme="light"] .production-trend-tooltip rect {
    border-color: rgba(20, 31, 40, 0.28);
    background: rgba(238, 244, 247, 0.98);
    color: #111820;
    box-shadow: 0 22px 52px rgba(20, 31, 40, 0.24);
}

:root[data-theme="light"] .production-trend-tooltip rect {
    fill: rgba(255, 255, 255, 0.98);
    stroke: rgba(27, 43, 54, 0.22);
}

:root[data-theme="light"] .account-trigger {
    border: 1px solid rgba(20, 31, 40, 0.22);
    background: rgba(232, 240, 243, 0.88);
    color: #111820;
    box-shadow: 0 8px 18px rgba(20, 31, 40, 0.1);
}

:root[data-theme="light"] .account-dropdown a:hover,
:root[data-theme="light"] .nav-link {
    background: rgba(17, 24, 32, 0.065);
}

:root[data-theme="light"] .nav-link {
    border: 1px solid rgba(20, 31, 40, 0.12);
    color: #24313b;
}

:root[data-theme="light"] .nav-link.active,
:root[data-theme="light"] .nav-link:hover {
    border-color: rgba(20, 31, 40, 0.34);
    background: linear-gradient(135deg, rgba(213, 198, 89, 0.28), rgba(117, 209, 106, 0.18));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48), 0 8px 18px rgba(20, 31, 40, 0.1);
}

:root[data-theme="light"] .info-tip {
    border-color: rgba(27, 43, 54, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(218, 228, 233, 0.96));
    color: #111820;
}

:root[data-theme="light"] .info-tip::after,
:root[data-theme="light"] .production-trend-tooltip text {
    color: #111820;
    fill: #111820;
}

:root[data-theme="light"] .production-trend-tooltip text:first-of-type,
:root[data-theme="light"] .production-trend-tooltip-time,
:root[data-theme="light"] .production-trend-grid-row text,
:root[data-theme="light"] .production-trend-grid-col text {
    fill: #53626d;
}

:root[data-theme="light"] .production-trend-grid-row line,
:root[data-theme="light"] .production-trend-grid-col line,
:root[data-theme="light"] .production-trend-axis {
    stroke: rgba(27, 43, 54, 0.18);
}

:root[data-theme="light"] .production-trend-axis-title {
    fill: #111820;
}

:root[data-theme="light"] .production-stat-unit,
:root[data-theme="light"] .production-summary-topline .panel-tag,
:root[data-theme="light"] .shift-table-col,
:root[data-theme="light"] .control-reagents-bar-col span,
:root[data-theme="light"] .update-console,
:root[data-theme="light"] .maintenance-total span,
:root[data-theme="light"] .maintenance-panel-note,
:root[data-theme="light"] .maintenance-empty,
:root[data-theme="light"] .maintenance-alert small,
:root[data-theme="light"] .maintenance-upcoming-item span,
:root[data-theme="light"] .maintenance-kpi span {
    color: #53626d;
}

:root[data-theme="light"] .maintenance-hero,
:root[data-theme="light"] .maintenance-card,
:root[data-theme="light"] .maintenance-kpi-strip {
    background:
        linear-gradient(180deg, rgba(246, 249, 250, 0.96), rgba(224, 233, 237, 0.94));
}

:root[data-theme="light"] .maintenance-table-row,
:root[data-theme="light"] .maintenance-alert,
:root[data-theme="light"] .maintenance-upcoming-item,
:root[data-theme="light"] .maintenance-kpi,
:root[data-theme="light"] .maintenance-skeleton {
    border-color: rgba(20, 31, 40, 0.16);
    background: rgba(255, 255, 255, 0.74);
    color: #111820;
}

:root[data-theme="light"] .maintenance-priority span:last-child,
:root[data-theme="light"] .maintenance-table-head,
:root[data-theme="light"] .maintenance-bar-item small,
:root[data-theme="light"] .maintenance-timeline small {
    color: #24313b;
}

:root[data-theme="light"] .maintenance-priority-strip,
:root[data-theme="light"] .maintenance-hero-head,
:root[data-theme="light"] .maintenance-panel-head {
    border-color: rgba(20, 31, 40, 0.16);
}

:root[data-theme="light"] .skeleton-line {
    background: rgba(27, 43, 54, 0.1);
}

:root[data-theme="light"] .setup-alert,
:root[data-theme="light"] .flash-error {
    background: rgba(177, 61, 53, 0.1);
    border-color: rgba(177, 61, 53, 0.28);
    color: #6e211b;
}

:root[data-theme="light"] .flash-success {
    background: rgba(47, 143, 67, 0.1);
    border-color: rgba(47, 143, 67, 0.28);
    color: #124c21;
}

:root[data-theme="light"] .status-rule-dialog,
:root[data-theme="light"] .status-rule-group,
:root[data-theme="light"] .status-rule-dialog-actions,
:root[data-theme="light"] .hero-badges span,
:root[data-theme="light"] .panel-tag {
    border-color: rgba(20, 31, 40, 0.22);
    background: rgba(235, 242, 245, 0.96);
    color: #111820;
    box-shadow: 0 8px 18px rgba(20, 31, 40, 0.1);
}

:root[data-theme="light"] .status-rule-dialog-head,
:root[data-theme="light"] .status-rule-dialog-copy,
:root[data-theme="light"] .status-rule-group-title,
:root[data-theme="light"] .status-rule-row {
    border-color: rgba(20, 31, 40, 0.18);
}

:root[data-theme="light"] .status-rule-row label span,
:root[data-theme="light"] .status-rule-metric span {
    color: #53626d;
}

:root[data-theme="light"] .status-rule-row input,
:root[data-theme="light"] .status-rule-row select {
    border-color: rgba(20, 31, 40, 0.24);
    background: rgba(248, 251, 252, 0.92);
}

:root[data-theme="light"] .status-rule-group-title,
:root[data-theme="light"] .status-rule-metric strong,
:root[data-theme="light"] .status-rule-dialog-head h3 {
    color: #111820;
}

:root[data-theme="light"] .status-rule-dialog-copy,
:root[data-theme="light"] .status-rule-metric span,
:root[data-theme="light"] .status-rule-row label span,
:root[data-theme="light"] .status-rule-save-state {
    color: var(--muted);
}

:root[data-theme="light"] .status-rule-icon-btn,
:root[data-theme="light"] .status-rule-reset-btn {
    border-color: rgba(27, 43, 54, 0.14);
    background: rgba(255, 255, 255, 0.88);
    color: #111820;
}

:root[data-theme="light"] .status-rule-row.is-custom input {
    background: rgba(255, 255, 255, 0.96);
}

@keyframes sweep {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

@keyframes skeletonSweep {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

@media (max-width: 1080px) {
    .auth-layout, .overview-grid { grid-template-columns: 1fr; }
    .app-frame {
        display: block;
        min-height: 100vh;
    }
    .main-shell {
        min-width: 0;
    }
    .sidebar {
        position: fixed;
        top: 12px;
        bottom: 12px;
        left: 12px;
        z-index: 900;
        width: min(84vw, 310px);
        overflow-y: auto;
        transform: translateX(calc(-100% - 18px));
        transition: transform 180ms ease;
        overscroll-behavior: contain;
    }
    .mobile-nav-open {
        overflow: hidden;
    }
    .mobile-nav-open .sidebar {
        transform: translateX(0);
    }
    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 850;
        display: block;
        background: rgba(2, 7, 12, 0.58);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
        backdrop-filter: blur(4px);
    }
    .mobile-nav-open .mobile-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        border: 1px solid rgba(164, 190, 201, 0.16);
        border-radius: 50%;
        display: inline-grid;
        place-items: center;
        gap: 4px;
        padding: 11px;
        background: linear-gradient(180deg, rgba(34, 45, 57, 0.92), rgba(11, 17, 25, 0.94));
        color: #eef4f7;
        cursor: pointer;
    }
    .mobile-menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }
    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }
    .topbar-title {
        min-width: 0;
    }
    .topbar h1 {
        overflow-wrap: anywhere;
    }
    .topbar-tools {
        grid-column: 1 / -1;
        grid-row: 2;
        width: min(100%, 360px);
    }
    .topbar.no-header-tools {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }
    .time-filter-card {
        min-width: 0;
    }
    .metrics-strip, .form-grid { grid-template-columns: 1fr 1fr; }
    .plant-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .production-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .control-room-grid,
    .control-room-snapshot-grid { grid-template-columns: 1fr; }
    .maintenance-grid { grid-template-columns: 1fr; }
    .maintenance-incidents-card,
    .maintenance-bypass-card,
    .maintenance-upcoming-card {
        grid-column: auto;
        grid-row: auto;
    }
    .maintenance-upcoming-grid { grid-template-columns: 1fr; }
    .control-room-feed-strip,
    .control-room-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .variance-grid { grid-template-columns: 1fr; }
    .shift-table-header,
    .shift-table-row,
    .shift-table-total {
        grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .report-comment-form .form-grid {
        grid-template-columns: 1fr;
    }

    .report-comment-field {
        grid-column: 1 / -1;
    }

    .report-comment-actions {
        justify-content: stretch;
    }

    .report-comment-actions .btn {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .auth-layout, .app-frame { padding: 14px; }
    .brand-panel, .auth-card, .topbar, .panel, .metric-card, .hero-panel, .sidebar { border-radius: 20px; }
    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: stretch;
        padding: 14px;
        gap: 12px;
    }
    .topbar.no-header-tools {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
    .topbar-title {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }
    .mobile-menu-toggle {
        grid-column: 1;
        grid-row: 1;
    }
    .eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
    }
    .topbar h1 {
        font-size: 1.45rem;
        line-height: 1.08;
    }
    .topbar-tools {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }
    .topbar-actions {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }
    .theme-toggle {
        justify-self: end;
    }
    .time-filter-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .account-menu {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: stretch;
    }
    .topbar.no-header-tools .account-menu {
        grid-row: 2;
    }
    .account-trigger {
        width: 100%;
        justify-content: flex-start;
    }
    .account-dropdown {
        left: 0;
        right: 0;
        width: 100%;
        min-width: 0;
    }
    .hero-panel, .panel-head { flex-direction: column; align-items: stretch; }
    .metrics-strip, .brand-pulse-metrics, .form-grid { grid-template-columns: 1fr; }
    .plant-summary-head {
        flex-direction: column;
        align-items: stretch;
    }
    .production-summary-topline {
        flex-direction: column;
        align-items: stretch;
    }
    .maintenance-hero-head,
    .maintenance-panel-head {
        flex-direction: column;
        align-items: stretch;
    }
    .maintenance-priority-strip,
    .maintenance-kpi-strip {
        grid-template-columns: 1fr;
    }
    .maintenance-table-head {
        display: none;
    }
    .maintenance-table-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .maintenance-equipment,
    .maintenance-table-row > span:nth-child(2),
    .maintenance-upcoming-item span {
        white-space: normal;
    }
    .maintenance-bars {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .maintenance-timeline {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
    .maintenance-mix {
        grid-template-columns: 1fr;
    }
    .maintenance-gauge {
        width: min(180px, 100%);
        justify-self: center;
    }
    .maintenance-kpi {
        border-width: 0 0 1px;
    }
    .maintenance-kpi:last-child {
        border-bottom: 0;
    }
    .production-trend-head {
        flex-direction: column;
        align-items: stretch;
    }
    .plant-card-grid { grid-template-columns: 1fr; }
    .production-summary-strip { grid-template-columns: 1fr; }
    .control-room-feed-strip,
    .control-room-summary-strip,
    .control-room-tab-row,
    .control-shift-performance-grid { grid-template-columns: 1fr; }
    .control-bypass-layout,
    .control-reagents-layout { grid-template-columns: 1fr; }
    .variance-head {
        flex-direction: column;
        align-items: stretch;
    }
    .variance-section-head,
    .variance-row {
        grid-template-columns: 1fr;
    }
    .variance-section-columns {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .status-rule-modal {
        padding: 12px;
    }
    .status-rule-dialog {
        max-height: 92vh;
    }
    .status-rule-dialog-head,
    .status-rule-dialog-actions {
        align-items: stretch;
    }
    .status-rule-dialog-actions {
        flex-direction: column;
    }
    .status-rule-save-state {
        margin-right: 0;
    }
    .status-rule-row {
        grid-template-columns: 1fr;
    }
    .status-rule-reset-btn,
    .status-rule-dialog-actions .btn {
        width: 100%;
    }
    .plant-card {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .plant-card:last-child { border-bottom: 0; }
    .production-stat-card {
        min-height: 132px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .production-stat-card:last-child { border-bottom: 0; }
    .control-feed-item,
    .control-summary-stat,
    .control-shift-performance-card {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .control-feed-item,
    .control-summary-stat,
    .control-shift-performance-card {
        padding-left: 56px;
    }
    .control-room-preview-btn {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        min-height: 60px;
    }
    .shift-table-header {
        display: none;
    }
    .shift-table-row,
    .shift-table-total {
        grid-template-columns: 1fr;
    }
    .shift-value-cell {
        min-height: 68px;
    }
    .content-area {
        gap: 14px;
    }
    .uploads-placeholder-panel,
    .empty-overview-panel {
        min-height: auto;
    }
    .pps-upload-card,
    .account-panel,
    .manager-grid .panel {
        padding: 18px;
    }
    .pps-upload-copy {
        text-align: left;
        margin-bottom: 18px;
    }
    .pps-upload-copy h4 {
        font-size: 1.55rem;
        line-height: 1.1;
    }
    .pps-upload-dropzone {
        padding: 24px 16px;
    }
    .pps-upload-picker {
        display: grid;
        width: 100%;
        min-width: 0;
        gap: 10px;
    }
    .pps-upload-picker-button,
    .pps-upload-picker-name {
        text-align: center;
    }
    .dashboard-form,
    .report-comment-form {
        padding: 14px;
    }
    .dashboard-form-report > .dashboard-form-grid,
    .dashboard-form-grid-values,
    .report-comment-entry-form .form-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-form-field,
    .report-comment-field {
        padding: 8px;
    }
    .dashboard-form-submit,
    .report-comment-actions .btn,
    .btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 520px) {
    html, body {
        overflow-x: hidden;
    }
    .app-frame,
    .auth-layout {
        padding: 10px;
    }
    .sidebar {
        top: 8px;
        bottom: 8px;
        left: 8px;
        width: min(88vw, 300px);
        padding: 16px 14px;
    }
    .topbar {
        border-radius: 16px;
    }
    .mobile-menu-toggle,
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    .account-meta strong,
    .account-meta small {
        max-width: calc(100vw - 118px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .time-filter-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .time-filter-tab.custom {
        grid-column: 1 / -1;
    }
    .time-range-popover {
        left: 0;
        right: 0;
        width: 100%;
        transform: none;
    }
    .panel,
    .metric-card,
    .hero-panel {
        padding: 14px;
    }
    .panel-head {
        margin-bottom: 14px;
    }
    .panel-head h3 {
        font-size: 1.45rem;
    }
    .metric-card strong,
    .plant-card-value {
        font-size: 1.65rem;
    }
    .production-summary-topline,
    .production-summary-strip {
        margin-left: 6px;
        margin-right: 6px;
    }
    .shift-label-cell,
    .shift-value-cell,
    .variance-row,
    .variance-section-head,
    .status-rule-row {
        padding: 10px;
    }
    .variance-history {
        margin: 4px 10px 10px;
    }
    .variance-history-frame {
        grid-template-columns: 34px minmax(0, 1fr);
    }
    .status-rule-dialog-head,
    .status-rule-dialog-copy,
    .status-rule-list,
    .status-rule-dialog-actions {
        padding-left: 14px;
        padding-right: 14px;
    }
    .data-table th,
    .data-table td {
        padding: 11px 10px;
    }
}
