/* v0.27: a compact workspace with consistent navigation, lists and controls. */
:root{--ink:#24282c;--line:#dfe2e5;--muted:#6c747d;--accent:#315d76;--soft:#f1f3f4;color:var(--ink);background:#f3f4f5;letter-spacing:-.15px}
.global-header{height:58px;padding:0 32px;gap:40px;background:#252a2f;border:0;color:#fff}
.global-header .brand{color:#fff}.global-header .wordmark{font-size:20px;letter-spacing:-1px}
.global-header nav>button{color:#bdc4ca;font-size:13px}.global-header nav>button.active{color:#fff;border-bottom-color:#fff}
.global-header .account small{color:#acb6bf}.global-header .icon-button{color:#c9d0d5}.global-header .icon-button:hover{background:#3b4249;color:#fff}
.content{max-width:1420px;padding:26px 32px 48px}.footer{max-width:1420px;padding:0 32px 20px}
.space-heading{align-items:center}.space-heading h1{font-size:24px}.back-link{margin-bottom:10px}.space-heading p{margin-top:5px}
.space-switch{min-width:180px}.space-switch select{min-height:34px}.space-tabs{margin:20px 0 22px;gap:26px}
.space-tabs button{padding-bottom:12px}.space-tabs button.active{color:#262e34;border-bottom-color:#262e34}
.page-heading{margin-bottom:18px}.page-heading h1{font-size:19px;letter-spacing:-.4px}.page-heading p{margin-top:5px;font-size:12px}
.panel,.sensor-card,.space-card{border-radius:3px;box-shadow:none}.panel-bar{padding:13px 18px;background:#fff}
.panel-bar h2{font-size:13px}.panel-bar .muted{font-weight:400}.panel-body{padding:18px}
.btn{border-radius:3px;min-height:34px;padding:7px 12px}.btn.primary{background:#303a42;border-color:#303a42}.btn.primary:hover{background:#19242d}
.text-button{color:#456577}.text-button.danger{color:#a6463b}.source-label{font-size:10px;line-height:1.5;font-weight:400;color:#707880;white-space:nowrap;letter-spacing:0}
.space-heading .source-label{border:1px solid #d4d9dd;border-radius:2px;padding:3px 6px;background:#fff}
.space-open{padding:22px}.space-open strong{font-size:17px}.space-card-tools{padding:10px 22px}
.sensor-grid{gap:16px;margin-bottom:22px}.sensor-card{padding:20px}.sensor-card>.section-heading{margin-bottom:18px}
.sensor-values strong{font-size:34px}.sensor-meta{margin-top:16px;padding-top:13px}
.sim-banner{padding:0 0 12px;margin:0;border:0;background:none;color:#737c83;font-size:11px}.sim-banner>span:first-child{display:none}.sim-banner .sim-clock{margin-left:auto;font-size:10px}
.sim-summary{padding:12px 0;margin-bottom:16px;border-bottom:1px solid var(--line);gap:26px}.sim-summary b{margin-left:6px}
.sim-plug-card{padding:18px 20px}.sim-plug-top{margin-bottom:15px}.sim-appliance-icon{color:#637986}.sim-plug-bottom .sim-status{font-size:22px}
.sim-power-button{border-radius:4px;width:34px;height:34px}.sim-power-button.is-on{color:#2b6c55;background:#f0f6f2;border-color:#b9cfc3}
.sim-space-layout{grid-template-columns:minmax(0,1fr) 320px;gap:18px}.sim-space-status{gap:18px}.sim-overview{gap:18px}
.sim-sensor-row{padding:16px 0}.sim-rule-status{font-size:21px}.sim-map{margin:8px auto 0}
.sim-test-controls{margin-top:20px;border-radius:3px;font-size:12px}.sim-test-controls>summary{padding:13px 16px}
.sim-test-controls .sim-sensor-panel{background:#fff}.sim-time-controls .btn{padding:6px 10px}
.rule-status-dot{display:inline-block;flex:none;width:6px;height:6px;border-radius:50%;background:#aeb5ba}.rule-status-dot.on{background:#3d8767}
.rule-summary-row{display:flex;align-items:center;gap:10px;padding:16px 18px;border:0;border-bottom:1px solid #edf0f1;background:#fff;color:var(--ink);width:100%;text-align:left}
.rule-summary-row:last-child{border-bottom:0}.rule-summary-row:hover{background:#f8f9fa}.rule-summary-row>span:nth-child(2){flex:1;min-width:0}.rule-summary-row b{font-size:12px;font-weight:550;display:block;line-height:1.65}.rule-summary-row small{display:block;color:var(--muted);font-size:11px;line-height:1.65;margin-top:4px}.rule-summary-row .icon{width:13px}
.automation-workbench{display:grid;grid-template-columns:260px minmax(0,1fr);border:1px solid var(--line);background:#fff;border-radius:3px;overflow:hidden;min-height:360px}
.rule-list{background:#f8f9fa;border-right:1px solid var(--line);padding:8px 0}.rule-list-item{display:block;width:100%;text-align:left;border:0;border-left:3px solid transparent;border-bottom:1px solid #e8ebed;background:none;padding:17px 17px 15px;color:var(--ink)}
.rule-list-item:hover{background:#edf1f3}.rule-list-item.selected{border-left-color:#416477;background:#eaf0f3}.rule-list-item>span{display:flex;align-items:baseline;gap:9px}.rule-list-item b{font-size:13px;font-weight:600;line-height:1.7}.rule-list-item small{display:block;font-size:11px;line-height:1.75;color:var(--muted);margin:7px 0 7px 15px}.rule-list-item em{font-size:10px;font-style:normal;color:#66757f;margin-left:15px}
.rule-list-note{font-size:11px;line-height:1.9;color:#7a838a;padding:18px}.rule-list-empty{font-size:12px;padding:18px}.rule-workarea{min-width:0}
.rule-readout{padding:26px}.rule-readout>header{display:flex;align-items:center;justify-content:space-between;gap:20px}.rule-readout h2{font-size:19px;margin-top:12px;line-height:1.6}.rule-definition{margin:26px 0;display:grid;gap:0;font-size:13px}.rule-definition>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:16px;padding:14px 0;border-bottom:1px solid #eceff1;line-height:1.9}.rule-definition dt{font-size:12px;color:var(--muted)}.rule-definition dd{margin:0;overflow-wrap:anywhere}.rule-runtime{display:flex;align-items:center;gap:8px;font-size:12px;color:#56636b;line-height:1.75;padding:10px 0}.rule-actions{display:flex;gap:8px;align-items:center;margin:16px 0;flex-wrap:wrap}.rule-actions>.danger{margin-left:auto}
.workbench-note{font-size:11px;line-height:1.8;color:var(--muted);margin:13px 0}.rule-readout .workbench-note{margin-bottom:0}
.automation-form{padding:24px}.automation-form header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:20px}.automation-form header h2{font-size:17px}
.automation-form input:not([type=checkbox]),.automation-form select,.date-range input{border:1px solid #ced5da;border-radius:3px;background:#fff;color:var(--ink);padding:8px 9px;min-height:36px;font-size:12px;max-width:100%;min-width:0}
.rule-name-field{display:grid;gap:8px;font-size:12px}.rule-name-field input{width:100%;font-size:14px!important}
.rule-section{border:0;border-top:1px solid var(--line);margin:24px 0 0;padding:20px 0 0;min-width:0}.rule-section legend{font-size:13px;padding:0 12px 0 0;font-weight:600}.rule-section legend b{font-size:10px;color:#637c8a;margin-right:9px}
.group-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:14px 0 10px}.group-heading select{background:#f8f9fa;border-color:#e4e8eb;font-size:11px;min-height:30px;padding:5px 28px 5px 8px}
.condition-row{display:flex;align-items:center;gap:6px;margin:8px 0;flex-wrap:wrap;background:#f8f9fa;padding:9px;border:1px solid #e6e9eb;border-radius:3px}.condition-row select{max-width:200px}.condition-row>select[data-edit=deviceId]{flex:1;min-width:130px}.condition-row input[type=number]{width:78px}.condition-row input[type=time]{width:110px}.condition-row>.icon-button{margin-left:auto;width:30px;height:30px}.condition-row select:first-child{font-size:11px}
.hold-field{margin-top:13px;flex-wrap:wrap;gap:8px;font-size:12px}.hold-field input{width:70px}.hold-field small{color:#90989e;font-size:10px}
.schedule-fields{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:16px;font-size:12px}.schedule-fields>small{flex-basis:100%;color:var(--muted);font-size:11px}.weekdays{display:flex;gap:5px}.weekdays label{cursor:pointer}.weekdays input{position:absolute;opacity:0;width:1px;height:1px}.weekdays span{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:3px;color:#707a82}.weekdays input:checked+span{background:#3f5c6d;color:white;border-color:#3f5c6d}.weekdays input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.action-row{display:flex;align-items:center;gap:7px;margin-bottom:9px;flex-wrap:wrap}.action-row .action-number{font-size:11px;color:#81909b;min-width:12px}.action-row input[data-edit=message]{flex:1;min-width:180px}.action-row select[data-edit=action-device]{flex:1;min-width:120px}.action-row input[type=number]{width:90px}.action-row>.icon-button{margin-left:auto;width:30px}.action-editor+.text-button{margin-top:3px;font-size:12px}
.rule-advanced{margin-top:24px;border-top:1px solid var(--line);padding-top:16px;color:var(--muted);font-size:12px}.rule-advanced summary{cursor:pointer}.rule-advanced>div{display:flex;gap:18px;margin-top:16px;flex-wrap:wrap}.rule-advanced label{display:grid;gap:7px;font-size:11px}.rule-advanced input{width:140px}
.editor-footer{display:flex;align-items:center;justify-content:space-between;margin:20px 0 0;padding-top:18px;border-top:1px solid var(--line)}.editor-footer .checkbox{display:flex;align-items:center;gap:8px;font-size:12px}.automation-form>.form-error{margin-top:12px}
.run-list{background:#fff}.run-item{border-bottom:1px solid #e9edef}.run-item:last-child{border-bottom:0}.run-item>summary{padding:15px 18px;display:flex;gap:14px;align-items:center;justify-content:space-between;cursor:pointer;list-style:none}.run-item>summary>span:first-child{display:grid;gap:5px}.run-item b{font-size:12px;font-weight:550}.run-item small{font-size:10px;color:var(--muted)}.run-item>summary:after{content:'+';font-size:15px;color:#8a949c}.run-item[open]>summary:after{content:'−'}.run-item .badge{margin-left:auto}.run-item>summary:hover{background:#f9fafb}
.run-detail{padding:0 18px 18px;font-size:12px;color:#65717a}.run-detail>p{margin:3px 0 12px}.run-detail details{font-size:11px;line-height:1.8;margin-bottom:12px}.run-detail details summary{cursor:pointer}.run-detail details p{padding:4px 0}.run-detail details b{color:#405568;margin-left:8px}.run-steps{padding:0;margin:0;list-style:none}.run-steps li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 18px;padding:11px 0;border-top:1px solid #edf0f1}.run-steps b{color:#358163}.run-steps b.result-error{color:#a94d41}.run-steps small{grid-column:1/-1;font-size:11px}.run-detail>.btn{margin-top:12px}
.history-filter{background:#fff;border:1px solid var(--line);border-radius:3px;margin-bottom:18px;padding:16px 18px}.history-filter-top{display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap}.history-filter-top>label{display:grid;gap:7px;font-size:11px;color:var(--muted)}.history-filter-top select{min-width:155px}.period-buttons{display:flex;gap:4px;flex-wrap:wrap;margin-left:auto}.period-buttons .btn{color:#697580;background:#fff;min-height:34px}.period-buttons .btn[aria-pressed=true]{background:#3d515e;border-color:#3d515e;color:#fff}
.date-range{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}.date-range label{display:grid;gap:7px;font-size:11px;color:var(--muted)}.date-range>span{padding-bottom:9px}.date-range>.form-error{flex-basis:100%}
.history-column-head,.history-item>summary{display:grid;grid-template-columns:165px minmax(180px,1fr) minmax(140px,.5fr) 65px;gap:16px;padding:14px 18px;align-items:center}.history-column-head{font-size:10px;color:#7b858c;background:#f8f9fa;border-bottom:1px solid var(--line);padding-top:11px;padding-bottom:11px}.history-item{border-bottom:1px solid #e8edf0}.history-item>summary{list-style:none;cursor:pointer;font-size:12px}.history-item>summary:hover{background:#f7f9fa}.history-item time{font-size:11px;color:#76818b;font-variant-numeric:tabular-nums}.history-item b{font-size:12px;font-weight:550;line-height:1.7;word-break:break-word}.history-item summary>span:nth-child(2)>small{display:block;color:#899198;font-size:10px;margin-top:4px}.history-item-detail{padding:4px 18px 16px;background:#fafbfc;font-size:12px;color:#687681}.history-item-detail .run-detail{padding:12px 0 0}.history-reading{margin:0;padding:10px 0;display:grid;gap:10px}.history-reading>div{display:flex;gap:20px;align-items:baseline}.history-reading dt{font-size:11px;color:#7f8a93;min-width:60px}.history-reading dd{margin:0;font-size:12px}
.history-pagination{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;font-size:11px;color:var(--muted)}.history-pagination>div{display:flex;gap:6px}.legacy-history{font-size:12px;line-height:1.75;padding:14px 18px;border:1px solid var(--line);background:#fff}.legacy-history>summary{cursor:pointer}.history-results .panel-bar{flex-wrap:wrap}
.device-register td{padding-top:13px;padding-bottom:13px}.device-state-cell{display:flex;align-items:center;gap:16px;justify-content:space-between;max-width:140px}.device-state-cell .sim-status{font-size:12px}.device-state-cell .sim-power-button{width:29px;height:29px;flex-shrink:0}.device-state-cell .icon{width:14px}.device-register td .actions{gap:14px}
@media(max-width:1100px){.automation-workbench{grid-template-columns:220px minmax(0,1fr)}.sim-space-layout{grid-template-columns:1fr}.sim-space-status{grid-template-columns:1fr 1fr}.period-buttons{margin-left:0}.history-column-head,.history-item>summary{grid-template-columns:150px minmax(150px,1fr) 140px 60px;gap:10px}}
@media(max-width:760px){
 .global-header{height:56px;padding:0 16px;gap:24px}.global-header .wordmark{font-size:18px}.global-header nav{gap:16px}.global-header nav>button{font-size:12px}.global-header .account{gap:7px}.global-header .account>span{display:none}
 .content{padding:20px 16px 36px}.footer{padding:0 16px 20px}.space-heading{align-items:flex-start}.space-heading h1{font-size:22px}.space-switch{margin-top:0;min-width:145px;max-width:100%}.space-tabs{gap:23px;margin:16px 0 18px}.page-heading{align-items:flex-start;gap:12px}.page-heading h1{font-size:18px}.page-heading p{font-size:11px;max-width:220px}.page-heading .btn{font-size:12px;padding:8px 10px;min-height:38px}
 .sim-plug-card{padding:16px}.sim-space-status{grid-template-columns:1fr}.sim-summary{gap:10px 18px}.sim-plug-bottom .sim-status{font-size:18px}.sim-plug-bottom small{font-size:9px}.sim-power-button{min-height:36px;width:36px}.sim-banner{padding-bottom:0}.sim-summary{margin-top:4px}.sim-test-controls>summary{padding:14px}.sim-time-controls .btn{min-height:44px}
 .automation-workbench{display:block}.rule-list{border-right:0;border-bottom:1px solid var(--line);display:flex;overflow-x:auto;padding:0;gap:0}.rule-list-item{min-width:205px;max-width:235px;flex-shrink:0;border-left:0;border-bottom:3px solid transparent;padding:13px 15px}.rule-list-item.selected{border-bottom-color:#416477}.rule-list-item b{font-size:12px}.rule-list-item small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;margin:5px 0}.rule-list-item em{margin-left:0}.rule-list-note{display:none}.rule-readout{padding:18px}.rule-readout h2{font-size:17px}.rule-definition{margin:20px 0}.rule-definition>div{grid-template-columns:72px minmax(0,1fr);gap:12px;font-size:12px}.rule-definition dt{font-size:11px}.rule-actions .btn{min-height:40px;font-size:12px}.rule-actions>.danger{min-height:40px;display:flex;align-items:center}
 .automation-form{padding:17px}.automation-form header h2{font-size:16px}.automation-form input:not([type=checkbox]),.automation-form select{min-height:40px;font-size:12px}.rule-section{margin-top:24px}.condition-row{gap:7px;padding:10px}.condition-row select{max-width:none}.condition-row>select[data-edit=deviceId]{min-width:155px;max-width:calc(100% - 108px)}.condition-row>select:first-child{width:95px}.condition-row .icon-button{min-width:30px}.condition-row input[type=number]{width:74px}.condition-row input[type=time]{width:105px}.action-row select[data-edit=action-type]{width:125px}.action-row input[data-edit=message]{min-width:165px;flex-basis:calc(100% - 55px);order:1;margin-left:19px}.action-row>.icon-button{margin-left:auto}.action-row select[data-edit=action-device]{min-width:120px}.editor-footer .btn{min-height:42px}.run-item>summary{padding:14px 16px}.run-detail{padding-left:16px;padding-right:16px}
 .history-filter{padding:14px}.history-filter-top{gap:12px}.history-filter-top>label{flex:1;min-width:120px}.history-filter-top select{min-width:0;width:100%;min-height:40px}.period-buttons{gap:5px;width:100%}.period-buttons .btn{flex:1;min-height:38px;padding:6px 7px}.date-range{gap:10px}.date-range label{flex:1;min-width:120px}.date-range input{width:100%;min-height:40px}.date-range>.btn{min-height:40px}.history-results .panel-bar{gap:6px}.history-results .panel-bar>.small{font-size:10px}.history-column-head{display:none}.history-item>summary{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:15px}.history-item time{grid-column:1/-1;font-size:10px}.history-item summary>span:nth-child(2){grid-column:1;grid-row:2}.history-item summary>span:nth-child(3){grid-column:2;grid-row:2;font-size:11px}.history-item summary>.source-label{grid-column:2;grid-row:3;text-align:right;font-size:9px}.history-item summary>span:nth-child(2)>small{display:none}.history-item-detail{padding:3px 15px 14px}.history-reading>div{gap:10px}.history-reading dd{font-size:11px}.history-pagination{padding:12px 15px}.history-pagination .btn{min-height:40px}.device-register table{min-width:650px}.device-register .text-button{min-height:36px}
}
