:root {
  color: #162822;
  background: #f4f7f4;
  font: 16px/1.5 "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #162822;
  --muted: #52655d;
  --line: #e0e9e0;
  --green: #197252;
  --light: #ebf5eb;
  --lime: #d8f47f;
  --sidebar: #142821;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
[hidden] { display: none !important; }
.sign-in { display: grid; min-height: 100dvh; place-items: center; padding: 20px; }
.sign-in-panel { width: min(100%, 390px); padding: clamp(21px, 6vw, 34px); border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.sign-in-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.sign-in-header .brand { padding: 0; min-width: 0; }
.sign-in-header .locale { flex: none; }
.sign-in-panel .brand small { color: var(--muted); }
.sign-in-panel h1 { font-size: 1.45rem; margin-bottom: 18px; }
.sign-in-panel fieldset { display: grid; gap: 6px; padding: 0; margin: 0; border: 0; }
.sign-in-panel input { width: 100%; height: 42px; margin-bottom: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; }
.sign-in-panel .button { margin-top: 4px; }
#sign-in-message { color: #963d31; margin-top: 12px; }
#sign-in-message:empty { display: none; }
#sign-out { padding: 0 9px; white-space: nowrap; }
.empty-report { padding: 24px 0; color: var(--muted); }
button, input, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, select:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid #258867; outline-offset: 3px; }
button { color: inherit; }
h1, h2, h3, p { margin: 0; }
small { font-size: .8rem; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; background: var(--sidebar); color: #e7f1e8; display: flex; flex-direction: column; padding: 24px 14px 17px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 8px 24px; }
.brand strong { font-size: 1.16rem; font-weight: 750; letter-spacing: .03em; display: block; }
.brand small { display: block; font-size: .67rem; letter-spacing: .09em; color: #a7c3ae; }
.brand-mark { display: block; width: 39px; height: 39px; object-fit: contain; border-radius: 11px; flex: none; }
.sidebar-footer strong { display: block; font-size: .9rem; }
.nav-label { color: #a0b7aa; font-size: .8rem; padding: 6px 10px 3px; }
.sidebar nav { display: flex; flex: 1 0 auto; flex-direction: column; gap: 6px; }
.nav-domains, .nav-reference { display: grid; gap: 3px; }
.sidebar nav .nav-reference { margin-top: auto; padding-top: 8px; }
.nav-link { color: #bcd2c3; border-radius: 8px; display: flex; align-items: center; min-height: 37px; padding: 7px 10px; font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
.nav-link:hover { background: #254237; color: white; }
.nav-link[aria-current="page"] { background: var(--lime); color: #193023; font-weight: 750; }
.sidebar-footer { display: flex; gap: 10px; align-items: center; margin-top: 12px; border-top: 1px solid #395346; padding: 14px 7px 0; }
.profile-mark { display: grid; place-items: center; inline-size: 34px; block-size: 34px; flex: none; border-radius: 50%; font-size: .78rem; font-weight: 750; background: #d6e6cd; color: #294635; }
.workspace-body { margin-left: 224px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 0 clamp(18px, 3vw, 42px); min-height: 62px; border-bottom: 1px solid var(--line); background: #fff; gap: 12px; }
.breadcrumb, .top-controls { display: flex; align-items: center; gap: 12px; font-size: .88rem; }
.breadcrumb { color: var(--muted); }
.breadcrumb strong { color: var(--ink); }
.locale { background: white; border: 1px solid var(--line); border-radius: 7px; min-height: 33px; min-width: 38px; color: var(--muted); font-size: .82rem; }
main { max-width: 1550px; margin: 0 auto; padding: 25px clamp(18px, 3vw, 42px) 20px; }
.headline { display: flex; align-items: end; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 20px; }
h1 { font-size: clamp(1.7rem, 3vw, 2.15rem); line-height: 1.15; font-weight: 770; letter-spacing: -.03em; }
.headline p { color: var(--muted); margin-top: 7px; font-size: .94rem; }
.tools, .legend, .period-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; inset: 15px 12px auto auto; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
select, .button { appearance: none; background: #fff; color: var(--ink); border: 1px solid #d9e5d9; border-radius: 8px; font-size: .9rem; min-height: 39px; font-weight: 650; padding: 7px 12px; }
select { padding-right: 31px; max-width: 100%; }
.button:hover, .locale:hover { background: #edf5eb; }
.button.primary { background: #1b674c; border-color: #1b674c; color: white; }
.button.primary:hover { background: #12553c; }
.period-note { justify-content: space-between; gap: 10px; color: var(--muted); font-size: .86rem; margin: 0 0 12px; }
.period-note-right { justify-content: flex-end; }
.time-range { position: relative; }
.time-range summary { list-style: none; position: relative; padding-right: 32px; white-space: nowrap; cursor: pointer; }
.time-range summary::-webkit-details-marker { display: none; }
.time-range summary::after { content: ""; position: absolute; inset: 15px 12px auto auto; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.time-range[open] summary::after { transform: translateY(3px) rotate(225deg); }
.time-range summary:focus-visible, .time-range input:focus-visible { outline: 2px solid #258867; outline-offset: 3px; }
.time-popover { position: absolute; top: calc(100% + 7px); right: 0; z-index: 3; width: min(350px, calc(100vw - 28px)); padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 24px #16282218; }
.time-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(95px, .68fr); gap: 9px; margin-bottom: 10px; }
.time-fields label { display: grid; gap: 4px; color: var(--muted); font-size: .86rem; font-weight: 650; min-width: 0; }
.time-fields input, .time-fields select { width: 100%; min-width: 0; }
.time-fields input { background: white; color: var(--ink); border: 1px solid #d9e5d9; border-radius: 8px; min-height: 39px; padding: 6px 9px; font-size: .9rem; }
.time-hint, .time-error { font-size: .82rem; margin-bottom: 10px; }
.time-hint { color: var(--muted); }
.time-error { color: #9b4336; }
.time-error:empty { display: none; }
.time-actions { display: flex; justify-content: flex-end; gap: 8px; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-filters .button[aria-pressed="true"] { border-color: #9dc1a7; background: #eaf5ea; color: #1b674c; }
.catalog-filters .button span { font-size: .79rem; margin-left: 3px; color: var(--muted); }
.catalog-toolbar input { width: min(240px, 100%); min-height: 39px; padding: 7px 10px; border: 1px solid #d9e5d9; border-radius: 8px; background: white; color: var(--ink); font-size: .9rem; }
.catalog-toolbar input:focus-visible, .metric-row summary:focus-visible { outline: 2px solid #258867; outline-offset: -2px; }
.metric-results { display: grid; gap: 13px; }
.domain-metrics { margin-top: 14px; }
.domain-metrics .metric-row:first-child { border-top: 0; }
.metric-group { background: white; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.metric-group h2 { padding: 11px 14px; font-size: 1rem; background: #f0f6f0; }
.metric-row { border-top: 1px solid #ecf1ec; }
.metric-row summary { display: grid; grid-template-columns: 2rem minmax(0, 1fr) minmax(0, auto) 10px; align-items: center; gap: 10px; padding: 11px 14px; min-height: 48px; cursor: pointer; list-style: none; }
.metric-row summary::-webkit-details-marker { display: none; }
.metric-row summary::after { content: ""; align-self: center; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.metric-row[open] summary::after { transform: rotate(225deg); }
.metric-row summary:hover, .metric-row[open] summary { background: #f7fbf7; }
.metric-id { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }
.metric-name { font-size: .94rem; overflow-wrap: anywhere; }
.metric-reading { color: #1b674c; font-size: .87rem; font-weight: 660; text-align: right; font-variant-numeric: tabular-nums; }
.metric-reading.metric-status, .metric-note { color: var(--muted); }
.metric-details { padding: 10px 14px 13px 56px; }
.metric-details h3, .metric-details dl, .metric-extra, .metric-note { font-size: .87rem; }
.metric-details p { margin-top: 3px; }
.metric-details dl, .metric-extra { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 9px; margin: 10px 0 0; }
.metric-details dt { color: var(--muted); }
.metric-details dd { margin: 2px 0 0; }
.metric-extra { color: #1b674c; }
.catalog-empty { padding: 14px 0; color: var(--muted); }
.filter-note { display: inline-flex; align-items: center; gap: 7px; }
.filter-note::before { content: ""; height: 7px; width: 7px; border-radius: 50%; background: #398265; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.stat, .panel { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 11px; }
.stat { padding: 13px 14px 12px; min-height: 117px; }
.stat:not(.stat-select):first-child, .stat-select[aria-pressed="true"] { border-top: 3px solid #79b16d; padding-top: 11px; }
.stat-select { text-align: left; }
.stat-select:hover { background: #f5f9f5; }
.stat-select[aria-pressed="true"] { background: #eef7ee; }
.stat-title { color: var(--muted); font-weight: 640; font-size: .88rem; }
.stat-number { display: block; margin: 4px 0 5px; font-size: clamp(1.35rem, 2.36vw, 2rem); line-height: 1.2; letter-spacing: -.045em; font-weight: 770; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.delta { color: #136344; background: #e8f5e8; padding: 2px 5px; border-radius: 4px; font-weight: 700; font-size: .78rem; white-space: nowrap; }
.delta.down { color: #9b4336; background: #fff0eb; }
.stat-note { color: var(--muted); font-size: .76rem; margin: 0 0 0 6px; }
.main-grid, .lower-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.panel { padding: 16px; }
.panel + .panel.solo, .solo + .solo { margin-top: 14px; }
.panel h2 { font-size: 1.09rem; line-height: 1.2; font-weight: 750; }
.panel-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.panel-desc { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.series-controls { display: inline-flex; padding: 3px; background: #f2f6f2; border-radius: 7px; }
.series-controls button { border: 0; background: transparent; border-radius: 5px; color: var(--muted); font-size: .83rem; padding: 4px 8px; }
.series-controls button[aria-pressed="true"] { color: #1e5d45; background: white; font-weight: 750; box-shadow: 0 0 0 1px #dfebdf; }
.chart-box { position: relative; height: 203px; }
.chart-unit { padding-left: 7px; font-size: .78rem; color: var(--muted); }
.period-reference { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .88rem; }
.period-reference strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.reference-line-key { display: inline-block; width: 24px; border-top: 2px dashed #8b6636; }
.calculation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 10px; }
.calculation { padding: 11px 13px; border-radius: 7px; background: #f4f8f4; min-width: 0; }
.calculation h3 { font-size: .9rem; }
.calculation p { margin: 3px 0 5px; color: var(--muted); font-size: .85rem; }
.calculation-value { color: #1b674c; font-size: .95rem; font-variant-numeric: tabular-nums; }
.admin-form fieldset { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; min-width: 0; padding: 0; margin: 0; border: 0; }
.admin-form label { display: grid; gap: 5px; font-size: .9rem; color: var(--muted); }
.admin-form input { width: min(190px, 100%); min-height: 39px; padding: 6px 9px; border: 1px solid #d9e5d9; border-radius: 8px; background: white; color: var(--ink); }
.admin-form fieldset:disabled .button { opacity: .65; cursor: wait; }
.admin-page-toggle fieldset { align-items: center; justify-content: space-between; padding: 10px 0; }
.admin-page-toggle + .admin-page-toggle { border-top: 1px solid var(--line); }
.admin-switch-label { font-size: .94rem; font-weight: 650; }
.admin-switch-control { display: flex; align-items: center; gap: 9px; }
.admin-switch-state { color: var(--muted); font-size: .88rem; }
.admin-switch { box-sizing: border-box; position: relative; width: 44px; height: 26px; padding: 0; border: 1px solid #a8bead; border-radius: 99px; background: #d6e3d8; }
.admin-switch span { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: white; }
.admin-switch[aria-checked="true"] { border-color: var(--green); background: var(--green); }
.admin-switch[aria-checked="true"] span { transform: translateX(18px); }
.admin-switch:disabled { opacity: .65; cursor: wait; }
canvas { width: 100%; height: 100%; display: block; }
.tooltip { position: absolute; background: #18362a; color: #fff; padding: 6px 9px; border-radius: 6px; pointer-events: none; font-size: .81rem; white-space: nowrap; z-index: 2; }
.donut-wrap { display: flex; justify-content: center; margin: 3px 0 11px; }
.donut { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; }
.donut-label { width: 88px; height: 88px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: white; }
.donut-label strong { font-size: 1.35rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.donut-label small { color: var(--muted); font-size: .74rem; }
.breakdown { display: grid; gap: 6px; }
.breakdown-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; color: var(--muted); font-size: .88rem; }
.breakdown-item span:first-child { display: flex; align-items: center; gap: 8px; }
.breakdown-item strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.swatch { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.short-list { display: grid; gap: 10px; }
.short-list div { display: flex; justify-content: space-between; align-items: center; gap: 9px; color: var(--muted); font-size: .9rem; }
.short-list strong { color: var(--ink); }
.short-list div + div { padding-top: 9px; border-top: 1px solid #edf1ed; }
.text-link { color: #176749; font-size: .86rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; white-space: nowrap; }
th, td { padding: 8px 10px; border-bottom: 1px solid #ecf1ec; }
th { background: #f4f8f4; color: var(--muted); font-weight: 650; }
tbody th { background: white; color: var(--ink); }
td { font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
th.number, td.number { text-align: right; }
td.heat { background: var(--heat, #f3f6f3); text-align: right; }
td.pending { color: #65756c; }
.meter { display: inline-block; vertical-align: middle; width: clamp(30px, 7vw, 90px); height: 6px; margin-right: 7px; background: #eaf2e8; border-radius: 4px; overflow: hidden; }
.meter span { display: block; height: 100%; background: #61a785; border-radius: inherit; }
footer { font-size: .81rem; color: var(--muted); padding-top: 3px; }
#notification { position: fixed; right: 22px; bottom: 20px; max-width: calc(100vw - 44px); padding: 10px 14px; background: #1b4938; color: white; border-radius: 8px; z-index: 4; }
#notification:empty { display: none; }
@media (max-width: 1100px) { .sidebar { width: 185px; } .workspace-body { margin-left: 185px; } }
@media (min-width: 921px) {
  .stats:has(.stat:nth-child(2):last-child) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats:has(.stat:nth-child(3):last-child) { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 920px) { .stats { grid-template-columns: repeat(2,minmax(0,1fr)); } .main-grid, .lower-grid { grid-template-columns: 1fr; } }
@media (max-width: 690px) {
  .sidebar { position: static; width: auto; padding: 10px 12px 8px; }
  .brand { padding: 0 2px 9px; } .brand-mark { width: 33px; height: 33px; }
  .nav-label, .sidebar-footer { display: none; }
  .sidebar nav { flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .nav-domains, .sidebar nav .nav-reference { display: contents; }
  .nav-link { min-height: 36px; padding: 6px 9px; font-size: .86rem; white-space: nowrap; }
  .workspace-body { margin: 0; }
  .topbar { min-height: 49px; padding: 0 14px; }
  main { padding: 16px 13px; } .headline { margin-bottom: 12px; }
  .tools { position: relative; width: 100%; }
  .time-range { position: static; }
  .time-popover { left: 0; right: auto; }
  .metric-row summary { grid-template-columns: 1.4rem minmax(0, 1fr) 9px; gap: 3px 8px; }
  .metric-row summary::after { grid-column: 3; grid-row: 1; }
  .metric-reading { grid-column: 2; text-align: left; }
  .metric-details { padding-left: 43px; }
  .stats { gap: 8px; } .stat { padding-inline: 10px; min-height: 105px; } .panel { padding: 12px; }
  .chart-box { height: 185px; } .stat-note { margin-left: 3px; }
  .calculation-grid { grid-template-columns: 1fr; }
}
