﻿:root {
  color-scheme: light;
  --ink: #15231f;
  --ink-2: #34443f;
  --muted: #73807c;
  --line: #dfe6e3;
  --line-strong: #c9d5d1;
  --canvas: #f3f6f5;
  --paper: #ffffff;
  --paper-2: #f8faf9;
  --green: #0f6b58;
  --green-2: #19856d;
  --green-soft: #e4f2ed;
  --navy: #183c52;
  --navy-soft: #e8eff4;
  --amber: #b96f0a;
  --amber-soft: #fff3dc;
  --red: #b34c4c;
  --red-soft: #fbe9e8;
  --blue: #356a9c;
  --violet: #7364a4;
  --shadow: 0 10px 28px rgba(29, 56, 48, .07);
  --sidebar: 228px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
button, select { font: inherit; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: var(--sidebar); flex-direction: column; padding: 25px 18px 18px; color: #e9f1ee; background: #112f29; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #9dc8bc; border-radius: 50%; font: 800 19px Georgia, serif; }
.brand strong, .brand small { display: block; letter-spacing: .12em; }
.brand strong { font: 700 17px Georgia, serif; }
.brand small { margin-top: 4px; color: #8db4aa; font-size: 8px; }
.nav { display: grid; gap: 6px; padding-top: 26px; }
.nav { scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-button { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; color: #a8c0ba; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.nav-button:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-button:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid #8fc2b4; outline-offset: 2px; }
.nav-button.is-active { color: #fff; background: #1a594b; box-shadow: inset 3px 0 #b7d9ce; }
.nav-icon { display: grid; width: 25px; height: 25px; place-items: center; color: #acd0c5; font-size: 13px; font-weight: 800; }
.nav-label { font-size: 13px; font-weight: 650; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 15px 10px 4px; border-top: 1px solid rgba(255,255,255,.1); }
.signal-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #70d5ad; box-shadow: 0 0 0 4px rgba(112,213,173,.12); }
.sidebar-foot b, .sidebar-foot small { display: block; }
.sidebar-foot b { font-size: 11px; }
.sidebar-foot small { margin-top: 3px; color: #82a69d; font-size: 9px; }

.shell { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 84px; padding: 15px clamp(22px, 3.5vw, 54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.breadcrumb { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.02em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.demo-badge { padding: 5px 8px; color: var(--amber); border: 1px solid #efc27e; border-radius: 4px; background: var(--amber-soft); font-size: 10px; font-weight: 800; }
.select-wrap { display: grid; gap: 3px; color: var(--muted); font-size: 9px; }
.select-wrap select { min-width: 148px; padding: 7px 28px 7px 9px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); font-size: 11px; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--paper); cursor: pointer; }
.icon-button:hover { color: var(--green); border-color: #84ad9f; background: var(--green-soft); }

main { max-width: 1540px; margin: 0 auto; padding: 26px clamp(20px, 3vw, 48px) 54px; }
footer { display: flex; justify-content: space-between; padding: 18px clamp(22px, 3.5vw, 54px) 24px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; }
.view { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: .25; transform: translateY(5px); } }

.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; margin-bottom: 20px; }
.page-intro h2 { margin-bottom: 7px; font-size: 25px; letter-spacing: -.02em; }
.page-intro p { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.updated { flex: 0 0 auto; padding-top: 7px; color: var(--muted); font-size: 10px; }
.section-label { margin: 0 0 7px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

.hero-grid { display: grid; grid-template-columns: 1.1fr repeat(4, minmax(0, .72fr)); gap: 10px; margin-bottom: 14px; }
.health-card, .metric-card, .panel { border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.health-card { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 18px; min-height: 142px; padding: 20px; border-top: 4px solid var(--green); border-radius: 7px; }
.score-ring { --score: 72; display: grid; width: 92px; height: 92px; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score) * 1%), #e5ebe8 0); }
.score-ring::before { content: ""; grid-area: 1/1; width: 70px; height: 70px; border-radius: 50%; background: #fff; }
.score-value { z-index: 1; grid-area: 1/1; text-align: center; }
.score-value strong, .score-value span { display: block; }
.score-value strong { font-size: 26px; }
.score-value span { color: var(--muted); font-size: 8px; }
.health-copy h3 { margin-bottom: 7px; font-size: 16px; }
.health-copy p { margin-bottom: 9px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.health-copy small { color: var(--amber); font-size: 9px; font-weight: 700; }
.metric-card { min-height: 142px; padding: 18px; border-radius: 7px; }
.metric-card .metric-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-card .metric-head > span:first-child { color: var(--muted); font-size: 10px; font-weight: 700; }
.metric-value { display: block; margin: 15px 0 8px; font-size: 22px; font-variant-numeric: tabular-nums; }
.metric-value small { margin-left: 3px; color: var(--muted); font-size: 10px; }
.metric-note { min-height: 30px; margin-bottom: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.delta { font-size: 9px; font-weight: 800; }
.positive { color: var(--green-2); }
.warning { color: var(--amber); }
.negative { color: var(--red); }
.neutral { color: var(--blue); }
.mini-track { height: 4px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: #e9eeec; }
.mini-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 14px; margin-bottom: 14px; }
.panel { min-width: 0; border-radius: 7px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 19px 14px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin-bottom: 4px; font-size: 15px; }
.panel-head p { margin-bottom: 0; color: var(--muted); font-size: 9px; }
.panel-body { padding: 18px 19px; }
.panel-action { color: var(--green); border: 0; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.owner-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; background: var(--paper-2); font-size: 8px; }
.owner-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green-2); }

.chart-wrap { position: relative; height: 244px; padding: 14px 6px 2px 44px; }
.chart-y { position: absolute; inset: 16px auto 22px 0; display: flex; flex-direction: column; justify-content: space-between; color: #91a09b; font-size: 8px; }
.chart-area { position: relative; height: 100%; border-bottom: 1px solid var(--line-strong); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), #eef2f0 25%); }
.chart-area svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-x { display: flex; justify-content: space-between; margin: 7px 0 0 42px; color: #91a09b; font-size: 8px; }
.chart-legend { display: flex; gap: 18px; margin-top: 13px; padding-left: 44px; color: var(--muted); font-size: 9px; }
.chart-legend i { display: inline-block; width: 16px; height: 2px; margin-right: 5px; vertical-align: middle; background: var(--green); }
.chart-legend .target i { height: 0; border-top: 2px dashed var(--blue); background: none; }
.today-line { stroke: #aab5b1; stroke-dasharray: 4 4; }

.alert-list { display: grid; gap: 9px; }
.alert-item { display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper-2); }
.alert-bar { width: 4px; height: 100%; min-height: 42px; border-radius: 3px; background: var(--amber); }
.alert-item.danger .alert-bar { background: var(--red); }
.alert-item.info .alert-bar { background: var(--blue); }
.alert-item h4 { margin: 0 0 4px; font-size: 11px; }
.alert-item p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.alert-time { color: #98a39f; font-size: 8px; white-space: nowrap; }

.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.task-progress { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: center; }
.donut { --pct: 78; display: grid; width: 104px; height: 104px; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--pct) * 1%), #e7ecea 0); }
.donut::before { content: ""; grid-area: 1/1; width: 74px; height: 74px; border-radius: 50%; background: #fff; }
.donut strong { z-index: 1; grid-area: 1/1; font-size: 20px; }
.task-bars { display: grid; gap: 11px; }
.task-bar-head { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.task-bar-head b { color: var(--ink); }
.bar { height: 6px; overflow: hidden; border-radius: 99px; background: #e7ecea; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.channel-bars { display: grid; gap: 13px; }
.channel-row { display: grid; grid-template-columns: 68px 1fr 52px; gap: 9px; align-items: center; font-size: 9px; }
.channel-row b { text-align: right; font-size: 10px; }
.channel-row .bar span { background: var(--blue); }
.channel-row.active .bar span { background: var(--green); }

.stage-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--line); box-shadow: var(--shadow); }
.stage { position: relative; padding: 16px; background: #fff; }
.stage.is-current { background: #eef7f4; }
.stage small, .stage strong, .stage span { display: block; }
.stage small { color: var(--muted); font-size: 8px; }
.stage strong { margin: 6px 0 5px; font-size: 11px; }
.stage span { color: var(--muted); font-size: 8px; }
.stage.is-current::after { content: "当前"; position: absolute; top: 11px; right: 10px; color: var(--green); font-size: 8px; font-weight: 800; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 9px; vertical-align: middle; }
th { color: var(--muted); background: #f5f8f7; font-size: 8px; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
td b { font-size: 10px; }
td small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-block; padding: 4px 7px; border-radius: 99px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.status-good { color: var(--green); background: var(--green-soft); }
.status-warn { color: var(--amber); background: var(--amber-soft); }
.status-danger { color: var(--red); background: var(--red-soft); }
.status-info { color: var(--blue); background: var(--navy-soft); }
.progress-cell { min-width: 100px; }
.progress-cell .bar { margin-top: 5px; }

.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.detail-card { padding: 17px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: var(--shadow); }
.detail-card > span { color: var(--muted); font-size: 9px; }
.detail-card strong { display: block; margin: 10px 0 5px; font-size: 20px; }
.detail-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }

.matrix { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.matrix-row { display: grid; grid-template-columns: 130px repeat(5, 1fr); gap: 1px; background: var(--line); }
.matrix-cell { min-height: 46px; padding: 11px; background: #fff; font-size: 9px; }
.matrix-cell.head { color: var(--muted); background: #f5f8f7; font-size: 8px; font-weight: 800; }
.matrix-cell.good { color: var(--green); background: #eef7f4; }
.matrix-cell.warn { color: var(--amber); background: #fff8eb; }
.matrix-cell.bad { color: var(--red); background: #fdf0ef; }

.empty-slot { display: grid; min-height: 170px; place-items: center; padding: 24px; color: var(--muted); border: 1px dashed #b9c7c2; border-radius: 6px; background: #f9fbfa; text-align: center; }
.empty-slot b { display: block; margin-bottom: 7px; color: var(--ink-2); font-size: 12px; }
.empty-slot span { font-size: 9px; line-height: 1.6; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 11px 15px; color: #fff; border-radius: 5px; background: #173f37; box-shadow: 0 10px 28px rgba(0,0,0,.2); font-size: 10px; animation: toast .2s ease-out; }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1350px) {
  :root { --sidebar: 190px; }
  .hero-grid { grid-template-columns: 1.15fr repeat(2, 1fr); }
  .health-card { grid-row: span 2; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .sidebar { position: static; width: auto; padding: 14px 16px; }
  .brand { padding: 0; border: 0; }
  .nav { display: flex; gap: 4px; overflow-x: auto; padding-top: 13px; }
  .nav-button { grid-template-columns: 1fr; min-width: max-content; min-height: 36px; padding: 0 12px; }
  .nav-icon, .sidebar-foot { display: none; }
  .shell { margin-left: 0; }
  .topbar { position: static; align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .hero-grid, .split-grid, .detail-grid { grid-template-columns: 1fr 1fr; }
  .health-card { grid-column: span 2; grid-row: auto; }
  .stage-strip { grid-template-columns: 1fr; }
  .matrix-row { grid-template-columns: 105px repeat(5, 115px); }
}
@media (max-width: 560px) {
  main { padding-inline: 14px; }
  .hero-grid, .split-grid, .detail-grid { grid-template-columns: 1fr; }
  .health-card { grid-column: auto; }
  .topbar { padding-inline: 16px; }
  .select-wrap { flex: 1; }
  .select-wrap select { width: 100%; min-width: 0; }
  .page-intro { flex-direction: column; }
  .task-progress { grid-template-columns: 1fr; justify-items: center; }
  footer { flex-direction: column; gap: 6px; }
}



