﻿:root {
  --bg: #f5f7fa;
  --surface: #fff;
  --surface-soft: #f8fafc;
  --line: #dfe6ee;
  --line-soft: #edf1f6;
  --text: #1f2a37;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --teal: #0f9f8f;
  --green: #16a34a;
  --green-soft: #eaf8ef;
  --amber: #d97706;
  --amber-soft: #fff4df;
  --red: #dc2626;
  --red-soft: #feecec;
  --violet: #6d5bd0;
  --shadow: 0 10px 28px rgba(31, 42, 55, .08);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 1180px; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); font-size: 12px; margin-top: 3px; }
.green { color: var(--green); }
.topbar { height: 58px; display: flex; align-items: center; gap: 22px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.product-mark { display: flex; align-items: center; gap: 10px; min-width: 186px; font-weight: 700; color: #182230; }
.mark-dot { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, var(--blue), var(--teal)); }
.topnav { display: flex; align-items: stretch; height: 100%; gap: 4px; flex: 1; }
.topnav-item { border: 0; background: transparent; padding: 0 12px; color: #526174; border-bottom: 2px solid transparent; }
.topnav-item.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.ghost-button, .secondary-button, .primary-button, .text-button, .pager-button, .iconless { border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); min-height: 34px; padding: 7px 12px; }
.primary-button { color: #fff; background: var(--blue); border-color: var(--blue); font-weight: 700; }
.primary-button.small { min-height: 32px; padding: 5px 10px; }
.secondary-button { background: var(--surface-soft); }
.text-button { border-color: transparent; color: var(--blue); background: transparent; padding: 6px 4px; min-height: 30px; }
.iconless { min-height: 30px; padding: 5px 9px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 5px; padding: 0 5px; border-radius: 9px; color: white; background: var(--red); font-size: 12px; }
select, input { min-height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 6px 10px; color: var(--text); }
.avatar-button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #fff; background: #334155; font-weight: 700; }
.account-menu { position: absolute; right: 0; top: 44px; width: 176px; display: none; padding: 6px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; }
.account-menu.open { display: grid; }
.account-menu button { border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 5px; }
.account-menu button:hover { background: var(--surface-soft); }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 58px); }
.sidebar { padding: 18px 14px; background: #101828; color: #d9e2ef; }
.sidebar-section { color: #8ca0ba; font-size: 12px; margin: 14px 10px 8px; }
.side-item { width: 100%; border: 0; border-radius: 6px; background: transparent; color: #d9e2ef; text-align: left; padding: 10px 12px; margin: 2px 0; }
.side-item.active, .side-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.side-item.compact { font-size: 13px; padding: 8px 12px; }
.content { padding: 22px; }
.hero-row, .panel, .sync-strip, .metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; }
.eyebrow, .panel-kicker { margin: 0 0 5px; color: var(--blue); font-size: 12px; font-weight: 700; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 24px; line-height: 1.25; letter-spacing: 0; }
h2 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: 0; }
.subcopy { margin: 0; color: var(--muted); }
.hero-actions { display: flex; gap: 10px; }
.sync-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 14px; margin-top: 14px; }
.sync-item { display: grid; gap: 4px; padding: 10px 12px; border-radius: 6px; background: var(--surface-soft); border: 1px solid var(--line-soft); }
.sync-item strong { font-size: 15px; }
.sync-item span { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.metric-card { padding: 16px; }
.metric-title { color: var(--muted); margin-bottom: 8px; }
.metric-value { font-size: 27px; font-weight: 800; }
.metric-trend { margin-top: 8px; color: var(--muted); }
.metric-card[data-tone="blue"] .metric-value { color: var(--blue); }
.metric-card[data-tone="green"] .metric-value { color: var(--green); }
.metric-card[data-tone="amber"] .metric-value { color: var(--amber); }
.metric-card[data-tone="red"] .metric-value { color: var(--red); }
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; margin-top: 14px; }
.primary-column, .right-column { display: grid; gap: 14px; align-content: start; }
.panel { padding: 16px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.table-header { align-items: end; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.filters input { width: 190px; }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.step-card { border: 1px solid var(--line); border-radius: 7px; padding: 14px; background: var(--surface-soft); position: relative; }
.step-card::after { content: ""; position: absolute; right: -13px; top: 50%; width: 14px; height: 1px; background: var(--line); }
.step-card:last-child::after { display: none; }
.step-card.active { border-color: #9bbcff; background: var(--blue-soft); }
.step-index { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: white; color: var(--blue); border: 1px solid #bfd0ff; font-weight: 800; margin-bottom: 8px; }
.step-card.done .step-index { color: white; background: var(--green); border-color: var(--green); }
.step-card h3 { margin: 0 0 5px; font-size: 15px; }
.step-card p { margin: 0; color: var(--muted); font-size: 13px; }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
th { color: #526174; font-size: 12px; background: var(--surface-soft); font-weight: 700; }
td { color: #273449; }
tbody tr:hover { background: #fbfdff; }
.status-tag, .risk-level, .mini-tag { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; }
.status-running { background: var(--blue-soft); color: var(--blue); }
.status-calibrating { background: #f2edff; color: var(--violet); }
.status-draft { background: var(--amber-soft); color: var(--amber); }
.status-done { background: var(--green-soft); color: var(--green); }
.progress-line { min-width: 112px; }
.progress-line span { display: block; height: 6px; border-radius: 4px; background: var(--line-soft); overflow: hidden; margin-bottom: 4px; }
.progress-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: var(--muted); }
.pager-button { min-height: 30px; padding: 4px 9px; }
.pager-button.active { color: white; background: var(--blue); border-color: var(--blue); }
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart { height: 248px; }
.chart.donut { height: 216px; }
.risk-item { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.risk-item:first-child { border-top: 0; padding-top: 0; }
.risk-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.risk-row strong { flex: 1; }
.risk-item p { margin: 0; color: var(--muted); }
.risk-high { background: var(--red-soft); color: var(--red); }
.risk-mid { background: var(--amber-soft); color: var(--amber); }
.risk-low { background: var(--green-soft); color: var(--green); }
.admin-line { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.admin-line:first-child { border-top: 0; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(80px); background: #0f172a; color: white; border-radius: 7px; padding: 10px 14px; opacity: 0; transition: 160ms ease; z-index: 80; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal { width: min(920px, calc(100vw - 48px)); border: 1px solid var(--line); border-radius: 10px; padding: 0; box-shadow: var(--shadow); }
.modal.wide { width: min(1080px, calc(100vw - 48px)); }
.modal::backdrop { background: rgba(15, 23, 42, .4); }
.modal form { padding: 18px; }
.modal-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 16px; }
.wizard-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.wizard-tab { border: 0; background: transparent; padding: 10px 12px; border-bottom: 2px solid transparent; color: var(--muted); }
.wizard-tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.wizard-body { min-height: 310px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { color: #405168; font-weight: 700; }
.validation-list { display: grid; gap: 8px; }
.validation-list div { display: flex; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; }
.workflow-preview { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.workflow-node { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--surface-soft); }
.workflow-arrow { color: var(--muted-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.admin-layout { display: grid; grid-template-columns: 190px 1fr; gap: 16px; }
.admin-layout nav { display: grid; gap: 6px; align-content: start; }
.admin-nav { text-align: left; border: 1px solid transparent; border-radius: 6px; padding: 10px 12px; background: transparent; }
.admin-nav.active, .admin-nav:hover { background: var(--blue-soft); color: var(--blue); }
.admin-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.admin-mini-card { border: 1px solid var(--line); border-radius: 7px; padding: 14px; }
.empty-state { border: 1px dashed var(--line); border-radius: 7px; padding: 18px; color: var(--muted); background: var(--surface-soft); }
@media (max-width: 1240px) {
  .main-grid { grid-template-columns: 1fr; }
  .right-column { grid-template-columns: repeat(3, 1fr); }
}
