/* ===================================================================
   ELBAMATIC S7 — modern SCADA dashboard (same UX, fresh skin)
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(34,211,238,0.10), transparent 60%),
        radial-gradient(900px 500px at 0% 110%, rgba(167,139,250,0.10), transparent 55%),
        #0b1220;
    color: #e6edf6;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    min-height: 100vh;
}
.mono { font-family: 'JetBrains Mono', monospace; }

.dash { max-width: 1500px; margin: 0 auto; padding: 16px 18px 28px; }

/* ---------- top bar ---------- */
.topbar {
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;                    /* crowded widths wrap to a second row instead of crushing */
    padding: 12px 18px; margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    color: #04121b; box-shadow: 0 6px 18px rgba(34,211,238,0.35);
}
.brand .title { font-size: 17px; font-weight: 800; letter-spacing: .3px; line-height: 1; }
.brand .sub { font-size: 11px; color: #8a97ab; letter-spacing: 2px; text-transform: uppercase; }
/* screen switcher */
.screen-nav { display: flex; gap: 4px; margin-left: 6px; }
.screen-nav a { padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 600;
    color: #b6c2d4; text-decoration: none; transition: .15s; white-space: nowrap; }
.screen-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.screen-nav a.active { background: rgba(34,211,238,0.16); color: #67e8f9; border: 1px solid rgba(34,211,238,0.3); }
.navmenu { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; border-radius: 8px;
    font-size: 11px; font-weight: 600; color: #b6c2d4; cursor: pointer; transition: .15s; white-space: nowrap; }
.navmenu:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* simple, reliable nav dropdown (CSS hover) */
.navdrop { position: relative; }
.navdrop:hover .navmenu { background: rgba(255,255,255,0.08); color: #fff; }
.navdrop-items { position: absolute; top: 100%; left: 0; z-index: 60; min-width: 160px;
    display: none; flex-direction: column; gap: 2px; padding: 5px; margin-top: 2px;
    background: #131c2e; border: 1px solid rgba(255,255,255,0.12); border-radius: 9px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.55); }
.navdrop:hover .navdrop-items { display: flex; }
.navdrop-items a { padding: 6px 10px; font-size: 11px; font-weight: 500; color: #b6c2d4;
    text-decoration: none; border-radius: 6px; white-space: nowrap; cursor: pointer; }
.navdrop-items a:hover { background: rgba(34,211,238,0.15); color: #67e8f9; }

/* ---------- mobile hamburger nav (hidden on desktop) ---------- */
.mnav { display: none; position: relative; }
.mnav-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 38px; padding: 0 9px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; cursor: pointer;
}
.mnav-btn span { display: block; width: 100%; min-width: 18px; height: 2px; border-radius: 2px; background: #b6c2d4; transition: .15s; }
.mnav-btn:hover span { background: #fff; }
.mnav-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.45); }
.mnav-panel {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 95; min-width: 220px;
    display: flex; flex-direction: column; padding: 8px;
    background: #131c2e; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.mnav-panel a {
    padding: 12px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
    color: #b6c2d4; text-decoration: none; transition: .15s;
}
.mnav-panel a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.mnav-panel a.active { background: rgba(34,211,238,0.16); color: #67e8f9; border: 1px solid rgba(34,211,238,0.3); }
.mnav-sep { height: 1px; margin: 6px 8px; background: rgba(255,255,255,0.1); }

.topmenu { display: flex; gap: 4px; margin-left: 8px; }
.topmenu .mi { padding: 4px 8px; border-radius: 8px; font-size: 11px; color: #b6c2d4; cursor: pointer; transition: .15s; text-decoration: none; }
.topmenu .mi:hover { background: rgba(255,255,255,0.08); color: #fff; }
.spacer { flex: 1; }
.clock { text-align: right; line-height: 1.1; }
.clock .t { font-size: 20px; font-weight: 700; }
.clock .d { font-size: 11px; color: #8a97ab; }

.pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04);
    white-space: nowrap; flex-shrink: 0;    /* never crush or word-wrap the status pill */
}
.pill .dotled { width: 8px; height: 8px; border-radius: 50%; }
.pill.ok { color: #86efac; } .pill.ok .dotled { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.pill.bad { color: #fca5a5; border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10); }
.pill.bad .dotled { background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- section labels ---------- */
.sec-label { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #6f7d92; margin: 4px 2px 10px; }

/* ---------- bins ---------- */
.bins { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 1200px) { .bins { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .bins { grid-template-columns: repeat(2, 1fr); } }

.bin-card {
    --accent: #22d3ee;
    position: relative; overflow: hidden;
    padding: 14px; border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.bin-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.bin-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}
.bin-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.bin-ic {
    width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent);
}
.bin-name { font-weight: 700; font-size: 14px; letter-spacing: .5px; flex: 1; }
.bin-max { font-size: 10px; color: #8a97ab; }

.bin-mid { display: flex; gap: 12px; align-items: stretch; }
.silo {
    position: relative; width: 26px; border-radius: 8px; flex: none;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); overflow: hidden;
}
.silo-fill {
    position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0 0 7px 7px;
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #000));
    box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent);
    transition: height .5s ease;
}
.silo-tick { position: absolute; left: -2px; right: -2px; height: 2px; background: #fff; opacity: .7; }
.readout { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.readout .act { display: flex; align-items: baseline; gap: 5px; }
.readout .act .num { font-size: 26px; font-weight: 800; }
.readout .act .unit { font-size: 12px; color: #8a97ab; }
.readout .lvl { font-size: 11px; color: var(--accent); font-weight: 700; }
.readout .tgt { font-size: 11px; color: #8a97ab; margin-top: 2px; }
.type-lines { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 11px; color: #b6c2d4; }
.type-lines span::before { content: "• "; color: var(--accent); }

.bin-leds { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; margin-top: 12px; }
.led {
    display: flex; align-items: center; gap: 5px; font-size: 10px; color: #8a97ab;
    padding: 3px 6px; border-radius: 7px; background: rgba(255,255,255,0.03); cursor: pointer; user-select: none;
    border: 1px solid transparent; transition: .12s;
}
.led .l { width: 7px; height: 7px; border-radius: 50%; background: #3a4761; flex: none; }
.led.on { color: #e6edf6; background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.led.on .l { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.bin-valve { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 10px; color: #8a97ab; border-radius: 8px; padding: 4px; transition: .15s; }
.bin-valve:hover { background: rgba(255,255,255,0.04); }
.bin-valve.on { color: var(--accent); }
.bin-valve .v { width: 16px; height: 16px; border-radius: 5px; display:flex;align-items:center;justify-content:center; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.bin-card.dosing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 28px rgba(0,0,0,.45); }
.bin-card.dosing .silo-fill { animation: silo-pulse 1.4s ease-in-out infinite; }
@keyframes silo-pulse { 50% { filter: brightness(1.35); } }

/* ---------- pipework / manifold ---------- */
.plantflow { margin: -4px 2px 0; }
.pipes { width: 100%; height: auto; display: block; overflow: visible; }
.pipes .pipe { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .45; transition: opacity .2s; }
.pipes .pipe.on { opacity: 1; }
.pipes .spine { fill: none; stroke: #64748b; stroke-width: 7; stroke-linecap: round; }
.pipes .trunk { fill: none; stroke: #64748b; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.pipes .trunk.on { stroke: #8aa0bd; }
.pipes .jn { opacity: .5; }
.pipes .jn.on { opacity: 1; filter: drop-shadow(0 0 5px currentColor); }
.pipes .flow { fill: none; stroke-width: 3; stroke-dasharray: 9 16; stroke-linecap: round;
    filter: drop-shadow(0 0 4px currentColor); animation: pipeflow .6s linear infinite; }
.pipes .trunkflow { stroke-width: 4; }
@keyframes pipeflow { to { stroke-dashoffset: -25; } }
.pipes .valve { cursor: pointer; }
.pipes .valve:hover { filter: brightness(1.35); }
.pipes .trunk-label { fill: #6f7d92; font: 700 10px 'Inter', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; }
.pipes .inlet-arrow { fill: #64748b; }
.pipes .inlet-arrow.on { fill: #22d3ee; filter: drop-shadow(0 0 6px #22d3ee); }
@media (max-width: 1200px) { .plantflow { display: none; } }

/* mixing-time panel inlet (receives the manifold trunk) */
.mix-inlet { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2; }
.mix-inlet .port { display: block; width: 12px; height: 12px; border-radius: 50%;
    background: #475569; border: 2px solid #0b1220; transition: .2s; }
.mix-inlet.on .port { background: #22d3ee; box-shadow: 0 0 12px #22d3ee; animation: inlet-pulse 1s ease-in-out infinite; }
@keyframes inlet-pulse { 50% { box-shadow: 0 0 4px #22d3ee; } }
.mixpanel.receiving { border-color: rgba(34,211,238,.45); box-shadow: 0 0 0 1px rgba(34,211,238,.25), 0 12px 30px rgba(0,0,0,.4); }
.mixpanel.receiving .mix-block { animation: mix-charge 1.4s ease-in-out infinite; }
@keyframes mix-charge { 50% { background: rgba(34,211,238,0.10); border-color: rgba(34,211,238,.35); } }

/* ---------- generic panel ---------- */
.panel {
    padding: 11px; border-radius: 14px; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);
}
.panel-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel-h .ic { color: #22d3ee; }
.panel-h .t { font-weight: 700; font-size: 15px; }
.panel-h .badge { margin-left: auto; font-size: 11px; color: #8a97ab; }

.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* production */
.field-row { margin-bottom: 8px; }
.field-row > label { display: block; font-size: 11px; color: #8a97ab; margin-bottom: 4px; letter-spacing: .3px; }
.stat { text-align: center; padding: 8px 6px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.stat .v { font-size: 18px; font-weight: 800; }
.stat .u { font-size: 11px; color: #8a97ab; }
.stat .k { font-size: 11px; color: #8a97ab; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }

/* moisture sliders */
.moist-wash { display: flex; gap: 10px; margin-bottom: 6px; }
.wash-tag { flex: 1; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 1px;
    padding: 6px; border-radius: 9px; background: rgba(34,211,238,0.12); color: #67e8f9; border: 1px solid rgba(34,211,238,0.25); }
/* moisture panel fills its height so sliders run full-height */
.moisture-panel { display: flex; flex-direction: column; }
.sliders { display: flex; gap: 6px; flex: 1; min-height: 0; }
.scol { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; }
.scol .pct { font-size: 12px; font-weight: 700; color: #22d3ee; margin-bottom: 4px; }
.scol .man { font-size: 10px; color: #6f7d92; margin-bottom: 6px; }
.vtrack { flex: 1; display: flex; justify-content: center; align-items: stretch; min-height: 0; width: 100%; }

/* custom vertical slider */
.vslider { position: relative; width: 22px; height: 100%; cursor: pointer; touch-action: none; }
.vslider * { pointer-events: none; }
.vslider .track { position: absolute; left: 50%; transform: translateX(-50%); width: 7px; height: 100%;
    border-radius: 999px; background: rgba(255,255,255,0.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.vslider .fill { position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 7px;
    border-radius: 999px; background: linear-gradient(180deg, #22d3ee, #0e7490);
    box-shadow: 0 0 8px rgba(34,211,238,0.45); }
.vslider .thumb { position: absolute; left: 50%; width: 16px; height: 16px; border-radius: 50%;
    transform: translate(-50%, 50%); background: #22d3ee; border: 2px solid #0b1220;
    box-shadow: 0 0 9px rgba(34,211,238,0.6); transition: bottom .05s linear; }
.vslider:hover .thumb { box-shadow: 0 0 13px rgba(34,211,238,0.85); }

/* mixing */
.mixpanel { position: relative; overflow: visible; }
.timer-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 8px; }
.daybox { display: flex; align-items: center; justify-content: center; gap: 6px; }
.daybox .num { font-size: 20px; font-weight: 800; min-width: 30px; text-align: center; }

.mix-block { background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.20);
    border-radius: 12px; padding: 9px; margin-bottom: 10px; }
.mix-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.mc { text-align: center; }
.mc-k { display: block; font-size: 10px; color: #8a97ab; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.mc-field { height: 30px; display: flex; align-items: center; justify-content: center; gap: 4px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); border-radius: 9px;
    font-size: 18px; font-weight: 700; }
.mc-field .u, .gate-pct .u, .temp-field .u { font-size: 10px; color: #8a97ab; font-weight: 500; }
.mix-progress { height: 9px !important; border-radius: 999px; }

.subhead { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #6f7d92;
    margin: 9px 0 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,0.06); }

.toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.toggle-grid.four { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.toggle-grid.four .tg { padding: 6px 4px; justify-content: center; font-size: 11px; gap: 6px; }

.gate-row { display: flex; align-items: center; gap: 8px; }
.gate-row .tg { flex: 1; justify-content: center; }
.gate-pct { margin-left: auto; font-size: 17px; font-weight: 800; white-space: nowrap; }
.temp-field { height: 32px; display: flex; align-items: center; justify-content: center; gap: 5px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); border-radius: 9px;
    font-size: 17px; font-weight: 700; }

.funnel { height: 22px; width: 78%; margin: 10px auto 0;
    background: linear-gradient(180deg, rgba(148,163,184,0.40), rgba(148,163,184,0.08));
    border-top: 2px solid rgba(148,163,184,0.55);
    clip-path: polygon(0 0, 100% 0, 66% 100%, 34% 100%); }
.tg {
    display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 10px; cursor: pointer;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); font-size: 12px; color: #8a97ab; user-select: none;
}
.tg .l { width: 9px; height: 9px; border-radius: 50%; background: #3a4761; }
.tg.on { color: #e6edf6; background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.4); }
.tg.on .l { background: #22c55e; box-shadow: 0 0 8px #22c55e; }

/* consistency */
.cons-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.cons-top .big { font-size: 16px; font-weight: 800; }
.cons-bar { position: relative; height: 9px; border-radius: 999px; overflow: hidden; display: flex;
    border: 1px solid rgba(255,255,255,0.08); }
.cons-seg { display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #0b1220; }
.cons-scale { display: flex; justify-content: space-between; font-size: 8px; color: #6f7d92; margin-top: 3px; }

/* truck */
.vehicle-body { display: flex; align-items: center; gap: 14px; }
.vehicle-truck { flex: 0 0 150px; max-width: 150px; }
.mixer-truck { width: 100%; height: auto; display: block; }
.mixer-truck .drum-spin { will-change: transform; }
.mixer-truck.charging .drum-spin { animation: drumroll 0.9s linear infinite; }
@keyframes drumroll { to { transform: translateX(-18px); } }
.mixer-truck .headlight { opacity: .45; transition: .2s; }
.mixer-truck.charging .headlight { opacity: 1; filter: drop-shadow(0 0 6px #fde68a); }

.vehicle-data { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.vehicle-data div { display: flex; justify-content: space-between; gap: 12px; }
.vehicle-data span { color: #8a97ab; }
.vehicle-data b { color: #e6edf6; font-weight: 700; }

/* slim warning alert */
.hmi-alert.mud-alert { padding: 2px 10px !important; }
.hmi-alert .mud-alert-message { padding: 2px 0 !important; font-size: 11px; }
.hmi-alert .mud-alert-icon { padding: 0 7px 0 0 !important; align-items: center; }
.hmi-alert .mud-alert-icon .mud-icon-root { font-size: 15px; }

/* bottom actions */
.actionbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding: 10px 14px;
    border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08); }
.ab-lead { display: flex; align-items: center; gap: 8px; }
.ab-nav { display: flex; align-items: center; gap: 4px; }
.ab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-width: 58px; padding: 6px 10px; border-radius: 12px; border: 0; background: transparent; cursor: pointer;
    color: #9aa7bd; text-decoration: none; transition: background .15s, color .15s; }
.ab-item .mud-icon-root { font-size: 22px; }
.ab-lbl { font-size: 10px; font-weight: 600; letter-spacing: .2px; line-height: 1; }
.ab-item:hover { color: #fff; background: rgba(255,255,255,0.07); }
.ab-item.active { color: #67e8f9; background: rgba(34,211,238,0.15); }
.ab-out { color: #fca5a5; }
.ab-out:hover { color: #fecaca; background: rgba(239,68,68,0.12); }
.ab-fab { display: none; }                 /* desktop uses the left-side ChildContent buttons */

/* primary-action FAB (start / stop toggle) — used on mobile */
.ab-fab-btn { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: #fff; transition: transform .12s ease; }
.ab-fab-btn:active { transform: scale(.93); }
.ab-fab-btn .mud-icon-root { font-size: 30px; }
.ab-fab-btn.start { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 12px 26px rgba(34,197,94,.5); }
.ab-fab-btn.stop  { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 12px 26px rgba(244,63,94,.5); }

/* ---- MOBILE: fixed bottom nav (4 labelled tabs) + a raised centre FAB for the primary action ---- */
@media (max-width: 640px) {
    .actionbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; gap: 0;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        border-radius: 18px 18px 0 0; border: 1px solid rgba(255,255,255,0.09); border-bottom: 0;
        background: rgba(11,18,32,0.94); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
        box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    }
    .actionbar .spacer, .ab-lead { display: none; }      /* the page-action row's job is the FAB now */
    .ab-nav { width: 100%; justify-content: space-around; gap: 0; }
    .ab-item { flex: 1; min-width: 0; padding: 5px 4px; }
    .actionbar .btn-txt { display: none; }
    .ab-fab { display: block; position: absolute; left: 50%; transform: translateX(-50%); top: -28px;
        padding: 6px; border-radius: 50%; background: rgba(11,18,32,0.94); }
    .dash { padding-bottom: 104px; }
}
.theme-light .ab-fab { background: rgba(248,250,252,0.94); }

/* ---- master production control bar (top of the plant screen) ---- */
.prodbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)); border: 1px solid rgba(255,255,255,0.08); }
.prodbar-state { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: #8a97ab; }
.prodbar-state .dot { width: 9px; height: 9px; border-radius: 50%; background: #64748b; }
.prodbar-state.on { color: #86efac; }
.prodbar-state.on .dot { background: #22c55e; box-shadow: 0 0 9px #22c55e; animation: pulse 1.2s infinite; }
.prodbtn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: 13px;
    cursor: pointer; font-size: 13px; font-weight: 700; white-space: nowrap; color: #fff; transition: transform .1s ease, filter .15s ease; }
.prodbtn:active { transform: scale(.97); }
.prodbtn:hover { filter: brightness(1.07); }
.prodbtn .mud-icon-root { font-size: 20px; }
.prodbtn.start { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 8px 22px rgba(34,197,94,.38); }
.prodbtn.stop  { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 8px 22px rgba(244,63,94,.38); }
@media (max-width: 640px) { .prodbar { flex-wrap: wrap; } .prodbtn { flex: 1 1 100%; justify-content: center; } }
.theme-light .prodbar { background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.012)); border-color: rgba(15,23,42,.12); }
.theme-light .prodbar-state { color: #64748b; }

/* tighten MudTextField inside dark panels */
.dash .mud-input-control { margin: 0; }

/* ===================================================================
   Order / delivery-note screen
   =================================================================== */
.apanel { border-top: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); height: auto; }
.apanel-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
    color: var(--accent); font-weight: 700; font-size: 13px; }
.apanel-h .mud-icon-root { color: var(--accent); }
.apanel-h .tag { margin-left: auto; font-size: 11px; color: #8a97ab; font-weight: 600;
    background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 999px; }

.form2 { display: grid; grid-template-columns: 100px 1fr; gap: 6px 10px; align-items: center; }
.form2 > label { font-size: 11px; color: #8a97ab; }
.rval { font-size: 12px; font-weight: 600; color: #e6edf6; min-height: 20px; display: flex; align-items: center; }
.rlabel { font-size: 11px; color: #8a97ab; text-decoration: none; cursor: pointer; }
.rlabel:hover { color: #67e8f9; text-decoration: underline; }
.recipe-link { color: #67e8f9 !important; text-decoration: none; cursor: pointer; gap: 4px; }
.recipe-link:hover { text-decoration: underline; }
.recipe-link .mud-icon-root { font-size: 13px; opacity: .8; }

.addrow { display: grid; grid-template-columns: 22px 1fr 46px 46px; gap: 6px; font-size: 12px;
    padding: 5px 7px; margin-top: 4px; background: rgba(255,255,255,0.03); border-radius: 8px; align-items: center; }
.addrow.muted { color: #6f7d92; }

.ss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; }
.frow { display: flex; align-items: center; gap: 8px; }
.frow > label { width: 32px; font-size: 11px; color: #8a97ab; }

.survey-empty { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 10px;
    background: rgba(34,197,94,0.08); border: 1px dashed rgba(34,197,94,0.35); color: #86efac; font-size: 12px; }

/* compact fields for forms */
.cfield { margin: 0 !important; }
.cfield .mud-input-control { margin: 0; }
.cfield .mud-input-slot { min-height: 20px !important; height: 20px; }
.cfield input, .cfield .mud-select-input { font-size: 10px !important; }
.cfield .mud-input.mud-input-outlined input { padding-top: 2px !important; padding-bottom: 2px !important; }
.cfield .mud-input.mud-input-outlined .mud-input-outlined-border { border-radius: 6px; }

/* shrink the dashboard text inputs / selects — plant order/production screens ONLY.
   `:not(.dash-report)` keeps the report/basic pages on MudBlazor's normal dense inputs. */
.dash:not(.dash-report) .mud-input-slot input,
.dash:not(.dash-report) .mud-input-slot input::placeholder,
.dash:not(.dash-report) .mud-select-input { font-size: 10px !important; }
.dash:not(.dash-report) .mud-input-slot { min-height: 22px !important; }
.dash:not(.dash-report) .mud-input.mud-input-outlined input { padding-top: 3px !important; padding-bottom: 3px !important; }
.dash:not(.dash-report) .mud-input-adornment .mud-typography,
.dash:not(.dash-report) .mud-input-adornment span { font-size: 9px !important; }

/* report / basic-info pages use MudBlazor's OWN dense inputs — correct label spacing,
   identical heights across select / text / date-range, value text centred by design.
   The only tweak is a slightly smaller value font so the fields aren't oversized; NO
   height / padding / align overrides here (those are what broke the label/value layout). */
.dash.dash-report .mud-input-slot input,
.dash.dash-report .mud-input-slot input::placeholder,
.dash.dash-report .mud-select-input { font-size: 0.9rem !important; }

/* order list table */
.otable, .otable .mud-table-root { background: transparent; }
.otable th { font-size: 10px !important; color: #8a97ab !important; background: rgba(255,255,255,0.04) !important; }
.otable td { font-size: 12px !important; }
.otable .sel-row td { background: rgba(34,211,238,0.16) !important; color: #67e8f9; }

/* productions */
.prod-blocks { display: flex; gap: 4px; }
.prod-block { flex: 1; height: 16px; border-radius: 4px; background: rgba(255,255,255,0.06); }
.prod-block.on { background: linear-gradient(180deg, #3b82f6, #1d4ed8); box-shadow: 0 0 8px rgba(59,130,246,0.5); }
.ptable, .ptable table { background: transparent; }
.ptable th { font-size: 10px; color: #8a97ab; text-transform: uppercase; letter-spacing: .5px; }
.ptable td { font-size: 12px; }
.empty-row { text-align: center; color: #6f7d92; padding: 18px 0 !important; font-size: 12px; }

/* ===================================================================
   Recipe editor screen
   =================================================================== */
.recipe-header { display: flex; align-items: center; gap: 12px; padding: 8px 14px; margin-bottom: 12px;
    border-radius: 12px; font-size: 12px; color: #8a97ab;
    background: linear-gradient(135deg, rgba(34,211,238,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08); }
.recipe-header .rno { font-size: 16px; font-weight: 800; color: #e6edf6; }
.used-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
    color: #fca5a5; font-weight: 700; font-size: 11px; background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3); padding: 3px 10px; border-radius: 999px; }

.ctlist { max-height: 520px; overflow: auto; border-radius: 10px; padding: 4px;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.08); }
.ctitem { padding: 4px 8px; border-radius: 6px; font-size: 11px; cursor: pointer; color: #b6c2d4; }
.ctitem:hover { background: rgba(255,255,255,0.06); }
.ctitem.sel { background: rgba(167,139,250,0.22); color: #ddd6fe; font-weight: 700; }
.ct-actions { margin-top: 10px; }

.recipe-dlg-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.recipe-dlg-title .rno { font-size: 12px; }
.recipe-dlg-title .used-badge { margin-left: auto; }
.recipe-dlg-body .ctlist { max-height: 60vh; }

/* S7 batching-times dialog */
.s7grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 16px; }
.s7grid.c2 { grid-template-columns: repeat(2, 1fr); }
.s7cell { display: flex; align-items: center; gap: 8px; }
.s7cell > label { flex: 1; font-size: 11px; color: #8a97ab; line-height: 1.2; }
.s7cell .u { font-size: 10px; color: #8a97ab; }
.s7f { width: 54px; flex: none; }
.s7add { display: grid; grid-template-columns: 66px repeat(4, 1fr); gap: 6px 10px; align-items: center; }
.s7add .hd { font-size: 10px; color: #8a97ab; text-align: center; line-height: 1.15; }
.s7add .rl { font-size: 11px; color: #cbd5e1; }
@media (max-width: 900px) { .s7grid { grid-template-columns: repeat(2, 1fr); } }

.rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; }
.rcell { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; }
.rcell > label { font-size: 11px; color: #8a97ab; }

.matgrid { display: grid; gap: 5px; align-items: center; margin-top: 2px; }
.matgrid .ml { font-size: 11px; color: #8a97ab; }

/* ===================================================================
   Material / silo stock screen
   =================================================================== */
.silo-row { display: flex; gap: 8px; align-items: flex-start; }
.silo-wrap { flex: 1; min-width: 0; max-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.silo-val { width: 100%; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
    padding: 2px 3px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: rgba(251,191,36,0.16); color: #fcd34d; border: 1px solid rgba(251,191,36,0.3); }
.silo-val.empty { background: rgba(255,255,255,0.04); color: #6f7d92; border-color: rgba(255,255,255,0.08); }
.silo-svg { width: 100%; height: auto; display: block; }
.silo-label { font-size: 10px; color: #cbd5e1; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 5px; padding: 1px 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.silo-label.reserve { color: #6f7d92; }

/* ---- silo animations ---- */
.silo-fill { transform-box: fill-box; transform-origin: center bottom;
    animation: siloRise .9s cubic-bezier(.2,.85,.25,1) both; }
@keyframes siloRise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* glass sheen sweep */
.silo-sheen { animation: siloSheen 5s ease-in-out infinite; will-change: transform; }
@keyframes siloSheen { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(120px); } }

/* minimum line pulse */
.silo-min { animation: siloMin 1.5s ease-in-out infinite; }
@keyframes siloMin { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* low-stock pulse */
.silo-wrap.low .silo-val { animation: siloLow 1.1s ease-in-out infinite; }
@keyframes siloLow { 50% { background: rgba(239,68,68,.28); color: #fecaca; border-color: rgba(239,68,68,.6); } }

/* staggered fill rise across a row */
.silo-row .silo-wrap:nth-child(2) .silo-fill { animation-delay: .06s; }
.silo-row .silo-wrap:nth-child(3) .silo-fill { animation-delay: .12s; }
.silo-row .silo-wrap:nth-child(4) .silo-fill { animation-delay: .18s; }
.silo-row .silo-wrap:nth-child(5) .silo-fill { animation-delay: .24s; }
.silo-row .silo-wrap:nth-child(6) .silo-fill { animation-delay: .30s; }
.silo-row .silo-wrap:nth-child(7) .silo-fill { animation-delay: .36s; }
.silo-row .silo-wrap:nth-child(8) .silo-fill { animation-delay: .42s; }
.silo-row .silo-wrap:nth-child(9) .silo-fill { animation-delay: .48s; }

/* ---------- responsive: phones / small tablets ---------- */
@media (max-width: 900px) {
    .screen-nav, .topmenu { display: none; }       /* desktop nav → hamburger */
    .mnav { display: block; }
    .topbar .tb-act { display: none !important; }   /* change-plant / theme / sign-out → into the hamburger */
    .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
    .topbar .spacer { display: none; }
    .brand .sub { display: none; }
    .bins { grid-template-columns: repeat(2, 1fr); }
    .sliders { flex-wrap: wrap; }
}
@media (max-width: 560px) {
    .bins { grid-template-columns: 1fr; }
    .topbar .pill { font-size: 10px; }
}

/* medium widths: drop the placeholder menu strip first, keep the real navigation */
@media (max-width: 1250px) {
    .topmenu { display: none; }
}

/* phones: topbar buttons become icon-only (labels hidden, icons + tooltips remain) */
@media (max-width: 900px) {
    .topbar .btn-txt { display: none; }
    .topbar .mud-button { min-width: 0; }
}

/* ============================================================================
   BusyOverlay — modern glass loader (add / edit / delete in flight)
   ============================================================================ */
.mt-load {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(120% 120% at 50% 40%, rgba(9, 14, 22, .45), rgba(6, 10, 16, .68));
    backdrop-filter: blur(9px) saturate(130%);
    -webkit-backdrop-filter: blur(9px) saturate(130%);
    animation: mt-load-fade .18s ease-out both;
}

.mt-load.mt-load-abs {
    position: absolute;
    border-radius: inherit;
}

@keyframes mt-load-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.mt-load-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 30px 46px;
    border-radius: 20px;
    background: linear-gradient(150deg, rgba(24, 32, 45, .94), rgba(13, 19, 28, .94));
    border: 1px solid rgba(255, 255, 255, .09);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6),
                0 1px 0 rgba(255, 255, 255, .05) inset,
                0 0 40px rgba(34, 211, 238, .06);
    animation: mt-load-pop .26s cubic-bezier(.18, .89, .32, 1.15) both;
}

@keyframes mt-load-pop {
    from { opacity: 0; transform: translateY(8px) scale(.93); }
    to   { opacity: 1; transform: none; }
}

/* dual counter-rotating conic "comet" rings + pulsing core */
.mt-load-ring {
    position: relative;
    width: 60px;
    height: 60px;
}

.mt-load-ring::before,
.mt-load-ring::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.mt-load-ring::before {
    inset: 0;
    background: conic-gradient(from 0deg, rgba(34, 211, 238, 0) 0deg, #22d3ee 95deg, #3b82f6 240deg, rgba(59, 130, 246, 0) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
    animation: mt-load-spin 1s linear infinite;
}

.mt-load-ring::after {
    inset: 10px;
    background: conic-gradient(from 180deg, rgba(167, 139, 250, 0) 0deg, #a78bfa 150deg, rgba(167, 139, 250, 0) 320deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
    animation: mt-load-spin 1.5s linear infinite reverse;
}

.mt-load-ring i {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 14px #22d3ee, 0 0 4px #67e8f9;
    animation: mt-load-pulse 1.2s ease-in-out infinite;
}

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

@keyframes mt-load-pulse {
    0%, 100% { transform: scale(.65); opacity: .5; }
    50%      { transform: scale(1.15); opacity: 1; }
}

.mt-load-txt {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.6px;
    text-transform: uppercase;
    color: #dbe4ee;
}

.mt-load-sub {
    margin-top: -8px;
    font-size: 11px;
    letter-spacing: .3px;
    color: #6b7a8d;
}

@media (prefers-reduced-motion: reduce) {
    .mt-load, .mt-load-card { animation: none; }
    .mt-load-ring::before, .mt-load-ring::after, .mt-load-ring i { animation-duration: 2s; }
}

/* customer picker dialog — no horizontal scrollbar at the bottom of the list */
.cust-pick-tbl .mud-table-container { overflow-x: hidden; }

/* ============================================================================
   THEME TOGGLE + LIGHT THEME  (MudBlazor components flip via the theme palette;
   these rules re-skin the custom SCADA chrome for light mode)
   ============================================================================ */
.mt-theme-toggle {
    position: fixed; right: 16px; bottom: 16px; z-index: 21000;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    color: #e6edf6; backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.40);
}
.mt-theme-toggle:hover { background: rgba(255,255,255,0.18); }
.theme-light .mt-theme-toggle {
    background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); color: #1e293b;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.theme-light body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(8,145,178,0.08), transparent 60%),
        radial-gradient(900px 500px at 0% 110%, rgba(124,58,237,0.08), transparent 55%),
        #f4f6fb;
    color: #1e293b;
}

/* top bar + navigation */
.theme-light .topbar { background: linear-gradient(135deg, rgba(0,0,0,0.03), rgba(0,0,0,0.015)); border-color: rgba(0,0,0,0.10); }
.theme-light .brand .sub { color: #64748b; }
.theme-light .screen-nav a, .theme-light .navmenu { color: #475569; }
.theme-light .screen-nav a:hover, .theme-light .navmenu:hover, .theme-light .navdrop:hover .navmenu { background: rgba(0,0,0,0.06); color: #0f172a; }
.theme-light .screen-nav a.active, .theme-light .mnav-panel a.active { background: rgba(8,145,178,0.12); color: #0e7490; border-color: rgba(8,145,178,0.30); }
.theme-light .navdrop-items, .theme-light .mnav-panel { background: #ffffff; border-color: rgba(0,0,0,0.12); box-shadow: 0 12px 32px rgba(0,0,0,0.18); }
.theme-light .navdrop-items a, .theme-light .mnav-panel a, .theme-light .topmenu .mi { color: #475569; }
.theme-light .navdrop-items a:hover, .theme-light .mnav-panel a:hover, .theme-light .topmenu .mi:hover { background: rgba(8,145,178,0.12); color: #0e7490; }
.theme-light .mnav-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.12); }
.theme-light .mnav-btn span { background: #475569; }
.theme-light .mnav-sep { background: rgba(0,0,0,0.10); }

/* pills / status */
.theme-light .pill { border-color: rgba(0,0,0,0.10); background: rgba(0,0,0,0.03); }

/* panels, cards, bins, stats, silos */
.theme-light .panel, .theme-light .apanel, .theme-light .bin-card,
.theme-light .mixpanel-wrap, .theme-light .hmi-card {
    background: linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.012));
    border-color: rgba(0,0,0,0.10);
}
.theme-light .panel-h .badge, .theme-light .bin-max, .theme-light .bin-valve,
.theme-light .apanel-h span, .theme-light .ml, .theme-light .rcell label { color: #64748b; }
.theme-light .silo { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.10); }
.theme-light .silo-tick { background: #334155; opacity: .6; }
.theme-light .stat, .theme-light .led, .theme-light .bin-led { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
.theme-light .bin-valve:hover { background: rgba(0,0,0,0.05); }

/* report horizontal bar chart */
.rep-bar-row { display: grid; grid-template-columns: 190px 1fr 90px; align-items: center; gap: 12px; margin-bottom: 8px; }
.rep-bar-label { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-bar-track { height: 16px; border-radius: 8px; background: rgba(255,255,255,0.06); overflow: hidden; }
.rep-bar-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, #22d3ee, #3b82f6); min-width: 2px; transition: width .4s ease; }
.rep-bar-val { font-size: 12px; text-align: right; color: #cbd5e1; }
.theme-light .rep-bar-track { background: rgba(0,0,0,0.06); }
.theme-light .rep-bar-val { color: #475569; }
@media (max-width: 640px) { .rep-bar-row { grid-template-columns: 120px 1fr 70px; } }

/* nav MudMenu / MudButton activators styled to match the screen-nav pills */
.nav-mud.mud-button-root {
    font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: normal;
    padding: 4px 10px; min-width: 0; border-radius: 8px; color: #b6c2d4;
}
.nav-mud.mud-button-root:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-mud .mud-button-label { gap: 2px; }
.theme-light .nav-mud.mud-button-root { color: #475569; }
.theme-light .nav-mud.mud-button-root:hover { background: rgba(0,0,0,0.06); color: #0f172a; }

a.brand-mark { text-decoration: none; cursor: pointer; }
a.brand-mark:hover { filter: brightness(1.1); }

/* nav icon button (Material screen) — sized/coloured to match the nav pills */
.nav-icon.mud-icon-button { color: #b6c2d4; padding: 5px; border-radius: 8px; }
.nav-icon.mud-icon-button:hover { background: rgba(255,255,255,0.08); color: #67e8f9; }
.theme-light .nav-icon.mud-icon-button { color: #475569; }
.theme-light .nav-icon.mud-icon-button:hover { background: rgba(0,0,0,0.06); color: #0e7490; }

/* ============================================================================
   LIGHT THEME — text-contrast fixes for classes coloured for the dark skin
   (near-white values / light-grey labels wash out on white)
   ============================================================================ */
.theme-light .rval { color: #1e293b !important; }
.theme-light .survey-empty { color: #15803d !important; border-color: rgba(21,128,61,.4) !important; }

.theme-light .form2 > label,
.theme-light .rcell > label,
.theme-light .matgrid .ml,
.theme-light .frow > label,
.theme-light .field-row > label,
.theme-light .s7cell > label,
.theme-light .s7cell .u,
.theme-light .s7add .hd,
.theme-light .s7add .rl,
.theme-light .rlabel,
.theme-light .stat .u,
.theme-light .stat .k,
.theme-light .mc-k,
.theme-light .mc-field .u,
.theme-light .gate-pct .u,
.theme-light .temp-field .u,
.theme-light .bin-max,
.theme-light .bin-valve,
.theme-light .readout .act .unit,
.theme-light .readout .tgt,
.theme-light .type-lines,
.theme-light .panel-h .badge,
.theme-light .apanel-h .tag,
.theme-light .clock .d,
.theme-light .subhead,
.theme-light .empty-row,
.theme-light .addrow.muted,
.theme-light .ctitem,
.theme-light .silo-label,
.theme-light .vehicle-data span,
.theme-light .rep-bar-val,
.theme-light .nav-icon.mud-icon-button,
.theme-light .otable th,
.theme-light .ptable th { color: #475569 !important; }

.theme-light .otable th { background: rgba(0,0,0,.05) !important; }
.theme-light .rlabel:hover { color: #0e7490 !important; }

/* light theme — Moisture Correction panel (wash tags / % / Man. were light cyan on white) */
.theme-light .wash-tag { color: #0e7490 !important; background: rgba(14,116,144,.10) !important; border-color: rgba(14,116,144,.32) !important; }
.theme-light .scol .pct { color: #0e7490 !important; }
.theme-light .scol .man { color: #475569 !important; }
.theme-light .moisture-panel .badge { color: #64748b !important; }

/* light theme — give the bottom action bar a visible border/separation */
.theme-light .actionbar {
    background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,.012));
    border: 1px solid rgba(15,23,42,.15);
    box-shadow: 0 1px 4px rgba(15,23,42,.06);
}
.theme-light .ab-item { color: #475569; }
.theme-light .ab-item:hover { color: #0f172a; background: rgba(0,0,0,.05); }
.theme-light .ab-item.active { color: #0e7490; background: rgba(8,145,178,.12); }
.theme-light .ab-out { color: #dc2626; }
.theme-light .ab-out:hover { color: #b91c1c; background: rgba(220,38,38,.10); }
@media (max-width: 640px) {
    .theme-light .actionbar { background: rgba(248,250,252,.94); border-color: rgba(15,23,42,.12);
        box-shadow: 0 -10px 30px rgba(15,23,42,.14); }
}

/* mobile hamburger is now a MudMenu icon button — keep the bordered-box look */
.mnav-mud.mud-icon-button {
    width: 42px; height: 40px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #cbd5e1;
}
.mnav-mud.mud-icon-button:hover { background: rgba(255,255,255,.12); }
.theme-light .mnav-mud.mud-icon-button {
    border-color: rgba(15,23,42,.18); background: rgba(0,0,0,.04); color: #475569;
}
.theme-light .mnav-mud.mud-icon-button:hover { background: rgba(0,0,0,.07); }
