:root {
  color-scheme:light; --ink:#162922; --deep:#132b27; --muted:#53665e; --accent:#16654c;
  --accent-dark:#114a39; --bg:#f3f6f2; --line:#dce5de; --white:#fff;
  font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif; line-height:1.55;
}
* {box-sizing:border-box}
[hidden] {display:none!important}
body {margin:0;background:var(--bg);color:var(--ink);font-size:1rem}
a {color:var(--accent);text-underline-offset:.18em}
h1,h2,p {margin:0}
h1 {font-size:clamp(1.85rem,3.4vw,2.75rem);line-height:1.2;letter-spacing:-.025em}
h2 {font-size:1.16rem;line-height:1.4}
small,.hint {font-size:.875rem;color:var(--muted)}
button,input,select {font:inherit}
button {cursor:pointer}
button:disabled {opacity:.55;cursor:wait}
:focus-visible {outline:3px solid #44977d;outline-offset:3px}
.skip {position:fixed;left:1rem;top:1rem;transform:translateY(-200%);background:white;padding:.55rem;z-index:4}
.skip:focus {transform:none}
.topbar {background:var(--deep);color:#fff}
.top-inner {max-width:82rem;margin:auto;padding:1rem clamp(1rem,4vw,3rem);display:flex;align-items:center;gap:1.5rem;flex-wrap:wrap}
.brand,.auth-brand {display:flex;align-items:center;gap:.68rem;text-decoration:none;color:inherit;font-size:1.16rem;font-weight:750;line-height:1.18;letter-spacing:-.015em}
.brand-mark {width:2.3rem;height:2.3rem;border-radius:.58rem;background:#bdeccd;color:#113b2a;display:grid;place-items:center;font-size:1.37rem;font-weight:800}
.brand small,.identity small {display:block;font-size:.875rem;color:#c2d6cb;font-weight:400;margin-top:.2rem;letter-spacing:0}
.topbar nav {display:flex;gap:.22rem;flex-wrap:wrap}
.topbar nav a {display:block;padding:.48rem .68rem;border-radius:.45rem;color:#e1eee7;text-decoration:none;white-space:nowrap;font-size:.94rem}
.topbar nav a:hover,.topbar nav a[aria-current] {background:#2d4b40;color:#fff}
.identity {display:flex;align-items:center;gap:.6rem;margin-left:auto;font-size:.875rem}
.identity .quiet {color:#e2f3e9;border-color:#436556}
.container {max-width:82rem;margin:auto;padding:2.55rem clamp(1rem,4vw,3rem) 3rem;display:grid;gap:1.25rem}
.heading {display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.heading p,.panel-head p,.auth-card p {margin-top:.45rem;color:var(--muted)}
.primary,.secondary,.quiet {display:inline-flex;align-items:center;justify-content:center;min-height:2.65rem;border-radius:.55rem;padding:.47rem .92rem;border:1px solid transparent;text-decoration:none;font-weight:650;line-height:1.35}
.primary {background:var(--accent);color:white}
.primary:hover {background:var(--accent-dark)}
.secondary {color:var(--accent);background:var(--white);border-color:#b9cfc2}
.quiet {background:transparent;color:var(--accent);border-color:var(--line);font-size:.875rem}
.quiet:hover,.secondary:hover {background:#e9f2eb;color:var(--accent-dark)}
.panel {background:var(--white);border:1px solid var(--line);border-radius:.85rem;overflow:hidden;min-width:0}
.panel-head {padding:1.05rem 1.2rem;border-bottom:1px solid var(--line)}
.panel-head p {font-size:.875rem}
.panel-body {padding:1.1rem 1.2rem}
.panel-body > h2 {margin-bottom:.4rem}
.panel-body label {max-width:100%}
.empty {padding:1.55rem 1.2rem;color:var(--muted)}
form {display:grid;gap:.9rem;align-items:start}
form button {justify-self:start}
label {display:grid;gap:.36rem;font-weight:600;min-width:0}
label > span {font-size:.92rem}
input,select {width:100%;height:2.75rem;border:1px solid #bfcfc4;border-radius:.5rem;padding:.45rem .65rem;color:var(--ink);background:#fff;min-width:0}
select {appearance:none;padding-right:1.9rem;background:linear-gradient(135deg,transparent 50%,#4f665b 50%) calc(100% - .93rem) 52%/.36rem .36rem no-repeat,linear-gradient(45deg,#4f665b 50%,transparent 50%) calc(100% - 1.26rem) 52%/.36rem .36rem no-repeat,#fff}
.filters {display:flex;flex-wrap:wrap;gap:.7rem;align-items:end}
.filters label {width:min(100%,12.5rem)}
.form-grid,.base-edit {display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr))}
.form-actions {display:flex;gap:.55rem;align-items:end;align-self:end}
.inline {display:flex;align-items:end;gap:.48rem}
.inline label {flex:1}
.entry-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.base-area {display:grid;gap:.65rem}
.base-picker {display:grid;grid-template-columns:repeat(4,1fr);gap:.65rem}
.base-picker button {background:white;color:var(--deep);border:1px solid var(--line);border-radius:.75rem;padding:.83rem .6rem;text-align:center;font-weight:700}
.base-picker button[aria-pressed=true] {background:var(--deep);color:#fff;border-color:var(--deep)}
.admin-entry {display:flex;justify-content:space-between;align-items:center;gap:1rem;text-decoration:none;color:var(--deep);border:1px solid #bfdbca;background:#e3f1e6;padding:1rem 1.2rem;border-radius:.7rem}
.admin-entry strong,.admin-entry small {display:block}
.admin-entry-label {font-weight:650;font-size:.9rem}
.metric-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));gap:.65rem}
.metric {background:white;border:1px solid var(--line);padding:.95rem;border-radius:.65rem;min-width:0}
.metric > span,.metric > small {display:block;color:var(--muted)}
.metric strong {font-size:clamp(1.25rem,2.5vw,2rem);font-weight:760;line-height:1.4;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.table-wrap {overflow-x:auto}
table {border-collapse:collapse;width:100%;font-size:.91rem;min-width:34rem}
th,td {text-align:left;padding:.72rem 1rem;border-bottom:1px solid var(--line)}
th {background:#f6f9f6;font-weight:650}
tbody tr:last-child td {border-bottom:0}
.cell-sub {font-size:.875rem;color:var(--muted);display:block;margin-top:.18rem}
.status {font-size:.875rem;background:#eef0ee;padding:.15rem .45rem;border-radius:.4rem}
.status.on {background:#e4f1e8;color:#245c3d}
.chart {padding:1rem 1.2rem;display:grid;gap:.45rem;font-variant-numeric:tabular-nums;font-size:.9rem}
.bar-row {display:grid;grid-template-columns:3.6rem 1fr minmax(2.8rem,auto);align-items:center;gap:.7rem}
.bar-row meter {width:100%;height:1.05rem}
.bar-row meter::-webkit-meter-bar {background:#edf3ed;border:0}
.bar-row meter::-webkit-meter-optimum-value {background:#337d60}
.bar-row meter::-moz-meter-bar {background:#337d60}
.auth-layout {min-height:100svh;display:grid;place-items:center;padding:1.25rem;background:radial-gradient(ellipse at 15% 20%,#dceee3,transparent 65%),var(--bg)}
.auth-card {width:min(100%,28rem);background:var(--white);border:1px solid var(--line);border-radius:1.05rem;padding:clamp(1.25rem,5vw,2.2rem);box-shadow:0 16px 52px #1a392913}
.auth-brand {margin-bottom:1.45rem}
.auth-card h1 {font-size:clamp(1.65rem,6vw,2.25rem)}
.auth-card form {margin-top:1.4rem}
.auth-card form > .primary {width:100%}
.auth-back {margin-top:.9rem}
.totp {background:#eff6ef;border:1px solid var(--line);border-radius:.55rem;padding:.75rem}
.totp code {display:block;overflow-wrap:anywhere;margin:.55rem 0}
.totp a {margin-left:.45rem;font-size:.875rem}
.invite-result .panel-body {display:grid;gap:.6rem}
.invite-result button {justify-self:start}
.finance-reference {background:#f7faf7}
.finance-reference strong {margin-left:.6rem}
.toast {position:fixed;bottom:1rem;right:1rem;max-width:min(28rem,calc(100% - 2rem));z-index:3;color:white;background:#164936;padding:.72rem 1rem;border-radius:.55rem;box-shadow:0 4px 22px #102a2240}
.toast.error {background:#7b2b31}
.boot {padding:2rem}
.topbar-compact .top-inner {padding-block:.72rem;gap:1rem}
.topbar-compact .brand {font-size:1.03rem}
.topbar-compact .brand-mark {width:2rem;height:2rem;font-size:1.15rem}
.topbar-compact small {font-size:.74rem}
.topbar-compact nav a {font-size:.83rem;padding:.43rem .6rem}
.topbar-compact .quiet {font-size:.78rem;min-height:2.15rem}
.entry-workspace {max-width:70rem;gap:.8rem;padding-top:1.65rem;font-size:.86rem}
.entry-workspace h1 {font-size:clamp(1.45rem,2.6vw,2rem);font-weight:690}
.entry-workspace h2 {font-size:1rem;font-weight:680}
.entry-workspace :is(.heading p,.hint) {font-size:.78rem}
.entry-workspace .heading p {margin-top:.25rem}
.entry-workspace :is(.primary,.secondary) {min-height:2.3rem;font-size:.82rem;padding:.42rem .77rem}
.entry-selection {display:grid;gap:.56rem;padding:.75rem .9rem}
.entry-base-line {display:flex;align-items:center;gap:.55rem .75rem;flex-wrap:wrap}
.entry-base-line h2 {white-space:nowrap}
.entry-base-line .base-picker {gap:.3rem}
.entry-base-line .base-picker button {padding:.34rem .67rem;border-radius:.42rem;font-size:.83rem;white-space:nowrap}
.entry-extra-bases summary {font-size:.8rem;color:var(--muted);cursor:pointer}
.entry-extra-bases .base-picker {display:flex;flex-wrap:wrap;margin-top:.35rem}
.entry-account-line {display:flex;align-items:center;gap:.55rem 1rem;flex-wrap:wrap}
.entry-account-line label {display:flex;align-items:center;gap:.75rem}
.entry-account-line label > span {white-space:nowrap}
.entry-account-line select {width:min(21rem,58vw)}
.entry-handle {white-space:nowrap}
.entry-workspace :is(input,select) {height:2.34rem;font-size:.86rem;padding-block:.31rem}
.entry-workspace label {gap:.34rem}
.entry-workspace label > span {font-size:.8rem}
.entry-recent {display:flex;align-items:baseline;gap:.32rem .72rem;padding-top:.15rem}
.entry-recent > span {white-space:nowrap;color:var(--muted);font-size:.78rem}
.entry-tags {display:flex;flex-wrap:wrap;gap:.28rem .4rem;min-width:0}
.entry-tag {max-width:100%;overflow-wrap:anywhere;border:1px solid #d5e5db;border-radius:1rem;background:#f1f7f3;color:#275441;padding:.23rem .61rem;font-size:.78rem;line-height:1.35}
.entry-tag:is(:hover,[aria-pressed=true]) {background:#deeee3;border-color:#9bbca8;color:var(--accent-dark)}
.entry-workspace .entry-grid {grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:.8rem}
.entry-workspace .panel-body {padding:.7rem .9rem}
.entry-workspace .entry-panel-head {display:flex;align-items:center;justify-content:space-between;gap:.34rem .7rem;flex-wrap:wrap;padding:.64rem .9rem;background:#f7faf7}
.entry-panel-head time {color:var(--muted);font-size:.76rem;font-variant-numeric:tabular-nums}
.entry-workspace .entry-realtime {grid-template-columns:repeat(2,minmax(0,1fr))}
.entry-workspace form {gap:.58rem .75rem}
.entry-form-actions {grid-column:1/-1}
.entry-maintenance summary {padding:.62rem .9rem;color:var(--accent);font-size:.81rem;font-weight:650;cursor:pointer}
.entry-maintenance[open] summary {border-bottom:1px solid var(--line)}
.dashboard {gap:1rem;padding-top:1.95rem;font-size:.88rem}
.dashboard h1 {font-size:clamp(1.58rem,2.5vw,2.18rem);font-weight:690}
.dashboard h2 {font-size:1.02rem;font-weight:680}
.dashboard .heading p,.dashboard .panel-head p,.dashboard small {font-size:.79rem}
.dashboard .primary {font-size:.82rem;min-height:2.36rem}
.dashboard .admin-entry {padding:.78rem 1rem}
.dashboard .admin-entry-label {font-size:.81rem}
.dashboard .metric-grid {grid-template-columns:repeat(4,minmax(0,1fr))}
.dashboard .metric {padding:.72rem .85rem}
.dashboard .metric strong {font-size:clamp(1.12rem,1.75vw,1.62rem);font-weight:720}
.dashboard .filters label {gap:.26rem;width:min(100%,10.45rem)}
.dashboard .filters label > span {font-size:.8rem}
.dashboard .filters input,.dashboard .filters select {height:2.36rem;font-size:.84rem}
.dashboard .panel-head {padding:.78rem 1rem}
.dashboard .chart {padding:.72rem 1rem;gap:.34rem;font-size:.79rem}
.dashboard .bar-row meter {height:.82rem}
.room-reports-heading p {margin-top:.21rem}
.room-scroll-hint {display:none}
.room-report-scroll:focus-visible {outline-offset:-3px}
.room-report-table {border-collapse:separate;border-spacing:0;min-width:61.5rem;font-size:.8rem;line-height:1.35}
.room-report-table th,.room-report-table td {padding:.53rem .47rem}
.room-report-table thead th {font-size:.74rem;color:#486258;white-space:nowrap}
.room-report-table thead tr:first-child th {background:#eaf2ed;color:#2a5143;font-size:.78rem}
.room-report-table thead th small {font-size:.68rem;font-weight:500}
.room-report-table [scope="colgroup"] {text-align:center;border-inline-start:1px solid var(--line)}
.room-report-table [scope="row"] {font-weight:400}
.room-report-table tr {--room-row:#fff}
.room-report-table tbody tr:nth-child(even) {--room-row:#f7faf8}
.room-report-table tbody tr:is(:hover,:focus-within) {--room-row:#eaf4ee}
.room-report-table tbody :is(td,th) {background:var(--room-row)}
.room-report-table tbody tr:last-child th {border-bottom:0}
.room-report-table .room-name {width:12rem;min-width:10.5rem;padding-inline:.85rem .63rem;position:sticky;left:0;z-index:1;border-right:1px solid var(--line)}
.room-name a {font-weight:680;color:var(--deep);text-decoration:none;overflow-wrap:anywhere}
.room-name a:hover,.room-name a:focus-visible {color:var(--accent);text-decoration:underline}
.room-name span {display:block;margin-top:.14rem;color:var(--muted);font-size:.71rem;overflow-wrap:anywhere}
.room-type {text-align:center;white-space:nowrap}
.room-tag {display:inline-block;border-radius:.28rem;padding:.12rem .34rem;font-size:.71rem;font-weight:640}
.room-tag-direct {color:#265f4c;background:#e0efe6}
.room-tag-managed {color:#3a5279;background:#e7eef9}
.room-tag-other {color:#575e59;background:#edf0ee}
.room-type small {display:block;margin-top:.15rem;font-size:.7rem}
.room-number {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.room-report-table .room-number:last-child {padding-right:.85rem}
.room-missing {color:#6f8178}
.room-profit {font-weight:670}
.profit-positive {color:#16654c}
.profit-negative {color:#a33743}
.quote-status {display:flex;align-items:baseline;flex-wrap:wrap;gap:.38rem .72rem;padding:.66rem .85rem;border:1px solid #e8dcb8;border-radius:.62rem;background:#fbf7eb;color:#625334;font-size:.84rem}
.quote-status strong {color:#654817}
.quote-form {display:grid;grid-template-columns:1fr 1fr 1.5fr auto;align-items:end}
.quote-summary .panel-head {border-bottom:0}
.quote-summary-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:0 1.2rem 1.1rem;gap:.65rem}
.quote-summary-grid > div {display:grid;gap:.12rem;background:#f1f7f3;border:1px solid #e0ebe3;padding:.7rem .82rem;border-radius:.5rem}
.quote-summary-grid span,.quote-comparison-head p {font-size:.81rem;color:var(--muted)}
.quote-summary-grid strong {font-size:clamp(1rem,2vw,1.48rem);font-variant-numeric:tabular-nums;line-height:1.3}
.quote-models {display:flex;flex-wrap:wrap;gap:.5rem;padding:1rem 1.2rem}
.quote-comparison {display:grid;gap:.65rem}
.quote-comparison-head p {margin-top:.25rem}
.quote-region-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.65rem}
.quote-region h3 {margin:0;padding:.64rem .8rem;background:#eaf2ed;color:#2a5143;font-size:.91rem;border-bottom:1px solid var(--line)}
.quote-region dl {margin:0;padding:0 .75rem}
.quote-region dl > div {display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .08rem;border-bottom:1px solid #e8eee9;font-size:.85rem}
.quote-region dl > div:last-child {border-bottom:0}
.quote-region dd {margin:0;text-align:right;font-variant-numeric:tabular-nums}
.quote-region dd small {display:block;font-size:.7rem}
.quote-region .quote-unavailable {color:var(--muted);font-size:.76rem;font-weight:400}
.quote-lowest {color:#16654c}
.quote-edit summary {padding:.85rem 1.2rem;font-weight:670;cursor:pointer}
.quote-edit[open] summary {border-bottom:1px solid var(--line)}
.quote-paste {grid-column:1/-1}
.quote-paste textarea {width:100%;resize:vertical;border:1px solid #bfcfc4;border-radius:.5rem;padding:.5rem .65rem;font:inherit}
.quote-paste .hint {margin-top:.3rem}
@media(max-width:1080px) {
  .room-scroll-hint {display:inline}
}
@media(max-width:760px) {
  .top-inner {gap:.65rem}
  .topbar nav {order:3;width:100%}
  .container {padding-top:1.6rem}
  .entry-grid {grid-template-columns:1fr}
  .base-picker {gap:.4rem}
  .base-picker button {padding:.66rem .22rem}
  .filters label {width:auto;flex:1 1 8.5rem}
  .filters button {margin-top:.4rem}
  .topbar-compact .top-inner {gap:.55rem}
  .entry-workspace {padding-top:1.1rem;gap:.65rem}
  .entry-workspace .entry-grid {grid-template-columns:1fr;gap:.65rem}
  .entry-base-line {gap:.4rem .62rem}
  .entry-base-line .base-picker button {padding:.32rem .48rem}
  .dashboard {padding-top:1.3rem;gap:.8rem}
  .dashboard .metric-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard .filters label {width:auto}
  .room-report-table .room-name {width:9rem;min-width:9rem;padding-inline:.62rem .42rem}
  .quote-form {grid-template-columns:repeat(2,minmax(0,1fr))}
  .quote-summary-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
