/* Shared visual language for every active screen. */
:root{--navy:#142c4d;--blue:#285eb5;--ink:#243e5e;--muted:#73869f;--line:#dce5ef;--bg:#f3f6fa;--green:#23866b;--red:#b74a5b}
body[data-page] .top{background:white;border-bottom:1px solid var(--line);padding:0 26px;gap:24px}
body[data-page] .brand{width:148px;padding-top:0}
body[data-page] .title h1{font-size:26px;letter-spacing:.5px;color:#1c3657}
body[data-page] .title p{display:block;font-size:11px;letter-spacing:1.5px;color:#8b9cb1}
body[data-page] #clock{position:static;color:#7a8da5;font-size:13px;z-index:auto;white-space:nowrap}
body[data-page] .sidebar{background:var(--navy);border-radius:0;padding:24px 10px 14px;gap:28px}
body[data-page] .side-label{font-size:11px;color:#7f9dbf;letter-spacing:1px;margin-left:5px}
body[data-page] .side-group{gap:10px}
body[data-page] .side-button{background:#1c385b;border:1px solid #35506f;color:#d6e3f3;border-radius:5px;font-size:13px;min-height:48px;box-shadow:none}
body[data-page] .side-button.primary{background:#2b64bb;border-color:#3b74cb;color:white}
body[data-page] .side-button.stop{background:#2c334c;color:#e2aeb8;border-color:#5d4a60}
body[data-page] .side-button.selected,body[data-page] .side-button.is-active{background:#2b64bb;border-color:#6093de;color:white}
body[data-page] .side-button:disabled{opacity:.42}
body[data-page] .sidebar section:first-child .side-group{gap:10px}
body[data-page] #logButton{display:flex}
body[data-page] .side-bottom{font-size:10px;color:#91a7c2;border-color:#344e6d}
body[data-page] main{padding:16px 22px 12px;background:var(--bg)}
body[data-page] .page-head{margin:0 0 14px;min-height:43px;align-items:center}
body[data-page] .page-head h2{font-size:24px;letter-spacing:.3px;color:#203e63}
body[data-page] .eyebrow{display:none}
body[data-page] .head-tools{gap:12px}
.small-button{border-color:#d1dce9;color:#527297;min-height:44px;background:white;border-radius:5px;font-size:13px}
.equipment{font-size:12px;color:#6d829e;border-color:#e0e7f0}
.user{color:#8294aa;font-size:11px}.user strong{color:#35577e;font-size:13px;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dot.active{background:#278b6e;box-shadow:0 0 0 3px #e3f3eb}
body[data-page] .bottom{background:white;border-top:1px solid #dbe4ef;box-shadow:none}
body[data-page] .nav-button{font-size:15px;color:#7187a2;min-width:0;border-color:#e4eaf3;font-weight:500}
body[data-page] .nav-button.current{background:#edf3fd;color:#285fb7;font-weight:600}
body[data-page] .nav-button.current:before{background:#2e67bd;height:3px}
body[data-page] .page-status{display:flex;min-height:36px;gap:15px;font-size:11px;color:#8295ad}
body[data-page="recipe"] .page-status,body[data-page="users"] .page-status{display:none}
.page-status #lastAction{flex:1;text-align:right;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page-status .page-context{display:none}
.dashboard-page{background:white;border:1px solid #d8e3ef;border-radius:7px;overflow:hidden}
.diagram-toolbar{background:#fbfcff;border-bottom:1px solid #e3eaf3;padding:9px 14px;color:#7e92ab}
.diagram-legend{font-size:11px}.diagram-tools button{color:#4b729e;border-color:#d2dfed;background:white;min-height:44px}
.diagram-scroll{background:white}
body[data-page="dashboard"] .page-head{position:static;z-index:auto}
body[data-page="dashboard"] .page-head>div:first-child{position:static;width:auto;height:auto;overflow:visible;clip:auto}
body[data-page="dashboard"] .diagram-toolbar{position:static;flex-direction:row;align-items:center;min-height:56px;background:#fbfcff;padding:8px 14px;border-bottom:1px solid #e3eaf3}
body[data-page="dashboard"] .diagram-legend{display:flex;max-width:none;justify-content:flex-start}
body[data-page="dashboard"] .readout-legend{flex-basis:auto;justify-content:flex-start}
.parameter-panel,.servo-card{border:1px solid #d8e3ef;border-radius:7px;background:white;box-shadow:none}
.parameter-panel>h3,.servo-card>h3{background:#edf3fc;color:#2c5b99;border-bottom:1px solid #dbe6f4;font-weight:600;font-size:17px}
.parameter-value{background:#fff8eb!important;border:1px solid #e8dabb!important;color:#8e6d30!important;border-radius:5px;font-size:17px;min-height:46px}
.servo-field output,.unavailable-value{background:#eef6f2;color:#3d8d74;border:1px solid #e0ece6}
.servo-action,.manual-open,.manual-close,.counter-reset{background:#eef4fd!important;color:#3568ab!important;border:1px solid #cddcf0!important;border-radius:5px!important;box-shadow:none!important;font-size:14px!important;min-height:48px}
.servo-action.danger,.manual-close{background:#fff3f4!important;color:#b45768!important;border-color:#ead1d7!important}
.servo-action.jog[aria-pressed="true"]{background:#2c65ba!important;color:white!important;border-color:#2c65ba!important}
.servo-status,.servo-hint{color:#859ab3!important;font-size:12px!important}
.servo-page{justify-content:flex-start;padding:0 0 8px}
.servo-card{padding:0 0 16px;overflow:hidden;min-height:520px}
.servo-card>h3{margin:0 0 30px;padding:18px 20px;text-align:left;line-height:1.5;min-height:64px}
.servo-card .axis-reset{top:10px;right:12px}
.servo-card .axis-reset .servo-action{min-height:44px;min-width:82px}
.servo-fields{padding-inline:20px}
.servo-actions{margin:40px 16px 0;gap:18px 10px}
.butterfly-actions{padding:0 12px;column-gap:22px}
.servo-status{margin:20px 20px 0}
.servo-field small{color:#8192a7}
.rp-button{border-color:#d1ddec;color:#54759d;font-size:13px}
.rp-button.primary{background:#2b63b7;border-color:#2b63b7;color:white}
.rp-button.danger{background:#fff2f4;border-color:#e8c8cf;color:#b34f61}
.rp-button.text-danger{color:#b05c6a}
.rm-table .rm-group-row th,.rm-table .rm-group-row :is(.rm-base,.rm-temperature,.rm-pressure,.rm-condition,.rm-carrier,.rm-source),.rm-table .rm-group-row .rm-group-fixed{background:#3265a7;border-color:#5280b8;font-weight:500}
.rm-table .rm-column-row th,.rm-table .rm-column-row .rm-fixed{background:#edf3fb;color:#5276a2}
.rm-table td,.rm-table th{border-color:#e0e7f1}
.rm-table tbody tr.selected td,.rm-table tbody tr.selected .rm-fixed{background:#eaf1fd}
body[data-role="operator"] .rm-cell:disabled{opacity:1;color:#567291;cursor:default}
.rp-work-tabs .rp-button,.rm-group-jumps button{min-height:44px}
.rm-layout .rp-heading{padding-top:12px}.rm-layout .rp-title-line h3{color:#2b4f7b}
.rm-layout .rp-work-footer{background:#fbfcff}
.rm-group-jumps button{background:#f1f5fb;color:#7790ae}
.rp-save-state{color:#388c74}.rp-overview-check strong{color:#408773}
.rp-dialog,.confirmation-panel,dialog{border:1px solid #d3dfed;border-radius:8px;box-shadow:0 20px 70px #16385d26}
.dialog-head{font-size:18px;color:#345a88;background:#fbfcff;border-color:#e1e9f3}
.confirm{background:#2b63b7;border-color:#2b63b7}.cancel{border-color:#d0ddeb;color:#6480a2}
.keypad-grid button,.rp-numeric-keys button{background:#f3f7fd;border-color:#d7e2f0;color:#3b6291}
.users-page{display:flex;flex-direction:column;gap:18px;min-height:0;flex:1;font-size:14px}
.users-page[hidden]{display:none}
.ua-overview{display:grid;grid-template-columns:.7fr .7fr .7fr 2fr;gap:14px;flex-shrink:0}
.ua-overview>div{padding:18px 22px;border:1px solid #dce5f0;background:white;border-radius:7px}
.ua-overview span{color:#8094ae;font-size:12px;display:block}
.ua-overview strong{font-size:27px;color:#365f95;display:block;margin-top:8px;font-weight:600}
.ua-overview .ua-rule{background:#edf3fc;border-color:#dbe6f6;display:flex;flex-direction:column;justify-content:center}
.ua-rule strong{font-size:17px;margin:0 0 9px}.ua-rule span{font-size:12px;color:#6b88ac;line-height:1.8}
.ua-panel{display:flex;flex-direction:column;min-height:0;flex:1;background:white;border:1px solid #d9e3f0;border-radius:7px;overflow:hidden}
.ua-panel-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;gap:15px;border-bottom:1px solid #e3eaf3;flex-shrink:0}
.ua-panel-head h3{font-size:18px;margin:0 0 7px;color:#355b8c}.ua-panel-head p{font-size:12px;margin:0;color:#92a2b7}
.ua-panel-head>div:last-child{display:flex;gap:12px;align-items:center}
.ua-panel-head input,.ua-form-body input,.ua-form-body select{border:1px solid #ccd9ea;border-radius:5px;background:#fff;color:#37587e;min-height:46px;padding:10px 12px;font:inherit}
.ua-panel-head input{width:230px;background:#f8faff;font-size:13px}
.ua-table-scroll{flex:1;min-height:0;overflow:auto}
.ua-table-scroll table{width:100%;border-collapse:collapse;text-align:left;font-size:13px;min-width:800px}
.ua-table-scroll th{padding:15px 22px;color:#7e94b0;background:#f3f6fb;font-size:12px;font-weight:500;position:sticky;top:0}
.ua-table-scroll td{padding:22px;border-bottom:1px solid #e8edf5;color:#6983a3}
.ua-table-scroll td strong{font-size:14px;color:#355f93}.ua-self{display:inline-block;background:#edf3fd;border:1px solid #d6e4f7;color:#6688b5;font-size:10px;padding:3px 7px;border-radius:4px;margin-left:10px}
.ua-role{padding:5px 10px;background:#f0f3f8;color:#8496ae;border-radius:4px;font-size:12px;white-space:nowrap}.ua-role.admin{color:#4e79af;background:#edf3fd}
.ua-status{display:flex;align-items:center;gap:7px;color:#a2aebe;font-size:12px}.ua-status i{width:6px;height:6px;background:#b2bdcd;border-radius:50%}.ua-status.on{color:#5b927f}.ua-status.on i{background:#4a9b7b}
.ua-row-actions{display:flex;gap:6px}.ua-row-actions button{background:white;color:#678ab4;border:1px solid #d9e3f0;border-radius:5px;min-height:44px;padding:9px 12px;font-size:12px}
.ua-local-note{padding:12px 22px;margin:0;background:#fbfcff;color:#97a8bc;font-size:11px;border-top:1px solid #e7edf5;flex-shrink:0}
.ua-form-body{padding:22px 26px}.ua-form-body .rp-field{margin-bottom:16px}.ua-form-body .rp-field>span{font-size:13px;margin-bottom:8px}.ua-form-body input,.ua-form-body select{width:100%}
.ua-form-actions{padding:0 26px 24px;display:flex;justify-content:flex-end;gap:12px}.ua-form-actions .rp-button{min-height:48px;min-width:100px}
.ua-login-mark{background:#edf3fc;color:#4e75a5;border-radius:5px;padding:13px 15px;margin-bottom:20px;font-size:14px}
.ua-note{font-size:12px;line-height:1.8;color:#8a9fb9;margin:12px 0}.ua-error{font-size:13px;color:#ba5867;line-height:1.7;margin:8px 0 0}
.ua-empty{padding:30px;color:#90a1b6}
.ua-recipe-rule{color:#7b94b1;font-size:12px;padding:7px 2px}
.ua-readonly-badge{font-size:12px;color:#7f98b5;background:#f1f5fa;border:1px solid #e0e8f3;border-radius:5px;padding:8px 12px}
.ua-download-info{color:#7d94af;font-size:13px;line-height:1.9}.ua-download-info strong{font-size:18px;color:#416797}.ua-download-info>span{display:inline-block;background:#fff2df;color:#ab8540;padding:5px 12px;border-radius:5px}
body[data-role="operator"] .sidebar .reference-operations{display:none}
body[data-role="operator"] .sidebar section:last-of-type{display:none}
[hidden]{display:none!important}
@media(min-width:1650px) and (min-height:950px){body[data-page] main{padding:16px 22px 12px}.parameter-panel>h3,.servo-card>h3{font-size:18px}body[data-page] .page-head{min-height:43px}}
@media(max-width:1400px){body[data-page] .brand{width:120px}body[data-page] .title h1{font-size:22px}body[data-page] .top{padding-inline:18px;gap:18px}body[data-page] main{padding:12px 16px 8px}body[data-page] .sidebar{padding:20px 7px;gap:22px}body[data-page] .side-button{font-size:12px}body[data-page] .nav-button{font-size:13px}.ua-overview>div{padding:14px 16px}.ua-panel-head{padding:16px 18px}.ua-table-scroll th,.ua-table-scroll td{padding:16px}.ua-row-actions{gap:4px}.ua-row-actions button{padding:8px}}
@media(max-height:850px){body[data-page] .page-head{margin-bottom:10px;min-height:40px}body[data-page] .page-head h2{font-size:22px}.ua-overview>div{padding:12px 18px}.ua-overview strong{font-size:22px;margin-top:4px}.ua-rule strong{font-size:15px}.users-page{gap:12px}}
@media(max-width:999px){body[data-page] .top{padding-inline:14px;gap:12px}body[data-page] .title h1{font-size:17px}body[data-page] .title p{display:none}body[data-page] .brand{width:100px}.ua-overview{grid-template-columns:repeat(3,1fr)}.ua-overview .ua-rule{grid-column:1/-1}.ua-panel-head{flex-wrap:wrap}.users-page{min-height:650px}.ua-table-scroll{min-height:330px}.ua-panel-head input{width:190px}.ua-row-actions button{white-space:nowrap}}
