:root {
    color-scheme: light;
    font-family: Inter, "Microsoft YaHei UI", system-ui, sans-serif;
    color: #18382d;
    background: #f4f6f2;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #196348; }
.frame { width: min(100% - 2rem, 70rem); margin-inline: auto; }
.shell-header { border-bottom: 1px solid #dbe3da; background: #fcfdf9; }
.navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; min-height: 4rem; }
.navigation a { text-decoration: none; }
.brand { font-weight: 750; letter-spacing: -0.04em; margin-right: auto; }
.link-button { font: inherit; border: 0; background: transparent; color: #196348; padding: 0; cursor: pointer; }
.intro { padding: clamp(2.5rem, 6vw, 5rem) 0 1.25rem; }
h1 { margin: 0; font-size: clamp(2.15rem, 5vw, 3.6rem); letter-spacing: -0.045em; }
h2 { margin: 0 0 1rem; font-size: 1.15rem; }
p { line-height: 1.7; }
.panel { background: #fcfdf9; border: 1px solid #dbe3da; border-radius: .9rem; padding: clamp(1rem, 4vw, 1.75rem); margin: 1rem 0; overflow: auto; }
.primary { background: #196348; color: white; border: 1px solid #196348; text-decoration: none; display: inline-flex; align-items: center; }
.muted { color: #4b6659; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.metrics span { display: block; color: #4b6659; font-size: .85rem; }
.metrics strong { display: block; margin-top: .4rem; font-size: 1.2rem; }
.node-list, .device-list { list-style: none; padding: 0; margin: 0; }
.node-list li, .device-list li, .node-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; border-top: 1px solid #e1e8df; padding-block: .8rem; }
.state { color: #695423; font-size: .9rem; }
.state[data-ok="true"] { color: #196348; }
.inline-form, .device-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; }
.inline-form label { display: grid; gap: .3rem; font-size: .85rem; }
.inline-form input, .inline-form select { min-height: 2.3rem; max-width: 100%; }
.danger, .danger-text { color: #9c332d; }
.member-row { padding: .85rem 0; border-top: 1px solid #e1e8df; }
.member-row summary { cursor: pointer; overflow-wrap: anywhere; }
.copy-field { width: 100%; margin: .5rem 0; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .55rem .7rem; border-bottom: 1px solid #e1e8df; overflow-wrap: anywhere; }

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    margin: 2rem 0 1rem;
    border-radius: 1rem;
    background: #e1eddf;
    border: 1px solid #d1e0d0;
}
.dashboard-heading h1 { font-size: clamp(1.8rem, 3.75vw, 2.75rem); }
.dashboard-heading p, .panel-heading p { margin: .45rem 0 0; color: #4b6659; overflow-wrap: anywhere; }
.section-nav { display: flex; flex-wrap: wrap; gap: .45rem .7rem; margin: .9rem 0 1.15rem; }
.section-nav a {
    padding: .38rem .75rem;
    color: #254d3d;
    background: #fcfdf9;
    border: 1px solid #dbe3da;
    border-radius: .5rem;
    text-decoration: none;
    font-size: .9rem;
}
.section-nav a:hover { background: #e9f0e8; }
.status-pill {
    display: inline-block;
    border-radius: 2rem;
    background: #edf3e9;
    color: #25563f;
    padding: .32rem .68rem;
    font-size: .82rem;
    white-space: nowrap;
    font-weight: 650;
}
.status-pill[data-status="limited"] { color: #754818; background: #fff0d8; }
.status-pill[data-status="disabled"], .status-pill[data-status="expired"] { color: #87403a; background: #faebe6; }
.summary-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1rem; }
.summary-card { margin: 0; }
.usage-card {
    border-radius: .9rem;
    padding: clamp(1.1rem, 3vw, 1.8rem);
    background: #153d30;
    color: #f8fcf4;
}
.usage-card h2 { color: #dcebdd; }
.usage-card p { margin: .6rem 0 0; font-size: .88rem; color: #dcebdd; }
.usage-value { display: block; font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.usage-progress { display: flex; align-items: center; gap: .8rem; margin-top: .75rem; font-variant-numeric: tabular-nums; }
.usage-progress meter { flex: 1 1 auto; height: .9rem; }
.usage-progress meter::-webkit-meter-bar { background: #345e4c; border: 0; }
.usage-progress meter::-webkit-meter-optimum-value { background: #c3e796; }
.usage-progress meter::-webkit-meter-suboptimum-value { background: #f6d288; }
.usage-progress meter::-webkit-meter-even-less-good-value { background: #f6a995; }
.summary-list, .member-metrics { margin: 0; }
.summary-list div { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-top: 1px solid #e1e8df; }
.summary-list dt, .member-metrics dt { color: #4b6659; font-size: .86rem; }
.summary-list dd, .member-metrics dd { margin: 0; font-weight: 680; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.member-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 1rem; }
.member-metrics dd { margin-top: .4rem; font-size: 1.12rem; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .85rem 1.25rem; margin-bottom: 1rem; }
.panel-heading h2 { margin-bottom: 0; }
.empty-state { margin: .7rem 0 0; padding: 1rem; color: #4b6659; background: #f1f5ee; border-radius: .5rem; }
.device-row { display: grid; grid-template-columns: minmax(10rem, 1fr) auto auto; gap: .65rem 1rem; align-items: start; padding: .95rem 0; border-top: 1px solid #e1e8df; }
.device-row strong { overflow-wrap: anywhere; }
.device-row small, .table-note { display: block; margin-top: .35rem; color: #4b6659; }
.device-options { grid-column: -2; }
.device-options summary, .history-details summary { cursor: pointer; color: #196348; font-weight: 650; padding-block: .35rem; }
.device-options[open] { grid-column: 1 / -1; }
.device-options[open] .device-actions { margin-top: .5rem; }
.device-options p { margin: .45rem 0 0; font-size: .85rem; }
.history-totals { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; color: #4b6659; font-size: .9rem; }
.history-totals strong { margin-left: .35rem; color: #18382d; font-variant-numeric: tabular-nums; }
.history-chart {
    display: flex;
    gap: clamp(.12rem, 1vw, .65rem);
    height: 8rem;
    margin-top: .85rem;
    padding: .45rem .65rem;
    border: 1px solid #e1e8df;
    border-radius: .55rem;
    background: #f1f5ee;
}
.history-bar { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
.history-bar meter { writing-mode: vertical-lr; direction: rtl; height: 100%; width: min(100%, 1.2rem); }
.history-bar meter::-webkit-meter-bar { background: #e2ebe0; border: 0; border-radius: .2rem; }
.history-bar meter::-webkit-meter-optimum-value { background: #317656; border-radius: .2rem; }
.history-axis { display: flex; justify-content: space-between; margin-top: .3rem; font-size: .8rem; color: #4b6659; }
.history-details { margin-top: .8rem; padding-top: .45rem; border-top: 1px solid #e1e8df; }
.table-scroll { overflow-x: auto; }
.table-scroll th { white-space: nowrap; font-size: .84rem; color: #4b6659; background: #f1f5ee; }
.table-scroll td { font-variant-numeric: tabular-nums; }
.copy-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.copy-row label { flex: 1 1 18rem; min-width: 0; display: grid; gap: .3rem; font-size: .85rem; }
.copy-row input { min-width: 0; width: 100%; }
.breadcrumb { display: flex; gap: .55rem; align-items: center; margin-top: 1.1rem; color: #4b6659; font-size: .86rem; }
.breadcrumb + .dashboard-heading { margin-top: .7rem; }
.settings-form { margin-top: 1.2rem; }
.reset-form label { display: flex; align-items: center; gap: .4rem; }
.reset-form input[type="checkbox"] { min-height: auto; }
@media (max-width: 44rem) {
    .summary-grid { grid-template-columns: minmax(0, 1fr); }
    .dashboard-heading { margin-top: 1rem; }
    .device-row { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 28rem) {
    .frame { width: calc(100% - 1rem); }
    .navigation { gap: .75rem; }
    .dashboard-heading { padding: 1rem; }
    .history-chart { height: 6rem; padding-inline: .35rem; }
}

