:root {
  --ink: #142b3d;
  --muted: #688092;
  --line: #dce6ec;
  --soft: #f4f7f8;
  --paper: #fff;
  --navy: #173b57;
  --navy-2: #0f2d44;
  --blue: #247ca7;
  --blue-soft: #e8f4f8;
  --green: #2e8b6e;
  --amber: #d9902f;
  --red: #c85a54;
  --violet: #7769ad;
  --shadow: 0 14px 36px rgba(28, 55, 72, .08);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--soft); color: var(--ink); }
button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 18px 20px; background: linear-gradient(165deg, var(--navy), var(--navy-2)); color: #fff; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 38px; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 13px; font-weight: 800; letter-spacing: .04em; background: rgba(255,255,255,.1); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .08em; }
.brand small { margin-top: 4px; font-size: 11px; color: #aac1d1; letter-spacing: .14em; }
.nav { display: grid; gap: 8px; }
.nav-item { border: 0; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 10px; color: #c7d6e0; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(91, 180, 215, .2); box-shadow: inset 3px 0 #6ec1dd; }
.nav-icon { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; font-size: 12px; }
.sidebar-foot { margin-top: auto; padding: 15px 10px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; gap: 10px; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot small { margin-top: 3px; color: #91aabd; font-size: 10px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #59c99a; box-shadow: 0 0 0 4px rgba(89,201,154,.12); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 0 4px rgba(200,90,84,.12); }
.main { min-width: 0; }
.topbar { height: 82px; padding: 0 34px; display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15; backdrop-filter: blur(12px); }
.topbar h1 { margin: 2px 0 0; font-size: 20px; }
.eyebrow, .overline { margin: 0; font-size: 10px; letter-spacing: .18em; color: #7791a2; font-weight: 700; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.sync-state { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.avatar { border: 0; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: var(--navy); cursor: default; }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }
.content { padding: 28px 34px 46px; max-width: 1600px; margin: 0 auto; }
.page { display: none; }
.page.active { display: block; animation: page-in .24s ease; }
@keyframes page-in { from { opacity: .4; transform: translateY(5px); } }
.hero { min-height: 188px; padding: 34px 38px; border-radius: 18px; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; background: radial-gradient(circle at 78% 35%, rgba(96,192,216,.34), transparent 19%), linear-gradient(115deg, #163a56 0%, #1c5675 58%, #297c91 100%); box-shadow: var(--shadow); overflow: hidden; }
.hero h2 { margin: 13px 0 9px; font-size: clamp(24px, 3vw, 34px); font-weight: 650; }
.hero p { margin: 0; max-width: 720px; color: #cfe0e7; line-height: 1.7; }
.tag { display: inline-flex; padding: 5px 10px; border-radius: 20px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.tag.light { color: #e8f9ff; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.14); }
.tag.demo { color: #8a611f; background: #fff3d9; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 9px; border: 1px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button.light { color: var(--navy); background: #fff; }
.button.secondary { padding: 9px 13px; border-color: var(--line); background: #fff; color: var(--ink); font-size: 12px; }
.button.primary { color: #fff; background: var(--navy); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.metric-card { display: flex; gap: 15px; align-items: center; padding: 21px; background: var(--paper); border: 1px solid #e6edf1; border-radius: 14px; box-shadow: 0 7px 18px rgba(28,55,72,.04); }
.metric-card small, .metric-card strong, .metric-card p { display: block; }
.metric-card small { color: var(--muted); font-size: 12px; }
.metric-card strong { margin: 4px 0 2px; font-size: 27px; }
.metric-card p { margin: 0; color: #94a5b1; font-size: 10px; }
.metric-icon { flex: 0 0 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; font-size: 13px; font-weight: 800; }
.metric-icon.blue { background: #e6f2f7; color: var(--blue); }.metric-icon.amber { background: #fbf0dd; color: var(--amber); }.metric-icon.green { background: #e5f4ef; color: var(--green); }.metric-icon.violet { background: #eeebf7; color: var(--violet); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr); gap: 20px; }
.panel { background: var(--paper); border: 1px solid #e3ebef; border-radius: 15px; box-shadow: 0 8px 24px rgba(28,55,72,.045); }
.panel-head { padding: 22px 24px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h3 { margin: 5px 0 0; font-size: 17px; }
.text-button { border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 12px; }
.catalog-list { padding: 0 24px 20px; }
.catalog-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 14px 2px; border-top: 1px solid #edf2f4; cursor: pointer; }
.catalog-row:hover strong { color: var(--blue); }
.catalog-symbol { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: var(--soft); color: var(--navy); font-weight: 800; }
.catalog-row strong, .catalog-row small { display: block; }.catalog-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.badge { padding: 4px 8px; border-radius: 20px; font-size: 10px; background: #fff1dc; color: #94601c; }
.badge.published { color: #237155; background: #e5f4ef; }
.milestone-list { list-style: none; margin: 0; padding: 2px 24px 22px; }
.milestone-list li { display: grid; grid-template-columns: 31px 1fr; gap: 12px; position: relative; padding: 8px 0 19px; }
.milestone-list li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 39px; width: 1px; height: 26px; background: var(--line); }
.milestone-list li > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #eef3f5; color: #7d929f; font-size: 11px; font-weight: 800; z-index: 1; }
.milestone-list .done > span { background: #e3f3ed; color: var(--green); }.milestone-list .current > span { background: var(--navy); color: #fff; box-shadow: 0 0 0 5px #e8eff3; }
.milestone-list strong, .milestone-list small { display: block; }.milestone-list strong { font-size: 13px; }.milestone-list small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.page-intro { margin: 1px 0 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.page-intro h2 { margin: 10px 0 6px; font-size: 27px; }.page-intro p { margin: 0; color: var(--muted); line-height: 1.65; }
.legend { display: flex; flex-wrap: wrap; gap: 13px; font-size: 10px; color: var(--muted); }.legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; }.legend-dot.human { background: var(--blue); }.legend-dot.quality { background: var(--amber); }.legend-dot.gate { background: var(--violet); }.legend-line { width: 16px; border-top: 2px solid var(--line); }.legend-line.return { border-color: var(--red); border-top-style: dashed; }
.template-layout { display: grid; grid-template-columns: 265px minmax(0, 1fr); min-height: calc(100vh - 205px); gap: 18px; }
.template-list-panel, .flow-panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.list-title { padding: 18px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }.list-title span { color: var(--muted); font-size: 11px; }
.template-list { padding: 8px; display: grid; gap: 5px; }
.template-item { border: 0; width: 100%; padding: 13px 12px; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; display: grid; grid-template-columns: 35px 1fr; gap: 10px; color: var(--ink); }
.template-item:hover { background: #f3f7f9; }.template-item.active { background: #eaf3f7; }
.template-item .symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-weight: 800; font-size: 12px; }
.template-item strong, .template-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.template-item strong { font-size: 12px; }.template-item small { color: var(--muted); margin-top: 4px; font-size: 10px; }
.flow-panel { min-width: 0; display: flex; flex-direction: column; }
.flow-toolbar { min-height: 86px; padding: 17px 21px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.flow-toolbar h3 { margin: 5px 0 3px; font-size: 18px; }.flow-toolbar p { margin: 0; color: var(--muted); font-size: 11px; }
.version-select { color: var(--muted); font-size: 10px; }.version-select select { margin-left: 7px; padding: 7px 25px 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.flow-notice { margin: 13px 18px 0; padding: 10px 13px; background: #fff6e6; border: 1px solid #f1deb8; border-radius: 8px; color: #895f20; font-size: 11px; }
.flow-scroll { flex: 1; overflow: auto; background-color: #f8fafb; background-image: radial-gradient(#d8e2e7 1px, transparent 1px); background-size: 18px 18px; min-height: 520px; }
.flow-canvas { position: relative; min-width: 100%; min-height: 520px; }
.flow-svg { position: absolute; inset: 0; overflow: visible; pointer-events: none; z-index: 1; }
.flow-node { position: absolute; width: 158px; min-height: 62px; padding: 11px 12px; border: 1px solid #d3e0e6; border-left: 4px solid var(--blue); border-radius: 10px; background: #fff; box-shadow: 0 7px 18px rgba(29,60,78,.08); z-index: 2; }
.flow-node strong { display: block; font-size: 12px; line-height: 1.35; }.flow-node small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .03em; }
.flow-node.quality_task { border-left-color: var(--amber); background: #fffaf1; }.flow-node.parallel_split, .flow-node.parallel_join, .flow-node.release_gate, .flow-node.exclusive_gateway { border-left-color: var(--violet); background: #f9f7ff; }.flow-node.start, .flow-node.end { border-left-color: var(--green); background: #f1faf6; }.flow-node.independent::after { content: "独立激活"; position: absolute; right: 7px; top: -8px; padding: 2px 6px; border-radius: 8px; color: #fff; background: var(--violet); font-size: 8px; }
.flow-edge { fill: none; stroke: #85a0b0; stroke-width: 1.5; }.flow-edge.condition { stroke: var(--violet); }.flow-edge.return { stroke: var(--red); stroke-dasharray: 6 4; }
.flow-edge-label { font-size: 9px; fill: #6c8190; paint-order: stroke; stroke: #f8fafb; stroke-width: 4px; }
.flow-footer { padding: 11px 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 10px; }
.empty-state { padding: 90px 20px; text-align: center; color: var(--muted); }
.skeleton { height: 54px; border-radius: 9px; background: linear-gradient(100deg,#eff3f5 30%,#f8fafb 50%,#eff3f5 70%); background-size: 300% 100%; animation: shimmer 1.5s infinite; margin: 7px 0; }.skeleton.tall { height: 210px; }
@keyframes shimmer { to { background-position: -100% 0; } }
.empty-product { min-height: 430px; display: grid; place-items: center; align-content: center; text-align: center; padding: 45px; }.empty-product h3 { margin: 18px 0 8px; }.empty-product p { max-width: 600px; margin: 0; color: var(--muted); line-height: 1.7; }.empty-illustration { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; color: var(--blue); background: var(--blue-soft); font-size: 25px; font-weight: 800; }.feature-chips { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }.feature-chips span { padding: 7px 11px; border-radius: 20px; background: var(--soft); color: var(--muted); font-size: 11px; }
.placeholder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }.placeholder-grid .panel { padding: 26px; }.placeholder-grid h3 { margin: 15px 0 9px; font-size: 15px; }.placeholder-grid strong { font-size: 31px; }.placeholder-grid p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }.placeholder-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.role-diagram { min-height: 420px; padding: 60px 30px; display: flex; flex-direction: column; align-items: center; }.role { min-width: 190px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 12px; text-align: center; font-weight: 700; background: #fff; }.role small { display: block; margin-top: 7px; color: var(--muted); font-weight: 400; }.role.core { color: #fff; background: var(--navy); border-color: var(--navy); }.role-links { width: min(70%, 650px); height: 70px; border-bottom: 1px solid #adc0ca; position: relative; }.role-links::before { content: ""; position: absolute; top: 0; left: 50%; height: 70px; border-left: 1px solid #adc0ca; }.role-links span { position: absolute; bottom: -8px; width: 15px; height: 15px; border-right: 1px solid #adc0ca; border-bottom: 1px solid #adc0ca; transform: rotate(45deg); }.role-links span:nth-child(1) { left: 0; }.role-links span:nth-child(2) { left: calc(50% - 7px); }.role-links span:nth-child(3) { right: 0; }.role-row { width: min(90%, 850px); display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; }
.scrim { display: none; }
@media (max-width: 1050px) { .metric-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }.template-layout { grid-template-columns: 220px minmax(0,1fr); }.sync-state { display: none; } }
@media (max-width: 760px) {
  .shell { display: block; }.sidebar { position: fixed; left: 0; transform: translateX(-102%); width: 250px; transition: transform .22s ease; }.sidebar.open { transform: translateX(0); }.scrim.open { display: block; position: fixed; inset: 0; background: rgba(11,31,44,.45); z-index: 19; }.menu-button { display: block; }.topbar { height: 69px; padding: 0 18px; }.topbar .button.secondary { display: none; }.content { padding: 18px 14px 35px; }.hero { padding: 27px 23px; align-items: flex-start; flex-direction: column; }.metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.metric-card { padding: 15px; }.metric-card p, .metric-icon { display: none; }.dashboard-grid { display: block; }.dashboard-grid .panel { margin-bottom: 14px; }.page-intro { align-items: flex-start; flex-direction: column; }.legend { display: none; }.template-layout { display: block; }.template-list-panel { margin-bottom: 12px; }.template-list { grid-template-columns: 1fr 1fr; }.flow-scroll { min-height: 570px; }.flow-canvas { min-height: 570px; }.flow-footer { flex-direction: column; }.placeholder-grid { grid-template-columns: 1fr; }.role-row { flex-direction: column; align-items: center; }.role-links { width: 1px; border-bottom: 0; }.role-links span { display: none; }
}
