:root {
  --ink: #18211d;
  --muted: #68736d;
  --paper: #f4f5ef;
  --surface: rgba(255, 255, 255, 0.92);
  --line: #dfe4dc;
  --green: #176b4d;
  --green-soft: #e4f2e9;
  --red: #b93636;
  --red-soft: #fae7e4;
  --amber: #9a6720;
  --shadow: 0 18px 50px rgba(37, 52, 44, 0.08);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 8% 0%, rgba(210, 231, 217, .72), transparent 30%), radial-gradient(circle at 94% 12%, rgba(245, 218, 198, .48), transparent 28%), var(--paper);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}
.dashboard-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 32px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 10px 2px 32px; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 13px; font-weight: 800; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(38px, 5vw, 62px); line-height: 1.06; letter-spacing: -.04em; }
.hero-copy { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.sync-pill { display: flex; align-items: center; gap: 12px; min-width: 250px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 24px rgba(30,47,39,.06); }
.sync-dot { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.sync-pill.is-offline .sync-dot { background: var(--amber); box-shadow: 0 0 0 5px #f4ead6; }
.sync-pill strong, .sync-pill small { display: block; }
.sync-pill strong { font-size: 14px; }
.sync-pill small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.notice { margin-bottom: 18px; padding: 13px 16px; border: 1px solid #ead8af; border-radius: 12px; color: #76511c; background: #fff7e8; font-size: 14px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 42px; }
.summary-card { padding: 21px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.summary-card span, .summary-card small { display: block; color: var(--muted); }
.summary-card span { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.summary-card strong { font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.summary-card small { margin-top: 8px; font-size: 12px; }
.summary-card-danger { border-color: #e9b9b2; background: linear-gradient(145deg,#fff,var(--red-soft)); }
.summary-card-danger strong { color: var(--red); }
.summary-card-safe { border-color: #bddbc7; background: linear-gradient(145deg,#fff,var(--green-soft)); }
.summary-card-safe strong { color: var(--green); }
.stock-section { padding: 28px; border: 1px solid rgba(211,219,211,.86); border-radius: 28px; background: rgba(255,255,255,.62); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { margin-bottom: 0; font-size: 28px; letter-spacing: -.02em; }
.section-heading > p { max-width: 380px; margin-bottom: 3px; color: var(--muted); font-size: 13px; text-align: right; }
.stock-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.stock-card { overflow: hidden; padding: 22px; border: 1px solid var(--line); border-top-width: 5px; border-radius: 20px; background: #fff; }
.stock-card.is-short { border-top-color: var(--red); }
.stock-card.is-safe { border-top-color: var(--green); }
.stock-card-top { display: flex; justify-content: space-between; gap: 12px; }
.spec-label { color: var(--muted); font-size: 12px; }
.stock-card h3 { margin: 5px 0 0; font-size: 25px; letter-spacing: -.03em; }
.status-badge { align-self: flex-start; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.is-short .status-badge { color: var(--red); background: var(--red-soft); }
.is-safe .status-badge { color: var(--green); background: var(--green-soft); }
.primary-value { margin: 24px 0 18px; padding: 18px; border-radius: 14px; background: #f5f7f3; }
.primary-value span { display: block; color: var(--muted); font-size: 12px; }
.primary-value strong { margin-right: 5px; font-size: 38px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.primary-value small { color: var(--muted); }
.is-short .primary-value strong { color: var(--red); }
.is-safe .primary-value strong { color: var(--green); }
.metric-list { margin: 0; }
.metric-list div { display: flex; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid #edf0eb; }
.metric-list dt { color: var(--muted); font-size: 13px; }
.metric-list dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.metric-list .projected { border-bottom: 0; }
.shortage-callout { display: flex; align-items: baseline; gap: 5px; margin-top: 16px; padding: 13px 15px; border-radius: 12px; }
.is-short .shortage-callout { color: var(--red); background: var(--red-soft); }
.is-safe .shortage-callout { color: var(--green); background: var(--green-soft); }
.shortage-callout span { margin-right: auto; font-size: 13px; font-weight: 700; }
.shortage-callout strong { font-size: 22px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 4px 0; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .hero { align-items: flex-start; flex-direction: column; } .sync-pill { width: 100%; } .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .stock-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .dashboard-shell { width: min(100% - 24px,1180px); padding-top: 24px; } h1 { font-size: 38px; } .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .summary-card { padding: 17px 15px; } .summary-card strong { font-size: 27px; } .stock-section { padding: 18px; border-radius: 20px; } .section-heading { align-items: flex-start; flex-direction: column; } .section-heading > p { text-align: left; } footer { flex-direction: column; } }
