:root{font-family:Inter,system-ui,-apple-system,sans-serif;color:#24332f;background:#f3f5f3;font-size:14px}*{box-sizing:border-box}body{margin:0;display:flex;min-height:100vh}aside{width:244px;background:#123c32;color:#d6e6df;padding:34px 22px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column}.mark{font-size:32px;letter-spacing:-2px;font-weight:800;display:flex;align-items:center;gap:14px;color:#b8df7c}.mark span{font-size:11px;letter-spacing:1px;color:white;max-width:90px;line-height:1.7}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:700;margin:25px 0;color:#7f948b}nav{display:grid;gap:7px;margin-top:20px}button{cursor:pointer;font:inherit;border:1px solid #ccd7d0;border-radius:7px;background:white;color:#234c3e;padding:10px 15px;font-weight:600}button:hover{filter:brightness(.95)}button:disabled{opacity:.5;cursor:wait}nav button{text-align:left;background:transparent;border:0;color:#c9d9d1;padding:13px 12px}nav button.active{background:#2c5546;color:white}.safety{margin-top:auto;border-top:1px solid #456354;padding-top:22px;font-size:12px}.safety p{color:#9eb6a9;line-height:1.8}.dot{width:7px;height:7px;background:#b8df7c;display:inline-block;border-radius:50%;margin-right:5px}main{margin-left:244px;padding:38px 42px;max-width:1640px;width:calc(100% - 244px)}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}header .eyebrow{margin:0 0 10px}h1{font-size:30px;font-weight:650;letter-spacing:-1px;margin:0}h2{font-size:17px;margin:0 0 8px}p{line-height:1.6;color:#718177;margin:5px 0 18px}.pill{font-size:12px;border-radius:20px;padding:8px 13px;background:#e3e9e5;white-space:nowrap}.card{background:white;border:1px solid #dce4de;border-radius:11px;padding:24px;margin-bottom:22px;box-shadow:0 2px 3px #123c3203}.login{display:flex;gap:20px;align-items:center}.login div{flex:1}.login p{margin:0}.login input{width:260px}label{display:grid;gap:7px;font-size:12px;color:#64766b;font-weight:600}input,select,textarea{font:inherit;color:#233a2e;background:#fafcf9;border:1px solid #d3ddd5;border-radius:6px;padding:10px;max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #acc8b9;outline-offset:2px}.primary{background:#28694f;border-color:#28694f;color:white}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:12px 0 24px}.stats article{background:white;border:1px solid #dce4de;border-radius:10px;padding:23px}.stats small{font-size:10px;letter-spacing:1.2px;color:#77877b}.stats strong{display:block;font-weight:550;font-size:32px;margin-top:18px}.section-head{display:flex;justify-content:space-between;gap:15px;align-items:center}.section-head select{max-width:320px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:10px;letter-spacing:.8px;color:#7c8c81;font-weight:600;background:#f7f9f5}th,td{padding:14px 12px;border-bottom:1px solid #e9eee9}td{font-size:12px}td:first-child{font-weight:600}td small{display:block;color:#87928b;font-weight:400;margin-top:5px}.quality{border-radius:5px;padding:4px 7px;font-size:11px;background:#edf0ee;color:#66736a;white-space:nowrap}.quality.good{background:#e6f2e8;color:#317947}.quality.bad{background:#fbe8e2;color:#aa4d35}.quality.stale{background:#faf1d5;color:#8a6d21}.muted{font-size:12px;color:#88958c;margin-top:15px}.form-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-top:22px}.check{display:flex;align-items:center}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;grid-column:1/-1}.hidden{display:none!important}textarea{display:block;width:100%;font-family:ui-monospace,monospace;font-size:12px;line-height:1.6;margin:18px 0;tab-size:2;resize:vertical}#message{margin-bottom:14px;font-size:13px;white-space:pre-wrap}#message.error{color:#a2452d}#message.ok{color:#28694f}td button{font-size:11px;padding:7px 9px;margin:2px}@media(max-width:1050px){aside{width:190px;padding:25px 14px}main{margin-left:190px;width:calc(100% - 190px);padding:25px}.stats{grid-template-columns:repeat(2,1fr)}.login{flex-wrap:wrap}.form-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){body{display:block}aside{position:static;width:100%;padding:18px}aside .eyebrow,.safety{display:none}nav{display:flex;flex-wrap:wrap;overflow:visible;margin-top:15px;gap:6px}nav button{flex:none;white-space:nowrap;font-size:12px;padding:10px 12px;min-height:40px}main{margin:0;width:100%;padding:18px}h1{font-size:24px}header{gap:10px}.stats{gap:10px}.stats article{padding:16px}.stats strong{font-size:26px}.card{padding:16px}.form-grid{grid-template-columns:1fr}.login input{width:100%}.section-head{align-items:start;flex-direction:column}.login label{width:100%}}

/* SCADA screen designer */
.editor-heading,.editor-row,.canvas-caption{display:flex;align-items:center;gap:10px}.editor-heading{justify-content:space-between;margin-bottom:18px}.editor-heading p{margin-bottom:0}.editor-toolbar{padding:16px}.editor-row{flex-wrap:wrap;margin-bottom:12px}.editor-row:last-child{margin-bottom:0}.editor-row label{min-width:105px}.editor-row label:first-child{min-width:200px}.editor-spacer{flex:1}.editor-settings{border-top:1px solid #e6ede8;padding-top:12px}.editor-settings input[type=number]{width:86px}.editor-settings input[type=color]{width:54px;height:39px;padding:4px}.editor-files button{font-size:11px;padding:8px 10px}.editor-workspace{display:grid;grid-template-columns:170px minmax(300px,1fr) 230px;gap:14px;align-items:start}.editor-palette,.editor-properties{padding:15px;min-width:0}.editor-palette .eyebrow{margin:0 0 15px}.editor-palette button,.editor-properties button{display:block;width:100%;font-size:11px;margin-top:8px;text-align:left;padding:10px}.editor-palette label{margin-bottom:12px}.palette-divider{border-top:1px solid #e1e8e3;margin:16px 0}.editor-stage{min-width:0}.canvas-caption{justify-content:space-between;font-size:11px;color:#6e8477;margin:0 0 10px}#screenCanvas{display:block;width:100%;height:auto;border:1px solid #c7d6cc;border-radius:9px;box-shadow:0 12px 35px #183a2910;touch-action:none;user-select:none}.editor-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:10px;color:#7a8b80;margin-top:14px}.editor-properties h2{font-size:14px;margin-bottom:15px}.editor-properties label{margin-bottom:11px;font-size:11px}.editor-properties input{width:100%;padding:8px}.property-pair{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.editor-properties input[type=color]{height:36px;padding:3px}.editor-workspace.is-preview{grid-template-columns:minmax(300px,1fr)}.is-preview .editor-palette,.is-preview .editor-properties{display:none}.screen-widget{cursor:move}.is-preview .screen-widget{cursor:default}.screen-widget .rotor{transform-origin:60px 55px;animation:fan-spin 2s linear infinite;animation-play-state:paused}.screen-widget.running .rotor{animation-play-state:running}.screen-widget text{font-family:Inter,system-ui,sans-serif}.screen-widget .widget-value{font-weight:650}.screen-widget .widget-label{fill:#607568}.screen-widget .widget-quality{font-size:11px}.resize-grip{cursor:nwse-resize}.editor-toolbar button.active{background:#e0eddf;border-color:#6b9a71}#screenStatus.dirty{background:#fff0d5;color:#936517}#screenStatus.saved{background:#e3f0e5;color:#287644}@keyframes fan-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.screen-widget.running .rotor{animation:none}}@media(max-width:1250px){.editor-workspace{grid-template-columns:145px minmax(250px,1fr)}.editor-properties{grid-column:1/-1}.editor-properties form{display:grid;grid-template-columns:repeat(3,1fr);gap:0 15px}.editor-properties form.hidden{display:none}.editor-properties .property-pair{grid-column:span 2}}@media(max-width:750px){.editor-workspace{grid-template-columns:1fr}.editor-palette{display:flex;gap:8px;flex-wrap:wrap}.editor-palette button{width:auto;margin:0}.editor-palette .muted,.palette-divider,.editor-palette .eyebrow{display:none}.editor-palette label{width:100%}.editor-properties form{grid-template-columns:1fr 1fr}.editor-heading{align-items:start}.editor-row label:first-child{min-width:140px}.editor-properties{grid-column:auto}}

.screen-widget.is-unavailable svg{filter:grayscale(1);opacity:.55}

.editor-legend .state-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px}.state-dot.ready{background:#3f78b5}.state-dot.running{background:#287c58}.state-dot.alarm{background:#c54c41}.state-dot.offline{background:#8b9892}

.screen-widget.screen-link{cursor:pointer}.screen-widget.screen-link:focus-visible>rect:first-of-type{stroke:#3f78b5;stroke-width:3;outline:none}

.auth-form{display:grid;gap:14px;max-width:520px}.auth-form label{display:grid;gap:7px}.auth-form #passwordPanel{display:grid;gap:12px}.auth-form button{justify-self:start}#loginError{color:#ae4d3b}#identity{font-size:11px;color:#8ca896}#controlPanel{background:#fff4d9;border:1px solid #ead7aa;border-radius:7px;padding:10px 14px;font-size:12px;margin-bottom:10px}body.signed-out .view{display:none}button:disabled{opacity:.5;cursor:default}

.screen-control{cursor:pointer}.screen-control:focus{outline:2px solid #326b58;outline-offset:2px}.valve-dialog{width:min(560px,92vw);border:1px solid #bfcfc5;border-radius:16px;padding:28px;color:#243a31;background:#f7faf7;box-shadow:0 20px 90px #102c3540}.valve-dialog::backdrop{background:#102c3570}.valve-dialog h2{margin:0 0 18px}.valve-position{font-size:25px;font-weight:650;color:#8b9892}.valve-position[data-state=open],.valve-position[data-state=position1]{color:#287c58}.valve-position[data-state=closed],.valve-position[data-state=position2]{color:#3f78b5}.valve-position[data-state=conflict]{color:#c54c41}.valve-position[data-state=unconfirmed]{color:#b47b26}.valve-detail{color:#63796b;font-size:13px}.valve-reason{padding:14px;border-radius:8px;background:#f6efdc;color:#825c24;line-height:1.6}.valve-actions{display:flex;gap:12px;margin:18px 0}.valve-actions[hidden]{display:none}.valve-actions button:disabled{cursor:not-allowed;opacity:.55}.valve-close{margin-top:8px}

.drive-dialog{width:min(650px,94vw)}.drive-readings{display:grid;gap:4px;font-variant-numeric:tabular-nums}.drive-readings p{margin:5px 0;font-size:18px;color:#284a40}.drive-form{display:grid;gap:12px;margin:20px 0}.drive-form label{display:grid;gap:8px;font-size:14px}.drive-form input{font:inherit;width:100%;padding:12px;border:1px solid #bacdc0;border-radius:7px;font-size:22px}.drive-form button{justify-self:start}.drive-error{color:#b34b3e}.drive-dialog [data-status=failed],.drive-dialog [data-status=delivery_unknown],.drive-dialog [data-status=journal_error]{color:#b34b3e}

.drive-dialog [hidden]{display:none!important}

.drive-actions{display:flex;gap:12px;margin:16px 0}.drive-actions button{min-width:130px}.drive-actions .drive-stop{background:#a4483c}.drive-state{font-size:1.4rem;font-weight:700}.drive-state[data-status=running]{color:#247b55}.drive-state[data-status=alarm],.drive-state[data-status=conflict]{color:#b04436}.drive-state[data-status=ready]{color:#3e79b4}.drive-state[data-status=offline]{color:#7b8b85}.drive-dialog [data-status=unconfirmed],.drive-dialog [data-status=delivery_unknown]{color:#9b691f}

.drive-dialog{padding:22px;max-height:calc(100vh - 32px);overflow-y:auto}.drive-dialog h2{margin-bottom:10px}.drive-state{margin:8px 0;line-height:1.2}.drive-dialog .drive-readings p{margin:3px 0}.drive-dialog .valve-detail{margin:6px 0}.drive-dialog .valve-reason{margin:8px 0;padding:10px;line-height:1.4}.drive-form{gap:8px;margin:12px 0}.drive-form label{gap:6px}.drive-form input{padding:10px}.drive-actions{margin:10px 0}

.network-underlay{filter:grayscale(.9) brightness(.76)}.network-map-button{cursor:pointer}.network-map-button:focus-visible{outline:2px solid #75b6ff;outline-offset:3px}.network-dialog{width:min(620px,94vw);max-height:85dvh;overflow:auto;background:#0e1a28;color:#dce8f2;border:1px solid #536b80;border-radius:12px;padding:24px;box-shadow:0 20px 80px #0008}.network-dialog::backdrop{background:#0008}.network-dialog h2{margin:0 0 14px;font-size:23px}.network-dialog p{color:#9eb3c6;line-height:1.6}.network-dialog dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:20px 0}.network-dialog dt{color:#91a8bd}.network-dialog dd{margin:0;text-align:right;overflow-wrap:anywhere}.network-dialog button{font:inherit;border:1px solid #526f87;background:#193d57;color:#edf5fb;padding:9px 13px;border-radius:6px;margin:5px 8px 5px 0;cursor:pointer}.network-dialog>button{background:#162938}

.editor-workspace.is-network-map{grid-template-columns:minmax(300px,1fr)}.is-network-map .editor-palette,.is-network-map .editor-properties{display:none}
