:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #667085;
  --line: #d9dee7;
  --surface: #f6f7f9;
  --panel: #ffffff;
  --accent: #1d6f78;
  --accent-2: #b48a2c;
  --danger: #ad3434;
  --warn: #a66d12;
  --ok: #237a4b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #10212b;
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
}

.brand p,
.section-head p,
.sidebar-note span,
.footer {
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pill,
.status-chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.pill.readonly,
.tag.ok,
.status-chip.ok {
  border-color: rgba(35, 122, 75, .26);
  background: rgba(35, 122, 75, .08);
  color: var(--ok);
}

.tag.warn,
.status-chip.warn {
  border-color: rgba(166, 109, 18, .28);
  background: rgba(166, 109, 18, .10);
  color: var(--warn);
}

.tag.stop {
  border-color: rgba(173, 52, 52, .26);
  background: rgba(173, 52, 52, .08);
  color: var(--danger);
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 116px);
}

.sidebar {
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  margin-bottom: 6px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #344054;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(29, 111, 120, .10);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-note {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfcfd;
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note strong {
  margin-bottom: 8px;
}

.content {
  padding: 24px;
  min-width: 0;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-grid.compact {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.metric,
.work-panel {
  border: 1px solid var(--line);
  background: #fff;
}

.metric {
  min-height: 110px;
  padding: 16px;
}

.metric span,
.metric em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.metric strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 26px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.work-panel {
  padding: 18px;
  overflow-x: auto;
}

.work-panel h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f5;
  line-height: 1.55;
}

.task-list li:last-child {
  border-bottom: 0;
}

.dot {
  width: 9px;
  height: 9px;
  margin-top: 8px;
  flex: 0 0 auto;
  background: var(--muted);
}

.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.info { background: var(--accent); }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e7ebf0;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: #475467;
  background: #eef3f4;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.ghost-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font: inherit;
  cursor: default;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  border-top: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 1100px) {
  .metric-grid,
  .metric-grid.compact {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sidebar-note {
    grid-column: 1 / -1;
  }
}
