/* 1.1: shared information hierarchy, with distinct desktop and handheld navigation. */
:root{--muted:#bab2a3;--r:16px}
body{font-size:14px;line-height:1.5}
[hidden]{display:none!important}
button:focus-visible,a:focus-visible{outline:2px solid #efbb4e;outline-offset:3px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.sidebar{height:100vh;height:100dvh;padding-top:20px}.sidebar .brand{flex-shrink:0;padding-bottom:18px}
#sideNav{display:block;flex:1;overflow-y:auto;min-height:0;padding-right:3px;scrollbar-width:thin;scrollbar-color:#3c372e transparent}
.nav-group{padding-bottom:12px}.nav-group-title{font-size:10px;letter-spacing:.12em;color:#a9a08d;padding:9px 14px 6px}
.nav-group .nav-btn{width:100%;min-height:40px;margin:3px 0;padding:9px 12px;font-size:13px;border-radius:9px}
.nav-group .nav-icon{font-size:17px}.sidebar-foot{margin-top:12px;flex-shrink:0;padding:12px}
.topbar{height:72px}.page-heading h1{font-size:19px}.eyebrow{font-size:11px}.workspace-back{border:1px solid #403b32;background:#201d19;border-radius:10px;width:36px;height:36px;font-size:28px;line-height:1;margin-right:12px;cursor:pointer}
main{max-width:1600px;padding:24px 28px 40px}.workspace-head{align-items:center;gap:20px;margin-bottom:22px}.workspace-head h2{font-size:23px;font-weight:650;letter-spacing:.02em}.workspace-head p{font-size:13px;line-height:1.65;margin-top:7px;max-width:760px}
.page-actions{display:flex;gap:9px;flex-wrap:wrap;flex-shrink:0}.primary-btn,.ghost-btn{border-radius:9px;min-height:40px;font-size:13px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;gap:6px;cursor:pointer}.primary-btn:disabled,.ghost-btn:disabled{opacity:.55;cursor:wait}
.workspace-head>.page-actions{flex:0 0 auto;min-width:0;margin-left:auto}.filter-context{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:12px;color:#c1baac;padding:0 4px 16px}
.text-link{padding:6px 0;color:#efbb4e;border:0;background:none;font-size:12px;cursor:pointer}.block-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px}.block-head h3{font-size:15px;margin:0}.block-head p,.block-head small{color:#b3ab9b;font-size:12px;margin:4px 0 0}.block-head>div{min-width:0}
.overview-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.stat-link{text-align:left;padding:19px 20px;cursor:pointer;transition:border-color .15s}.stat-link:hover{border-color:#efbb4e}.stat-link>span{display:block;color:#c1baac;font-size:13px}.stat-link strong{display:block;font-size:32px;font-weight:650;line-height:1.35;margin:8px 0}.stat-link small{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:#8abd9a}.stat-link i{font-style:normal}
.overview-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);gap:18px;align-items:start}.overview-grid>*{min-width:0}.overview-map{position:relative}.overview-map .map-panel{margin-bottom:0!important}.overview-map .map-stage{height:340px;min-height:340px}.map-full-link{position:absolute;right:16px;bottom:16px;z-index:8;background:#101113e8;padding:9px 12px;border:1px solid #807560;border-radius:8px}.overview-side{display:grid;gap:18px}.overview-devices{grid-column:1/-1}.shortcuts-panel .shortcut-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 20px 20px}.shortcut-grid button{justify-content:flex-start;font-size:12px;min-height:44px}.quiet-state{display:flex;gap:12px;align-items:flex-start;padding:2px 20px 22px}.quiet-state>span{width:32px;height:32px;border:1px solid #454036;border-radius:50%;display:grid;place-items:center;color:#8bbe9b;flex-shrink:0}.quiet-state b{font-size:14px;font-weight:500}.quiet-state p{margin:6px 0 0;font-size:12px;line-height:1.7;color:#b7afa0}.attention-row{display:block;text-align:left;width:calc(100% - 40px);margin:0 20px 12px;padding:12px;background:#26231d;border:1px solid #584c2e;border-radius:10px;cursor:pointer}.attention-row b,.attention-row small,.attention-row span{display:block;font-size:12px}.attention-row small{color:#b9b2a3;margin:5px 0}.attention-row span{color:#ffd17e;font-size:11px}
.overview-device{width:100%;display:flex;align-items:center;gap:14px;padding:15px 20px;text-align:left;border:0;border-top:1px solid #302c25;background:transparent;cursor:pointer}.overview-device:hover{background:#2b2721}.overview-device>span:nth-child(2){flex:1;min-width:0}.overview-device b{font-size:13px;overflow-wrap:anywhere}.overview-device small{display:block;font-size:11px;color:#b5ad9d;margin-top:4px}.device-kind{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#2d2a23;color:#efbb4e;flex-shrink:0}.overview-device .status{white-space:nowrap}.sync-caption{font-size:12px;color:#aea593;margin:18px 0 0}
.device-toolbar{padding:16px 18px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:20px}.search-label{display:block;flex:1;max-width:380px}.search-label>span{font-size:12px;color:#bcb5a6;display:block;margin-bottom:7px}.device-search,.history-controls select,.management-toolbar select{min-height:42px;border:1px solid #464036;border-radius:9px;background:#0f1012;color:#f4f2ee;padding:9px 12px;font-size:14px;max-width:100%;width:100%;outline:none}.device-search:focus,.history-controls select:focus{border-color:#efbb4e}.filter-tabs{display:flex;gap:5px;flex-wrap:wrap}.filter-tabs button{padding:8px 12px;min-height:38px;border:1px solid transparent;border-radius:8px;color:#bab3a4;background:transparent;font-size:12px;cursor:pointer;white-space:nowrap}.filter-tabs button.active{background:#332f27;border-color:#9e6f23;color:#f6f5f1}.filter-tabs button span{margin-left:4px;opacity:.75}.device-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}.hive-card{cursor:default;padding:20px;display:flex;flex-direction:column}.hive-card:hover{transform:none}.hive-card.offline{opacity:1}.hive-head{align-items:flex-start;gap:10px}.hive-head h3{font-size:15px;margin:6px 0 5px}.device-type{font-size:11px;color:#efbb4e}.hive-head small{font-size:12px;color:#b7afa0}.hive-head .status{flex-shrink:0}.hive-vitals{gap:10px;margin:20px 0 0}.hive-vitals div{padding:12px}.hive-vitals span{font-size:12px}.hive-vitals b{font-size:21px}.device-time{font-size:11px;color:#b3aa9a;margin:16px 0}.device-actions{display:flex;gap:9px;border-top:1px solid #322e27;padding-top:14px;margin-top:auto}.device-actions button{flex:1;min-height:40px;font-size:12px}.gateway-summary{display:flex;align-items:center;gap:14px;min-height:160px;padding:20px 0}.gateway-summary>span{font-size:40px;color:#efbb4e}.gateway-summary b{font-size:15px}.gateway-summary p{font-size:12px;color:#b6ae9e;margin:7px 0 0}
.workspace-empty{padding:30px 20px;text-align:center}.workspace-empty b{font-size:15px;font-weight:500}.workspace-empty p{font-size:12px;color:#b0a796;margin:9px 0}.inline-message{padding:14px 18px;background:#382c26;border:1px solid #69503b;border-radius:12px;color:#f5cf97;font-size:13px}
.map-workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}.map-workspace .map-panel{margin:0!important;min-height:0}.map-workspace .map-stage{height:calc(100dvh - 245px);min-height:440px}.map-workspace>aside{max-height:calc(100dvh - 185px);overflow:auto}.map-workspace aside h3{margin:0 0 14px;font-size:15px}.map-workspace aside p{font-size:13px}.site-row{cursor:pointer;min-width:0}.site-row h4{font-size:13px}.site-row small{font-size:11px}
.more-page{max-width:1120px}.account-summary{display:flex;gap:15px;align-items:center;padding:20px}.account-summary .avatar{width:48px;height:48px;font-size:21px}.account-summary b{font-size:17px}.account-summary p{font-size:12px;color:#b6af9f;margin:5px 0 0}.more-section{margin:24px 0}.more-section h3{font-size:14px;color:#c9c3b7;font-weight:500}.more-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.more-item{display:flex;align-items:center;gap:12px;padding:18px;text-align:left;cursor:pointer}.more-item>span:nth-child(2){flex:1;min-width:0}.more-icon{font-size:22px;color:#efbb4e}.more-item b{display:block;font-size:14px;font-weight:500}.more-item small{display:block;margin-top:5px;font-size:11px;color:#b7afa0}.more-item i{font-style:normal;color:#b5ad9d}.planned-features{padding:16px 20px;font-size:13px;color:#b8b0a0}.planned-features summary{cursor:pointer}.planned-features summary span{float:right;color:#b1a897;font-size:11px}.planned-features p{font-size:12px;line-height:1.7}.account-actions{display:flex;gap:12px;margin:24px 0;flex-wrap:wrap}
.management-toolbar{gap:12px;margin-bottom:18px}.management-search{flex:1;max-width:540px;min-width:200px}.management-search .search-field{width:100%;max-width:none;min-width:0;font-size:14px;min-height:42px}.management-toolbar select{width:auto;min-width:130px}.management-toolbar [data-table-count]{color:#b5ad9d;font-size:12px;margin-left:auto}.admin-table{font-size:13px}.admin-table th{font-size:12px;padding:14px 16px;white-space:nowrap}.admin-table td{font-size:12px;padding:15px 16px}.status-pill,.status{font-size:11px}.mini-btn{min-height:34px;font-size:12px;padding:7px 10px}.setting-grid{gap:18px}.setting-card{padding:22px}.setting-card h3{font-size:16px}.setting-card p{font-size:12px;line-height:1.7}.setting-row{font-size:13px;gap:20px;padding:14px 0}.amap-key-grid label span{font-size:12px}.amap-key-grid input{font-size:14px;min-height:42px}
.history-controls{display:flex;align-items:flex-end;gap:14px;padding:20px;margin-bottom:18px}.history-controls label{min-width:0;flex:1}.history-controls label:first-child{flex:2}.history-controls label>span{display:block;font-size:12px;color:#c0b9ab;margin-bottom:8px}.history-controls button{min-height:43px}.history-chart-panel{margin-bottom:18px}.history-chart{display:block;width:100%;height:260px;padding:0 18px}.history-chart text{font:13px system-ui;fill:#b5ad9d}.chart-empty{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;color:#b6af9f}.chart-empty>span{font-size:40px;color:#958972}.chart-empty b{font-size:14px;font-weight:500}.chart-empty p{font-size:12px;margin:8px 0}.history-records .table-wrap{max-height:600px;overflow:auto}.readings-table th{position:sticky;top:0;z-index:1}.history-records .block-head{border-bottom:1px solid #322e27}.mobile-dock{display:none}
@media(min-width:901px){.profile-menu{top:64px}.panel-title{min-height:58px;height:auto;padding:14px 18px;flex-wrap:wrap;gap:8px}.panel-title h3{font-size:15px}.panel-title small{font-size:11px}.segmented button{font-size:11px;min-height:32px}}
@media(max-width:1200px) and (min-width:901px){.overview-grid{grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr)}.map-workspace{grid-template-columns:minmax(0,1fr) 250px}.page-heading .eyebrow{display:none}.topbar-actions{gap:12px}.clock{display:none}.more-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){
  .mobile-dock{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:25;background:#0e1012f5;backdrop-filter:blur(14px);border-top:1px solid #3c372e;padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));box-shadow:0 -10px 25px #0b0c0e26}
  .mobile-dock button{border:0;border-radius:10px;background:none;min-height:52px;color:#aca391;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer}.mobile-dock button>span{font-size:22px;line-height:1.1}.mobile-dock b{font-size:11px;font-weight:500}.mobile-dock button[aria-current="page"]{color:#efbb4e;background:#2d2a23}
  main{padding:20px 16px calc(90px + env(safe-area-inset-bottom));max-width:900px}.topbar{height:64px}.workspace-back{margin:0;width:38px;height:40px;flex-shrink:0}.page-heading .eyebrow{display:none}.page-heading h1{font-size:17px}.mobile-menu{width:40px;height:40px;font-size:21px}.profile-menu{top:58px}.topbar-actions{gap:5px}.profile-btn .avatar{width:32px;height:32px}.topbar-actions .icon-btn{width:35px;height:35px}.profile-btn>span:last-child{display:none}
  .workspace-head{align-items:flex-start;margin-bottom:18px;gap:12px}.workspace-head h2{font-size:21px}.workspace-head p{font-size:12px;line-height:1.7;margin-top:5px}.workspace-head>div:first-child{min-width:0;flex:1}.page-actions{gap:8px}.page-actions button{font-size:12px;min-height:38px;padding:8px 11px}
  .overview-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}.stat-link{padding:15px 16px}.stat-link strong{font-size:29px;margin:5px 0}.stat-link>span{font-size:12px}.stat-link small{font-size:10px}.overview-grid{display:flex;flex-direction:column;gap:16px}.overview-grid>*{width:100%}.overview-side{display:contents}.attention-panel{order:0;width:100%}.shortcuts-panel{display:none}.overview-devices{order:1}.overview-map{order:2}.overview-map .map-stage{height:290px;min-height:290px}.block-head{padding:16px}.block-head h3{font-size:14px}.quiet-state{padding:0 16px 18px}.quiet-state p{font-size:12px}.overview-device{padding:14px 16px;gap:10px}.overview-device .status{font-size:10px}.overview-device b{font-size:12px}.device-kind{width:30px;height:34px}.overview-device small{font-size:10px}
  .device-toolbar{display:block;padding:15px}.search-label{max-width:none}.device-search{font-size:16px;min-height:46px}.device-toolbar .filter-tabs{margin-top:12px}.filter-tabs button{min-height:40px}.device-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.hive-card{padding:18px}.hive-head h3{font-size:14px}.device-time{font-size:11px}.gateway-summary{min-height:140px}.device-actions button{min-height:44px}.map-workspace{display:flex;flex-direction:column;gap:16px}.map-workspace>*{width:100%}.map-workspace .map-stage{height:calc(100dvh - 310px);min-height:340px;max-height:560px}.map-workspace>aside{max-height:none}.more-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.more-item{padding:16px;gap:10px}.more-item small{font-size:11px}
  .history-controls{flex-wrap:wrap;padding:16px;gap:12px}.history-controls label:first-child{flex:1 0 100%}.history-controls label:nth-child(2){flex:1}.history-controls select{font-size:16px;min-height:46px}.history-controls button{min-height:46px}.history-chart-panel .block-head{flex-wrap:wrap}.history-chart-panel .filter-tabs{width:100%;justify-content:space-between}.history-chart{height:230px;padding:0 8px}.chart-empty{min-height:190px}.history-records .block-head small{font-size:10px}.readings-table{min-width:0}.readings-table th{position:static}.history-records .table-wrap{max-height:600px}
  .management-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.management-search{min-width:0;flex-basis:100%;max-width:none}.management-search .search-field{font-size:16px;min-height:46px}.management-toolbar select{min-height:44px;font-size:16px;width:auto;max-width:70%}.management-toolbar [data-table-count]{font-size:12px}.admin-table td{font-size:13px;padding:10px 0}.admin-table th{font-size:12px}.mini-btn{min-height:40px}.setting-card{padding:18px}.amap-key-grid input{font-size:16px}.account-actions{display:grid;grid-template-columns:1fr;gap:10px}.account-actions>*{min-height:46px}.toast{bottom:calc(80px + env(safe-area-inset-bottom))}.modal-backdrop{z-index:60}.form-actions{bottom:-22px}.mobile-dock:has(button:focus-visible){outline:none}
}
@media(max-width:600px){.device-grid{grid-template-columns:1fr}.more-grid{grid-template-columns:1fr}.more-item{padding:16px 18px}.more-item i{font-size:23px}.more-icon{width:30px}.workspace-head{flex-wrap:wrap}.workspace-head .page-actions{flex-shrink:0}.management-page .workspace-head>div:first-child{flex-basis:100%}.management-page .page-actions{width:100%;justify-content:flex-end}.device-toolbar .filter-tabs button{flex:1}.readings-table td{grid-template-columns:90px minmax(0,1fr)}.history-records .block-head{align-items:flex-start}.hive-vitals b{font-size:22px}.hive-head .status{font-size:10px}}
@media(min-width:601px) and (max-width:900px){.admin-table{min-width:700px}.admin-table td{padding:14px}.table-wrap{overflow-x:auto}.management-page .workspace-head{flex-wrap:nowrap}}
@media(max-width:360px){.topbar{gap:4px;padding-left:8px;padding-right:8px}.workspace-back{width:30px}.mobile-menu{width:34px}.topbar-actions .icon-btn{width:30px}.profile-btn{padding:0}.page-heading h1{font-size:16px}.page-actions{flex-wrap:wrap}.map-panel .panel-title .right{width:100%}.overview-device{gap:7px}.overview-device .device-kind{display:none}.overview-device b{font-size:11px}.workspace-head>div:first-child{min-width:0}.history-controls button{font-size:12px}}
@media(orientation:landscape) and (max-height:500px){.mobile-dock{padding-top:3px;padding-bottom:3px}.mobile-dock button{min-height:43px;flex-direction:row;gap:6px}.mobile-dock button>span{font-size:18px}.map-workspace .map-stage{min-height:300px}.topbar{height:56px}}
