:root {
  /* Sprint 1: shared desktop design tokens. Legacy aliases remain below. */
  --upms-bg-deep: #07111f;
  --upms-bg-panel: rgba(10, 28, 48, 0.78);
  --upms-bg-panel-strong: rgba(12, 35, 60, 0.92);
  --upms-bg-card: rgba(9, 30, 54, 0.82);
  --upms-bg-glass: rgba(7, 17, 31, 0.76);
  --upms-bg-hover: rgba(255, 255, 255, 0.04);
  --upms-border: rgba(110, 180, 255, 0.18);
  --upms-border-strong: rgba(0, 216, 255, 0.42);
  --upms-grid-line: rgba(255, 255, 255, 0.018);
  --upms-divider: rgba(110, 180, 255, 0.12);
  --upms-cyan: #00d8ff;
  --upms-blue: #1e8cff;
  --upms-green: #22c55e;
  --upms-orange: #ff7a00;
  --upms-red: #ef4444;
  --upms-gold: #f2c14e;
  --upms-purple: #7c3aed;
  --upms-slate: #6f86a2;
  --upms-text-main: #f4f8ff;
  --upms-text-secondary: #a7bdd6;
  --upms-text-muted: #6f86a2;
  --upms-text-inverse: #07111f;
  --upms-radius-sm: 8px;
  --upms-radius-md: 12px;
  --upms-radius-lg: 18px;
  --upms-radius-card: 18px;
  --upms-shadow-panel: 0 18px 50px rgba(0, 0, 0, 0.35);
  --upms-shadow-glow: 0 0 36px rgba(0, 216, 255, 0.18);
  --upms-sidebar-width: 276px;
  --upms-envbar-height: 0px;
  --upms-topbar-height: 54px;
  --upms-page-gap: 20px;
  --bg-deep: #07111f;
  --bg-deeper: #030915;
  --bg-panel: rgba(10, 28, 48, 0.78);
  --bg-panel-strong: rgba(12, 35, 60, 0.92);
  --bg-card: rgba(9, 30, 54, 0.82);
  --line-soft: rgba(110, 180, 255, 0.18);
  --line-strong: rgba(0, 216, 255, 0.42);
  --text-main: #f4f8ff;
  --text-secondary: #a7bdd6;
  --text-muted: #6f86a2;
  --cyan: #00d8ff;
  --blue: #1e8cff;
  --gold: #f2c14e;
  --orange: #ff7a00;
  --green: #22c55e;
  --red: #ef4444;
  --purple: #7c3aed;
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-glow-blue: 0 0 36px rgba(0, 216, 255, 0.18);
  --shadow-glow-gold: 0 0 28px rgba(242, 193, 78, 0.14);
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shell-padding: 20px;
}

body[data-theme="engineering-light"] {
  --upms-bg-deep: #eef2f7;
  --upms-bg-panel: #ffffff;
  --upms-bg-panel-strong: #f8fafc;
  --upms-bg-card: #ffffff;
  --upms-bg-glass: #f8fafc;
  --upms-bg-hover: #eef6ff;
  --upms-border: #d7dee8;
  --upms-border-strong: #6aa4d8;
  --upms-grid-line: rgba(71, 85, 105, 0.08);
  --upms-divider: #dbe3ed;
  --upms-cyan: #0f7fb8;
  --upms-blue: #2563eb;
  --upms-green: #15803d;
  --upms-orange: #b45309;
  --upms-red: #b91c1c;
  --upms-gold: #a16207;
  --upms-slate: #64748b;
  --upms-text-main: #172033;
  --upms-text-secondary: #475569;
  --upms-text-muted: #718096;
  --upms-text-inverse: #ffffff;
  --upms-shadow-panel: 0 14px 28px rgba(15, 23, 42, 0.10);
  --upms-shadow-glow: none;
  --bg-deep: #eef2f7;
  --bg-deeper: #e5eaf1;
  --bg-panel: #ffffff;
  --bg-panel-strong: #f8fafc;
  --bg-card: #ffffff;
  --line-soft: #d7dee8;
  --line-strong: #8bb9df;
  --text-main: #172033;
  --text-secondary: #475569;
  --text-muted: #718096;
  --cyan: #0f7fb8;
  --blue: #2563eb;
  --gold: #a16207;
  --orange: #b45309;
  --green: #15803d;
  --red: #b91c1c;
  --shadow-glow-blue: none;
  --shadow-glow-gold: none;
  --shadow-card: 0 12px 26px rgba(15, 23, 42, 0.10);
}

body[data-theme="cad-dark"] {
  --upms-bg-deep: #1f2328;
  --upms-bg-panel: rgba(42, 48, 55, 0.92);
  --upms-bg-panel-strong: rgba(34, 39, 46, 0.96);
  --upms-bg-card: rgba(47, 54, 61, 0.92);
  --upms-bg-glass: rgba(31, 35, 40, 0.88);
  --upms-bg-hover: rgba(180, 210, 235, 0.08);
  --upms-border: rgba(171, 184, 195, 0.22);
  --upms-border-strong: rgba(99, 179, 237, 0.42);
  --upms-grid-line: rgba(220, 230, 240, 0.035);
  --upms-cyan: #62c7f2;
  --upms-blue: #79a8ff;
  --upms-green: #4ade80;
  --upms-orange: #fbbf24;
  --upms-red: #fb7185;
  --upms-text-main: #edf2f7;
  --upms-text-secondary: #c3ceda;
  --upms-text-muted: #8b98a6;
  --upms-shadow-panel: 0 16px 34px rgba(0, 0, 0, 0.26);
  --upms-shadow-glow: none;
  --bg-deep: #1f2328;
  --bg-deeper: #171a1f;
  --bg-panel: rgba(42, 48, 55, 0.92);
  --bg-panel-strong: rgba(34, 39, 46, 0.96);
  --bg-card: rgba(47, 54, 61, 0.92);
  --line-soft: rgba(171, 184, 195, 0.22);
  --line-strong: rgba(99, 179, 237, 0.42);
  --text-main: #edf2f7;
  --text-secondary: #c3ceda;
  --text-muted: #8b98a6;
  --cyan: #62c7f2;
  --blue: #79a8ff;
  --gold: #f6d365;
  --orange: #fbbf24;
  --green: #4ade80;
  --red: #fb7185;
  --shadow-glow-blue: none;
  --shadow-glow-gold: none;
}

body[data-theme="neo-dark"] {
  color: var(--text-main);
}

body[data-theme="engineering-light"],
body[data-theme="cad-dark"] {
  background: var(--bg-deep);
}

/* Shared status language. Glow is deliberately reserved for actual alerts. */
.status-running, .status-pending, .status-review, .status-done,
.status-blocked, .status-mock, .status-warning, .status-critical {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.status-running { color: var(--upms-cyan); background: rgba(0, 216, 255, .12); border-color: rgba(0, 216, 255, .24); }
.status-pending, .status-warning { color: var(--upms-orange); background: rgba(255, 122, 0, .12); border-color: rgba(255, 122, 0, .24); }
.status-review { color: #bca8ff; background: rgba(124, 58, 237, .14); border-color: rgba(124, 58, 237, .28); }
.status-done { color: var(--upms-green); background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .24); }
.status-blocked, .status-critical { color: #ff9aa1; background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .32); }
.status-critical { box-shadow: 0 0 14px rgba(239, 68, 68, .16); }
.status-mock { color: var(--upms-cyan); background: rgba(111, 134, 162, .14); border-color: rgba(111, 134, 162, .28); }

.legacy-nav, .legacy-dashboard-shell { display: none; }
.focus-pulse { box-shadow:0 0 0 2px rgba(0,216,255,.52), 0 0 30px rgba(0,216,255,.20) !important; transition:box-shadow .18s ease, border-color .18s ease; }
.domain-nav { flex:1 1 auto; min-height:0; display: grid; align-content:start; gap: 10px; padding: 16px 0; overflow-y:auto; overflow-x:hidden; scrollbar-width: thin; scrollbar-color: rgba(120,210,255,.28) rgba(255,255,255,.035); }
.panel.sgm-dashboard.active,
.workbench-main,
.workbench-context,
.workbench-evidence,
.split-main,
.split-side,
.sync-batch-items,
.quality-center-section,
.version-archive-grid { scrollbar-width: thin; scrollbar-color: rgba(120,210,255,.28) rgba(255,255,255,.035); }
.domain-group { position: relative; border: 1px solid rgba(120,210,255,.08); border-radius: 16px; padding: 7px; background: rgba(255,255,255,.018); }
.domain-group.is-active { border-color: rgba(0,216,255,.28); background: linear-gradient(135deg, rgba(0,216,255,.09), rgba(255,255,255,.02)); }
.domain-toggle { width: 100%; display:flex; align-items:center; justify-content:space-between; gap:8px; color: var(--upms-text-main); background: transparent; border: 0; padding: 9px 10px; text-align: left; font-weight: 800; cursor: pointer; }
.domain-toggle small { color: var(--upms-text-muted); font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.domain-toggle.active { color: var(--upms-cyan); }
.domain-links { display: grid; gap: 4px; padding: 4px 0 0; }
.domain-links[hidden] { display: none; }
.domain-link { display:grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items:center; gap:8px; color: var(--upms-text-secondary); background: transparent; border: 0; border-radius: 12px; padding: 8px 9px; text-align:left; cursor:pointer; font-size:12px; }
.domain-link-dot { width:6px; height:6px; border-radius:999px; background:rgba(120,210,255,.34); box-shadow:0 0 0 4px rgba(120,210,255,.04); }
.domain-link small { color:var(--upms-text-muted); font-size:10px; padding:2px 6px; border-radius:999px; background:rgba(120,210,255,.06); }
.domain-link:hover, .domain-link.active { color: var(--upms-cyan); background:rgba(0,216,255,.08); }
.domain-link.active .domain-link-dot { background:var(--upms-cyan); box-shadow:0 0 0 4px rgba(0,216,255,.14); }
.domain-link.is-ready small { color:var(--upms-green); background:rgba(34,197,94,.11); }
.domain-link.is-ready .domain-link-dot { background:var(--upms-green); box-shadow:0 0 0 4px rgba(34,197,94,.08); }
.domain-link.is-reserved { opacity:.82; }
.domain-link.is-reserved small { color:var(--upms-gold); background:rgba(242,193,78,.09); }
.domain-link.is-reserved .domain-link-dot { background:var(--upms-gold); box-shadow:0 0 0 4px rgba(242,193,78,.08); }
.domain-link.is-development { opacity:.76; border:1px dashed rgba(120,210,255,.12); }
.domain-link.is-development small { color:var(--upms-text-secondary); background:rgba(111,134,162,.12); }
.domain-link.is-development .domain-link-dot { background:var(--upms-slate); box-shadow:0 0 0 4px rgba(111,134,162,.08); }
.sprint2-topbar { min-height: var(--upms-topbar-height); display:flex; align-items:center; justify-content:space-between; gap:10px; padding: 0 12px; }
.topbar-context, .topbar-actions { display:flex; align-items:center; gap:10px; min-width:0; }
.topbar-project-block { display:grid; gap:3px; padding:7px 10px; border:1px solid rgba(120,210,255,.12); border-radius:14px; background:rgba(255,255,255,.025); }
.topbar-project-block span { color:var(--upms-text-muted); font-size:10px; letter-spacing:.08em; text-transform:uppercase; }
.topbar-select, .topbar-search { background: var(--upms-bg-glass); border:1px solid var(--upms-border); border-radius:10px; color:var(--upms-text-main); padding:8px 10px; outline:none; }
.topbar-select { max-width:260px; border-color:transparent; background:transparent; padding:0; }
.topbar-search { width:min(30vw,380px); box-shadow: inset 0 0 0 1px rgba(0,216,255,.04); }
.topbar-stage-pill { display:inline-flex; align-items:center; padding:9px 12px; border-radius:999px; color:var(--upms-cyan); background:rgba(0,216,255,.1); border:1px solid rgba(0,216,255,.18); font-size:12px; white-space:nowrap; }
.topbar-action { color:var(--upms-text-secondary); background:rgba(255,255,255,.025); border:1px solid rgba(120,210,255,.1); border-radius:999px; padding:7px 10px; cursor:pointer; white-space:nowrap; }
.topbar-action:hover { color:var(--upms-text-main); border-color:rgba(0,216,255,.3); }
.home-popover { position:fixed; z-index:200; width:300px; max-height:300px; overflow:auto; padding:12px; background:#0b1b2d; border:1px solid var(--upms-border-strong); border-radius:12px; box-shadow:var(--upms-shadow-panel); }
.sprint2-dashboard { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:10px; padding:10px 12px 12px; border-radius:24px; background:linear-gradient(135deg, rgba(0,216,255,.045), transparent 28%), radial-gradient(circle at 72% 8%, rgba(242,193,78,.08), transparent 24%), linear-gradient(180deg, rgba(255,255,255,.025), transparent 22%); box-shadow:inset 0 0 0 1px rgba(120,210,255,.06); }
.home-main { min-width:0; display:grid; gap:12px; grid-template-areas:'topline topline' 'map metrics' 'map command' 'stage stage' 'tasks issues' 'review delivery' 'drill drill'; grid-template-columns:minmax(0,1.25fr) minmax(340px,.75fr); }
.home-main .project-map-panel { grid-area:map; }
.home-topline { grid-area:topline; }
.metric-grid { grid-area:metrics; }
.home-drilldown-panel { grid-area:drill; }
.command-insight-panel { grid-area:command; }
#stage-gates { grid-area:stage; }
#stage-gates .stage-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
#today-tasks { grid-area:tasks; }
#issue-queue { grid-area:issues; }
#chief-review { grid-area:review; }
#delivery-gate { grid-area:delivery; }
.home-side { display:grid; align-content:start; gap:12px; }
.map-placeholder, .home-module { border:1px solid var(--upms-border); border-radius:var(--upms-radius-card); background:linear-gradient(180deg, rgba(10,28,48,.86), rgba(7,17,31,.82)); padding:12px; box-shadow:0 14px 34px rgba(0,0,0,.20); }
.map-placeholder { min-height:250px; background: linear-gradient(135deg,rgba(0,216,255,.08),transparent 44%), repeating-linear-gradient(0deg,transparent 0 31px,var(--upms-grid-line) 32px); }
.map-lines { height:110px; margin:12px 0; background:linear-gradient(150deg,transparent 0 20%,#1e8cff 21% 23%,transparent 24% 43%,#22c55e 44% 46%,transparent 47% 65%,#ff7a00 66% 68%,transparent 69%); opacity:.85; }
.metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.metric-value{font-size:22px;font-weight:800;margin:4px 0}.metric-card{padding:10px}.metric-card.blue{border-left:3px solid var(--upms-blue)}.metric-card.cyan{border-left:3px solid var(--upms-cyan)}.metric-card.green{border-left:3px solid var(--upms-green)}.metric-card.risk{border-left:3px solid var(--upms-orange)}
.metric-card.is-focused { border-color: rgba(0,216,255,.42); box-shadow: 0 0 0 1px rgba(0,216,255,.12) inset; }
.stage-list,.queue-list { display:grid; gap:7px; }.stage-row,.queue-row { display:grid; grid-template-columns:1.2fr auto auto; gap:8px; padding:8px; border:1px solid transparent; border-radius:8px; background:rgba(255,255,255,.025); color:var(--upms-text-main); font-size:12px; cursor:pointer; text-align:left; }.stage-row *, .queue-row *, .review-row *, .quality-issue-row * { color:inherit; }.stage-row strong,.queue-row strong{color:var(--upms-text-main)}.stage-row small,.queue-row small{display:block;color:var(--upms-text-secondary);font-size:11px;line-height:1.45}.stage-row.notStarted{opacity:.58}.stage-row.blocked{border:1px solid rgba(239,68,68,.4)}
.home-title { margin:0; font-size:16px; }.home-sub { color:var(--upms-text-muted); font-size:12px; }.side-score{font-size:26px;color:var(--upms-cyan);font-weight:800}.notice { color:var(--upms-text-secondary); font-size:12px; padding:6px 0; }
.home-module.is-focused { border-color: rgba(0,216,255,.42); box-shadow: 0 0 0 1px rgba(0,216,255,.12) inset, 0 0 0 1px rgba(0,216,255,.08); }
.home-topline { display:flex; justify-content:space-between; align-items:center; gap:10px; padding: 0; }
.home-topline-left { display:grid; gap:4px; min-width:0; }
.home-badge { display:inline-flex; align-items:center; width:max-content; padding:5px 10px; border-radius:999px; background:rgba(0,216,255,.12); color:var(--upms-text-main); font-size:12px; border:1px solid rgba(0,216,255,.2); }
.home-command-title { color:var(--upms-text-main); font-size:22px; line-height:1.12; font-weight:900; letter-spacing:.025em; text-shadow:0 0 24px rgba(0,216,255,.14); }
.home-topline-text { color:var(--upms-text-secondary); font-size:11px; }
.home-topline-right { display:flex; gap:8px; flex-wrap:wrap; }
.topline-action { border:1px solid rgba(120,210,255,.18); background:rgba(255,255,255,.04); color:var(--upms-text-main); border-radius:999px; padding:7px 12px; font-size:12px; cursor:pointer; }
.topline-action.primary { color:#03101d; background:linear-gradient(135deg, var(--upms-cyan), #7df0be); border-color:rgba(125,240,190,.48); font-weight:900; box-shadow:0 0 22px rgba(0,216,255,.18); }
.topline-action:hover { border-color:rgba(0,216,255,.42); }
.home-drilldown-panel .detail-panel { display:grid; gap:10px; }
.detail-panel-home .card-title { margin:0; }
.detail-panel-home .detail-row { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid rgba(120,210,255,.08); }
.detail-panel-home .detail-label { color:var(--upms-text-muted); font-size:12px; }
.detail-panel-home .detail-value { color:var(--upms-text-main); font-size:12px; text-align:right; }
.detail-panel-home .detail-note { color:var(--upms-text-secondary); font-size:12px; line-height:1.6; }
.detail-actions { display:flex; flex-wrap:wrap; gap:8px; }
.detail-actions button { border:1px solid rgba(120,210,255,.18); background:rgba(255,255,255,.04); color:var(--upms-text-main); border-radius:999px; padding:7px 12px; font-size:12px; cursor:pointer; }
.detail-actions button:hover { border-color:rgba(0,216,255,.42); }
.field-mapping-actions {
  margin:8px 0 12px;
  padding:10px;
  border:1px solid rgba(0,216,255,.16);
  border-radius:12px;
  background:rgba(0,216,255,.055);
}
.field-mapping-actions button:first-child {
  border-color:rgba(0,216,255,.34);
  background:rgba(0,216,255,.14);
  color:#e8fbff;
  font-weight:800;
}
.command-verdict { display:flex; justify-content:space-between; gap:12px; align-items:center; margin:10px 0; padding:12px; border:1px solid rgba(120,210,255,.16); border-radius:16px; background:rgba(3,10,19,.34); }
.command-verdict strong { font-size:20px; color:#ffcf8a; }
.command-verdict.can-deliver strong { color:var(--upms-green); }
.command-verdict span { color:#a7bdd6; font-size:12px; text-align:right; }
.role-action-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-top:10px; }
.role-action-grid button { display:grid; gap:4px; padding:10px; border:1px solid rgba(120,210,255,.15); border-radius:14px; background:rgba(255,255,255,.03); color:#e7f2ff; text-align:left; cursor:pointer; }
.role-action-grid button:hover { border-color:rgba(0,216,255,.42); transform:translateY(-1px); }
.role-action-grid span { color:#9fb6d1; font-size:11px; }
.role-action-grid strong { color:#fff; font-size:12px; line-height:1.45; }
.project-entry-main { grid-template-areas:'topline topline' 'metrics metrics' 'projects flow'; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); }
.project-entry-list { grid-area:projects; }
.project-entry-main .home-module:last-child { grid-area:flow; }
.project-entry-main .home-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 0;
  border: 1px solid var(--upms-border);
  border-radius: var(--upms-radius-card);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.project-entry-main .home-topline-left {
  display: grid;
  gap: 6px;
  align-content: start;
}
.project-entry-main .home-topline-right {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 8px;
  width: min(100%, 188px);
  padding-top: 2px;
}
.project-entry-main .home-topline-text { line-height: 1.55; color: #64748b; }
.project-entry-main .home-badge {
  background: rgba(15, 127, 184, 0.10);
  color: var(--upms-cyan);
  border-color: rgba(15, 127, 184, 0.18);
}
.project-entry-main .home-command-title {
  color: #172033;
  text-shadow: none;
}
.project-entry-main .topline-action {
  background: #ffffff;
  color: #172033;
  border-color: #d7dee8;
  width: 100%;
  justify-content: center;
  text-align: center;
}
.project-entry-main .topline-action.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--upms-blue), #2dd4bf);
  border-color: rgba(45, 212, 191, 0.45);
}

body[data-theme="cad-dark"] .project-entry-main .home-topline {
  background: linear-gradient(180deg, rgba(42, 48, 55, 0.96), rgba(34, 39, 46, 0.96));
  border-color: rgba(171, 184, 195, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.20);
}

body[data-theme="cad-dark"] .project-entry-main .home-badge {
  background: rgba(98, 199, 242, 0.10);
  color: var(--upms-cyan);
  border-color: rgba(98, 199, 242, 0.18);
}

body[data-theme="cad-dark"] .project-entry-main .home-command-title {
  color: #edf2f7;
}

body[data-theme="cad-dark"] .project-entry-main .home-topline-text {
  color: #c3ceda;
}

body[data-theme="cad-dark"] .project-entry-main .topline-action {
  background: rgba(255, 255, 255, 0.03);
  color: #edf2f7;
  border-color: rgba(171, 184, 195, 0.22);
}

body[data-theme="cad-dark"] .project-entry-main .topline-action.primary {
  color: #03101d;
  background: linear-gradient(135deg, var(--upms-cyan), #7df0be);
  border-color: rgba(125, 240, 190, 0.45);
}
.home-project-card {
  display:grid;
  gap:6px;
  width:100%;
  padding:12px;
  border:1px solid rgba(120,210,255,.16);
  border-radius:12px;
  background:rgba(255,255,255,.03);
  color:var(--upms-text-main);
  text-align:left;
  cursor:pointer;
}
.home-project-card span { color:var(--upms-text-muted); font-size:11px; }
.home-project-card strong { font-size:15px; line-height:1.35; }
.home-project-card small { color:var(--upms-text-secondary); font-size:12px; line-height:1.5; }
.home-project-card:hover, .home-project-card.selected { border-color:rgba(0,216,255,.42); background:rgba(0,216,255,.08); }
.filter-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0 12px; }
.filter-chip { border:1px solid rgba(120,210,255,.16); background:rgba(255,255,255,.03); color:var(--upms-text-secondary); border-radius:999px; padding:6px 10px; font-size:12px; cursor:pointer; }
.filter-chip.is-active { background:rgba(0,216,255,.12); color:var(--upms-text-main); border-color:rgba(0,216,255,.32); }
.filter-spacer { flex:1 1 auto; }
.search-group { display:grid; gap:8px; margin-top:10px; }
.search-group-title { color:var(--upms-text-main); font-size:12px; font-weight:700; letter-spacing:.04em; }
.search-group-list { display:grid; gap:8px; }
.search-hit { display:grid; gap:3px; width:100%; text-align:left; border:1px solid rgba(120,210,255,.16); background:rgba(255,255,255,.03); color:var(--upms-text-main); border-radius:12px; padding:10px 12px; cursor:pointer; }
.search-hit small { color:var(--upms-text-secondary); font-size:11px; }
.search-empty { color:var(--upms-text-secondary); font-size:12px; padding:8px 0; }
.role-path-list, .role-quick-links { display:flex; flex-wrap:wrap; gap:8px; }
.role-path-step { border:1px solid rgba(120,210,255,.18); background:rgba(255,255,255,.03); color:var(--upms-text-main); border-radius:999px; padding:6px 10px; font-size:12px; cursor:pointer; }
.role-path-step:hover { border-color:rgba(0,216,255,.42); }
.task-flow { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 4px; }
.task-flow-step { padding:6px 10px; border-radius:999px; border:1px solid rgba(120,210,255,.12); color:var(--upms-text-secondary); font-size:12px; background:rgba(255,255,255,.03); }
.task-flow-step.is-done { color:var(--upms-green); border-color:rgba(34,197,94,.2); }
.task-flow-step.is-current { color:var(--upms-cyan); border-color:rgba(0,216,255,.3); }
.stage-list .stage-row, .queue-list .queue-row { grid-template-columns: minmax(0,1.3fr) auto auto auto; align-items:center; }
.stage-row.is-active, .queue-row.is-active { border:1px solid rgba(0,216,255,.42); background:rgba(0,216,255,.12); box-shadow:0 0 0 1px rgba(0,216,255,.1) inset; }
.stage-row span:last-child, .queue-row span:last-child { color:var(--upms-text-secondary); }
.project-map-panel { display:grid; gap:0; border:1px solid rgba(120,210,255,.22); border-radius:28px; background: linear-gradient(180deg, rgba(7,17,31,0.99), rgba(10,24,42,0.97)); box-shadow: 0 28px 80px rgba(0,0,0,.38), 0 0 0 1px rgba(0,216,255,.04) inset; overflow:hidden; position:relative; }
.project-map-panel:before { content:''; position:absolute; inset:0; background: radial-gradient(circle at 18% 10%, rgba(0,216,255,.12), transparent 30%), radial-gradient(circle at 82% 18%, rgba(242,193,78,.08), transparent 24%), linear-gradient(180deg, rgba(255,255,255,.03), transparent 24%); pointer-events:none; }
.project-map-toolbar { position:relative; z-index:1; display:flex; justify-content:space-between; gap:10px; align-items:flex-start; padding:12px 14px 8px; border-bottom:1px solid var(--upms-divider); background:linear-gradient(90deg, rgba(3,10,19,.72), rgba(7,17,31,.42)); }
.project-map-copy { min-width:0; display:grid; gap:6px; }
.project-map-title { font-size:14px; font-weight:800; letter-spacing:.04em; color:var(--upms-text-main); }
.project-map-subtitle { color:var(--upms-text-secondary); font-size:11px; line-height:1.35; }
.project-map-toolbar-right { display:grid; justify-items:end; gap:8px; max-width:62%; }
.map-toolbar-note { color:var(--upms-text-secondary); font-size:12px; }
.map-layer-list { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.map-layer-toggle { display:inline-flex; align-items:center; gap:6px; padding:5px 8px; border-radius:999px; border:1px solid var(--upms-border); background:rgba(11,27,45,.78); color:var(--upms-text-secondary); font-size:11px; cursor:pointer; transition:transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.map-layer-toggle:hover { transform:translateY(-1px); border-color:rgba(120,210,255,.5); color:var(--upms-text-main); }
.map-layer-toggle.is-on { background:rgba(0,216,255,.12); color:var(--upms-text-main); border-color:rgba(0,216,255,.32); }
.map-layer-toggle.is-off { opacity:.58; }
.map-toggle-dot { width:8px; height:8px; border-radius:999px; background:var(--upms-text-muted); box-shadow:0 0 0 4px rgba(255,255,255,.04); }
.map-layer-toggle.is-on .map-toggle-dot { background:var(--upms-cyan); box-shadow:0 0 0 4px rgba(0,216,255,.12); }
.map-production-legend { position:relative; z-index:1; display:flex; flex-wrap:wrap; gap:8px; padding:8px 14px 0; color:var(--upms-text-secondary); font-size:11px; }
.map-production-legend span { display:inline-flex; align-items:center; gap:7px; padding:6px 9px; border-radius:999px; background:rgba(255,255,255,.026); border:1px solid rgba(120,210,255,.1); }
.legend-dot { width:8px; height:8px; border-radius:999px; background:var(--upms-cyan); box-shadow:0 0 0 4px rgba(0,216,255,.08); }
.legend-work { background:var(--upms-blue); }
.legend-line { background:var(--upms-cyan); }
.legend-risk { background:var(--upms-red); box-shadow:0 0 0 4px rgba(239,68,68,.12); }
.legend-quality { background:var(--upms-orange); box-shadow:0 0 0 4px rgba(255,122,0,.12); }
.legend-delivery { background:var(--upms-gold); box-shadow:0 0 0 4px rgba(242,193,78,.12); }
.map-stage { position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1.35fr) minmax(230px, 260px); gap:10px; padding:10px 12px 12px; }
.map-stage-shell { position:relative; min-height:360px; height:clamp(360px, 46vh, 460px); border:1px solid rgba(120,210,255,.18); border-radius:22px; overflow:hidden; background: linear-gradient(180deg, rgba(6,14,27,.94), rgba(8,19,33,.9)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), inset 0 -40px 90px rgba(0,216,255,.035); }
.map-grid-texture { position:absolute; inset:0; pointer-events:none; background-image: linear-gradient(rgba(0,216,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0,216,255,.06) 1px, transparent 1px); background-size: 42px 42px; opacity:.5; }
.map-svg .map-grid-texture-line { fill:none; stroke:rgba(120,210,255,.08); stroke-width:1; }
.map-svg { position:relative; z-index:1; width:100%; height:100%; min-height:0; display:block; }
.map-svg text { user-select:none; }
.map-boundary-line { fill:none; stroke:rgba(142,188,227,.58); stroke-width:2.2; stroke-dasharray:9 8; }
.map-workarea-fill { fill:rgba(0,216,255,.08); stroke:rgba(0,216,255,.42); stroke-width:2; }
.map-workarea-complete { fill:rgba(34,197,94,.12); stroke:rgba(34,197,94,.42); }
.map-workarea-pending { fill:rgba(255,122,0,.09); stroke:rgba(255,122,0,.34); stroke-dasharray:10 8; }
.map-delivery-fill { fill:rgba(242,193,78,.08); stroke:rgba(242,193,78,.38); stroke-width:2; stroke-dasharray:12 8; }
.map-road-line { fill:none; stroke:rgba(120,210,255,.34); stroke-width:6; stroke-linecap:round; stroke-linejoin:round; }
.map-road-line-secondary { stroke-width:4; stroke-dasharray:12 8; opacity:.88; }
.map-shape { vector-effect:non-scaling-stroke; }
.map-object { cursor:pointer; transition:opacity .18s ease, transform .18s ease; }
.map-object:hover { opacity:.98; }
.map-object-dim { opacity:.22; }
.map-object-selected .map-shape, .map-object-selected .map-point-core, .map-object-selected .map-pulse { filter: drop-shadow(0 0 14px rgba(0,216,255,.42)); animation:selectedMapPulse 1.8s ease-in-out infinite; }
.map-risk .map-point-core { animation:riskAlarm 2.1s ease-in-out infinite; }
.map-label { font: 600 11px/1.2 "Microsoft YaHei","PingFang SC",sans-serif; fill:#f4f8ff; paint-order:stroke; stroke:rgba(7,17,31,.95); stroke-width:4px; stroke-linejoin:round; }
.map-label-sub { font-size:10px; font-weight:400; fill:rgba(232,244,255,.72); stroke-width:3px; }
.map-label-line { fill:rgba(232,244,255,.82); }
.map-line .map-shape, .map-line-water .map-shape { fill:none; stroke:url(#mapWaterStroke); stroke-width:7; stroke-linecap:round; stroke-linejoin:round; }
.map-line-drainage .map-shape { fill:none; stroke:url(#mapDrainStroke); stroke-width:6; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:12 10; }
.map-line-gas .map-shape { fill:none; stroke:url(#mapGasStroke); stroke-width:7; stroke-linecap:round; stroke-linejoin:round; }
.map-line-power .map-shape { fill:none; stroke:#f2c14e; stroke-width:5; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:10 8; }
.map-line-telecom .map-shape { fill:none; stroke:#8f7cff; stroke-width:5; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:6 7; }
.map-road .map-shape { fill:none; stroke:rgba(120,210,255,.22); stroke-width:6; stroke-linecap:round; stroke-linejoin:round; }
.map-workarea .map-shape { fill:rgba(0,216,255,.08); stroke:rgba(0,216,255,.38); stroke-width:2; stroke-dasharray:10 8; }
.map-delivery-area .map-shape { fill:rgba(242,193,78,.09); stroke:rgba(242,193,78,.46); stroke-width:2; stroke-dasharray:11 8; }
.map-point .map-point-core { fill:var(--upms-cyan); stroke:#f4f8ff; stroke-width:2; }
.map-point-point .map-point-core { fill:var(--upms-cyan); }
.map-point-manhole .map-point-core { fill:#7fa0bf; }
.map-point-valve .map-point-core { fill:#f2c14e; }
.map-point-reviewed .map-point-core { fill:var(--upms-green); }
.map-risk .map-point-core { fill:#ff5a58; }
.map-quality-issue .map-point-core { fill:#ff7a00; }
.map-team .map-point-core { fill:#8f7cff; }
.map-point .map-cross path, .map-point .map-check path { fill:none; stroke:#f4f8ff; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.map-pulse { fill:none; stroke:rgba(255,90,88,.5); stroke-width:2; animation:mapPulse 1.9s ease-in-out infinite; }
.map-pulse-risk { stroke:rgba(255,90,88,.58); }
.map-focus-frame { fill:none; stroke:rgba(0,216,255,.26); stroke-width:2; stroke-dasharray:14 12; }
.map-object-detail { position:relative; min-height:360px; height:clamp(360px, 46vh, 460px); border:1px solid rgba(120,210,255,.14); border-radius:22px; background: linear-gradient(180deg, rgba(11,27,45,.92), rgba(7,17,31,.96)); padding:14px; display:grid; align-content:start; gap:10px; overflow:auto; }
.map-object-detail-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.map-object-detail-title { color:var(--upms-text-main); font-size:15px; font-weight:800; letter-spacing:.03em; }
.map-object-detail-sub { color:var(--upms-text-secondary); font-size:12px; margin-top:4px; }
.map-object-detail-summary { color:var(--upms-text-main); font-size:13px; line-height:1.7; }
.map-object-detail-meta { display:grid; gap:8px; }
.map-detail-row { display:flex; justify-content:space-between; gap:12px; color:var(--upms-text-secondary); font-size:12px; padding:8px 10px; border-radius:12px; background:rgba(255,255,255,.03); }
.map-detail-row strong { color:var(--upms-text-main); font-weight:700; text-align:right; }
.map-object-detail-block { display:grid; gap:8px; padding-top:4px; }
.map-object-detail-block-label { color:var(--upms-text-secondary); font-size:12px; letter-spacing:.04em; }
.map-object-chip-list { display:flex; flex-wrap:wrap; gap:8px; }
.map-object-chip { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:rgba(0,216,255,.12); color:var(--upms-text-main); font-size:12px; border:1px solid rgba(0,216,255,.2); }
.map-object-detail-note { color:var(--upms-text-secondary); font-size:12px; line-height:1.6; }
.map-clear-selection { border:1px solid rgba(120,210,255,.2); background:rgba(255,255,255,.04); color:var(--upms-text-main); border-radius:999px; padding:7px 12px; font-size:12px; cursor:pointer; }
.map-clear-selection:hover { border-color:rgba(0,216,255,.42); }
.map-object-detail-empty { display:grid; gap:12px; align-content:start; }
.map-footnote { position:relative; z-index:1; padding:0 16px 16px; color:var(--upms-text-secondary); font-size:12px; letter-spacing:.05em; }
.map-tooltip { position:fixed; z-index:220; pointer-events:none; max-width:280px; padding:12px 13px; border-radius:14px; background:rgba(7,17,31,.96); border:1px solid rgba(120,210,255,.26); box-shadow:var(--upms-shadow-panel); color:var(--upms-text-main); backdrop-filter: blur(10px); }
.map-tooltip-title { font-size:13px; font-weight:800; margin-bottom:4px; }
.map-tooltip-sub { color:var(--upms-text-secondary); font-size:11px; margin-bottom:6px; }
.map-tooltip-row { color:var(--upms-text-main); font-size:11px; line-height:1.55; }
.queue-row.is-active, .risk-alert-row.is-active { border:1px solid rgba(0,216,255,.42); background:rgba(0,216,255,.12); box-shadow:0 0 0 1px rgba(0,216,255,.1) inset, 0 12px 30px rgba(0,216,255,.06); }
.task-row.is-active { position:relative; border-color:rgba(0,216,255,.5); background:linear-gradient(90deg, rgba(0,216,255,.14), rgba(255,255,255,.03)); }
.task-row.is-active:before { content:''; position:absolute; left:0; top:8px; bottom:8px; width:3px; border-radius:999px; background:var(--upms-cyan); box-shadow:0 0 14px rgba(0,216,255,.32); }
.queue-row.is-active span:last-child, .risk-alert-row.is-active span:last-child { color:var(--upms-text-main); }
.task-row-actions { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.task-row-actions button { border:1px solid rgba(120,210,255,.16); background:rgba(255,255,255,.04); color:var(--upms-text-main); border-radius:999px; padding:5px 8px; font-size:11px; cursor:pointer; }
.task-row-actions button:hover { border-color:rgba(0,216,255,.4); color:var(--upms-cyan); }
.metric-card { text-align:left; cursor:pointer; color:var(--upms-text-main); transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.metric-card:hover { transform:translateY(-2px); border-color:rgba(0,216,255,.36); }
.metric-card .metric-kicker { color:var(--upms-text-muted); font-size:11px; letter-spacing:.1em; text-transform:uppercase; }
.metric-card .metric-title { display:block; color:var(--upms-text-main); font-weight:800; }
.metric-card small { color:var(--upms-text-secondary); line-height:1.35; font-size:11px; }
.metric-card em { color:var(--upms-cyan); font-style:normal; font-size:12px; }
.metric-card.risk {
  background: rgba(255, 122, 0, .08);
  border-color: rgba(255, 122, 0, .24);
}
.severity-badge { display:inline-flex; align-items:center; justify-content:center; min-width:34px; padding:4px 8px; border-radius:999px; font-size:12px; font-weight:800; }
.severity-low { color:var(--upms-cyan); border-color:rgba(0,216,255,.18); }
.severity-medium { color:var(--upms-gold); border-color:rgba(242,193,78,.22); }
.severity-high { color:var(--upms-orange); border-color:rgba(255,122,0,.28); }
.severity-critical { color:#ff9aa1; border-color:rgba(239,68,68,.34); box-shadow:0 0 18px rgba(239,68,68,.12); }
.severity-badge.severity-low { background:rgba(0,216,255,.1); }
.severity-badge.severity-medium { background:rgba(242,193,78,.12); }
.severity-badge.severity-high { background:rgba(255,122,0,.14); }
.severity-badge.severity-critical { background:rgba(239,68,68,.16); }
.workbench-panel { display:none; gap:10px; min-height:0; }
.workbench-panel.active { display:grid; grid-template-rows:auto minmax(0,1fr); }
.workbench-layout { display:grid; grid-template-columns:210px minmax(0,1fr) 248px; gap:10px; align-items:stretch; min-height:0; overflow:hidden; }
.workbench-context,
.workbench-main,
.workbench-evidence { min-width:0; border:1px solid rgba(120,210,255,.14); border-radius:22px; background:linear-gradient(180deg, rgba(10,28,48,.78), rgba(7,17,31,.84)); box-shadow:0 16px 42px rgba(0,0,0,.2); }
.workbench-context,
.workbench-evidence { display:grid; align-content:start; gap:9px; padding:10px; max-height:100%; overflow-y:auto; }
.workbench-main { padding:12px; min-height:0; overflow:auto; }
.workbench-hero { display:flex; justify-content:space-between; gap:12px; align-items:stretch; margin-bottom:8px; padding:10px 14px; border:1px solid rgba(120,210,255,.18); border-radius:18px; background:linear-gradient(135deg, rgba(0,216,255,.1), rgba(10,28,48,.82) 44%, rgba(242,193,78,.06)); box-shadow:0 12px 32px rgba(0,0,0,.18); }
.workbench-hero h1 { margin:3px 0 3px; font-size:18px; letter-spacing:.02em; }
.workbench-hero p { margin:0; color:var(--upms-text-secondary); line-height:1.4; font-size:12px; max-width:720px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.workbench-domain { display:inline-flex; padding:3px 8px; border-radius:999px; color:var(--upms-cyan); background:rgba(0,216,255,.1); border:1px solid rgba(0,216,255,.18); font-size:11px; font-weight:800; }
.workbench-hero aside { min-width:190px; display:grid; align-content:center; gap:3px; padding:9px 11px; border-radius:14px; border:1px solid rgba(120,210,255,.14); background:rgba(7,17,31,.54); }
.workbench-hero aside strong { color:var(--upms-text-main); font-size:12px; }
.workbench-hero aside span, .workbench-footer-note { color:var(--upms-text-secondary); font-size:11px; line-height:1.4; }
.workbench-rail-title { color:var(--upms-cyan); font-size:12px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.workbench-kv { display:grid; gap:4px; padding:8px; border:1px solid rgba(120,210,255,.12); border-radius:12px; background:rgba(3,10,19,.36); color:var(--upms-text-main); }
.workbench-evidence .workbench-kv,
.workbench-context .workbench-kv { background:linear-gradient(180deg, rgba(3,10,19,.72), rgba(9,24,42,.58)); border-color:rgba(120,210,255,.16); }
.workbench-kv span { color:var(--upms-text-muted); font-size:11px; background:transparent; }
.workbench-kv strong { display:block; color:var(--upms-text-main); background:transparent; font-size:12px; line-height:1.55; white-space:normal; }
.workbench-evidence .workbench-kv strong { color:#e8f4ff; text-shadow:0 0 12px rgba(0,216,255,.08); }
.workbench-metric-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.workbench-metric-actions button { border:1px solid rgba(120,210,255,.22); border-radius:999px; background:rgba(0,216,255,.08); color:var(--upms-cyan); padding:5px 8px; font-size:11px; font-weight:700; cursor:pointer; }
.workbench-metric-actions button:hover,
.workbench-metric-actions button:focus-visible { border-color:rgba(0,216,255,.48); background:rgba(0,216,255,.16); color:#fff; outline:none; }
.workbench-note { color:var(--upms-text-secondary); font-size:11px; line-height:1.45; padding:8px; border-radius:12px; background:rgba(0,216,255,.045); border:1px dashed rgba(0,216,255,.14); }
.workbench-footer-note { margin-top:16px; padding:12px 14px; border:1px dashed rgba(120,210,255,.18); border-radius:16px; background:rgba(255,255,255,.025); }
.panel.workbench-panel.active { display:grid; }
.workbench-main > .page-title,
.workbench-main > .page-subtitle { display:none; }
.workbench-main > .toolbar,
.workbench-main > .card,
.workbench-main > .card-grid,
.workbench-main > .project-workbench-summary,
.workbench-main > .project-workbench-layout,
.workbench-main > .project-quick-actions,
.workbench-main > .split-layout,
.workbench-main > .validation-list,
.workbench-main > [id$="Result"] { border-radius:22px; }
.workbench-main > .toolbar { display:flex; flex-wrap:wrap; gap:7px; align-items:center; margin:0 0 8px; padding:8px; border:1px solid rgba(120,210,255,.14); background:linear-gradient(180deg, rgba(8,22,38,.82), rgba(7,17,31,.7)); max-width:100%; overflow-x:auto; }
.workbench-main .search-input,
.workbench-main .filter-select { min-height:32px; border:1px solid rgba(120,210,255,.2); border-radius:10px; background:rgba(3,10,19,.58); color:var(--upms-text-main); padding:6px 10px; outline:none; box-shadow:inset 0 0 0 1px rgba(0,216,255,.03); font-size:12px; }
.workbench-main .search-input { min-width:220px; }
.workbench-main .search-input::placeholder { color:rgba(167,189,214,.72); }
.workbench-main .filter-select { min-width:132px; color:#e8f4ff; background:#081827; }
.workbench-main .filter-select option { color:#f4f8ff; background:#10243a; }
.workbench-main .search-input:focus,
.workbench-main .filter-select:focus { border-color:rgba(0,216,255,.42); box-shadow:0 0 0 3px rgba(0,216,255,.08); }
.project-workbench-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 14px; }
.project-summary-card { display:grid; gap:6px; padding:14px; border:1px solid rgba(120,210,255,.18); border-radius:18px; background:linear-gradient(180deg, rgba(8,25,44,.96), rgba(5,14,25,.94)); box-shadow:inset 0 0 0 1px rgba(0,216,255,.035), 0 12px 28px rgba(0,0,0,.2); }
.project-summary-card strong { color:var(--upms-text-main); font-size:20px; }
.project-summary-card small { color:var(--upms-text-secondary); line-height:1.5; }
.project-workbench-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:14px; align-items:start; }
.project-list-column .card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.project-card {
  width:100%;
  min-height:156px;
  display:grid;
  gap:10px;
  padding:16px;
  text-align:left;
  color:var(--upms-text-main);
  cursor:pointer;
  border:1px solid rgba(120,210,255,.2);
  border-radius:18px;
  appearance:none;
  background:linear-gradient(180deg, rgba(8,25,44,.96), rgba(5,14,25,.94));
  box-shadow:inset 0 0 0 1px rgba(0,216,255,.035), 0 12px 28px rgba(0,0,0,.22);
}
.project-card .card-title { color:var(--upms-text-main); font-size:16px; line-height:1.35; }
.project-card .card-desc { color:#c8d9ec; }
.project-card .card-metrics { display:flex; flex-wrap:wrap; gap:8px; color:#a7bdd6; font-size:12px; }
.project-card .card-metrics b { color:var(--upms-cyan); font-size:14px; }
.project-card .light-hint { color:#8fa6c0; }
.project-card:hover { transform:translateY(-1px); border-color:rgba(0,216,255,.42); background:linear-gradient(180deg, rgba(10,32,56,.98), rgba(6,18,32,.96)); }
.project-card.selected { border-color:rgba(0,216,255,.62); background:linear-gradient(180deg, rgba(0,216,255,.13), rgba(8,25,44,.96) 42%, rgba(5,14,25,.96)); box-shadow:0 0 0 1px rgba(0,216,255,.16) inset, 0 14px 36px rgba(0,216,255,.12); }
.project-detail-card { display:grid; gap:12px; padding:16px; border:1px solid rgba(120,210,255,.2); border-radius:22px; background:linear-gradient(180deg, rgba(8,25,44,.97), rgba(5,14,25,.95)); box-shadow:inset 0 0 0 1px rgba(0,216,255,.035), 0 12px 28px rgba(0,0,0,.22); }
.project-detail-header h3 { margin:10px 0 6px; color:var(--upms-text-main); font-size:20px; }
.project-detail-header p, .project-detail-note { margin:0; color:var(--upms-text-secondary); font-size:12px; line-height:1.6; }
.first-use-guide { display:grid; gap:10px; margin:0 0 12px; padding:12px; border:1px solid rgba(0,216,255,.18); border-radius:16px; background:linear-gradient(180deg, rgba(0,216,255,.08), rgba(255,255,255,.025)); }
.first-use-head { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.first-use-head b { color:var(--upms-cyan); }
.first-use-head span { color:#9fb6d1; font-size:12px; }
.first-use-steps { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.first-use-steps button { display:grid; gap:4px; padding:10px; border:1px solid rgba(120,210,255,.15); border-radius:14px; background:rgba(3,10,19,.36); color:#e7f2ff; text-align:left; cursor:pointer; }
.first-use-steps button:hover { border-color:rgba(0,216,255,.42); transform:translateY(-1px); }
.first-use-steps strong { width:24px; height:24px; display:inline-grid; place-items:center; border-radius:999px; color:#03101d; background:var(--upms-cyan); font-size:12px; }
.first-use-steps span { color:#fff; font-weight:800; font-size:12px; }
.first-use-steps small, .first-use-guide p { margin:0; color:#9fb6d1; font-size:11px; line-height:1.55; }
.first-use-guide.is-compact .first-use-steps { grid-template-columns:1fr; }
.project-ops-board { display:grid; gap:10px; margin-top:2px; }
.ops-card { display:grid; gap:7px; padding:12px; border:1px solid rgba(120,210,255,.15); border-radius:16px; background:rgba(3,10,19,.34); }
.ops-card b { color:var(--upms-cyan); font-size:13px; letter-spacing:.02em; }
.ops-card p { margin:0; color:#e7f2ff; font-size:12px; line-height:1.65; }
.ops-card small { color:#9fb6d1; font-size:11px; line-height:1.55; }
.ops-stage-list, .ops-risk-list { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.ops-stage-list li, .ops-risk-list li { display:flex; justify-content:space-between; gap:8px; padding:7px 8px; border-radius:10px; background:rgba(255,255,255,.028); color:#d8e8f8; font-size:12px; }
.ops-stage-list li small, .ops-risk-list li small { text-align:right; color:#9fb6d1; }
.ops-stage-list li.is-current { background:rgba(0,216,255,.12); color:#fff; box-shadow:inset 3px 0 0 var(--upms-cyan); }
.ops-stage-list li.is-done { color:#b8f5d2; }
.project-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.project-detail-grid span { display:grid; gap:4px; padding:10px; border:1px solid rgba(120,210,255,.16); border-radius:14px; background:rgba(0,216,255,.055); color:#9fb6d1; font-size:11px; }
.project-detail-grid strong { color:#f4f8ff; font-size:13px; }
.project-quick-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; padding:12px; border:1px solid rgba(120,210,255,.14); background:rgba(255,255,255,.025); }
.project-quick-actions button { border:1px solid rgba(120,210,255,.18); background:rgba(0,216,255,.08); color:var(--upms-text-main); border-radius:999px; padding:8px 13px; cursor:pointer; }
.project-quick-actions button:hover { border-color:rgba(0,216,255,.42); transform:translateY(-1px); }
.project-quick-actions button.danger { background:rgba(239,68,68,.1); border-color:rgba(239,68,68,.22); }
.project-form-host, .pipe-form-host { margin-top:14px; margin-bottom:14px; }
.project-form-panel { display:grid; gap:14px; padding:16px; border:1px solid rgba(120,210,255,.18); border-radius:22px; background:linear-gradient(180deg, rgba(8,25,44,.96), rgba(5,14,25,.94)); }
.project-form-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.project-form-head h3 { margin:0; color:var(--upms-text-main); }
.project-form-head button { border:1px solid rgba(120,210,255,.18); background:rgba(255,255,255,.04); color:var(--upms-text-main); border-radius:999px; padding:6px 10px; cursor:pointer; }
.project-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.project-form-grid label { display:grid; gap:5px; color:#9fb6d1; font-size:12px; }
.project-form-grid label.wide { grid-column:1 / -1; }
.project-form-grid input, .project-form-grid select, .project-form-grid textarea { min-height:36px; border:1px solid rgba(120,210,255,.18); border-radius:12px; background:rgba(3,10,19,.82); color:#f4f8ff; padding:8px 10px; outline:none; }
.project-form-grid select option { color:#f4f8ff; background:#10243a; }
.project-form-grid textarea { min-height:72px; resize:vertical; }
.project-form-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.empty-state { padding:14px; border:1px dashed rgba(120,210,255,.18); border-radius:14px; background:rgba(0,216,255,.045); color:var(--upms-text-secondary); font-size:12px; line-height:1.6; }
.table td strong { display:block; color:var(--upms-text-main); font-size:12px; }
.table td small { display:block; color:var(--upms-text-muted); font-size:10px; margin-top:3px; }
.survey-hint { display:inline-flex; max-width:220px; padding:5px 8px; border-radius:10px; font-size:11px; line-height:1.45; border:1px solid rgba(120,210,255,.14); background:rgba(255,255,255,.03); color:#d7e8f8; }
.survey-hint.is-warning { color:#ffd48c; border-color:rgba(255,122,0,.22); background:rgba(255,122,0,.08); }
.survey-hint.is-ok { color:#9df2c6; border-color:rgba(34,197,94,.22); background:rgba(34,197,94,.08); }
.pipe-detail-panel { gap:9px; }
.surveyor-advice { margin-top:10px; padding:12px; border:1px solid rgba(0,216,255,.18); border-radius:14px; background:linear-gradient(180deg, rgba(0,216,255,.08), rgba(255,255,255,.025)); }
.surveyor-advice b { color:var(--upms-cyan); font-size:13px; }
.surveyor-advice p { margin:6px 0 0; color:#cfe0f2; font-size:12px; line-height:1.65; }
.business-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }
.business-grid span { display:grid; gap:4px; padding:10px; border:1px solid rgba(120,210,255,.12); border-radius:14px; background:rgba(255,255,255,.025); color:var(--upms-text-muted); font-size:11px; }
.business-grid strong { color:var(--upms-text-main); font-size:13px; }
.evidence-chain-panel { animation:evidenceSlideIn .22s ease-out both; }
.evidence-chain-panel.status-approved { border-color:rgba(34,197,94,.32); box-shadow:0 0 0 1px rgba(34,197,94,.1) inset; }
.evidence-chain-panel.status-returned { border-color:rgba(255,122,0,.36); box-shadow:0 0 0 1px rgba(255,122,0,.1) inset; }
.evidence-chain-panel.status-escalated { border-color:rgba(239,68,68,.4); box-shadow:0 0 0 1px rgba(239,68,68,.12) inset; }
.evidence-chain-grid { display:grid; gap:8px; margin:12px 0; }
.evidence-row { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid rgba(120,210,255,.12); border-radius:14px; background:rgba(255,255,255,.03); color:var(--upms-text-secondary); font-size:12px; }
.evidence-row strong { color:var(--upms-text-main); text-align:right; }
.evidence-chip-list { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.evidence-chip { display:inline-flex; padding:6px 10px; border-radius:999px; border:1px solid rgba(120,210,255,.16); background:rgba(255,255,255,.035); font-size:12px; }
.return-owner-group { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0; padding:10px; border-radius:14px; background:rgba(255,122,0,.06); border:1px solid rgba(255,122,0,.14); }
.return-owner-group span { color:var(--upms-text-muted); font-size:12px; }
.return-owner-group button { border:1px solid rgba(255,122,0,.2); background:rgba(255,255,255,.04); color:var(--upms-text-main); border-radius:999px; padding:6px 10px; cursor:pointer; }
.return-owner-group strong { color:var(--upms-orange); font-size:12px; }
.task-trigger-panel { position:relative; overflow:hidden; }
.task-trigger-panel:after { content:''; position:absolute; inset:0; background:linear-gradient(110deg, transparent 0%, rgba(0,216,255,.08) 46%, transparent 72%); transform:translateX(-100%); animation:taskSheen 2.8s ease-in-out infinite; pointer-events:none; }
.role-path-step.is-current { color:var(--upms-cyan); border-color:rgba(0,216,255,.38); background:rgba(0,216,255,.12); }
.sync-batch-panel { display:grid; gap:12px; }
.sync-batch-list { display:grid; gap:8px; }
.sync-batch-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:stretch; }
.sync-batch-card { display:grid; grid-template-columns:minmax(0,1.5fr) .8fr .5fr .6fr; gap:10px; align-items:center; width:100%; padding:10px 12px; border:1px solid rgba(120,210,255,.14); border-radius:14px; background:rgba(255,255,255,.025); color:var(--upms-text-main); text-align:left; cursor:pointer; }
.sync-batch-card:hover { border-color:rgba(0,216,255,.36); background:rgba(0,216,255,.08); }
.sync-batch-card small { display:block; color:var(--upms-text-muted); font-size:11px; margin-top:3px; overflow:hidden; text-overflow:ellipsis; }
.sync-apply-btn { align-self:stretch; min-width:128px; }
.sync-batch-items { padding-top:8px; max-height:calc(100vh - 330px); overflow:auto; }
.sync-apply-result { display:grid; gap:10px; margin:4px 0 12px; padding:13px; border:1px solid rgba(0,216,255,.18); border-radius:18px; background:rgba(0,216,255,.055); }
.sync-item-table code { color:var(--upms-cyan); white-space:normal; word-break:break-all; }
.sync-conflict-row td { background:rgba(239,68,68,.06); }
.queue-row:hover, .stage-row:hover, .detail-actions button:hover, .role-path-step:hover { transform:translateY(-1px); }
@keyframes taskSheen { 0%, 62% { transform:translateX(-100%); opacity:0; } 74% { opacity:.75; } 100% { transform:translateX(100%); opacity:0; } }
@keyframes mapPulse { 0% { transform: scale(.86); opacity:.22; } 50% { transform: scale(1.04); opacity:.5; } 100% { transform: scale(1.22); opacity:0; } }
@keyframes selectedMapPulse { 0%,100% { opacity:1; } 50% { opacity:.82; } }
@keyframes riskAlarm { 0%,100% { filter:drop-shadow(0 0 4px rgba(239,68,68,.34)); } 50% { filter:drop-shadow(0 0 13px rgba(239,68,68,.58)); } }
@keyframes evidenceSlideIn { from { opacity:0; transform:translateX(10px); } to { opacity:1; transform:translateX(0); } }
/* Keep legacy panel controls in the DOM for routing, without duplicating navigation visually. */
.nav-menu.legacy-nav { display: none; }
@media (max-width:1439px){.sprint2-dashboard{grid-template-columns:1fr}.home-side{grid-template-columns:repeat(2,minmax(0,1fr))}.project-workbench-layout{grid-template-columns:1fr}.project-workbench-summary{grid-template-columns:1fr}.project-list-column .card-grid{grid-template-columns:1fr}.first-use-steps{grid-template-columns:1fr 1fr}}
@media (max-width:1199px){.home-main{grid-template-areas:'topline' 'map' 'metrics' 'stage' 'tasks' 'issues' 'review' 'delivery' 'drill'; grid-template-columns:1fr}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#stage-gates .stage-list{grid-template-columns:1fr}.map-stage{grid-template-columns:1fr}.map-stage-shell,.map-object-detail{min-height:420px}.project-map-toolbar{flex-direction:column; align-items:flex-start}.project-map-toolbar-right{max-width:none; justify-items:flex-start}.map-layer-list{justify-content:flex-start}}
@media(max-width:959px){.sprint2-dashboard{display:none}.sgm-dashboard.active:before{content:'建议使用移动端任务体验';display:block;padding:40px;text-align:center;color:var(--upms-text-secondary)}.app-shell{grid-template-columns:180px minmax(0,1fr)}.topbar-search{display:none}}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 16% 10%, rgba(0, 216, 255, 0.14), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(242, 193, 78, 0.10), transparent 20%),
    radial-gradient(circle at 70% 82%, rgba(30, 140, 255, 0.10), transparent 22%),
    linear-gradient(180deg, #08111f 0%, #060d18 45%, #030915 100%);
}

body {
  height: 100vh;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.22;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.25) 88%, transparent);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { color: var(--upms-text-main); }
select option { color: #07111f; }

.theme-switcher {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  padding: 7px 10px;
  border: 1px solid var(--upms-border);
  border-radius: 12px;
  background: var(--upms-bg-glass);
}
.theme-switcher span {
  color: var(--upms-text-muted);
  font-size: 10px;
}
.theme-switcher select {
  min-width: 96px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--upms-text-main);
  font-weight: 700;
}

.mock-banner {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 16px;
  color: rgba(167, 189, 214, 0.95);
  background: rgba(3, 9, 21, 0.88);
  border-bottom: 1px solid rgba(0, 216, 255, 0.12);
  backdrop-filter: blur(14px);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.mock-banner-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 216, 255, 0.12);
  color: var(--cyan);
  font-weight: 700;
}

.mock-banner-sep { color: rgba(167, 189, 214, 0.28); }

.app-shell,
.app-container {
  width: 100%;
  height: calc(100vh - var(--upms-envbar-height));
  min-height: calc(100vh - var(--upms-envbar-height));
  display: grid;
  grid-template-columns: var(--upms-sidebar-width) minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: var(--upms-envbar-height);
  align-self: start;
  height: calc(100vh - var(--upms-envbar-height));
  min-height: calc(100vh - var(--upms-envbar-height));
  display: flex;
  flex-direction: column;
  padding: 18px 16px 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 22, 39, 0.96), rgba(5, 12, 22, 0.98)),
    radial-gradient(circle at top, rgba(0, 216, 255, 0.12), transparent 42%);
  border-right: 1px solid rgba(110, 180, 255, 0.16);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.02);
  backdrop-filter: blur(16px);
}

.sidebar-header {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(110, 180, 255, 0.12);
}

.system-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.system-brand-logo {
  width: 60px;
  height: 58px;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.system-brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.20)) drop-shadow(0 0 14px rgba(0,216,255,.10));
}

.system-brand-copy { min-width: 0; }

.system-brand-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.system-brand-desc {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.sidebar-brand-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.nav-menu {
  list-style: none;
  padding: 14px 0 12px;
  margin: 0;
  display: grid;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px 10px 14px;
  border-radius: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background 160ms ease;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.03);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--text-main);
  background: linear-gradient(90deg, rgba(0, 216, 255, 0.13), rgba(30, 140, 255, 0.06));
  box-shadow: inset 0 0 0 1px rgba(0, 216, 255, 0.18);
}

.nav-item.active::before { background: linear-gradient(180deg, var(--gold), var(--cyan)); }

.nav-icon,
.nav-glyph {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--upms-cyan);
  border: 1px solid rgba(0, 216, 255, 0.12);
  border-radius: 7px;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  background: rgba(0, 216, 255, 0.06);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(110, 180, 255, 0.12);
}

.sidebar-slogan,
.sidebar-tagline,
.sidebar-user-name,
.sidebar-user-role {
  margin: 0;
}

.sidebar-slogan {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
}

.sidebar-tagline,
.sidebar-user-role {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.sidebar-project-card,
.sidebar-user-card {
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(11, 24, 42, 0.98), rgba(8, 17, 30, 0.92));
  border: 1px solid rgba(110, 180, 255, 0.14);
}
.sidebar-actor-card { border-color:rgba(0,216,255,.18); background:linear-gradient(180deg, rgba(0,216,255,.08), rgba(8,17,30,.92)); }

.sidebar-project-label,
.sidebar-user-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-project-name,
.sidebar-user-name {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
}

.main-stage,
.main-content {
  min-width: 0;
  height: calc(100vh - var(--upms-envbar-height));
  min-height: 0;
  padding: 0 0 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar,
.sgm-topbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 10px;
  min-height: 60px;
  padding: 12px 0 12px 0;
  margin-bottom: 8px;
  border-radius: 0;
  border: 1px solid rgba(110, 180, 255, 0.16);
  background: rgba(10, 24, 40, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}

.sprint2-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(250px, 0.74fr) auto;
  grid-template-areas: "context search actions";
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0 14px;
  gap: 8px;
}

.topbar-context,
.topbar-actions {
  display: flex;
  min-width: 0;
}

.topbar-context {
  grid-area: context;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.topbar-context--empty {
  min-width: 0;
}

.topbar-context--empty .topbar-project-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: clamp(360px, 36vw, 560px);
}

.topbar-context--empty .topbar-project-block span {
  flex: 0 0 auto;
}

.topbar-context--empty .topbar-stage-pill {
  flex: 1 1 auto;
  margin-left: auto;
  max-width: none;
  white-space: nowrap;
}

.topbar-search {
  grid-area: search;
  min-width: 0;
  width: min(100%, 300px);
  justify-self: start;
}

.topbar-actions {
  grid-area: actions;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.topbar-context .topbar-project-block {
  min-width: 0;
  padding: 5px 8px;
}

.topbar-context .topbar-select {
  width: clamp(128px, 9vw, 176px);
  min-width: 0;
  max-width: 100%;
}

.topbar-stage-pill {
  flex: 0 1 auto;
  margin-left: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 5px 8px;
  max-width: clamp(132px, 12vw, 186px);
  color: var(--upms-text-secondary);
  background: rgba(15, 127, 184, 0.08);
  border-color: rgba(15, 127, 184, 0.14);
  font-size: 11px;
  font-weight: 700;
}

.topbar-context--empty .topbar-stage-pill,
.topbar-context--empty .topbar-project-block span {
  color: var(--upms-text-secondary);
}

@media (max-width: 1240px) {
  .sprint2-topbar {
    padding: 0 10px;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "context actions"
      "search actions";
    align-items: start;
  }
  .topbar-context { gap: 8px; }
  .topbar-actions { align-self: start; justify-content: flex-end; }
  .topbar-search { min-width: 0; width: min(100%, 340px); justify-self: start; }
}

@media (max-width: 1180px) {
  .topbar,
  .sgm-topbar { grid-template-columns: minmax(0, 1fr); }
  .sprint2-topbar { padding: 0 10px; gap: 10px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "context" "search" "actions"; }
  .topbar-context { flex-wrap: wrap; }
  .topbar-project-block { padding: 6px 8px; }
  .topbar-context .topbar-select { width: clamp(144px, 24vw, 208px); }
  .topbar-search { min-width: 0; width: 100%; }
  .topbar-actions { justify-content: flex-start; }
  .topbar-action,
  .topbar-stage-pill {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

@media (max-width: 1080px) {
  .sprint2-topbar { gap: 8px; }
  .theme-switcher { padding: 6px 8px; }
  .topbar-context .topbar-select { width: clamp(138px, 26vw, 196px); }
  .topbar-actions { gap: 8px; }
}

body[data-theme="engineering-light"] {
  background:
    linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
}

body[data-theme="engineering-light"]::before {
  opacity: 0.18;
  background:
    linear-gradient(90deg, rgba(71,85,105,0.06) 1px, transparent 1px),
    linear-gradient(rgba(71,85,105,0.06) 1px, transparent 1px);
}

body[data-theme="engineering-light"] .main-stage,
body[data-theme="engineering-light"] .main-content {
  background: #eef2f7;
}

body[data-theme="engineering-light"] .topbar,
body[data-theme="engineering-light"] .sgm-topbar,
body[data-theme="engineering-light"] .workbench-context,
body[data-theme="engineering-light"] .workbench-main,
body[data-theme="engineering-light"] .workbench-evidence,
body[data-theme="engineering-light"] .home-module,
body[data-theme="engineering-light"] .map-placeholder,
body[data-theme="engineering-light"] .project-detail-card,
body[data-theme="engineering-light"] .card,
body[data-theme="engineering-light"] .split-main,
body[data-theme="engineering-light"] .split-side,
body[data-theme="engineering-light"] .quality-center-section,
body[data-theme="engineering-light"] .delivery-responsibility,
body[data-theme="engineering-light"] .delivery-check-card,
body[data-theme="engineering-light"] .delivery-command,
body[data-theme="engineering-light"] .quality-command,
body[data-theme="engineering-light"] .mapping-command {
  background: #ffffff;
  border-color: #d7dee8;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body[data-theme="engineering-light"] .sprint2-dashboard,
body[data-theme="engineering-light"] .workbench-hero {
  background: #f8fafc;
  border-color: #d7dee8;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.10);
}

body[data-theme="engineering-light"] .workbench-kv,
body[data-theme="engineering-light"] .workbench-evidence .workbench-kv,
body[data-theme="engineering-light"] .workbench-context .workbench-kv,
body[data-theme="engineering-light"] .stage-row,
body[data-theme="engineering-light"] .queue-row,
body[data-theme="engineering-light"] .toolbar,
body[data-theme="engineering-light"] .workbench-main > .toolbar {
  background: #f8fafc;
  border-color: #dbe3ed;
}

body[data-theme="engineering-light"] .table th {
  background: #f1f5f9;
  color: #475569;
}

body[data-theme="engineering-light"] .table td {
  border-bottom-color: #e2e8f0;
}

body[data-theme="engineering-light"] .table tbody tr:hover td {
  background: #edf6ff;
}

body[data-theme="engineering-light"] .topline-action.primary {
  color: #ffffff;
  background: #2563eb;
  box-shadow: none;
}

body[data-theme="engineering-light"] .home-command-title,
body[data-theme="engineering-light"] .workbench-evidence .workbench-kv strong {
  text-shadow: none;
}

body[data-theme="cad-dark"] {
  background:
    linear-gradient(180deg, #24292f 0%, #1f2328 100%);
}

body[data-theme="cad-dark"] .main-stage,
body[data-theme="cad-dark"] .main-content {
  background: #1f2328;
}

body[data-theme="cad-dark"] .sprint2-dashboard,
body[data-theme="cad-dark"] .home-module,
body[data-theme="cad-dark"] .workbench-context,
body[data-theme="cad-dark"] .workbench-main,
body[data-theme="cad-dark"] .workbench-evidence,
body[data-theme="cad-dark"] .topbar,
body[data-theme="cad-dark"] .sgm-topbar {
  background: #2a3037;
  border-color: rgba(171, 184, 195, 0.22);
  box-shadow: 0 10px 24px rgba(0,0,0,.20);
}

.sgm-topbar-left,
.sgm-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sgm-icon-button,
.topbar-icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 216, 255, 0.18);
  border-radius: 10px;
  color: var(--text-main);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
}

.sgm-location,
.sgm-weather,
.sgm-quality-pill,
.sgm-topbar-item,
.sgm-topbar-time,
.topbar-meta,
.topbar-time,
.topbar-week,
.topbar-status {
  color: var(--text-secondary);
  font-size: 12px;
}

.sgm-quality-pill,
.topbar-quality {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.18);
}

.sgm-topbar-item strong {
  margin-left: 4px;
  color: var(--red);
}

.panel { display: none; }
.panel.active { display: block; min-height:0; overflow:hidden; }
.main-stage > .panel.active,
.main-content > .panel.active { flex:1 1 auto; min-height:0; }

#panel-project-war-room.active {
  flex: 0 0 auto;
}

.page-title,
.dashboard-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 0;
}

.page-subtitle,
.dashboard-subtitle {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* Legacy dashboard/hero/KPI CSS removed after V2 home shell rebuild. */

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-value {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  margin-top: 8px;
}

.card-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag-mock { color: var(--cyan); background: rgba(0, 216, 255, 0.10); border: 1px solid rgba(0, 216, 255, 0.14); }
.tag-blocked { color: #ffb3b3; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.14); }
.tag-warning { color: #ffd48c; background: rgba(255, 122, 0, 0.12); border: 1px solid rgba(255, 122, 0, 0.14); }
.tag-ok { color: #7df0be; background: rgba(34, 197, 94, 0.10); border: 1px solid rgba(34, 197, 94, 0.14); }

.status-card,
.no-go-card {
  padding: 18px;
}

.status-card.blocked-card { border-left: 3px solid var(--red); }
.status-card.warning-card { border-left: 3px solid var(--orange); }
.status-card.ok-card { border-left: 3px solid var(--green); }

.light-hint,
.light-feedback {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.quality-command { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:14px; margin-bottom:14px; padding:16px; border:1px solid rgba(120,210,255,.18); border-radius:22px; background:linear-gradient(180deg, rgba(8,25,44,.96), rgba(5,14,25,.94)); box-shadow:inset 0 0 0 1px rgba(0,216,255,.035), 0 12px 28px rgba(0,0,0,.22); }
.quality-command h3 { margin:6px 0 8px; color:var(--upms-text-main); }
.quality-command p { margin:8px 0 0; color:#cfe0f2; font-size:12px; line-height:1.65; }
.quality-command strong.is-pass { color:var(--upms-green); font-size:24px; }
.quality-command strong.is-blocked { color:#ff9aa1; font-size:24px; }
.quality-command aside { display:grid; grid-template-columns:1fr auto; gap:7px 10px; align-content:start; padding:12px; border:1px solid rgba(120,210,255,.14); border-radius:16px; background:rgba(3,10,19,.36); }
.quality-command aside span { color:#9fb6d1; font-size:12px; }
.quality-command aside b { color:#fff; text-align:right; }
.project-war-room-workspace,
#projectWarRoomWorkspace {
  display: grid;
  gap: 6px;
  padding: 6px 0;
  align-content: start;
}

#projectWarRoomWorkspace > .quality-command {
  margin-bottom: 0;
  padding: 6px 12px;
}

#projectWarRoomWorkspace > .field-production-grid {
  margin-bottom: 6px;
}

#projectWarRoomWorkspace > .delivery-check-actions {
  margin-top: 0;
  padding: 6px 10px;
}

#panel-project-war-room .page-title {
  margin-bottom: 2px;
}

#panel-project-war-room .page-subtitle {
  margin-bottom: 4px;
}
.quality-owner-grid { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.quality-owner-grid span { display:flex; justify-content:space-between; gap:8px; padding:7px 8px; border-radius:10px; background:rgba(255,255,255,.035); }
.quality-owner-grid strong { color:var(--upms-cyan); }
.validation-list {
  display: grid;
  gap: 10px;
}

.validation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(110, 180, 255, 0.12);
  background: rgba(255,255,255,0.03);
}

.validation-item.warn { border-left: 3px solid var(--orange); }
.validation-item.blocked { border-left: 3px solid var(--red); }
.validation-item.ok { border-left: 3px solid var(--green); }
.quality-review-list .validation-item {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:flex-start;
}

.quality-review-list .validation-item > div {
  min-width:0;
}

.quality-review-list .validation-item b {
  display:block;
  white-space:normal;
  overflow-wrap:break-word;
  line-height:1.45;
}

.quality-review-list .quality-next-action {
  grid-column:1 / -1;
}

.quality-next-action { min-width:220px; display:grid; gap:6px; justify-items:end; }
.quality-next-action span { color:#9fb6d1; font-size:11px; }
.quality-next-action button { border:1px solid rgba(120,210,255,.18); background:rgba(0,216,255,.08); color:var(--upms-text-main); border-radius:999px; padding:6px 10px; font-size:11px; cursor:pointer; text-align:left; }
.quality-next-action button:hover { border-color:rgba(0,216,255,.42); }

.quality-review-list .quality-next-action {
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
}

.quality-review-list .quality-next-action span {
  flex:0 0 auto;
}

.quality-review-list .quality-next-action button {
  flex:0 1 auto;
}

.field-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.field-badge-required { color: var(--orange); }
.field-badge-placeholder { color: var(--text-muted); }
.field-badge-key { color: var(--cyan); font-weight: 700; }
.field-badge-blocked { color: var(--red); }

.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-main);
}

.table th,
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(110, 180, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 4;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(7,17,31,.96);
  backdrop-filter: blur(12px);
}

.table tbody tr:hover td {
  background: rgba(0, 216, 255, 0.04);
}

.table tbody tr.selected td {
  background: rgba(0, 216, 255, 0.08);
}

#panel-result-preview .card-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}

#panel-result-preview .data-card {
  min-height:96px;
  border:1px solid rgba(120,210,255,.16);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(7,22,38,.88), rgba(5,14,25,.9));
  box-shadow:inset 0 0 0 1px rgba(0,216,255,.03);
}

#panel-result-preview .data-card .card-label {
  color:var(--upms-text-secondary);
  font-size:11px;
}

#panel-result-preview .data-card .card-value {
  color:var(--upms-cyan);
  font-size:28px;
}

.mapping-center { margin:14px 0 16px; }
.mapping-command { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:14px; padding:16px; border:1px solid rgba(120,210,255,.18); border-radius:22px; background:linear-gradient(180deg, rgba(8,25,44,.96), rgba(5,14,25,.94)); box-shadow:inset 0 0 0 1px rgba(0,216,255,.035), 0 12px 28px rgba(0,0,0,.22); }
.mapping-command.can-map { border-color:rgba(34,197,94,.28); }
.mapping-command.is-blocked { border-color:rgba(255,122,0,.28); }
.mapping-command h3 { margin:6px 0 8px; color:var(--upms-text-main); }
.mapping-command strong { display:block; color:#ffcf8a; font-size:24px; }
.mapping-command.can-map strong { color:var(--upms-green); }
.mapping-command p { margin:8px 0 0; color:#cfe0f2; font-size:12px; line-height:1.65; }
.mapping-command aside { display:grid; grid-template-columns:1fr auto; gap:7px 10px; align-content:start; padding:12px; border:1px solid rgba(120,210,255,.14); border-radius:16px; background:rgba(3,10,19,.36); }
.mapping-command aside span { color:#9fb6d1; font-size:12px; }
.mapping-command aside b { color:#fff; text-align:right; }
.mapping-board { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; }
.mapping-board > div { padding:14px; border:1px solid rgba(120,210,255,.16); border-radius:18px; background:rgba(3,10,19,.34); }
.mapping-board h4 { margin:0 0 10px; color:var(--upms-cyan); }
.mapping-layer-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.mapping-layer-grid span { display:grid; gap:4px; padding:9px; border-radius:12px; background:rgba(255,255,255,.03); color:#9fb6d1; font-size:12px; box-shadow:inset 3px 0 0 var(--upms-slate); }
.mapping-layer-grid span.ready { color:#d8ffe8; box-shadow:inset 3px 0 0 var(--upms-green); }
.mapping-layer-grid strong { color:#fff; }
.mapping-board ul { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.mapping-board li { display:flex; justify-content:space-between; gap:10px; padding:9px 10px; border-radius:12px; background:rgba(255,255,255,.03); color:#d8e8f8; font-size:12px; }
.mapping-board li strong { color:#fff; text-align:right; }

#fieldMappingTable {
  table-layout:auto;
}

#fieldMappingTable th:first-child,
#fieldMappingTable td:first-child {
  min-width:110px;
  white-space:normal;
  word-break:keep-all;
}

#fieldMappingTable td:first-child .tag {
  white-space:nowrap;
}

#fieldMappingTable th:nth-child(2),
#fieldMappingTable td:nth-child(2),
#fieldMappingTable th:nth-child(6),
#fieldMappingTable td:nth-child(6) {
  min-width:130px;
}

.delivery-center { margin:14px 0 16px; }
.delivery-center-workspace, .version-archive-workspace { display:grid; gap:14px; }
.version-archive-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; max-height:calc(100vh - 320px); overflow:auto; }
.version-archive-card { display:grid; gap:7px; padding:13px; border:1px solid rgba(120,210,255,.14); border-radius:16px; background:rgba(3,10,19,.34); }
.version-archive-card.is-current { border-color:rgba(0,216,255,.36); box-shadow:0 0 22px rgba(0,216,255,.10); }
.version-archive-card.is-delivered { box-shadow:inset 3px 0 0 var(--upms-green); }
.version-archive-card strong { color:#fff; font-size:18px; }
.version-archive-card small, .version-archive-card em, .version-archive-card div { color:#a7bdd6; font-size:12px; font-style:normal; }
.version-archive-card div { display:flex; gap:10px; }
.field-production-workspace { display:grid; gap:14px; }
.field-command { border-color:rgba(0,216,255,.22); }
.field-production-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px; margin:0 0 14px; }
.field-flow-card,
.field-record-card,
.field-map-context { display:grid; gap:8px; padding:13px; border:1px solid rgba(120,210,255,.14); border-radius:16px; background:rgba(3,10,19,.34); }
.field-flow-card h4,
.field-record-card h4,
.field-production-board h4 { margin:0 0 8px; color:var(--upms-cyan); }
.field-task-layout { display:grid; grid-template-columns:minmax(280px,.95fr) minmax(0,1.05fr); gap:14px; }
.field-group-board { display:grid; gap:12px; }
.field-task-detail { min-width:0; display:grid; gap:12px; }
.field-map-context b,
.field-record-card strong,
.field-evidence-card strong,
.field-safety-card strong { color:#fff; }
.field-map-context span,
.field-record-card span,
.field-record-card small,
.field-evidence-card span,
.field-evidence-card small,
.field-evidence-card p,
.field-safety-card span,
.field-safety-card small { color:#a7bdd6; font-size:12px; line-height:1.5; }
.field-production-board { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; }
.field-production-board > div { padding:14px; border:1px solid rgba(120,210,255,.16); border-radius:18px; background:rgba(3,10,19,.34); }
.field-card-list { display:grid; gap:10px; }
.field-evidence-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; }
.field-evidence-card { display:grid; gap:8px; padding:14px; border:1px solid rgba(120,210,255,.15); border-radius:18px; background:linear-gradient(180deg, rgba(6,22,38,.72), rgba(3,10,19,.48)); box-shadow:inset 3px 0 0 rgba(0,216,255,.32); }
.field-evidence-card .detail-actions { margin-top:4px; }
.field-safety-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; }
.field-safety-card { display:grid; gap:6px; padding:12px; border:1px solid rgba(120,210,255,.12); border-radius:16px; background:rgba(255,255,255,.03); }
.field-safety-card.is-pass { box-shadow:inset 3px 0 0 var(--upms-green); }
.field-safety-card.is-blocked { box-shadow:inset 3px 0 0 var(--upms-orange); }
.field-action-bar { margin-top:0; }
.office-production-workspace { display:grid; gap:14px; }
.office-command { border-color:rgba(125,240,190,.24); }
.office-production-shell { display:grid; grid-template-columns:210px minmax(0,1fr) 320px; gap:14px; align-items:start; }
.office-tree-panel,
.office-linkage-canvas,
.office-inspector,
.office-bottom-rail > div { padding:14px; border:1px solid rgba(120,210,255,.16); border-radius:18px; background:rgba(3,10,19,.34); }
.office-tree-panel h4,
.office-linkage-canvas h4,
.office-inspector h4,
.office-bottom-rail h4 { margin:0 0 10px; color:var(--upms-cyan); }
.office-tree-panel { display:grid; gap:8px; }
.office-tree-row { display:flex; justify-content:space-between; align-items:center; gap:10px; width:100%; padding:9px 10px; border:1px solid rgba(120,210,255,.12); border-radius:12px; background:rgba(255,255,255,.03); color:#d8e8f8; cursor:pointer; text-align:left; }
.office-tree-row:hover,
.office-linkage-row:hover,
.office-linkage-row.is-active { border-color:rgba(0,216,255,.36); background:rgba(0,216,255,.08); }
.office-tree-row strong { color:#fff; font-size:12px; }
.office-linkage-canvas { display:grid; gap:8px; min-width:0; }
.office-conflict-queue { display:grid; gap:10px; padding:14px; border:1px solid rgba(255,122,0,.18); border-radius:18px; background:rgba(255,122,0,.055); }
.office-conflict-queue h4 { margin:0; color:#ffd28a; }
.office-conflict-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px 12px; border:1px solid rgba(255,122,0,.18); border-radius:14px; background:rgba(255,255,255,.03); color:#d9f3ff; cursor:pointer; text-align:left; }
.office-conflict-row.is-active { border-color:rgba(255,122,0,.45); background:rgba(255,122,0,.12); }
.office-conflict-row.is-resolved { box-shadow:inset 3px 0 0 var(--upms-green); }
.office-conflict-row small { display:block; margin-top:4px; color:#a7bdd6; }
.office-conflict-compare { display:grid; gap:6px; margin:10px 0; }
.office-conflict-compare-row { display:grid; grid-template-columns:96px minmax(0,1fr) minmax(0,1fr); gap:8px; align-items:center; padding:8px; border-radius:10px; background:rgba(255,255,255,.035); color:#a7bdd6; font-size:12px; }
.office-conflict-compare-row strong { color:#d8e8f8; }
.office-conflict-compare-row em { color:#ffd28a; font-style:normal; }
.office-conflict-compare-row.is-head { color:#9fb6d1; background:rgba(0,216,255,.055); }
.office-conflict-resolution { margin:8px 0; padding:9px 10px; border-radius:12px; background:rgba(34,197,94,.08); color:#9be7bd; font-size:12px; }
.office-linkage-row { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(120px,.7fr) auto; gap:10px; align-items:center; padding:10px 12px; border:1px solid rgba(120,210,255,.13); border-radius:14px; background:rgba(255,255,255,.03); color:#d9f3ff; cursor:pointer; text-align:left; }
.office-linkage-row b { color:#fff; }
.office-linkage-row small { display:block; margin-top:3px; color:#a7bdd6; }
.office-inspector { min-width:0; }
.office-bottom-rail { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(220px,.75fr); gap:14px; }
.office-check-row { display:grid; grid-template-columns:130px minmax(0,1fr) auto; gap:10px; align-items:center; padding:9px 0; border-top:1px solid rgba(120,210,255,.10); }
.office-check-row:first-of-type { border-top:0; }
.office-check-row span { color:#9fb6d1; font-size:12px; }
.office-check-row strong { color:#fff; font-size:12px; }
.office-check-row em { font-style:normal; }
.office-action-log { display:grid; gap:8px; margin:0; padding:0; list-style:none; color:#cfe0f2; font-size:12px; }
.office-action-log li { padding:8px 9px; border-radius:10px; background:rgba(255,255,255,.035); }
.office-linkage-layout { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:14px; }
.office-readiness-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.office-readiness-card { display:grid; gap:6px; padding:12px; border:1px solid rgba(120,210,255,.12); border-radius:16px; background:rgba(255,255,255,.03); }
.office-readiness-card.is-pass { box-shadow:inset 3px 0 0 var(--upms-green); }
.office-readiness-card.is-blocked { box-shadow:inset 3px 0 0 var(--upms-orange); }
.office-readiness-card span,
.office-readiness-card small { color:#a7bdd6; font-size:12px; }
.office-readiness-card strong { color:#fff; font-size:18px; }
.office-action-bar { margin-top:0; }
@media(max-width:1180px){ .office-production-shell,.office-linkage-layout{grid-template-columns:1fr;} .office-bottom-rail{grid-template-columns:1fr;} }
.sidebar::-webkit-scrollbar,
.panel.sgm-dashboard.active::-webkit-scrollbar,
.domain-nav::-webkit-scrollbar,
.workbench-main::-webkit-scrollbar,
.workbench-context::-webkit-scrollbar,
.workbench-evidence::-webkit-scrollbar,
.split-main::-webkit-scrollbar,
.split-side::-webkit-scrollbar,
.sync-batch-items::-webkit-scrollbar,
.quality-center-section::-webkit-scrollbar,
.version-archive-grid::-webkit-scrollbar { width:8px; height:8px; }
.sidebar::-webkit-scrollbar-thumb,
.panel.sgm-dashboard.active::-webkit-scrollbar-thumb,
.domain-nav::-webkit-scrollbar-thumb,
.workbench-main::-webkit-scrollbar-thumb,
.workbench-context::-webkit-scrollbar-thumb,
.workbench-evidence::-webkit-scrollbar-thumb,
.split-main::-webkit-scrollbar-thumb,
.split-side::-webkit-scrollbar-thumb,
.sync-batch-items::-webkit-scrollbar-thumb,
.quality-center-section::-webkit-scrollbar-thumb,
.version-archive-grid::-webkit-scrollbar-thumb { border-radius:999px; background:rgba(120,210,255,.24); }
.sidebar::-webkit-scrollbar-track,
.domain-nav::-webkit-scrollbar-track,
.panel.sgm-dashboard.active::-webkit-scrollbar-track,
.workbench-main::-webkit-scrollbar-track,
.workbench-context::-webkit-scrollbar-track,
.workbench-evidence::-webkit-scrollbar-track { background:rgba(255,255,255,.025); border-radius:999px; }
.quality-center-workspace { display:grid; gap:14px; }
.quality-center-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.quality-center-section { padding:14px; border:1px solid rgba(120,210,255,.16); border-radius:18px; background:rgba(3,10,19,.34); max-height:calc(100vh - 320px); overflow:auto; }
.quality-center-section h4 { margin:0 0 10px; color:var(--upms-cyan); }
.quality-section-head { display:grid; gap:4px; margin-bottom:10px; }
.quality-section-head h4 { margin:0; color:var(--upms-cyan); }
.quality-section-head p { margin:0; color:var(--upms-text-secondary); font-size:12px; line-height:1.55; }
.quality-center-queue { display:grid; gap:8px; }
.chief-review-workspace { display:grid; gap:14px; }
.chief-review-grid { display:grid; grid-template-columns:minmax(280px,.72fr) minmax(0,1.28fr); gap:14px; }
.chief-review-list { display:grid; gap:8px; }
.chief-review-panel-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; gap:10px; align-items:center; padding:10px 12px; border:1px solid rgba(120,210,255,.14); border-radius:14px; background:rgba(255,255,255,.03); color:#d9f3ff; text-align:left; cursor:pointer; }
.chief-review-panel-row.is-active { border-color:rgba(0,216,255,.38); background:rgba(0,216,255,.08); }
.chief-review-panel-row small { display:block; color:#a7bdd6; margin-top:3px; }
.chief-review-detail { min-width:0; }
.delivery-command { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:14px; padding:16px; border:1px solid rgba(120,210,255,.18); border-radius:22px; background:linear-gradient(180deg, rgba(8,25,44,.96), rgba(5,14,25,.94)); box-shadow:inset 0 0 0 1px rgba(0,216,255,.035), 0 12px 28px rgba(0,0,0,.22); }
.delivery-command.can-deliver { border-color:rgba(34,197,94,.28); }
.delivery-command.is-blocked { border-color:rgba(255,122,0,.28); }
.delivery-verdict h3 { margin:6px 0 8px; color:var(--upms-text-main); }
.delivery-verdict strong { display:block; color:#ffcf8a; font-size:26px; }
.delivery-command.can-deliver .delivery-verdict strong { color:var(--upms-green); }
.delivery-verdict p { margin:8px 0 0; color:#cfe0f2; font-size:12px; line-height:1.65; }
.delivery-command aside { display:grid; grid-template-columns:1fr auto; gap:7px 10px; align-content:start; padding:12px; border:1px solid rgba(120,210,255,.14); border-radius:16px; background:rgba(3,10,19,.36); }
.delivery-command aside span { color:#9fb6d1; font-size:12px; }
.delivery-command aside b { color:#fff; text-align:right; }
.delivery-package-meta { display:grid; gap:4px; margin-top:10px; padding:10px 12px; border:1px solid rgba(120,210,255,.15); border-radius:14px; background:rgba(3,10,19,.34); }
.delivery-package-meta span { color:#9fb6d1; font-size:11px; }
.delivery-package-meta strong { color:#fff; font-size:14px; }
.delivery-package-meta small { color:#a7bdd6; }
.delivery-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.delivery-actions button { border:1px solid rgba(120,210,255,.18); background:rgba(0,216,255,.08); color:var(--upms-text-main); border-radius:999px; padding:7px 12px; cursor:pointer; }
.delivery-package-board { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; }
.delivery-package-board > div { padding:14px; border:1px solid rgba(120,210,255,.16); border-radius:18px; background:rgba(3,10,19,.34); }
.delivery-package-board h4 { margin:0 0 10px; color:var(--upms-cyan); }
.delivery-package-board ul { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.delivery-package-board li { display:flex; justify-content:space-between; gap:10px; padding:9px 10px; border-radius:12px; background:rgba(255,255,255,.03); color:#d8e8f8; font-size:12px; }
.delivery-package-board li strong { color:#fff; text-align:right; }
.delivery-package-board li.ready { box-shadow:inset 3px 0 0 var(--upms-green); }
.delivery-package-board li.missing, .delivery-package-board li.blocked { box-shadow:inset 3px 0 0 var(--upms-orange); }
.delivery-status-line { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; color:#a7bdd6; font-size:12px; }
.delivery-timeline { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.delivery-timeline span { position:relative; padding:7px 10px; border:1px solid rgba(120,210,255,.14); border-radius:999px; color:#9fb6d1; background:rgba(255,255,255,.025); font-size:12px; }
.delivery-timeline span.is-done { border-color:rgba(34,197,94,.22); color:#9be7bd; background:rgba(34,197,94,.08); }
.delivery-timeline span.is-current { border-color:rgba(0,216,255,.32); color:#fff; background:rgba(0,216,255,.12); box-shadow:0 0 18px rgba(0,216,255,.10); }
.delivery-timeline span.is-returned { border-color:rgba(255,122,0,.32); color:#ffd28a; background:rgba(255,122,0,.12); }
.delivery-next-action { margin:10px 0 0; padding:10px 12px; border:1px solid rgba(0,216,255,.16); border-radius:12px; background:rgba(0,216,255,.06); color:#d9f3ff; font-size:12px; line-height:1.6; }
.delivery-responsibility { margin-top:14px; padding:14px; border:1px solid rgba(255,122,0,.18); border-radius:18px; background:linear-gradient(180deg, rgba(36,18,8,.34), rgba(3,10,19,.34)); }
.delivery-responsibility h4 { margin:0 0 10px; color:#ffd28a; }
.delivery-responsibility-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; }
.delivery-responsibility-card { display:grid; gap:8px; padding:11px 12px; border:1px solid rgba(255,122,0,.16); border-radius:14px; background:rgba(255,122,0,.06); }
.delivery-responsibility-card button { border:0; background:transparent; color:#d9f3ff; cursor:pointer; text-align:left; padding:0; }
.delivery-responsibility-card button:first-child { display:grid; gap:5px; }
.delivery-responsibility-card span { color:#ffd28a; font-size:12px; }
.delivery-responsibility-card strong { color:#fff; font-size:13px; }
.delivery-responsibility-card small { color:#a7bdd6; line-height:1.45; }
.delivery-responsibility-action { justify-self:start; padding:5px 10px !important; border-radius:999px !important; background:rgba(0,216,255,.10) !important; color:var(--upms-cyan) !important; font-size:11px; }
.delivery-history { margin-top:14px; padding:14px; border:1px solid rgba(120,210,255,.16); border-radius:18px; background:rgba(3,10,19,.34); }
.delivery-history h4 { margin:0 0 10px; color:var(--upms-cyan); }
.delivery-history-row { display:grid; grid-template-columns:120px minmax(0,1fr) 190px; gap:8px 12px; align-items:center; padding:10px 0; border-top:1px solid rgba(120,210,255,.10); }
.delivery-history-row:first-of-type { border-top:0; }
.delivery-history-row span { color:#9fb6d1; font-size:12px; }
.delivery-history-row strong { color:#fff; font-size:12px; }
.delivery-history-row small { color:#a7bdd6; text-align:right; }
.delivery-history-row em { grid-column:2 / 4; color:#d9f3ff; font-style:normal; font-size:12px; }
.delivery-check-workspace { display:grid; gap:14px; }
.delivery-check-command { display:grid; grid-template-columns:minmax(0,1fr) 240px; gap:14px; padding:16px; border:1px solid rgba(0,216,255,.20); border-radius:22px; background:linear-gradient(180deg, rgba(8,25,44,.96), rgba(5,14,25,.94)); }
.delivery-check-command h3 { margin:6px 0 8px; color:var(--upms-text-main); }
.delivery-check-command strong { display:block; color:var(--upms-green); font-size:24px; }
.delivery-check-command p { color:#cfe0f2; font-size:12px; line-height:1.65; }
.delivery-check-command aside { display:grid; grid-template-columns:1fr auto; gap:7px 10px; align-content:start; padding:12px; border:1px solid rgba(120,210,255,.14); border-radius:16px; background:rgba(3,10,19,.36); }
.delivery-check-command aside span { color:#9fb6d1; font-size:12px; }
.delivery-check-command aside b { color:#fff; text-align:right; }
.delivery-check-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; }
.delivery-check-card { display:grid; gap:5px; padding:12px; border-radius:16px; background:rgba(255,255,255,.03); border:1px solid rgba(120,210,255,.12); }
.delivery-check-card span { color:#9fb6d1; font-size:12px; }
.delivery-check-card strong { color:#fff; }
.delivery-check-card small { color:#a7bdd6; }
.delivery-check-card.is-pass { box-shadow:inset 3px 0 0 var(--upms-green); }
.delivery-check-card.is-blocked { box-shadow:inset 3px 0 0 var(--upms-orange); }
.delivery-check-actions { display:flex; flex-wrap:wrap; gap:8px; padding:12px; border:1px solid rgba(120,210,255,.12); border-radius:18px; background:rgba(3,10,19,.30); }
.delivery-check-actions button { border:1px solid rgba(120,210,255,.18); background:rgba(0,216,255,.08); color:var(--upms-text-main); border-radius:999px; padding:7px 12px; cursor:pointer; }
#panel-result-preview .card > .card-header {
  align-items:center;
  min-height:42px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(120,210,255,.1);
}

#panel-result-preview .card > .card-header .card-title {
  flex:0 0 auto;
  line-height:1.2;
  margin:0;
  padding-top:1px;
}

#panel-result-preview .result-table-switch {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
  padding:10px;
  border:1px solid rgba(120,210,255,.14);
  border-radius:10px;
  background:rgba(3,10,19,.35);
}

#panel-result-preview .result-table-switch button {
  border:1px solid rgba(120,210,255,.2);
  border-radius:8px;
  background:rgba(255,255,255,.04);
  color:var(--upms-text-secondary);
  padding:8px 12px;
  font-weight:700;
  cursor:pointer;
}

#panel-result-preview .result-table-switch button.is-active {
  border-color:rgba(0,216,255,.5);
  background:rgba(0,216,255,.14);
  color:#fff;
}

#panel-result-preview .result-table-card.is-hidden {
  display:none;
}

#panel-result-preview .excel-result-review {
  margin-top:14px;
  margin-bottom:14px;
}

#panel-result-preview .excel-review-command {
  display:grid;
  grid-template-columns:minmax(0,1fr) 230px;
  gap:12px;
  margin-top:0;
  padding:14px;
  border:1px solid rgba(255,183,77,.22);
  border-radius:10px;
  background:linear-gradient(180deg, rgba(19,15,9,.72), rgba(7,17,31,.62));
  box-shadow:0 12px 28px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,183,77,.06);
}

#panel-result-preview .excel-review-command.can-preview {
  border-color:rgba(34,197,94,.26);
  background:linear-gradient(180deg, rgba(6,30,19,.72), rgba(7,17,31,.62));
}

#panel-result-preview .excel-review-command h3 {
  margin:4px 0 6px;
  color:#fff;
}

#panel-result-preview .excel-review-command strong {
  display:block;
  color:#ffcf8a;
  font-size:20px;
}

#panel-result-preview .excel-review-command.can-preview strong {
  color:var(--upms-green);
}

#panel-result-preview .excel-review-command p {
  margin:6px 0 0;
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-primary-action {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:12px;
}

#panel-result-preview .excel-review-primary-action button {
  border:1px solid rgba(34,197,94,.46);
  border-radius:8px;
  background:linear-gradient(180deg, rgba(34,197,94,.24), rgba(0,216,255,.14));
  color:#f0fff8;
  padding:9px 13px;
  font-weight:800;
  cursor:pointer;
}

#panel-result-preview .excel-review-primary-action button:disabled {
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--upms-text-muted);
  cursor:not-allowed;
}

#panel-result-preview .excel-review-primary-action span {
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-command aside {
  display:grid;
  grid-template-columns:1fr auto;
  gap:6px 10px;
  align-content:center;
  padding:10px;
  border:1px solid rgba(120,210,255,.12);
  border-radius:8px;
  background:rgba(3,10,19,.28);
}

#panel-result-preview .excel-review-command aside span,
#panel-result-preview .excel-review-card small {
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-command aside b {
  color:#fff;
}

#panel-result-preview .excel-review-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}

#panel-result-preview .excel-review-card {
  min-height:92px;
  padding:12px;
  border:1px solid rgba(120,210,255,.14);
  border-radius:8px;
  background:rgba(3,10,19,.30);
}

#panel-result-preview .excel-review-card.is-pass {
  box-shadow:inset 3px 0 0 var(--upms-green);
}

#panel-result-preview .excel-review-card.is-blocked {
  box-shadow:inset 3px 0 0 var(--upms-orange);
}

#panel-result-preview .excel-review-card span {
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-card strong {
  display:block;
  margin:6px 0;
  color:#fff;
}

#panel-result-preview .excel-review-problems {
  margin-top:10px;
  padding:12px;
  border:1px solid rgba(120,210,255,.14);
  border-radius:10px;
  background:rgba(3,10,19,.26);
}

#panel-result-preview .excel-review-problems-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:10px;
}

#panel-result-preview .excel-review-problems-head h4 {
  margin:0 0 4px;
  color:var(--upms-cyan);
}

#panel-result-preview .excel-review-problems-head p {
  margin:0;
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-progress {
  min-width:118px;
  padding:8px 10px;
  border:1px solid rgba(120,210,255,.14);
  border-radius:8px;
  background:rgba(255,255,255,.035);
  text-align:right;
}

#panel-result-preview .excel-review-progress span {
  display:block;
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-progress b {
  color:#fff;
  font-size:18px;
}

#panel-result-preview .excel-review-problem-list {
  display:grid;
  gap:8px;
}

#panel-result-preview .excel-review-problem-row {
  display:grid;
  grid-template-columns:minmax(240px,1.3fr) minmax(260px,1fr) 150px;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid rgba(120,210,255,.12);
  border-radius:8px;
  background:rgba(255,255,255,.035);
}

#panel-result-preview .excel-review-problem-main {
  display:grid;
  gap:4px;
  min-width:0;
}

#panel-result-preview .excel-review-problem-main .tag {
  justify-self:start;
}

#panel-result-preview .excel-review-problem-main b {
  color:#fff;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#panel-result-preview .excel-review-problem-main small {
  color:var(--upms-text-secondary);
  line-height:1.45;
}

#panel-result-preview .excel-review-problem-meta {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}

#panel-result-preview .excel-review-problem-meta span {
  min-width:0;
  padding:5px 7px;
  border:1px solid rgba(120,210,255,.10);
  border-radius:7px;
  background:rgba(0,216,255,.045);
  color:var(--upms-text-secondary);
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#panel-result-preview .excel-review-problem-action {
  display:grid;
  gap:6px;
  justify-items:start;
}

#panel-result-preview .excel-review-problem-action span {
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-problem-action button {
  border:1px solid rgba(0,216,255,.34);
  border-radius:8px;
  background:rgba(0,216,255,.12);
  color:#e8fbff;
  padding:7px 10px;
  font-weight:700;
  cursor:pointer;
}

#panel-result-preview .excel-review-empty {
  display:grid;
  gap:4px;
  padding:12px;
  border:1px dashed rgba(34,197,94,.28);
  border-radius:8px;
  background:rgba(34,197,94,.06);
}

#panel-result-preview .excel-review-empty b {
  color:var(--upms-green);
}

#panel-result-preview .excel-review-empty span {
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-change-note {
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  align-items:center;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(120,210,255,.14);
  border-radius:8px;
  background:rgba(0,216,255,.045);
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .excel-review-change-note b {
  color:var(--upms-cyan);
}

#panel-result-preview .excel-review-change-note small {
  color:var(--upms-text-secondary);
}

#panel-result-preview .excel-review-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

#panel-result-preview .excel-review-actions button {
  border:1px solid rgba(120,210,255,.18);
  border-radius:8px;
  background:rgba(0,216,255,.08);
  color:#e8fbff;
  padding:7px 11px;
  font-weight:700;
  cursor:pointer;
}

#panel-result-preview .excel-review-actions button:disabled {
  border-color:rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:var(--upms-text-muted);
  cursor:not-allowed;
}

#panel-result-preview .excel-review-route-hint {
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 10px;
  border:1px dashed rgba(120,210,255,.18);
  border-radius:8px;
  background:rgba(255,255,255,.025);
  color:var(--upms-text-secondary);
  font-size:12px;
  line-height:1.45;
}

@media (max-width: 1100px) {
  #panel-result-preview .excel-review-problem-row {
    grid-template-columns:1fr;
  }
  #panel-result-preview .excel-review-problem-action {
    justify-items:start;
  }
}

#panel-result-preview .result-review-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
  padding:10px 12px;
  border:1px solid rgba(120,210,255,.14);
  border-radius:10px;
  background:rgba(4,14,26,.42);
}

#panel-result-preview .result-review-toolbar b {
  color:#fff;
  margin-right:10px;
}

#panel-result-preview .result-review-toolbar span {
  color:var(--upms-text-secondary);
  font-size:12px;
}

#panel-result-preview .result-review-toolbar button {
  border:1px solid rgba(120,210,255,.18);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:var(--upms-text-secondary);
  padding:6px 10px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

#panel-result-preview .result-review-toolbar button.is-active {
  border-color:rgba(0,216,255,.54);
  background:rgba(0,216,255,.14);
  color:#fff;
}

#panel-result-preview .result-table-scroll {
  overflow:auto;
  max-height:62vh;
  border:1px solid rgba(120,210,255,.08);
  border-radius:8px;
}

#panel-result-preview .result-table-scroll table {
  margin:0;
}

#panel-result-preview .col-toggle-group {
  display:flex;
  flex:1 1 auto;
  flex-wrap:wrap;
  gap:6px;
  justify-content:flex-end;
  align-items:center;
}

#panel-result-preview .col-toggle-btn {
  border:1px solid rgba(120,210,255,.16);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  color:var(--upms-text-secondary);
  padding:5px 9px;
  font-size:11px;
  cursor:pointer;
}

#panel-result-preview .col-toggle-btn.on {
  color:var(--upms-cyan);
  background:rgba(0,216,255,.1);
  border-color:rgba(0,216,255,.28);
}

#panel-result-preview .col-toggle-btn.off {
  color:var(--upms-text-muted);
  opacity:.72;
}

#panel-result-preview .sortable-table th {
  color:var(--upms-cyan);
  background:rgba(0,216,255,.045);
}

#panel-result-preview .sortable-table th,
#panel-result-preview .sortable-table td {
  white-space:nowrap;
  vertical-align:middle;
}

#panel-result-preview .sortable-table td span,
#panel-result-preview .sortable-table td small {
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

#panel-result-preview .sortable-table tr.is-repair-target td {
  background:rgba(255,193,7,.08);
  box-shadow:inset 0 1px 0 rgba(255,193,7,.18), inset 0 -1px 0 rgba(255,193,7,.18);
}

#panel-result-preview .sortable-table td.result-cell-issue {
  background:rgba(255,183,77,.14);
  box-shadow:inset 0 0 0 1px rgba(255,183,77,.18);
}

#panel-result-preview .sortable-table td.result-cell-issue span {
  color:#ffe8bc;
  font-weight:700;
}

#panel-result-preview .line-result-table {
  table-layout:fixed;
  min-width:1180px;
}

#panel-result-preview .line-result-table .col-line_no { width:138px; }
#panel-result-preview .line-result-table .col-project_id { width:92px; }
#panel-result-preview .line-result-table .col-from_point,
#panel-result-preview .line-result-table .col-to_point { width:76px; }
#panel-result-preview .line-result-table .col-pipeline_type { width:76px; }
#panel-result-preview .line-result-table .col-material { width:74px; }
#panel-result-preview .line-result-table .col-diameter { width:88px; }
#panel-result-preview .line-result-table .col-start_depth,
#panel-result-preview .line-result-table .col-end_depth { width:82px; }
#panel-result-preview .line-result-table .col-quality,
#panel-result-preview .line-result-table .col-approval { width:96px; }
#panel-result-preview .line-result-table .col-review { width:150px; }
#panel-result-preview .line-result-table .col-owner { width:128px; }
#panel-result-preview .line-result-table .col-action {
  position:sticky;
  right:0;
  z-index:2;
  width:92px;
  min-width:92px;
  background:#07182a;
  box-shadow:-8px 0 12px rgba(0,0,0,.18);
  text-align:center;
}

#panel-result-preview .line-result-table th.col-action {
  z-index:3;
  background:#09233a;
}

#panel-result-preview .sortable-table td button {
  border:1px solid rgba(0,216,255,.34);
  border-radius:999px;
  background:rgba(0,216,255,.14);
  color:#e8fbff;
  min-width:58px;
  padding:5px 9px;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  cursor:pointer;
}

#panel-result-preview .sortable-table td button:hover,
#panel-result-preview .sortable-table td button:focus-visible {
  border-color:rgba(0,216,255,.72);
  background:rgba(0,216,255,.26);
  color:#ffffff;
  outline:none;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  min-height:0;
  overflow:hidden;
}

.split-main {
  min-width: 0;
  max-height: calc(100vh - 310px);
  overflow:auto;
}

.split-side {
  min-width: 0;
  max-height: calc(100vh - 310px);
  overflow:auto;
}

.detail-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text-muted);
  border-radius: 16px;
  border: 1px dashed rgba(110, 180, 255, 0.18);
  background: rgba(255,255,255,0.03);
}

.detail-panel {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(110, 180, 255, 0.14);
  background: rgba(255,255,255,0.03);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(110, 180, 255, 0.08);
  font-size: 12px;
}

.detail-label { color: var(--text-muted); }
.detail-value { color: var(--text-main); font-weight: 700; }

.btn-primary,
.app-button-primary,
.btn-secondary,
.app-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn-primary,
.app-button-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #04101c;
  font-weight: 800;
  box-shadow: var(--shadow-glow-blue);
}

.btn-secondary,
.app-button-secondary {
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  border-color: rgba(110, 180, 255, 0.16);
}

.btn-primary:hover,
.app-button-primary:hover,
.btn-secondary:hover,
.app-button-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 216, 255, 0.34);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.dashboard-band {
  display: grid;
  gap: 18px;
}

.sgm-page { display: grid; gap: 16px; }

.sgm-brand-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(110, 180, 255, 0.14);
  background: linear-gradient(135deg, rgba(8, 19, 35, 0.92), rgba(9, 28, 48, 0.84));
  box-shadow: var(--shadow-card);
}

.sgm-brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 216, 255, 0.16);
  background: rgba(255,255,255,0.03);
}

.sgm-brand-title { font-size: 24px; font-weight: 900; margin-top: 12px; }
.sgm-brand-subtitle,
.sgm-slogan { color: var(--text-secondary); margin-top: 8px; }

.sgm-feedback-row,
.sgm-entry-grid {
  display: grid;
  gap: 10px;
}

.sgm-feedback-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.sgm-feedback-pill,
.sgm-entry-card {
  border-radius: 16px;
  border: 1px solid rgba(110, 180, 255, 0.14);
  background: rgba(255,255,255,0.03);
}

.sgm-feedback-pill {
  padding: 10px 12px;
  color: var(--text-main);
}

.sgm-entry-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sgm-entry-card {
  padding: 16px;
  color: var(--text-main);
  text-decoration: none;
}

.sgm-entry-title {
  font-size: 14px;
  font-weight: 800;
}

.sgm-entry-hint {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.sgm-entry-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(0, 216, 255, 0.16);
  background: rgba(0, 216, 255, 0.06);
  color: var(--cyan);
  font-weight: 800;
  margin-bottom: 12px;
}

.sgm-status-card,
.sgm-sync-card {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sgm-stat-number {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.sgm-warning { color: #ffd48c; }
.sgm-success { color: #7df0be; }
.sgm-danger { color: #ffb3b3; }

.sgm-mock-map {
  min-height: 330px;
  padding: 18px;
  overflow: hidden;
}

.sgm-map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.sgm-map-node {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(110, 180, 255, 0.12);
  background: rgba(255,255,255,0.03);
}

.sgm-mock-map .page-subtitle { margin-bottom: 4px; }

.sgm-bottom-safe { height: 24px; }

.sgm-hud-panel {
  border-radius: 16px;
  border: 1px solid rgba(110, 180, 255, 0.14);
  background: rgba(255,255,255,0.03);
}

.sgm-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sgm-hero,
.sgm-grid-bg {
  background: linear-gradient(135deg, rgba(8, 19, 35, 0.92), rgba(9, 28, 48, 0.84));
}

.sgm-pipeline-glow {
  filter: drop-shadow(0 20px 38px rgba(0, 216, 255, 0.12));
}

.sgm-warning-badge { color: #ffd48c; background: rgba(255, 122, 0, 0.12); }
.sgm-success-badge { color: #7df0be; background: rgba(34, 197, 94, 0.10); }

.sgm-task-table,
.sgm-chart-card {
  border-radius: 18px;
}

.sgm-dashboard { gap: 10px; }
.panel.sgm-dashboard { display: none; }
.panel.sgm-dashboard.active { display: block; flex:1 1 auto; min-height:0; overflow:auto; }

.sgm-shell,
.dashboard-page {
  display: block;
}

.mock-ribbon {
  position: relative;
  z-index: 110;
}

.mock-ribbon .pill {
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
}

.runtime-clock {
  display: flex;
  align-items: center;
  gap: 8px;
}

.runtime-clock strong {
  color: var(--text-main);
}

@media (max-width: 1480px) {
  .app-shell,
  .app-container {
    grid-template-columns: 248px minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .sidebar {
    position: static;
    min-height: auto;
  }
  .app-shell,
  .app-container {
    grid-template-columns: 1fr;
  }
  .kpi-grid,
  .data-grid,
  .quick-entry-grid,
  .sgm-entry-grid,
  .sgm-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-hero,
  .dashboard-grid-grid,
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .mock-banner {
    flex-wrap: wrap;
    text-align: center;
  }
  .main-stage,
  .main-content {
    padding: 14px;
  }
  .sidebar {
    padding: 16px;
  }
  .topbar,
  .sgm-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .kpi-grid,
  .data-grid,
  .quick-entry-grid,
  .sgm-entry-grid,
  .sgm-card-grid,
  .sgm-status-card,
  .sgm-sync-card,
  .sgm-map-grid,
  .sgm-feedback-row {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    min-height: 300px;
  }
  .task-row,
  .risk-row,
  .entry-preview {
    grid-template-columns: 1fr;
  }
  .progress-step {
    grid-template-columns: 1fr;
  }
}

/* Final theme adaptation layer: keep production surfaces readable after legacy component styles. */
body[data-theme="engineering-light"] .main-stage,
body[data-theme="engineering-light"] .main-content {
  background: #eef2f7;
  color: #172033;
}

body[data-theme="engineering-light"] .topbar,
body[data-theme="engineering-light"] .sgm-topbar,
body[data-theme="engineering-light"] .sprint2-dashboard,
body[data-theme="engineering-light"] .home-module,
body[data-theme="engineering-light"] .workbench-main,
body[data-theme="engineering-light"] .workbench-context,
body[data-theme="engineering-light"] .workbench-evidence,
body[data-theme="engineering-light"] .workbench-hero,
body[data-theme="engineering-light"] .workbench-hero aside,
body[data-theme="engineering-light"] .card,
body[data-theme="engineering-light"] .info-card,
body[data-theme="engineering-light"] .data-card,
body[data-theme="engineering-light"] .project-card,
body[data-theme="engineering-light"] .project-summary-card,
body[data-theme="engineering-light"] .project-detail-card,
body[data-theme="engineering-light"] .project-form-panel,
body[data-theme="engineering-light"] .split-main,
body[data-theme="engineering-light"] .split-side,
body[data-theme="engineering-light"] .detail-panel,
body[data-theme="engineering-light"] .quality-command,
body[data-theme="engineering-light"] .quality-command aside,
body[data-theme="engineering-light"] .quality-center-section,
body[data-theme="engineering-light"] .delivery-command,
body[data-theme="engineering-light"] .delivery-command aside,
body[data-theme="engineering-light"] .delivery-check-command,
body[data-theme="engineering-light"] .delivery-check-command aside,
body[data-theme="engineering-light"] .delivery-check-actions,
body[data-theme="engineering-light"] .delivery-check-card,
body[data-theme="engineering-light"] .delivery-package-board > div,
body[data-theme="engineering-light"] .delivery-package-meta,
body[data-theme="engineering-light"] .delivery-responsibility,
body[data-theme="engineering-light"] .delivery-history,
body[data-theme="engineering-light"] .mapping-command,
body[data-theme="engineering-light"] .mapping-command aside,
body[data-theme="engineering-light"] .mapping-board > div,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-command,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-command aside,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-card,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-problems,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-progress,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-problem-row,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-change-note,
body[data-theme="engineering-light"] .field-flow-card,
body[data-theme="engineering-light"] .field-record-card,
body[data-theme="engineering-light"] .field-map-context,
body[data-theme="engineering-light"] .field-production-board > div,
body[data-theme="engineering-light"] .field-evidence-card,
body[data-theme="engineering-light"] .field-safety-card,
body[data-theme="engineering-light"] .office-tree-panel,
body[data-theme="engineering-light"] .office-linkage-canvas,
body[data-theme="engineering-light"] .office-inspector,
body[data-theme="engineering-light"] .office-bottom-rail > div,
body[data-theme="engineering-light"] .office-conflict-queue,
body[data-theme="engineering-light"] .office-readiness-card,
body[data-theme="engineering-light"] .version-archive-card,
body[data-theme="engineering-light"] #panel-result-preview .data-card {
  background: #ffffff;
  color: #172033;
  border-color: #d7dee8;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body[data-theme="engineering-light"] .sidebar {
  background: #f8fafc;
  color: #172033;
  border-right-color: #d7dee8;
  box-shadow: inset -1px 0 0 rgba(15, 23, 42, 0.04);
}

body[data-theme="engineering-light"] .sidebar-header,
body[data-theme="engineering-light"] .sidebar-footer {
  border-color: #dbe3ed;
}

body[data-theme="engineering-light"] .system-brand-name,
body[data-theme="engineering-light"] .sidebar-project-name,
body[data-theme="engineering-light"] .sidebar-user-name,
body[data-theme="engineering-light"] .domain-toggle,
body[data-theme="engineering-light"] .domain-link.active,
body[data-theme="engineering-light"] .nav-item.active {
  color: #172033;
}

body[data-theme="engineering-light"] .system-brand-desc,
body[data-theme="engineering-light"] .sidebar-brand-note,
body[data-theme="engineering-light"] .sidebar-tagline,
body[data-theme="engineering-light"] .sidebar-user-role,
body[data-theme="engineering-light"] .domain-link,
body[data-theme="engineering-light"] .nav-item {
  color: #475569;
}

body[data-theme="engineering-light"] .domain-group,
body[data-theme="engineering-light"] .sidebar-project-card,
body[data-theme="engineering-light"] .sidebar-user-card {
  background: #ffffff;
  border-color: #dbe3ed;
}

body[data-theme="engineering-light"] .domain-group.is-active,
body[data-theme="engineering-light"] .domain-link:hover,
body[data-theme="engineering-light"] .domain-link.active,
body[data-theme="engineering-light"] .nav-item:hover,
body[data-theme="engineering-light"] .nav-item.active {
  background: #edf6ff;
  border-color: #bfdbfe;
  box-shadow: none;
}

body[data-theme="engineering-light"] .domain-link small,
body[data-theme="engineering-light"] .domain-link.is-reserved small,
body[data-theme="engineering-light"] .domain-link.is-ready small,
body[data-theme="engineering-light"] .domain-link.is-development small {
  background: #f1f5f9;
  color: #475569;
}

body[data-theme="engineering-light"] .sidebar-slogan,
body[data-theme="engineering-light"] .domain-link.is-reserved .domain-link-dot,
body[data-theme="engineering-light"] .nav-item.active::before {
  color: #9a5b00;
  background: #d08a00;
}

body[data-theme="engineering-light"] .workbench-kv,
body[data-theme="engineering-light"] .stage-row,
body[data-theme="engineering-light"] .queue-row,
body[data-theme="engineering-light"] .search-hit,
body[data-theme="engineering-light"] .role-path-step,
body[data-theme="engineering-light"] .role-action-grid button,
body[data-theme="engineering-light"] .command-verdict,
body[data-theme="engineering-light"] .ops-card,
body[data-theme="engineering-light"] .first-use-steps button,
body[data-theme="engineering-light"] .sync-batch-card,
body[data-theme="engineering-light"] .sync-apply-result,
body[data-theme="engineering-light"] .mapping-layer-grid span,
body[data-theme="engineering-light"] .mapping-board li,
body[data-theme="engineering-light"] .office-tree-row,
body[data-theme="engineering-light"] .office-linkage-row,
body[data-theme="engineering-light"] .office-conflict-row,
body[data-theme="engineering-light"] .office-conflict-compare-row,
body[data-theme="engineering-light"] .office-action-log li,
body[data-theme="engineering-light"] .delivery-history-row,
body[data-theme="engineering-light"] .delivery-timeline span,
body[data-theme="engineering-light"] .validation-item,
body[data-theme="engineering-light"] .toolbar,
body[data-theme="engineering-light"] .workbench-main > .toolbar {
  background: #f8fafc;
  color: #172033;
  border-color: #dbe3ed;
}

body[data-theme="engineering-light"] .tag-warning,
body[data-theme="engineering-light"] .status-pending,
body[data-theme="engineering-light"] .status-warning,
body[data-theme="engineering-light"] .sgm-warning-badge,
body[data-theme="engineering-light"] .delivery-timeline span.is-returned,
body[data-theme="engineering-light"] .survey-hint.is-warning,
body[data-theme="engineering-light"] .severity-medium,
body[data-theme="engineering-light"] .severity-badge.severity-medium {
  color: #7a4a00;
  background: #fff7e6;
  border-color: #f1c56d;
}

body[data-theme="engineering-light"] .tag-blocked,
body[data-theme="engineering-light"] .status-blocked,
body[data-theme="engineering-light"] .status-critical,
body[data-theme="engineering-light"] .severity-high,
body[data-theme="engineering-light"] .severity-badge.severity-high {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

body[data-theme="engineering-light"] .tag-ok,
body[data-theme="engineering-light"] .status-ok,
body[data-theme="engineering-light"] .status-done,
body[data-theme="engineering-light"] .status-pass {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

body[data-theme="engineering-light"] .tag-mock {
  color: #075985;
  background: #e0f2fe;
  border-color: #7dd3fc;
}

body[data-theme="engineering-light"] .status-card.warning-card,
body[data-theme="engineering-light"] .validation-item.warn,
body[data-theme="engineering-light"] .delivery-command.is-blocked,
body[data-theme="engineering-light"] .mapping-command.is-blocked,
body[data-theme="engineering-light"] .delivery-check-card.is-blocked,
body[data-theme="engineering-light"] .field-safety-card.is-blocked,
body[data-theme="engineering-light"] .office-readiness-card.is-blocked,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-card.is-blocked,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-command.is-blocked {
  border-color: #f1c56d;
  box-shadow: inset 3px 0 0 #d08a00;
}

body[data-theme="engineering-light"] .delivery-responsibility,
body[data-theme="engineering-light"] .delivery-responsibility-card,
body[data-theme="engineering-light"] .office-conflict-queue,
body[data-theme="engineering-light"] .office-conflict-row {
  background: #fffaf0;
  border-color: #f1c56d;
  color: #172033;
}

body[data-theme="engineering-light"] .delivery-responsibility h4,
body[data-theme="engineering-light"] .delivery-responsibility-card span,
body[data-theme="engineering-light"] .office-conflict-queue h4,
body[data-theme="engineering-light"] .office-conflict-compare-row em,
body[data-theme="engineering-light"] .command-verdict strong,
body[data-theme="engineering-light"] .delivery-verdict strong,
body[data-theme="engineering-light"] .mapping-command strong,
body[data-theme="engineering-light"] .return-owner-group strong,
body[data-theme="engineering-light"] .sgm-warning {
  color: #8a5200;
}

body[data-theme="engineering-light"] .delivery-responsibility-action {
  background: #eaf4ff !important;
  color: #0f5f8f !important;
  border: 1px solid #bfdbfe !important;
}

body[data-theme="engineering-light"] input,
body[data-theme="engineering-light"] select,
body[data-theme="engineering-light"] textarea,
body[data-theme="engineering-light"] .search-input,
body[data-theme="engineering-light"] .filter-select,
body[data-theme="engineering-light"] .topbar-select,
body[data-theme="engineering-light"] .topbar-search,
body[data-theme="engineering-light"] .workbench-main .search-input,
body[data-theme="engineering-light"] .workbench-main .filter-select,
body[data-theme="engineering-light"] .project-form-grid input,
body[data-theme="engineering-light"] .project-form-grid select,
body[data-theme="engineering-light"] .project-form-grid textarea {
  background: #ffffff;
  color: #172033;
  border-color: #cbd5e1;
  box-shadow: none;
}

body[data-theme="engineering-light"] select option,
body[data-theme="engineering-light"] .workbench-main .filter-select option,
body[data-theme="engineering-light"] .project-form-grid select option {
  background: #ffffff;
  color: #172033;
}

body[data-theme="engineering-light"] button,
body[data-theme="engineering-light"] .detail-actions button,
body[data-theme="engineering-light"] .project-quick-actions button,
body[data-theme="engineering-light"] .quality-next-action button,
body[data-theme="engineering-light"] .delivery-actions button,
body[data-theme="engineering-light"] .delivery-check-actions button,
body[data-theme="engineering-light"] .workbench-metric-actions button,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-actions button,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-problem-action button,
body[data-theme="engineering-light"] .task-row-actions button,
body[data-theme="engineering-light"] .return-owner-group button,
body[data-theme="engineering-light"] .map-clear-selection {
  color: #172033;
  background: #ffffff;
  border-color: #cbd5e1;
}

body[data-theme="engineering-light"] .btn-primary,
body[data-theme="engineering-light"] .topline-action.primary {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: none;
}

body[data-theme="engineering-light"] .workbench-metric-actions button:hover,
body[data-theme="engineering-light"] .workbench-metric-actions button:focus-visible {
  color: #ffffff;
  background: #0f5f8f;
  border-color: #0f5f8f;
}

body[data-theme="engineering-light"] .table {
  color: #172033;
}

body[data-theme="engineering-light"] .table th {
  color: #475569;
  background: #f1f5f9;
  border-bottom-color: #dbe3ed;
}

body[data-theme="engineering-light"] .table td {
  color: #172033;
  border-bottom-color: #e2e8f0;
}

body[data-theme="engineering-light"] .table tbody tr:hover td,
body[data-theme="engineering-light"] .table tbody tr.selected td {
  background: #eaf4ff;
}

body[data-theme="engineering-light"] #panel-result-preview .result-table-scroll {
  border-color: #dbe3ed;
  background: #ffffff;
}

body[data-theme="engineering-light"] #panel-result-preview .result-table-switch,
body[data-theme="engineering-light"] #panel-result-preview .result-review-toolbar {
  background: #ffffff;
  color: #172033;
  border-color: #d7dee8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

body[data-theme="engineering-light"] #panel-result-preview .result-table-switch button,
body[data-theme="engineering-light"] #panel-result-preview .result-review-toolbar button {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

body[data-theme="engineering-light"] #panel-result-preview .result-table-switch button.is-active,
body[data-theme="engineering-light"] #panel-result-preview .result-review-toolbar button.is-active {
  background: #e0f2fe;
  color: #075985;
  border-color: #38bdf8;
}

body[data-theme="engineering-light"] #panel-result-preview .result-review-toolbar b {
  color: #172033;
}

body[data-theme="engineering-light"] #panel-result-preview .result-review-toolbar span {
  color: #475569;
}

body[data-theme="engineering-light"] #panel-result-preview .sortable-table th {
  color: #0f5f8f;
  background: #f1f5f9;
}

body[data-theme="engineering-light"] #panel-result-preview .sortable-table tr.is-repair-target td {
  background: #fff7e6;
  box-shadow: inset 0 1px 0 #f1c56d, inset 0 -1px 0 #f1c56d;
}

body[data-theme="engineering-light"] #panel-result-preview .sortable-table td.result-cell-issue {
  background: #fff7e6;
  box-shadow: inset 0 0 0 1px #f1c56d;
}

body[data-theme="engineering-light"] #panel-result-preview .sortable-table td.result-cell-issue span {
  color: #7a4a00;
}

body[data-theme="engineering-light"] #panel-result-preview .sortable-table td button {
  color: #0f5f8f;
  background: #eaf4ff;
  border-color: #93c5fd;
  box-shadow: none;
}

body[data-theme="engineering-light"] #panel-result-preview .sortable-table td button:hover,
body[data-theme="engineering-light"] #panel-result-preview .sortable-table td button:focus-visible {
  color: #ffffff;
  background: #0f5f8f;
  border-color: #0f5f8f;
}

body[data-theme="engineering-light"] #panel-result-preview .line-result-table .col-action {
  background: #ffffff;
  box-shadow: -8px 0 12px rgba(15, 23, 42, 0.08), inset 1px 0 0 #dbe3ed;
}

body[data-theme="engineering-light"] #panel-result-preview .line-result-table th.col-action {
  background: #f1f5f9;
}

body[data-theme="engineering-light"] #panel-result-preview .col-toggle-btn {
  color: #475569;
  background: #ffffff;
  border-color: #cbd5e1;
}

body[data-theme="engineering-light"] #panel-result-preview .col-toggle-btn.on {
  color: #0f5f8f;
  background: #eaf4ff;
  border-color: #93c5fd;
}

body[data-theme="engineering-light"] #panel-result-preview .col-toggle-btn.off {
  color: #64748b;
  background: #f8fafc;
}

body[data-theme="engineering-light"] .home-command-title,
body[data-theme="engineering-light"] .card-title,
body[data-theme="engineering-light"] .project-card .card-title,
body[data-theme="engineering-light"] .project-detail-header h3,
body[data-theme="engineering-light"] .workbench-hero aside strong,
body[data-theme="engineering-light"] .workbench-kv strong,
body[data-theme="engineering-light"] .queue-row strong,
body[data-theme="engineering-light"] .stage-row strong,
body[data-theme="engineering-light"] .role-action-grid strong,
body[data-theme="engineering-light"] .first-use-steps span,
body[data-theme="engineering-light"] .ops-card p,
body[data-theme="engineering-light"] .project-detail-grid strong,
body[data-theme="engineering-light"] .mapping-layer-grid strong,
body[data-theme="engineering-light"] .mapping-board li strong,
body[data-theme="engineering-light"] .field-map-context b,
body[data-theme="engineering-light"] .field-record-card strong,
body[data-theme="engineering-light"] .field-evidence-card strong,
body[data-theme="engineering-light"] .field-safety-card strong,
body[data-theme="engineering-light"] .office-tree-row strong,
body[data-theme="engineering-light"] .office-tree-row b,
body[data-theme="engineering-light"] .office-linkage-row b,
body[data-theme="engineering-light"] .office-check-row strong,
body[data-theme="engineering-light"] .office-readiness-card strong,
body[data-theme="engineering-light"] .delivery-command aside b,
body[data-theme="engineering-light"] .delivery-package-meta strong,
body[data-theme="engineering-light"] .delivery-package-board li strong,
body[data-theme="engineering-light"] .delivery-responsibility-card strong,
body[data-theme="engineering-light"] .delivery-history-row strong,
body[data-theme="engineering-light"] .delivery-check-command aside b,
body[data-theme="engineering-light"] .delivery-check-card strong,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-command h3,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-command aside b,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-card strong,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-progress b,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-problem-main b {
  color: #172033;
  text-shadow: none;
}

body[data-theme="engineering-light"] .delivery-responsibility-card button,
body[data-theme="engineering-light"] .delivery-responsibility-card small,
body[data-theme="engineering-light"] .delivery-next-action,
body[data-theme="engineering-light"] .delivery-history-row em,
body[data-theme="engineering-light"] .delivery-status-line,
body[data-theme="engineering-light"] .delivery-package-meta span,
body[data-theme="engineering-light"] .delivery-package-meta small,
body[data-theme="engineering-light"] .delivery-check-card span,
body[data-theme="engineering-light"] .delivery-check-card small,
body[data-theme="engineering-light"] .quality-section-head p,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-command p,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-command aside span,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-card span,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-card small,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-problems-head p,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-progress span,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-problem-main small,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-problem-action span,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-change-note,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-change-note small,
body[data-theme="engineering-light"] #panel-result-preview .excel-review-empty span {
  color: #475569;
}

body[data-theme="engineering-light"] #panel-result-preview .excel-review-problem-meta span {
  background: #f1f5f9;
  color: #334155;
  border-color: #dbe3ed;
}

body[data-theme="engineering-light"] #panel-result-preview .excel-review-problem-action button {
  background: #eaf4ff;
  color: #0f5f8f;
  border-color: #93c5fd;
}

body[data-theme="engineering-light"] #panel-result-preview .excel-review-primary-action button {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
}

body[data-theme="engineering-light"] #panel-result-preview .excel-review-primary-action button:disabled {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

body[data-theme="engineering-light"] #panel-result-preview .excel-review-primary-action span {
  color: #475569;
}

body[data-theme="engineering-light"] #panel-result-preview .excel-review-empty {
  background: #f0fdf4;
  border-color: #86efac;
}

body[data-theme="engineering-light"] .home-topline-text,
body[data-theme="engineering-light"] .notice,
body[data-theme="engineering-light"] .workbench-hero p,
body[data-theme="engineering-light"] .workbench-hero aside span,
body[data-theme="engineering-light"] .workbench-note,
body[data-theme="engineering-light"] .queue-row small,
body[data-theme="engineering-light"] .stage-row small,
body[data-theme="engineering-light"] .field-record-card span,
body[data-theme="engineering-light"] .field-record-card small,
body[data-theme="engineering-light"] .field-evidence-card span,
body[data-theme="engineering-light"] .field-evidence-card small,
body[data-theme="engineering-light"] .field-evidence-card p,
body[data-theme="engineering-light"] .field-safety-card span,
body[data-theme="engineering-light"] .field-safety-card small,
body[data-theme="engineering-light"] .office-conflict-row small,
body[data-theme="engineering-light"] .office-linkage-row small,
body[data-theme="engineering-light"] .office-check-row span,
body[data-theme="engineering-light"] .office-action-log,
body[data-theme="engineering-light"] .office-readiness-card span,
body[data-theme="engineering-light"] .office-readiness-card small,
body[data-theme="engineering-light"] .quality-command p,
body[data-theme="engineering-light"] .quality-command aside span,
body[data-theme="engineering-light"] .mapping-command p,
body[data-theme="engineering-light"] .mapping-command aside span,
body[data-theme="engineering-light"] .delivery-command aside span,
body[data-theme="engineering-light"] .delivery-check-command aside span {
  color: #475569;
}

body[data-theme="engineering-light"] .home-popover,
body[data-theme="engineering-light"] .map-tooltip {
  background: #ffffff;
  color: #172033;
  border-color: #8bb9df;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

body[data-theme="engineering-light"] .project-map-panel,
body[data-theme="engineering-light"] .map-stage-shell,
body[data-theme="engineering-light"] .map-object-detail {
  background: #f8fafc;
  color: #172033;
  border-color: #d7dee8;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body[data-theme="engineering-light"] .project-map-panel:before {
  background:
    radial-gradient(circle at 18% 10%, rgba(14, 165, 233, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 32%);
}

body[data-theme="engineering-light"] .project-map-toolbar {
  background: linear-gradient(90deg, #ffffff, #f1f5f9);
  border-bottom-color: #d7dee8;
}

body[data-theme="engineering-light"] .map-layer-toggle,
body[data-theme="engineering-light"] .map-production-legend span,
body[data-theme="engineering-light"] .map-clear-selection {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

body[data-theme="engineering-light"] .map-layer-toggle:hover,
body[data-theme="engineering-light"] .map-layer-toggle.is-on,
body[data-theme="engineering-light"] .map-clear-selection:hover {
  background: #e0f2fe;
  color: #0f172a;
  border-color: #38bdf8;
}

body[data-theme="engineering-light"] .map-stage-shell {
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

body[data-theme="engineering-light"] .map-stage-shell > .map-grid-texture {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  opacity: 0.65;
}

body[data-theme="engineering-light"] .map-svg .map-bg-rect {
  fill: #ffffff;
}

body[data-theme="engineering-light"] .map-svg .map-grid-pattern-line {
  stroke: rgba(148, 163, 184, 0.18);
}

body[data-theme="engineering-light"] .map-svg .map-grid-texture-line {
  stroke: rgba(148, 163, 184, 0.18);
}

body[data-theme="engineering-light"] .map-label,
body[data-theme="engineering-light"] .map-label-line {
  fill: #0f172a;
  stroke: rgba(255, 255, 255, 0.92);
}

body[data-theme="engineering-light"] .map-label-sub {
  fill: #475569;
}

body[data-theme="engineering-light"] .map-boundary-line {
  stroke: rgba(71, 85, 105, 0.48);
}

body[data-theme="engineering-light"] .map-road-line,
body[data-theme="engineering-light"] .map-road .map-shape {
  stroke: rgba(100, 116, 139, 0.28);
}

body[data-theme="engineering-light"] .map-detail-row {
  background: #f1f5f9;
}

body[data-theme="engineering-light"] .map-object-chip {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}

body[data-theme="engineering-light"] #pipelineCanvas {
  background: #f8fafc !important;
  border: 1px solid #d7dee8;
}

body[data-theme="cad-dark"] .main-stage,
body[data-theme="cad-dark"] .main-content {
  background: #1f2328;
}

body[data-theme="cad-dark"] .topbar,
body[data-theme="cad-dark"] .sgm-topbar,
body[data-theme="cad-dark"] .sprint2-dashboard,
body[data-theme="cad-dark"] .home-module,
body[data-theme="cad-dark"] .workbench-main,
body[data-theme="cad-dark"] .workbench-context,
body[data-theme="cad-dark"] .workbench-evidence,
body[data-theme="cad-dark"] .workbench-hero,
body[data-theme="cad-dark"] .workbench-hero aside,
body[data-theme="cad-dark"] .card,
body[data-theme="cad-dark"] .info-card,
body[data-theme="cad-dark"] .data-card,
body[data-theme="cad-dark"] .project-card,
body[data-theme="cad-dark"] .project-summary-card,
body[data-theme="cad-dark"] .project-detail-card,
body[data-theme="cad-dark"] .split-main,
body[data-theme="cad-dark"] .split-side,
body[data-theme="cad-dark"] .detail-panel,
body[data-theme="cad-dark"] .quality-command,
body[data-theme="cad-dark"] .delivery-command,
body[data-theme="cad-dark"] .delivery-check-command,
body[data-theme="cad-dark"] .mapping-command,
body[data-theme="cad-dark"] .project-map-panel,
body[data-theme="cad-dark"] .map-stage-shell,
body[data-theme="cad-dark"] .map-object-detail {
  background: #2a3037;
  color: #edf2f7;
  border-color: rgba(171, 184, 195, 0.24);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.20);
}

body[data-theme="cad-dark"] .sidebar {
  background: #22272e;
  color: #edf2f7;
  border-right-color: rgba(171, 184, 195, 0.22);
}

body[data-theme="cad-dark"] .domain-group,
body[data-theme="cad-dark"] .sidebar-project-card,
body[data-theme="cad-dark"] .sidebar-user-card {
  background: #2a3037;
  border-color: rgba(171, 184, 195, 0.20);
}

body[data-theme="cad-dark"] .domain-group.is-active,
body[data-theme="cad-dark"] .domain-link:hover,
body[data-theme="cad-dark"] .domain-link.active,
body[data-theme="cad-dark"] .nav-item:hover,
body[data-theme="cad-dark"] .nav-item.active {
  background: rgba(98, 199, 242, 0.10);
  border-color: rgba(98, 199, 242, 0.24);
}

body[data-theme="cad-dark"] input,
body[data-theme="cad-dark"] select,
body[data-theme="cad-dark"] textarea,
body[data-theme="cad-dark"] .search-input,
body[data-theme="cad-dark"] .filter-select,
body[data-theme="cad-dark"] .topbar-select,
body[data-theme="cad-dark"] .topbar-search,
body[data-theme="cad-dark"] .workbench-main .search-input,
body[data-theme="cad-dark"] .workbench-main .filter-select {
  background: #22272e;
  color: #edf2f7;
  border-color: rgba(171, 184, 195, 0.28);
}

body[data-theme="cad-dark"] select option,
body[data-theme="cad-dark"] .workbench-main .filter-select option {
  background: #22272e;
  color: #edf2f7;
}

/* Engineering light readability pass: neutralize leftover dark-theme pale text. */
body[data-theme="engineering-light"] .main-stage,
body[data-theme="engineering-light"] .main-stage *,
body[data-theme="engineering-light"] .sidebar,
body[data-theme="engineering-light"] .sidebar * {
  text-shadow: none;
}

body[data-theme="engineering-light"] .page-title,
body[data-theme="engineering-light"] .section-title,
body[data-theme="engineering-light"] .panel-title,
body[data-theme="engineering-light"] .home-title,
body[data-theme="engineering-light"] .card-title,
body[data-theme="engineering-light"] .detail-value,
body[data-theme="engineering-light"] .detail-row strong,
body[data-theme="engineering-light"] .metric-card strong,
body[data-theme="engineering-light"] .metric-card .metric-value,
body[data-theme="engineering-light"] .metric-card .metric-title,
body[data-theme="engineering-light"] .project-map-title,
body[data-theme="engineering-light"] .map-object-detail-title,
body[data-theme="engineering-light"] .map-detail-row strong,
body[data-theme="engineering-light"] .business-grid strong,
body[data-theme="engineering-light"] .evidence-row strong,
body[data-theme="engineering-light"] .survey-hint strong,
body[data-theme="engineering-light"] .version-archive-card strong,
body[data-theme="engineering-light"] .sync-item-table code,
body[data-theme="engineering-light"] .quality-owner-grid strong,
body[data-theme="engineering-light"] .quality-command aside b,
body[data-theme="engineering-light"] .mapping-command aside b,
body[data-theme="engineering-light"] .mapping-board li strong,
body[data-theme="engineering-light"] .delivery-verdict strong,
body[data-theme="engineering-light"] .delivery-check-command aside b,
body[data-theme="engineering-light"] .delivery-package-board li strong,
body[data-theme="engineering-light"] .delivery-history-row strong,
body[data-theme="engineering-light"] .return-owner-group strong,
body[data-theme="engineering-light"] .chief-review-panel-row strong,
body[data-theme="engineering-light"] .chief-review-panel-row b {
  color: #172033;
}

body[data-theme="engineering-light"] .page-subtitle,
body[data-theme="engineering-light"] .card-desc,
body[data-theme="engineering-light"] .detail-label,
body[data-theme="engineering-light"] .detail-note,
body[data-theme="engineering-light"] .detail-row span,
body[data-theme="engineering-light"] .metric-card span,
body[data-theme="engineering-light"] .metric-card small,
body[data-theme="engineering-light"] .metric-card em,
body[data-theme="engineering-light"] .project-map-subtitle,
body[data-theme="engineering-light"] .map-object-detail-summary,
body[data-theme="engineering-light"] .map-tooltip-row,
body[data-theme="engineering-light"] .map-production-legend span,
body[data-theme="engineering-light"] .map-object-chip,
body[data-theme="engineering-light"] .business-grid span,
body[data-theme="engineering-light"] .surveyor-advice p,
body[data-theme="engineering-light"] .ops-card small,
body[data-theme="engineering-light"] .ops-stage-list li small,
body[data-theme="engineering-light"] .ops-risk-list li small,
body[data-theme="engineering-light"] .first-use-steps small,
body[data-theme="engineering-light"] .first-use-guide p,
body[data-theme="engineering-light"] .project-card .card-metrics,
body[data-theme="engineering-light"] .project-card .light-hint,
body[data-theme="engineering-light"] .version-archive-card small,
body[data-theme="engineering-light"] .version-archive-card em,
body[data-theme="engineering-light"] .version-archive-card div,
body[data-theme="engineering-light"] .quality-owner-grid span,
body[data-theme="engineering-light"] .delivery-package-board li,
body[data-theme="engineering-light"] .delivery-history-row span,
body[data-theme="engineering-light"] .delivery-history-row small,
body[data-theme="engineering-light"] .delivery-history-row em,
body[data-theme="engineering-light"] .delivery-next-action,
body[data-theme="engineering-light"] .delivery-check-command p,
body[data-theme="engineering-light"] .delivery-verdict p,
body[data-theme="engineering-light"] .delivery-package-meta,
body[data-theme="engineering-light"] .delivery-timeline span,
body[data-theme="engineering-light"] .office-conflict-compare-row,
body[data-theme="engineering-light"] .office-conflict-compare-row.is-head,
body[data-theme="engineering-light"] .office-action-log,
body[data-theme="engineering-light"] .chief-review-panel-row small,
body[data-theme="engineering-light"] .light-hint,
body[data-theme="engineering-light"] .light-feedback {
  color: #475569;
}

body[data-theme="engineering-light"] .ops-stage-list li,
body[data-theme="engineering-light"] .ops-risk-list li,
body[data-theme="engineering-light"] .office-tree-row,
body[data-theme="engineering-light"] .office-linkage-row,
body[data-theme="engineering-light"] .chief-review-panel-row,
body[data-theme="engineering-light"] .mapping-board li,
body[data-theme="engineering-light"] .delivery-package-board li {
  color: #172033;
}

body[data-theme="engineering-light"] button span,
body[data-theme="engineering-light"] button small,
body[data-theme="engineering-light"] button strong,
body[data-theme="engineering-light"] .btn-primary span,
body[data-theme="engineering-light"] .btn-primary small,
body[data-theme="engineering-light"] .btn-primary strong {
  color: inherit;
}

body[data-theme="engineering-light"] input::placeholder,
body[data-theme="engineering-light"] textarea::placeholder,
body[data-theme="engineering-light"] .search-input::placeholder,
body[data-theme="engineering-light"] .topbar-search::placeholder {
  color: #64748b;
}

body[data-theme="engineering-light"] code {
  background: #eef6ff;
  color: #0f5f8f;
  border-color: #bfdbfe;
}

body[data-theme="engineering-light"] .metric-card.risk {
  background: #fff8eb;
  border-color: #e0a33a;
  box-shadow: 0 8px 18px rgba(120, 73, 0, 0.08);
}

body[data-theme="engineering-light"] .metric-card.risk span,
body[data-theme="engineering-light"] .metric-card.risk small {
  color: #6b4e16;
}

body[data-theme="engineering-light"] .metric-card.risk strong {
  color: #172033;
}

body[data-theme="engineering-light"] .metric-card.green {
  background: #f0fdf4;
  border-color: #16a34a;
  box-shadow: 0 8px 18px rgba(21, 128, 61, 0.08);
}

body[data-theme="engineering-light"] .metric-card.green span,
body[data-theme="engineering-light"] .metric-card.green small,
body[data-theme="engineering-light"] .metric-card.green em {
  color: #166534;
}

body[data-theme="engineering-light"] .metric-card.green strong {
  color: #14532d;
}

body[data-theme="engineering-light"] .tag-ok,
body[data-theme="engineering-light"] .status-done,
body[data-theme="engineering-light"] .sgm-success-badge,
body[data-theme="engineering-light"] .delivery-timeline span.is-done {
  color: #14532d;
  background: #dcfce7;
  border-color: #86efac;
}

body[data-theme="engineering-light"] .sgm-success,
body[data-theme="engineering-light"] .status-card.ok-card,
body[data-theme="engineering-light"] .quality-command strong.is-pass,
body[data-theme="engineering-light"] .mapping-command.can-map strong,
body[data-theme="engineering-light"] .command-verdict.can-deliver strong,
body[data-theme="engineering-light"] .delivery-command.can-deliver .delivery-verdict strong,
body[data-theme="engineering-light"] .delivery-check-command strong,
body[data-theme="engineering-light"] .task-flow-step.is-done,
body[data-theme="engineering-light"] .ops-stage-list li.is-done,
body[data-theme="engineering-light"] .mapping-layer-grid span.ready,
body[data-theme="engineering-light"] .delivery-package-board li.ready {
  color: #166534;
}

body[data-theme="engineering-light"] .survey-hint.is-ok {
  color: #14532d;
  background: #ecfdf3;
  border-color: #86efac;
}

body[data-theme="engineering-light"] .domain-link.is-ready small {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

body[data-theme="engineering-light"] .domain-link.is-ready .domain-link-dot {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.10);
}

body[data-theme="engineering-light"] .map-point-reviewed .map-point-core {
  fill: #16a34a;
  stroke: #f8fafc;
}

body[data-theme="engineering-light"] .map-workarea-complete {
  fill: rgba(22, 163, 74, 0.12);
  stroke: rgba(21, 128, 61, 0.50);
}

body[data-theme="cad-dark"] .metric-card.risk {
  background: #34312a;
  border-color: #b7791f;
}

body[data-theme="cad-dark"] .metric-card.risk span,
body[data-theme="cad-dark"] .metric-card.risk small {
  color: #d6c5a3;
}

body[data-theme="cad-dark"] .metric-card.risk strong {
  color: #f7fafc;
}

body:not([data-theme]) .metric-card.risk,
body[data-theme="neo-dark"] .metric-card.risk {
  border-color: rgba(255, 122, 0, .34);
}

body:not([data-theme]) .metric-card.risk,
body[data-theme="neo-dark"] .metric-card.risk {
  background: #132235;
  box-shadow: inset 3px 0 0 var(--upms-orange);
}

body:not([data-theme]) .metric-card.risk span,
body:not([data-theme]) .metric-card.risk small,
body[data-theme="neo-dark"] .metric-card.risk span,
body[data-theme="neo-dark"] .metric-card.risk small {
  color: #cbd8e8;
}

body:not([data-theme]) .metric-card.risk strong,
body[data-theme="neo-dark"] .metric-card.risk strong {
  color: #ffffff;
}
