:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-warm: #fff1f0;
  --fg: #1f1f1f;
  --fg-2: #4b5563;
  --muted: #697386;
  --meta: #d32029;
  --border: #d9dce3;
  --border-soft: #eef0f4;
  --accent: #d32029;
  --accent-on: #ffffff;
  --accent-hover: color-mix(in oklab, var(--accent), black 8%);
  --accent-active: color-mix(in oklab, var(--accent), black 14%);
  --success: #22a06b;
  --warn: #faad14;
  --danger: #cf1322;
  --font-display: "Ant Sans", "Alibaba PuHuiTi", Inter, Arial, sans-serif;
  --font-body: "Ant Sans", "Alibaba PuHuiTi", Inter, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, monospace;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 32px;
  --text-3xl: 48px;
  --text-4xl: 64px;
  --leading-body: 1.52;
  --leading-tight: 1.08;
  --tracking-display: -0.018em;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --section-y-desktop: 96px;
  --section-y-tablet: 68px;
  --section-y-phone: 48px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --elev-flat: none;
  --elev-ring: 0 0 0 1px var(--border);
  --elev-raised: 0 18px 42px rgba(31, 31, 31, 0.10);
  --focus-ring: 0 0 0 4px rgba(211, 32, 41, 0.22);
  --motion-fast: 140ms;
  --motion-base: 220ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --container-max: 1200px;
  --container-gutter-desktop: 36px;
  --container-gutter-tablet: 24px;
  --container-gutter-phone: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font-family: var(--font-body); }
body { font-size: var(--text-sm); line-height: var(--leading-body); }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.app { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; z-index: 4; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 8px 26px; }
.brand-mark { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--fg); color: var(--accent-on); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; }
.brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.nav-label { margin: 10px 10px 7px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.nav { display: grid; gap: 4px; }
.nav a { min-height: 42px; padding: 0 var(--space-3); display: flex; align-items: center; gap: var(--space-3); border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard); }
.nav a:hover { background: var(--border-soft); color: var(--fg); }
.nav a.active { background: var(--surface-warm); color: var(--accent); }
.nav svg { width: 18px; height: 18px; stroke-width: 1.7; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding: 18px 8px 0; }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--border-soft); display: grid; place-items: center; font-weight: 600; }
.user-name { font-weight: 500; }
.user-role { color: var(--muted); font-size: 12px; }
.main { min-width: 0; }
.topbar { height: 64px; position: sticky; top: 0; z-index: 3; background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-soft); padding: 0 var(--space-8); display: flex; align-items: center; justify-content: space-between; }
.crumb { color: var(--muted); font-size: 13px; }
.crumb b { color: var(--fg); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); display: grid; place-items: center; cursor: pointer; transition: border-color var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard); }
.icon-btn:hover { background: var(--surface); border-color: var(--muted); }
.icon-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.icon-btn svg { width: 18px; height: 18px; }
.content { padding: var(--space-8); max-width: 1540px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
h1 { font-size: var(--text-2xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); font-weight: 600; }
h2 { font-size: var(--text-xl); letter-spacing: -.01em; font-weight: 600; }
h3 { font-size: var(--text-base); font-weight: 600; }
.page-desc { color: var(--muted); margin: 7px 0 0; max-width: 65ch; }
.btn { min-height: 40px; padding: 0 var(--space-5); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg); font-weight: 600; letter-spacing: .02em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); transition: transform var(--motion-fast) var(--ease-standard), background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard); }
.btn:hover { background: var(--surface); border-color: var(--muted); }
.btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.btn:active { transform: translateY(2px); }
.btn.primary { background: var(--accent); color: var(--accent-on); border-color: var(--accent); box-shadow: var(--elev-ring); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.primary:active { background: var(--accent-active); }
.btn.danger { color: var(--danger); }
.btn svg { width: 17px; height: 17px; }
.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 18px; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.metric { padding: 20px; min-height: 126px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-label { color: var(--muted); font-weight: 500; }
.metric-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 26px; letter-spacing: -.02em; font-weight: 600; }
.delta { font-size: 12px; color: var(--muted); }
.delta.up { color: var(--success); }
.split { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .8fr); }
.panel-head { padding: 19px 20px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.panel-body { padding: 20px; }
.muted { color: var(--muted); }
.link { text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.chart { height: 250px; display: grid; grid-template-columns: 46px 1fr; grid-template-rows: 1fr 26px; gap: 10px; }
.y-axis { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font: 11px var(--font-mono); text-align: right; }
.plot { position: relative; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), var(--border) 25%); }
.bars { position: absolute; inset: 0 8px 0 10px; display: flex; gap: 12px; align-items: end; }
.bar-group { flex: 1; height: 100%; display: flex; align-items: end; gap: 4px; }
.bar { flex: 1; min-width: 6px; border-radius: 4px 4px 0 0; background: var(--fg); opacity: .88; }
.bar.secondary { background: var(--meta); opacity: .72; }
.x-axis { grid-column: 2; display: flex; justify-content: space-around; color: var(--muted); font: 11px var(--font-mono); }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; background: var(--fg); }
.legend i.rose { background: var(--meta); }
.queue { display: grid; gap: 12px; }
.queue-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.queue-item:last-child { border: 0; }
.queue-num { width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--surface); display: grid; place-items: center; font: 600 13px var(--font-mono); }
.queue-title { font-weight: 500; }
.queue-meta { color: var(--muted); font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: var(--text-xs); font-weight: 500; padding: 4px 9px; border-radius: var(--radius-pill); background: var(--surface); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status.success { color: var(--success); background: color-mix(in oklab, var(--success) 10%, var(--bg)); }
.status.success::before { background: var(--success); }
.status.warn { color: var(--fg-2); background: color-mix(in oklab, var(--warn) 18%, var(--bg)); }
.status.warn::before { background: var(--warn); }
.status.danger { color: var(--danger); background: var(--surface-warm); }
.status.danger::before { background: var(--danger); }
.toolbar { padding: 14px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.search { position: relative; min-width: 260px; flex: 1; max-width: 380px; }
.search svg { position: absolute; width: 16px; height: 16px; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input, .select { min-height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--fg); padding: 0 var(--space-3); outline: none; transition: border-color var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard); }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.search .input { width: 100%; padding-left: 36px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th { text-align: left; color: var(--muted); background: var(--surface); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); }
td { padding: 15px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.strong { font-weight: 500; }
.sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.product { display: flex; align-items: center; gap: 11px; }
.product-thumb { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; color: var(--fg); }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab { min-height: 43px; border: 0; background: none; color: var(--muted); padding: 0; cursor: pointer; font-weight: 500; position: relative; }
.tab.active { color: var(--fg); }
.tab.active::after { content: ''; position: absolute; height: 2px; left: 0; right: 0; bottom: -1px; background: var(--fg); }
.count { margin-left: 5px; color: var(--muted); font: 11px var(--font-mono); }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; }
.small-btn { min-height: 34px; padding: 0 10px; border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--text-xs); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
.small-btn:hover { background: var(--surface); border-color: var(--muted); }
.small-btn:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.checkbox { width: 16px; height: 16px; accent-color: var(--accent); }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; background: color-mix(in oklab, var(--fg) 38%, transparent); display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop.open { display: flex; }
.modal { width: min(640px, 100%); max-height: 90vh; overflow: auto; background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--elev-raised); }
.modal-head { padding: 21px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.detail { padding: 13px 14px; background: var(--surface); border-radius: var(--radius-sm); }
.detail-label { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.detail-value { margin-top: 4px; font-weight: 500; }
.divider { height: 1px; background: var(--border); margin: 22px 0; }
.form-row { display: grid; gap: 7px; margin-bottom: 16px; }
.form-row label { font-weight: 500; }
.form-row .input, .form-row .select { width: 100%; }
.notice { padding: 13px 14px; border-radius: var(--radius-sm); background: color-mix(in oklab, var(--warn) 16%, var(--bg)); color: var(--fg-2); font-size: 13px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; min-width: 280px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--fg); color: var(--bg); box-shadow: var(--elev-raised); transform: translateY(24px); opacity: 0; pointer-events: none; transition: var(--motion-base) var(--ease-standard); }
.toast.show { transform: none; opacity: 1; }
.loading-state { min-height: 260px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn[disabled], .small-btn[disabled] { cursor: not-allowed; opacity: .58; }
.btn.is-loading::before { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .65s linear infinite; }
.field-error { min-height: 18px; color: var(--danger); font-size: var(--text-xs); margin-top: var(--space-1); }
.sync-note { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--muted); font-size: var(--text-xs); }
.sync-note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); display: none; }
.filter-chip { min-height: 38px; padding: 0 12px; border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius-sm); cursor: pointer; }
.batch-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.batch-card { padding: 18px; }
.batch-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.batch-code { font: 600 15px var(--font-mono); }
.progress { height: 7px; background: var(--border-soft); border-radius: var(--radius-pill); overflow: hidden; margin: 12px 0 8px; }
.progress > i { display: block; height: 100%; background: var(--fg); border-radius: inherit; }
.batch-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.kpi-line { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 16px; }
.kpi-mini { padding: 14px; background: var(--surface); border-radius: var(--radius-sm); }
.kpi-mini b { display: block; font: 600 17px var(--font-mono); }
.kpi-mini span { font-size: 11px; color: var(--muted); }
.launcher { max-width: 1080px; margin: 0 auto; padding: 72px 32px; }
.launcher-head { max-width: 720px; margin-bottom: 42px; }
.launcher-head h1 { font-size: 48px; letter-spacing: -.03em; }
.launcher-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.launcher-card { padding: 24px; min-height: 170px; display: flex; flex-direction: column; transition: transform .18s ease, border-color .18s ease; }
.launcher-card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--fg) 25%, var(--border)); }
.launcher-card p { color: var(--muted); max-width: 48ch; }
.launcher-card .open { margin-top: auto; font-weight: 500; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(420px, .9fr); background: var(--bg); }
.login-context { background: var(--surface); border-right: 1px solid var(--border); padding: var(--space-12); display: flex; flex-direction: column; justify-content: space-between; }
.login-brand { display: flex; align-items: center; gap: var(--space-3); }
.login-brand .brand-mark { width: 36px; height: 36px; }
.login-story { max-width: 640px; }
.login-story h1 { font-size: var(--text-3xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); margin-bottom: var(--space-5); }
.login-story p { color: var(--fg-2); font-size: var(--text-base); max-width: 58ch; }
.workflow-line { margin-top: var(--space-8); display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); overflow: hidden; }
.workflow-step { padding: var(--space-5); border-right: 1px solid var(--border); }
.workflow-step:last-child { border-right: 0; }
.workflow-step b { display: block; font-size: var(--text-base); margin-bottom: var(--space-1); }
.workflow-step span { color: var(--muted); font-size: var(--text-xs); }
.login-foot { color: var(--muted); font-size: var(--text-xs); }
.login-panel { display: grid; place-items: center; padding: var(--space-12); }
.login-form { width: min(400px,100%); }
.login-form-head { margin-bottom: var(--space-8); }
.login-form-head h2 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.login-form-head p { color: var(--muted); margin: 0; }
.login-form .form-row { margin-bottom: var(--space-5); }
.password-field { position: relative; }
.password-field .input { padding-right: 64px; }
.password-toggle { position: absolute; right: var(--space-2); top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--fg-2); cursor: pointer; min-height: 32px; padding: 0 var(--space-2); font-size: var(--text-xs); }
.login-options { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 var(--space-6); color: var(--fg-2); font-size: var(--text-sm); }
.remember { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.login-submit { width: 100%; min-height: 44px; }
.login-security { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border-soft); color: var(--muted); font-size: var(--text-xs); line-height: 1.6; }
@media (max-width: 1100px) { .metrics { grid-template-columns: repeat(2,1fr); } .split { grid-template-columns: 1fr; } .batch-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .app { grid-template-columns: 76px 1fr; } .sidebar { padding: 20px 12px; } .brand-name,.brand-sub,.nav-label,.nav span,.sidebar-foot .user-info { display: none; } .brand { justify-content: center; padding-inline: 0; } .nav a { justify-content: center; padding: 0; } .content { padding: 24px 18px; } .topbar { padding: 0 18px; } .page-head { align-items: flex-start; flex-direction: column; } .launcher-grid { grid-template-columns: 1fr; } .login-page { grid-template-columns: 1fr; } .login-context { display: none; } .login-panel { padding: var(--space-6); } }
