﻿:root { color-scheme: dark; --bg:#0d141a; --surface:#16212b; --surface-2:#1c2a35; --line:#304453; --text:#f4f7f9; --muted:#91a5b3; --green:#31d07c; --cyan:#64d5ff; --amber:#ffc857; }
* { box-sizing:border-box; }
html, body { margin:0; min-height:100%; font-family:Inter,Segoe UI,Arial,sans-serif; background:var(--bg); color:var(--text); }
a { color:inherit; }
.content { max-width:1480px; margin:auto; padding:32px clamp(18px,3vw,48px) 56px; }
.plant-header,.panel-title { display:flex; justify-content:space-between; align-items:center; gap:24px; }
h1 { margin:3px 0 5px; font-size:clamp(2rem,4vw,3.6rem); letter-spacing:-.045em; }
h2 { margin:2px 0 0; font-size:1.45rem; }
.eyebrow { color:var(--cyan); font-size:.72rem; font-weight:800; letter-spacing:.14em; margin:0; }
.last-update { color:var(--muted); margin:0; }
.line-state { border:1px solid var(--line); border-radius:999px; padding:10px 16px; background:var(--surface); font-weight:700; white-space:nowrap; }
.line-state span,.connection-dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--green); margin-right:9px; box-shadow:0 0 12px var(--green); }
.summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:28px 0 18px; }
.summary-card { min-height:116px; padding:20px; border:1px solid var(--line); border-radius:10px; background:linear-gradient(145deg,var(--surface-2),var(--surface)); display:flex; flex-direction:column; justify-content:space-between; }
.summary-card span { color:var(--muted); }
.summary-card strong { font-size:2.1rem; }
.summary-card.accent { border-top:3px solid var(--green); }.summary-card.warning { border-top:3px solid var(--amber); }
.panel { border:1px solid var(--line); background:var(--surface); border-radius:12px; padding:22px; margin-top:18px; }
.readonly { color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:6px 11px; font-size:.78rem; }
.motor-grid { display:grid; grid-template-columns:repeat(4,minmax(180px,1fr)); gap:10px; margin-top:20px; }
.motor-card { min-height:74px; display:grid; grid-template-columns:56px 1fr 10px; align-items:center; gap:12px; padding:9px; border:1px solid var(--line); background:#121d25; border-radius:7px; }
.motor-card.moving { border-color:var(--green); }.motor-code { background:#29404f; border:2px solid var(--cyan); border-radius:5px; padding:11px 5px; text-align:center; font-weight:800; }
.motor-card.moving .motor-code { border-color:var(--green); }.motor-card strong,.motor-card span { display:block; }.motor-card span { color:var(--muted); font-size:.78rem; margin-top:3px; }.motor-card i { width:9px; height:9px; border-radius:50%; background:var(--green); box-shadow:0 0 9px var(--green); }
.alarm-row { display:grid; grid-template-columns:42px 1fr auto; align-items:center; gap:14px; margin-top:18px; padding:14px; border:1px solid #665528; background:#2c281b; border-radius:8px; }.alarm-icon { width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--amber);color:#17130a;font-weight:900;}.alarm-row p{margin:3px 0 0;color:#c8c2ad}.alarm-row time{color:var(--muted)}
#blazor-error-ui { color:#111; background:#ffdf85; bottom:0; box-shadow:0 -1px 2px rgba(0,0,0,.2); display:none; left:0; padding:.7rem 1.25rem; position:fixed; width:100%; z-index:1000; }
@media(max-width:900px){.summary-grid{grid-template-columns:1fr}.motor-grid{grid-template-columns:repeat(2,1fr)}.plant-header{align-items:flex-start;flex-direction:column}.line-state{align-self:flex-start}}
@media(max-width:560px){.content{padding:22px 14px 40px}.motor-grid{grid-template-columns:1fr}.panel{padding:15px}.summary-card{min-height:92px}}

.connection-status { margin:22px 0; padding:12px 16px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.connected { color:var(--green); }.unavailable,.diagnostic-warning { color:var(--amber); }
.overall { font-size:1.1rem; font-weight:600; margin:16px 0; }
.analysis-summary { padding:12px; background:var(--surface-2); border-radius:6px; white-space:pre-line; }
.signal-grid { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.signal { padding:7px 10px; background:#101b24; color:var(--muted); border:1px solid var(--line); border-radius:5px; }
.signal.on { color:var(--green); border-color:var(--green); }.signal strong { margin-left:5px; }
.analysis-section h2 { color:var(--cyan); font-size:1.05rem; margin-bottom:14px; }
.analysis-row { display:grid; grid-template-columns:minmax(220px, 30%) 1fr; gap:16px; padding:12px 0; border-top:1px solid var(--line); }
.analysis-row span { color:var(--cyan); }.analysis-row .active-state { color:var(--amber); }
.alarm-row p { overflow-wrap:anywhere; }
@media(max-width:700px) { .analysis-row { grid-template-columns:1fr; gap:6px; } }

.production-cards { display:grid; grid-template-columns:repeat(4,minmax(180px,1fr)); gap:14px; margin:28px 0 18px; }
.production-panel { margin-top:14px; }
.production-chart-scroll { overflow-x:auto; padding:18px 0 4px; }
.production-chart { min-width:920px; height:330px; display:grid; grid-template-columns:repeat(31,1fr); align-items:end; gap:5px; padding:24px 10px 0; border-left:1px solid var(--line); border-bottom:1px solid var(--line); background:repeating-linear-gradient(to top,transparent 0,transparent 64px,rgba(48,68,83,.42) 65px); }
.production-column { height:100%; display:grid; grid-template-rows:24px 1fr 24px; align-items:end; text-align:center; min-width:20px; }
.production-value { color:var(--muted); font-size:.62rem; overflow:hidden; }
.production-bar { width:72%; min-height:1px; margin:0 auto; border-radius:3px 3px 0 0; background:linear-gradient(180deg,var(--green),#159957); box-shadow:0 0 10px rgba(49,208,124,.22); }
.production-day { color:var(--muted); font-size:.7rem; align-self:center; }
@media(max-width:1050px){.production-cards{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.production-cards{grid-template-columns:1fr}.production-chart{min-width:800px}}

.login-shell { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:100%; max-width:460px; padding:32px; }
.login-card h1 { font-size:2.2rem; margin:12px 0; }
.login-form { display:flex; flex-direction:column; gap:10px; margin-top:24px; }
.login-form input { width:100%; border:1px solid var(--line); border-radius:6px; padding:12px; background:var(--bg); color:var(--text); }
.access-button { border:0; border-radius:6px; padding:12px 20px; margin-top:12px; background:var(--green); color:#10211b; font-weight:700; cursor:pointer; }
.logout-link { margin:0 18px; color:var(--cyan); }
