.app-settings-body{padding:16px}.app-settings-body p{margin:0 0 12px}.app-settings-body input{display:block;margin:6px 0 16px}.app-settings-body .actions{margin-top:12px}#app-settings{min-height:30px;font-size:12px;padding:0 8px}#app-settings[hidden]{display:none}
:root{font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;color:#182638;background:#eef3fa;font-size:14px;--blue:#0967e9;--ink:#182638;--muted:#556579;--line:#e4eaf2}
*{box-sizing:border-box}body{margin:0;min-height:100vh;display:flex;flex-direction:column}
button,input,select{font:inherit;color:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #2075df;outline-offset:2px}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}
.topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px;background:#fff;border-bottom:1px solid var(--line);min-height:62px;padding:0 24px}.brand{display:flex;align-items:center;gap:12px;text-align:left;font-size:17px;font-weight:750;justify-self:start;border:0;background:none;padding:0}.brand img{width:28px;height:28px;object-fit:contain}.topbar nav{display:flex;gap:26px;align-self:stretch}.nav-btn{border:0;background:none;display:flex;align-items:center;gap:8px;border-bottom:2px solid transparent;white-space:nowrap;padding:0 4px}.nav-btn.active{color:var(--blue);border-bottom-color:var(--blue);font-weight:700}.account{display:flex;align-items:center;gap:10px;justify-self:end;color:var(--muted);white-space:nowrap}.avatar{display:grid;place-items:center;background:var(--blue);color:white;width:32px;height:32px;border-radius:50%;font-size:11px;font-weight:700}.demo{font-size:12px;background:#fff6de;border:1px solid #f3e4a5;color:#795014;padding:4px 8px;border-radius:5px}
.tabs{min-height:46px;display:flex;align-items:end;gap:4px;padding:0 24px;background:#fff;border-bottom:1px solid #dce5f0;overflow:auto}.tab{min-height:37px;border:0;border-bottom:2px solid transparent;background:none;padding:0 14px;white-space:nowrap;display:flex;gap:7px;align-items:center}.tab.active{background:#eaf4ff;border-color:var(--blue);color:var(--blue);border-radius:5px 5px 0 0;font-weight:700}
main{flex:1;width:100%;padding:20px 24px 26px}.surface{background:white;border:1px solid var(--line);border-radius:8px;min-width:0;overflow:hidden}.section-head{padding:16px 22px;border-bottom:1px solid #eef1f6;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-height:58px}.section-head h1,.section-head h2{margin:0;display:flex;align-items:center;gap:11px;font-size:17px;line-height:1.45}.section-head h1::before,.section-head h2::before{content:"";width:4px;height:21px;background:#058cf2;border-radius:2px;flex:none}
.filters{padding:21px 22px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 24px;border-bottom:1px solid #eef1f6;align-items:center}.filters label{display:flex;align-items:center;gap:9px;min-width:0}.filters label span{white-space:nowrap}.range{display:flex;align-items:center;gap:6px;min-width:0;flex:1}.range input{min-width:0;padding:0 6px}
input,select{height:36px;border:1px solid #d7e0eb;border-radius:5px;background:#fff;padding:0 10px;min-width:0;width:100%}input::placeholder{color:#78889a}.actions{display:flex;justify-content:flex-end;align-items:center;gap:9px;flex-wrap:wrap}.button,.icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #d7e0eb;background:white;border-radius:5px;min-height:35px;padding:0 12px;white-space:nowrap;text-decoration:none}.button:hover,.icon-btn:hover{background:#f0f6ff;text-decoration:none}.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.primary:hover{background:#0759cf}.icon-btn{width:35px;padding:0}.icon{width:17px;height:17px;flex:none;display:inline-block;vertical-align:middle;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.table-area{padding:0 22px}.table-bar{min-height:52px;display:flex;align-items:center;justify-content:space-between;color:var(--muted);gap:10px}.scroll-table{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}table.records{min-width:1110px}th,td{padding:12px 10px;border-bottom:1px solid #edf1f6;vertical-align:middle}th{background:#f6f8fc;color:#233549;font-weight:700;white-space:nowrap}td{line-height:1.55}tbody tr:hover{background:#f8fbff}.mono{font-variant-numeric:tabular-nums;white-space:nowrap}.secondary{display:block;color:var(--muted);font-size:12px;margin-top:3px}.chips{display:flex;gap:4px;flex-wrap:wrap;max-width:225px}.chip,.status{display:inline-flex;align-items:center;gap:5px;border:1px solid #f4df9b;color:#805508;background:#fff9e6;border-radius:4px;padding:2px 6px;font-size:12px;white-space:nowrap}.status.active{color:#075bb9;background:#eaf4ff;border-color:#afd4fc}.status.done{color:#23714a;background:#effaf2;border-color:#c2e9cc}.row-actions{display:flex;gap:10px;flex-wrap:wrap;min-width:204px}.link{background:none;border:0;padding:0;color:var(--blue);white-space:nowrap}.link:hover{text-decoration:underline}.empty{padding:38px 16px;text-align:center;color:var(--muted);margin:0}.pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:15px 0;color:var(--muted)}button:disabled{opacity:.45;cursor:default}
.summary-layout{display:grid;grid-template-columns:2.25fr 1fr;gap:16px}.summary-body{padding:18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.summary-block{padding:14px;background:#f1fafb;border-radius:6px;min-width:0}.summary-block.wide{grid-column:1/-1}.summary-block h3{font-size:15px;margin:0 0 8px}.summary-block h3::before{content:"";display:inline-block;background:#058cf2;width:3px;height:14px;margin-right:8px;vertical-align:-2px;border-radius:2px}.donut{height:205px;background:#fff;border-radius:6px}.region-list{padding:4px 0}.region-row{display:grid;grid-template-columns:90px 1fr 34px;gap:12px;align-items:center;padding:8px 0}.region-track{height:9px;background:#ddebf1;border-radius:5px;overflow:hidden}.region-track span{display:block;height:100%;background:#428bee}.calendar{padding:14px}.calendar header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center}.calendar-grid>*{display:grid;place-items:center;min-height:38px;color:var(--muted)}.calendar-grid button{background:#fff;border:1px solid #eef1f6;min-height:48px;color:var(--ink)}.calendar-grid .selected{border-color:var(--blue);color:var(--blue);background:#eaf4ff}.stack{display:grid;align-content:start;gap:16px}.device-summary{display:grid;grid-template-columns:repeat(3,1fr);padding:18px;text-align:center;color:var(--muted)}.device-summary b{display:block;color:var(--ink);font-size:22px;margin-bottom:4px}
.record-strip{display:flex;gap:12px 24px;align-items:center;flex-wrap:wrap;padding:13px 22px;border-bottom:1px solid var(--line);color:var(--muted)}.record-strip b{color:var(--ink)}.chart-tabs{display:flex;gap:4px;padding:0 22px;border-bottom:1px solid var(--line);overflow:auto}.chart-filters{grid-template-columns:1fr 1fr 1fr auto;border-bottom:0}.unit-input{display:flex;flex:1;min-width:0}.unit-input input{border-radius:5px 0 0 5px}.unit{display:flex;align-items:center;border:1px solid #d7e0eb;border-left:0;border-radius:0 5px 5px 0;background:#f6f8fc;padding:0 8px;color:var(--muted);font-size:12px}.chart-wrap{position:relative;margin:0 18px 18px}.chart{height:min(62vh,630px);min-height:330px}.chart-empty{position:absolute;inset:36% 8% auto;pointer-events:none;text-align:center;background:rgba(255,255,255,.94);color:var(--muted);padding:12px;border:1px solid var(--line);border-radius:5px;width:max-content;max-width:84%;margin:auto}
footer{display:flex;justify-content:space-between;gap:8px;padding:12px 24px;background:#fff;border-top:1px solid var(--line);color:var(--muted);font-size:12px}
dialog{width:min(540px,calc(100% - 28px));max-height:80vh;border:1px solid var(--line);border-radius:8px;padding:0;color:var(--ink);box-shadow:0 12px 36px #17365b33}dialog::backdrop{background:#14284155}dialog header{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid var(--line)}dialog h2{margin:0;font-size:17px}#dialog-content{padding:16px}.history-entry{padding:9px 0;border-bottom:1px solid var(--line)}.history-entry .chips{max-width:100%;margin-top:8px}
@media(max-width:1120px){.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-layout{grid-template-columns:1.7fr 1fr}.summary-body{grid-template-columns:1fr}.topbar{gap:12px}.topbar nav{gap:12px}}
@media(max-width:720px){.topbar{grid-template-columns:1fr auto;padding:9px 12px 0;gap:4px}.topbar nav{grid-row:2;grid-column:1/-1;justify-content:space-between;overflow:auto;gap:7px}.nav-btn{min-height:42px;font-size:12px}.brand{font-size:14px;gap:6px}.brand img{width:21px;height:21px}.operator{display:none}.account{gap:4px}.avatar{width:25px;height:25px}.demo{font-size:11px;padding:3px 5px}.tabs{padding:0 10px}main{padding:12px 8px}.section-head,.filters,.table-area,.record-strip,.chart-tabs{padding-left:12px;padding-right:12px}.filters{grid-template-columns:1fr;gap:10px}.filters label>span:first-child{min-width:74px}.summary-layout{grid-template-columns:1fr}.summary-body{padding:10px}.chart-wrap{margin:0 4px 12px}.chart{min-height:330px}.section-head h1,.section-head h2{font-size:16px}footer{padding:11px 12px}}
