:root {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #111c34;
  background: #eef4fb;
  color-scheme: light;
  --accent: #3158e8;
  --expense: #b2c1fa;
  --muted: #586882;
  --line: #d8e2ef;
  --surface: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, select, input { font: inherit; }
:focus-visible { outline: 3px solid #5268e9; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell { width: min(1184px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: var(--surface); border-bottom: 1px solid #e3eaf4; }
.topbar-inner { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 750; text-decoration: none; }
.brand-mark { display: flex; align-items: end; justify-content: center; gap: 3px; background: var(--accent); width: 33px; height: 33px; padding-bottom: 8px; border-radius: 8px; }
.brand-mark i { display: block; width: 3px; height: 7px; border-radius: 2px; background: white; }
.brand-mark i:nth-child(2) { height: 12px; }
.brand-mark i:nth-child(3) { height: 17px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.badge { color: #3b3785; background: #eeebff; border-radius: 6px; padding: 5px 9px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.quiet-button { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; color: #34467a; font-size: 14px; white-space: nowrap; }
.quiet-button:hover { background: #eef2ff; }
.dashboard, .editor { padding-block: 34px 25px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(31px, 4vw, 48px); line-height: 1.15; letter-spacing: -.035em; font-weight: 780; }
.intro p { margin-top: 9px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.select-wrap { position: relative; }
.select-wrap::after { position: absolute; content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); right: 17px; top: 16px; pointer-events: none; }
select, input { background: white; border: 1px solid #bdcadd; border-radius: 8px; color: #182842; min-height: 43px; padding: 9px 12px; }
select { appearance: none; min-width: 172px; padding-right: 37px; cursor: pointer; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 1px 2px #1a387306; min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric { display: flex; gap: 16px; align-items: flex-start; padding: 19px 20px; }
.metric-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 9px; font: 700 22px/1 system-ui, sans-serif; }
.room-icon { background: #e7efff; color: #224ac9; font-size: 28px; }
.occupied-icon { background: #e2f6ea; color: #166846; }
.net-icon { background: #fff1df; color: #9b5308; }
.metric h2 { font-size: 15px; font-weight: 650; }
.metric-value { font-size: clamp(25px, 3vw, 36px); font-weight: 780; line-height: 1.22; font-variant-numeric: tabular-nums; letter-spacing: -.035em; margin-block: 4px; overflow-wrap: anywhere; }
.metric-value small { font-size: .57em; letter-spacing: 0; }
.metric-note { color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.panel { padding: 19px 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.panel h2 { font-size: 20px; letter-spacing: -.02em; font-weight: 750; }
.legend, .legend span, .occupancy-breakdown dt { display: flex; align-items: center; gap: 7px; }
.legend { gap: 16px; color: #34445e; font-size: 14px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.income { background: var(--accent); }
.expense { background: var(--expense); }
.vacant { background: #dfe7f3; }
.axis-caption, .table-unit { font-size: 13px; color: var(--muted); }
.chart { --plot-height: 174px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 6px; margin-top: 8px; }
.axis { display: flex; flex-direction: column; justify-content: space-between; height: calc(var(--plot-height) + 12px); margin-top: -7px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-grid { position: relative; display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: 5px; }
.bar-grid::before { content: ""; position: absolute; inset: 0 0 auto; height: var(--plot-height); border-bottom: 1px solid #dbe4f0; background: repeating-linear-gradient(to bottom, #e3eaf4 0 1px, transparent 1px 25%); pointer-events: none; }
.bar-group { color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 0 4px 6px; position: relative; cursor: pointer; min-width: 0; }
.bar-group:hover { background: #eff3ff; }
.bar-group[aria-pressed="true"] { background: #eaf0ff; color: #2344b6; font-weight: 700; }
.bar-pair { display: flex; height: var(--plot-height); align-items: end; justify-content: center; gap: 4px; }
.bar { display: block; width: 27%; max-width: 28px; height: var(--height); border-radius: 4px 4px 0 0; }
.bar-label { display: block; margin-top: 9px; font-size: 13px; white-space: nowrap; line-height: 1.5; }
.ring { --fill: 0%; position: relative; display: grid; place-items: center; width: min(148px, 100%); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--accent) var(--fill), #e4eafa 0); margin: 1px auto 13px; }
.ring > div { display: grid; place-content: center; text-align: center; background: white; width: 78%; height: 78%; border-radius: 50%; }
.ring strong { font-size: 29px; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.ring span { font-size: 13px; color: var(--muted); margin-top: 2px; }
.occupancy-breakdown { display: grid; gap: 7px; margin: 0; }
.occupancy-breakdown div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.occupancy-breakdown dt { color: #34445e; }
.occupancy-breakdown dd { margin: 0; font-weight: 650; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 9px 12px; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead { background: #f0f4fa; color: #425470; }
thead th { font-weight: 650; }
tbody tr + tr { border-top: 1px solid #edf1f7; }
tbody tr[data-selected] { background: #edf2ff; }
tbody td:last-child { color: #2344b6; font-weight: 700; }
.data-note { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 16px; }
.editor { max-width: 760px; }
.entry-form { padding: 25px; }
.entry-hint { color: var(--muted); line-height: 1.55; margin-bottom: 20px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fields label { display: grid; gap: 7px; font-weight: 620; font-size: 15px; min-width: 0; }
.fields input { width: 100%; min-width: 0; font-weight: 450; }
.period-field { grid-column: 1 / -1; }
.period-field input { max-width: 245px; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.primary { min-height: 43px; cursor: pointer; border: 0; color: white; background: var(--accent); border-radius: 8px; padding: 9px 19px; font-weight: 650; }
.primary:hover { background: #2445c9; }
#entry-status { font-size: 14px; color: #18613b; }
#entry-status[data-error] { color: #a02827; }
@media (max-width: 800px) {
  .shell { width: calc(100% - 36px); }
  .metric { padding: 15px 13px; gap: 9px; }
  .metric-icon { width: 34px; height: 34px; flex-basis: 34px; font-size: 18px; }
  .panel { padding-inline: 16px; }
}
@media (max-width: 620px) {
  .dashboard, .editor { padding-top: 25px; }
  .topbar-inner { min-height: 58px; }
  .brand { font-size: 15px; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; padding-bottom: 6px; }
  .top-actions { gap: 6px; }
  .badge { font-size: 12px; padding-inline: 6px; }
  .quiet-button { font-size: 13px; padding-inline: 7px; }
  .intro { align-items: start; flex-direction: column; margin-bottom: 16px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric:last-child { grid-column: 1 / -1; }
  .metric { padding: 12px 10px; gap: 8px; }
  .metric h2 { font-size: 14px; }
  .metric-value { font-size: 26px; }
  .metric-note { font-size: 12px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .chart { --plot-height: 148px; grid-template-columns: 42px minmax(0, 1fr); gap: 5px; }
  .bar-grid { gap: 2px; }
  .bar-group { padding-inline: 1px; }
  .bar-pair { gap: 3px; }
  .bar-label { font-size: 11px; }
  th, td { padding: 9px 5px; font-size: 12px; }
  .fields { gap: 13px; }
}
button.quiet-button { background: white; cursor: pointer; }
button.quiet-button:hover { background: #eef2ff; }
.primary:disabled { opacity: .62; cursor: wait; }
.access { display: grid; place-items: center; min-height: min(620px, calc(100svh - 64px)); padding-block: 30px; }
.access-card { width: min(100%, 430px); display: grid; gap: 11px; padding: clamp(22px, 5vw, 34px); }
.access-mark { margin-bottom: 3px; }
.access-card h1 { font-size: 34px; }
.access-card p { color: var(--muted); line-height: 1.55; margin-bottom: 7px; }
.access-card label { font-size: 14px; font-weight: 650; }
.access-card input { width: 100%; }
.access-card .primary { margin-top: 4px; }
.access-card .login-error, .data-error { color: #a02827; }
.data-error { margin-bottom: 12px; }
@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .brand { font-size: 14px; }
  .top-actions { gap: 4px; }
  .quiet-button { padding-inline: 5px; }
  .metric-icon { display: none; }
  .panel { padding-inline: 11px; }
}
.table-wrap { max-width: 100%; overflow-x: auto; }
tbody th { font-weight: 650; }
.axis { white-space: nowrap; }
@media (max-width: 360px) {
  .topbar-inner { flex-wrap: wrap; padding-block: 8px; row-gap: 6px; }
  .brand { white-space: nowrap; }
}
