.device-v2-subnav.device-v2-subnav--balanced{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;align-items:stretch;padding:6px;margin:0 auto 18px;border:1px solid var(--line);border-radius:14px;background:var(--soft);box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}
.device-v2-subnav.device-v2-subnav--balanced button{position:relative;min-height:44px;padding:10px 14px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--muted);font-size:12px;font-weight:760;text-align:center;cursor:pointer;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}
.device-v2-subnav.device-v2-subnav--balanced button:not(:last-child)::after{content:"";position:absolute;right:-4px;top:11px;bottom:11px;width:1px;background:var(--line);opacity:.72;pointer-events:none}
.device-v2-subnav.device-v2-subnav--balanced button:hover{background:var(--panel);border-color:var(--line);color:var(--ink);transform:translateY(-1px)}
.device-v2-subnav.device-v2-subnav--balanced button.active{background:var(--panel);border-color:var(--line);color:var(--ink);box-shadow:0 5px 15px rgba(20,26,38,.07)}
.device-v2-subnav.device-v2-subnav--balanced button.active::before{content:"";position:absolute;left:26%;right:26%;bottom:4px;height:2px;border-radius:999px;background:#6978e8}

.meter-history-panel-v2 .mini-chart,.meter-history-panel-v2 .device-meter-list{display:none!important}
.meter-history-explorer{display:grid;gap:14px;margin-top:8px}
.meter-history-explorer-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding-top:2px}
.meter-history-explorer-head>div{min-width:0}
.meter-history-explorer-head b{display:block;font-size:12px;color:var(--ink)}
.meter-history-explorer-head span{display:block;margin-top:3px;color:var(--muted);font-size:10px}
.meter-history-hint{white-space:nowrap;padding:6px 9px;border:1px solid var(--line);border-radius:999px;background:var(--soft);color:var(--muted);font-size:9px;font-weight:750}
.meter-month-track{display:grid;grid-template-columns:repeat(auto-fit,minmax(142px,1fr));gap:8px}
.meter-month-card{position:relative;display:flex;min-height:118px;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:10px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink);text-align:left;cursor:pointer;overflow:hidden;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}
.meter-month-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#6878e8;opacity:.35;transition:opacity .16s ease}
.meter-month-card:hover{transform:translateY(-2px);border-color:#aeb9ca;box-shadow:0 10px 24px rgba(20,26,38,.08)}
.meter-month-card:hover::before,.meter-month-card.active::before{opacity:1}
.meter-month-card.active{border-color:#8694ed;background:#f7f8ff;box-shadow:0 10px 26px rgba(75,91,190,.12)}
.meter-month-card .month-label{font-size:10px;font-weight:820;letter-spacing:.025em;color:var(--muted)}
.meter-month-card strong{font-size:20px;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.025em}
.meter-month-card small{display:block;color:var(--muted);font-size:9px;line-height:1.45}
.meter-month-card .month-open{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;padding-top:8px;border-top:1px solid var(--line);font-size:9px;font-weight:780;color:#5968cc}
.meter-month-card .month-open i{font-style:normal;font-size:13px;transition:transform .16s ease}
.meter-month-card.active .month-open i{transform:rotate(90deg)}
.meter-history-detail{border:1px solid var(--line);border-radius:13px;background:var(--panel);overflow:hidden}
.meter-history-detail.empty{padding:16px;text-align:center;color:var(--muted);font-size:10px;border-style:dashed;background:var(--soft)}
.meter-history-detail-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--soft)}
.meter-history-detail-head b{font-size:12px}
.meter-history-detail-head span{color:var(--muted);font-size:9px}
.meter-history-reading{display:grid;grid-template-columns:minmax(180px,1.3fr) minmax(100px,.55fr) minmax(150px,.8fr) minmax(110px,.6fr);align-items:center;gap:12px;padding:11px 14px;border-bottom:1px solid var(--line)}
.meter-history-reading:last-child{border-bottom:0}
.meter-history-reading:hover{background:var(--soft)}
.meter-history-reading .meter-name b,.meter-history-reading .meter-name small{display:block}
.meter-history-reading .meter-name b{font-size:11px}
.meter-history-reading .meter-name small{margin-top:2px;color:var(--muted);font-size:9px}
.meter-history-reading .meter-value{font-size:13px;font-weight:830;font-variant-numeric:tabular-nums}
.meter-history-reading .meter-date,.meter-history-reading .meter-source{color:var(--muted);font-size:9px}
.meter-history-reading .meter-source{text-align:right}
.meter-history-reading .meter-history-state{display:inline-flex;margin-left:5px;padding:2px 5px;border-radius:999px;background:var(--soft);font-size:8px;font-weight:760;color:var(--muted)}
.meter-history-reading .meter-history-state.primary{background:#eef0ff;color:#5867cf}
.meter-history-reading .meter-history-state.inactive{background:#f2f3f5;color:#7c8490}

html[data-theme="dark"] .device-v2-subnav.device-v2-subnav--balanced{background:#121923;border-color:#2b394a;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
html[data-theme="dark"] .device-v2-subnav.device-v2-subnav--balanced button:hover,html[data-theme="dark"] .device-v2-subnav.device-v2-subnav--balanced button.active{background:#1d2734;border-color:#3a4a5f;color:#eef3f9;box-shadow:0 8px 18px rgba(0,0,0,.14)}
html[data-theme="dark"] .meter-month-card{background:#171f2a;border-color:#2d3b4d}
html[data-theme="dark"] .meter-month-card:hover{border-color:#52647c;box-shadow:0 12px 26px rgba(0,0,0,.18)}
html[data-theme="dark"] .meter-month-card.active{background:#202a3a;border-color:#7585ed;box-shadow:0 12px 28px rgba(0,0,0,.2)}
html[data-theme="dark"] .meter-history-detail{background:#171f2a;border-color:#2d3b4d}
html[data-theme="dark"] .meter-history-detail-head,html[data-theme="dark"] .meter-history-reading:hover,html[data-theme="dark"] .meter-history-detail.empty{background:#121923}
html[data-theme="dark"] .meter-history-reading .meter-history-state{background:#202b38}
html[data-theme="dark"] .meter-history-reading .meter-history-state.primary{background:#27325a;color:#aab4ff}
html[data-theme="dark"] .meter-history-reading .meter-history-state.inactive{background:#252a31;color:#969eaa}

@media(max-width:860px){.device-v2-subnav.device-v2-subnav--balanced{grid-template-columns:repeat(2,minmax(0,1fr))}.device-v2-subnav.device-v2-subnav--balanced button::after{display:none}.meter-history-reading{grid-template-columns:1fr auto}.meter-history-reading .meter-date,.meter-history-reading .meter-source{grid-column:1/-1;text-align:left}.meter-history-explorer-head{align-items:flex-start;flex-direction:column;gap:7px}.meter-history-hint{white-space:normal}}
@media(max-width:520px){.device-v2-subnav.device-v2-subnav--balanced{grid-template-columns:1fr 1fr}.meter-month-track{grid-template-columns:1fr 1fr}.meter-month-card{min-height:108px}}
