:root {
  color-scheme: light;
  --ink: #152128;
  --muted: #65737c;
  --line: #dce3e5;
  --surface: #ffffff;
  --canvas: #f3f6f5;
  --teal: #087f73;
  --teal-dark: #075e57;
  --teal-soft: #e3f3ef;
  --orange: #e97525;
  --danger: #b73535;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.access-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #0b2627; }
.access-panel { width: min(420px, 100%); background: var(--surface); border: 1px solid #2f5555; padding: 36px; box-shadow: 0 24px 60px rgba(0, 0, 0, .24); }
.brand-mark { width: 42px; height: 42px; display: inline-grid; place-items: center; color: #fff; background: var(--teal); font-size: 13px; font-weight: 800; }
.eyebrow { margin: 18px 0 6px; color: var(--teal); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.access-panel h1 { margin: 0; font-size: 30px; }
.access-panel > p:not(.eyebrow):not(.form-error) { color: var(--muted); line-height: 1.7; }
.access-panel label { display: grid; gap: 8px; margin: 26px 0 14px; font-size: 13px; font-weight: 700; }
.access-panel input { width: 100%; height: 44px; border: 1px solid #aab7bb; padding: 0 12px; outline: none; }
.access-panel input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 115, .12); }
.access-panel button { width: 100%; height: 44px; border: 0; background: var(--teal); color: #fff; font-weight: 800; }
.access-panel button:hover { background: var(--teal-dark); }
.form-error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-size: 12px; }
.topbar { height: 68px; padding: 0 max(24px, calc((100vw - 1320px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #10292b; color: #fff; border-bottom: 3px solid var(--orange); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand div { display: grid; gap: 2px; }
.brand strong { font-size: 15px; }
.brand small { color: #a9c2c1; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.connection { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.connection i { width: 8px; height: 8px; border-radius: 50%; background: #9eaaae; }
.connection i.online { background: #4bc3a8; box-shadow: 0 0 0 4px rgba(75, 195, 168, .15); }
.connection i.degraded { background: var(--orange); }
.text-link { color: #c9dbda; font-size: 12px; text-decoration: none; }
.text-link:hover { color: #fff; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #527071; background: transparent; color: #fff; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.loading svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
main { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 38px 0 52px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 24px; }
.page-heading .eyebrow { margin-top: 0; }
.page-heading h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); }
.page-heading p { margin: 8px 0 0; color: var(--muted); }
.as-of { display: grid; justify-items: end; gap: 4px; text-align: right; }
.as-of span, .as-of small { color: var(--muted); font-size: 12px; }
.as-of strong { font-size: 14px; }
.freshness-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(220px, 1.25fr); background: #e7eeec; border-top: 1px solid #cbd7d5; border-bottom: 1px solid #cbd7d5; }
.freshness-band > div { padding: 15px 18px; display: grid; gap: 3px; border-right: 1px solid #cbd7d5; }
.freshness-band span, .freshness-band small { color: var(--muted); font-size: 11px; }
.freshness-band strong { font-size: 13px; }
.freshness-band strong.stale { color: var(--danger); }
.freshness-band p { margin: 0; padding: 15px 18px; align-self: center; color: var(--muted); font-size: 12px; line-height: 1.5; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 28px 0; border: 1px solid var(--line); background: var(--surface); }
.metrics article { min-height: 126px; padding: 22px; display: grid; align-content: space-between; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metrics article.accent { background: var(--teal); color: #fff; }
.metrics span { color: var(--muted); font-size: 12px; font-weight: 700; }
.metrics .accent span, .metrics .accent small { color: #cce9e5; }
.metrics strong { font-size: clamp(25px, 3vw, 38px); }
.metrics small { color: var(--muted); font-size: 11px; }
.workspace { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); }
.panel header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel header .eyebrow { margin: 0 0 3px; }
.panel h2 { margin: 0; font-size: 17px; }
.permission-pill, .privacy-pill { padding: 5px 8px; color: var(--teal-dark); background: var(--teal-soft); font-size: 10px; font-weight: 800; }
.status-list { padding: 8px 20px 14px; }
.status-list > div { min-height: 43px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1f1; }
.status-list > div:last-child { border-bottom: 0; }
.status-list span { color: var(--muted); font-size: 12px; }
.status-list strong { font-size: 14px; }
.latest-order dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.latest-order dl div { padding: 18px 20px; border-right: 1px solid #edf1f1; border-bottom: 1px solid #edf1f1; }
.latest-order dl div:nth-child(2n) { border-right: 0; }
.latest-order dl div:nth-last-child(-n+2) { border-bottom: 0; }
.latest-order dt { margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.latest-order dd { margin: 0; font-weight: 800; }
.notice { margin-top: 18px; display: flex; gap: 18px; padding: 17px 20px; border-left: 3px solid var(--orange); background: #fff7ef; }
.notice strong { flex: 0 0 auto; font-size: 12px; }
.notice p { margin: 0; color: #6d594b; font-size: 12px; line-height: 1.6; }
@media (max-width: 960px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics article { border-bottom: 1px solid var(--line); }
  .metrics article:nth-child(2n) { border-right: 0; }
  .metrics article:last-child { grid-column: 1 / -1; }
  .workspace { grid-template-columns: 1fr 1fr; }
  .latest-order { grid-column: 1 / -1; }
  .freshness-band { grid-template-columns: repeat(3, 1fr); }
  .freshness-band p { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .brand small, .text-link { display: none; }
  main { width: calc(100% - 28px); padding-top: 24px; }
  .page-heading { align-items: start; flex-direction: column; }
  .as-of { justify-items: start; text-align: left; }
  .freshness-band, .metrics, .workspace { grid-template-columns: 1fr; }
  .freshness-band > div { border-right: 0; border-bottom: 1px solid #cbd7d5; }
  .metrics article, .metrics article:nth-child(2n) { border-right: 0; }
  .metrics article:last-child, .latest-order { grid-column: auto; }
}
