:root {
  --ink: #172326;
  --muted: #647174;
  --line: #dce3e2;
  --soft: #f4f7f6;
  --paper: #ffffff;
  --teal: #216869;
  --teal-dark: #174d4f;
  --amber: #d97706;
  --blue: #2f5d8a;
  --red: #b5473c;
  --sidebar: #142426;
  --radius: 6px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif; font-size: 14px; letter-spacing: 0; }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); color: #dce9e7; padding: 20px 14px; display: flex; flex-direction: column; min-height: 100vh; }
.brand { display: flex; gap: 11px; align-items: center; padding: 0 8px 22px; border-bottom: 1px solid #294043; }
.brand strong { display: block; font-size: 17px; }
.brand small { display: block; color: #88a5a4; margin-top: 2px; font-size: 11px; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; background: #d9a441; color: #142426; font-weight: 800; border-radius: 4px; flex: 0 0 auto; }
nav { display: grid; gap: 5px; padding-top: 20px; }
.nav-item { height: 40px; border: 0; color: #a9bfbd; background: transparent; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: var(--radius); text-align: left; }
.nav-item svg { width: 17px; }
.nav-item:hover, .nav-item.active { color: white; background: #22383a; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #294043; padding: 15px 8px 0; display: flex; align-items: center; justify-content: space-between; }
.sidebar-foot form { margin: 0; }
.workspace { min-width: 0; }
.topbar { min-height: 88px; display: flex; justify-content: space-between; align-items: center; padding: 18px 30px; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0 0 4px; font-size: 22px; }
.topbar p { margin: 0; color: var(--muted); }
.primary-button, .secondary-button { min-height: 38px; border-radius: var(--radius); padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; font-weight: 600; }
.primary-button { color: white; background: var(--teal); }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button { color: var(--ink); background: white; border-color: var(--line); }
.danger-button { min-height: 38px; border: 1px solid #d9a5a5; border-radius: var(--radius); padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; color: #8d2f2f; background: #fff8f8; font-weight: 600; }
.danger-button:hover { background: #fceaea; }
.action-group { display: flex; gap: 8px; align-items: center; }
.primary-button svg, .secondary-button svg { width: 17px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 4px; color: inherit; background: transparent; }
.icon-button:hover { background: rgba(128, 160, 158, .16); }
.icon-button svg { width: 18px; }
.content-view { padding: 26px 30px 40px; }
.hidden { display: none !important; }
.empty-state { min-height: 360px; display: grid; place-content: center; text-align: center; color: var(--muted); border: 1px dashed #bcc9c7; background: rgba(255,255,255,.45); }
.empty-state svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--teal); }
.project-list { background: white; border: 1px solid var(--line); }
.project-row { min-height: 76px; display: grid; grid-template-columns: minmax(240px, 1.5fr) 130px 130px 120px 90px; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.project-row:last-child { border-bottom: 0; }
.project-row:hover { background: #f9fbfa; }
.project-name { border: 0; background: transparent; text-align: left; color: var(--ink); padding: 0; font-weight: 700; }
.project-name small { display: block; color: var(--muted); font-weight: 400; margin-top: 5px; }
.metric-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.status { display: inline-flex; align-items: center; width: fit-content; min-height: 24px; padding: 0 8px; border-radius: 3px; font-size: 12px; background: #eef2f2; color: #536064; }
.status.completed { background: #e5f1eb; color: #236144; }
.status.running, .status.queued { background: #fff1d9; color: #915d09; }
.status.failed { background: #f8e6e4; color: #963f37; }
.back-button { border: 0; background: transparent; color: var(--teal); padding: 0; display: inline-flex; gap: 6px; align-items: center; }
.back-button svg { width: 16px; }
.detail-heading { display: flex; justify-content: space-between; align-items: end; margin: 14px 0 18px; }
.detail-heading h2 { margin: 0 0 5px; font-size: 20px; }
.detail-heading p { margin: 0; color: var(--muted); }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); background: white; border: 1px solid var(--line); margin-bottom: 18px; }
.stat-item { padding: 16px 18px; border-right: 1px solid var(--line); min-height: 84px; }
.stat-item:last-child { border-right: 0; }
.stat-item strong { display: block; font-size: 23px; margin-top: 7px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { min-height: 40px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 700; }
.route-selector { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.route-selector button { min-height: 32px; border: 1px solid var(--line); background: white; color: var(--muted); padding: 0 10px; border-radius: 4px; }
.route-selector button.active { background: var(--teal); color: white; border-color: var(--teal); }
.data-table-wrap { width: 100%; overflow: auto; background: white; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f1f5f4; color: #4b5b5e; font-size: 12px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.bar-cell { min-width: 150px; }
.bar-track { height: 7px; background: #e8eeed; margin-top: 5px; }
.bar-fill { height: 7px; background: var(--teal); }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 12px; }
.section-head h3 { margin: 0; font-size: 16px; }
.subtle { color: var(--muted); }
.network-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 16px; }
.network-stage { height: 520px; background: #f8faf9; border: 1px solid var(--line); position: relative; }
#networkCanvas { width: 100%; height: 100%; display: block; }
.network-tooltip { position: absolute; pointer-events: none; background: #172326; color: white; padding: 6px 8px; border-radius: 3px; font-size: 12px; max-width: 260px; }
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.search-row input, .search-row select { min-height: 36px; border: 1px solid var(--line); background: white; padding: 0 10px; border-radius: 4px; }
.search-row input { flex: 1; }
.artifact-list { background: white; border: 1px solid var(--line); }
.artifact-row { display: grid; grid-template-columns: minmax(0,1fr) 100px 120px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.artifact-row:last-child { border-bottom: 0; }
.artifact-row a { color: var(--teal); text-decoration: none; font-weight: 600; }
.asset-project-row { cursor: pointer; }
.asset-project-row:hover td { background: #f5f9f8; }
.asset-project-row small { display: block; max-width: 360px; margin-top: 5px; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-stats { margin-bottom: 22px; }
.progress-shell { background: white; border: 1px solid var(--line); padding: 20px; }
.progress-bar { height: 8px; background: #e6eceb; margin: 14px 0 9px; }
.progress-fill { height: 100%; background: var(--amber); transition: width .25s ease; }
dialog { width: min(560px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 24px 80px rgba(18,38,40,.22); }
dialog::backdrop { background: rgba(16,31,33,.48); }
dialog form { padding: 20px; display: grid; gap: 15px; }
dialog header { display: flex; justify-content: space-between; align-items: center; }
dialog h2 { margin: 0; font-size: 18px; }
label { color: #465659; font-weight: 600; display: grid; gap: 7px; }
label input { min-height: 40px; padding: 0 10px; border: 1px solid #bdc9c7; border-radius: 4px; }
.file-drop { padding: 18px; border: 1px dashed #9eb1ae; background: #f7faf9; }
.file-drop input { padding: 7px 0; border: 0; }
.file-drop span { color: var(--muted); font-weight: 400; }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; line-height: 1.5; }
.check-row input { width: 17px; height: 17px; min-height: 0; margin-top: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 360px; padding: 11px 14px; border-radius: 4px; background: #172326; color: white; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.form-error { color: #9f362e; background: #f9e8e6; padding: 9px 11px; border-left: 3px solid var(--red); }
.login-body { min-height: 100vh; display: grid; place-items: center; background: #eef3f1; }
.login-shell { width: min(780px, calc(100vw - 30px)); display: grid; grid-template-columns: 1.1fr 1fr; background: white; border: 1px solid var(--line); box-shadow: 0 18px 55px rgba(25,47,48,.12); }
.login-brand { background: var(--sidebar); color: white; padding: 50px 38px; }
.login-brand .brand-mark { margin-bottom: 24px; }
.login-brand h1 { margin: 0 0 12px; font-size: 28px; }
.login-brand p { color: #abc1bf; line-height: 1.7; }
.login-form { padding: 42px 34px; display: grid; gap: 17px; align-content: center; }
.login-form h2 { margin: 0 0 5px; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 64px minmax(0,1fr); }
  .sidebar { padding: 16px 8px; }
  .brand { padding: 0 7px 18px; }
  .brand > div, .nav-item span, .sidebar-foot span { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .topbar, .content-view { padding-left: 16px; padding-right: 16px; }
  .project-row { grid-template-columns: minmax(180px, 1fr) 90px 90px; }
  .project-row > :nth-child(4), .project-row > :nth-child(5) { display: none; }
  .network-layout { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: 0; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .topbar { align-items: flex-start; gap: 12px; }
  .topbar h1 { font-size: 18px; }
  .topbar p { display: none; }
  .project-row { grid-template-columns: 1fr 80px; }
  .project-row > :nth-child(3) { display: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { padding: 28px; }
  .login-form { padding: 28px; }
}
