:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5f6d67;
  --line: #d9e2dd;
  --paper: #f6f8f5;
  --panel: #ffffff;
  --accent: #0f7d68;
  --accent-2: #2457a6;
  --warning: #a35d00;
  --danger: #a32727;
  --soft: #e7f3ef;
  --shadow: 0 18px 45px rgba(24, 38, 32, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

body.login-body {
  min-height: 100vh;
  background:
    linear-gradient(130deg, rgba(15, 125, 104, 0.12), transparent 42%),
    linear-gradient(310deg, rgba(36, 87, 166, 0.12), transparent 44%),
    var(--paper);
}

body.simulator-body {
  min-height: 100vh;
  overflow: hidden;
  background: #edf3f1;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  background: #101915;
  color: #f6fbf8;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #f2fbf6;
  color: #0d4e42;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #a9b9b2;
}

.simulator-topbar {
  height: 74px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: #101915;
  color: #f6fbf8;
}

.simulator-brand {
  color: #f6fbf8;
}

.simulator-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.simulator-shell {
  height: calc(100vh - 74px);
  padding: 0;
  display: grid;
  grid-template-columns: 280px minmax(620px, 1fr) 360px;
  gap: 0;
}

.simulator-library,
.simulator-inspector {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.simulator-inspector {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.simulator-library h2,
.simulator-inspector h2 {
  margin: 0;
}

.simulator-library p,
.empty-state {
  color: var(--muted);
}

.equipment-palette {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.palette-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fbfdfb;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.palette-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(24, 38, 32, 0.08);
}

.palette-card img,
.equipment-fallback {
  grid-row: span 2;
  width: 66px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.equipment-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
}

.palette-card small {
  color: var(--muted);
}

.simulator-canvas-wrap {
  position: relative;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.canvas-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 10px 16px;
  background: #f8fbf9;
  border-bottom: 1px solid var(--line);
}

.canvas-toolbar span,
.canvas-legend {
  color: var(--muted);
  font-size: 13px;
}

.canvas-toolbar div:first-child {
  display: grid;
  gap: 2px;
}

.canvas-legend {
  display: flex;
  gap: 14px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.legend-dot.qc {
  background: var(--accent-2);
}

.visual-canvas {
  position: relative;
  min-width: 900px;
  min-height: 660px;
  overflow: hidden;
  background:
    linear-gradient(rgba(15, 125, 104, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 125, 104, 0.08) 1px, transparent 1px),
    #edf3f1;
  background-size: 28px 28px;
}

.canvas-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.canvas-lines line {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 9 7;
}

.canvas-lines .qc-line {
  stroke: var(--accent-2);
}

.canvas-node {
  position: absolute;
  z-index: 2;
  width: 190px;
  min-height: 142px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(24, 38, 32, 0.14);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.canvas-node.selected {
  border-color: var(--accent);
  box-shadow: 0 18px 38px rgba(15, 125, 104, 0.22);
}

.canvas-node .node-image {
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: #f2f7f4;
}

.canvas-node img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.canvas-node strong,
.canvas-node small {
  display: block;
}

.canvas-node strong {
  margin-top: 8px;
}

.canvas-node small {
  color: var(--muted);
}

.parameter-form {
  display: grid;
  gap: 12px;
}

.selected-device-heading {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  background: var(--soft);
}

.selected-device-heading span {
  color: var(--muted);
}

.parameter-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.parameter-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
}

.source-link {
  color: var(--accent-2);
  font-weight: 800;
}

.simulation-output {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.visual-run-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.visual-run-summary article,
.visual-bottleneck {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.visual-run-summary span,
.visual-bottleneck p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.visual-node-results {
  margin-top: 12px;
}

.visual-warnings {
  color: var(--muted);
  padding-left: 18px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  color: #d9e5df;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}

.nav-list a:hover,
.nav-list a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #c9d6d0;
  font-size: 13px;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: #49d17d;
  box-shadow: 0 0 0 5px rgba(73, 209, 125, 0.16);
}

main {
  padding: 32px;
  display: grid;
  gap: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.topbar h1,
.section-heading h2,
.hero-copy h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(26px, 4vw, 44px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.primary-action,
.secondary-action {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.primary-action {
  min-height: 42px;
  padding: 0 16px;
  background: var(--ink);
  color: #ffffff;
}

.secondary-action {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

.login-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.login-panel,
.login-context {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.login-panel {
  padding: 28px;
  display: grid;
  gap: 28px;
}

.login-brand {
  color: var(--ink);
}

.login-brand small {
  color: var(--muted);
}

.login-panel h1,
.login-context h2 {
  margin: 0;
  letter-spacing: 0;
}

.login-panel h1 {
  font-size: clamp(28px, 5vw, 42px);
}

.login-copy,
.login-context p {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
}

.login-form input:focus {
  outline: 3px solid rgba(15, 125, 104, 0.18);
  border-color: var(--accent);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

.login-context {
  min-height: 430px;
  padding: 34px;
  display: grid;
  align-content: end;
}

.login-context h2 {
  max-width: 680px;
  font-size: clamp(30px, 5vw, 56px);
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(160px, 0.5fr));
  gap: 16px;
}

.hero-panel,
.metric-card,
.section-block,
.side-panel,
.run-panel,
.risk-panel,
.governance-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  min-height: 330px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(240px, 0.75fr);
  gap: 20px;
  overflow: hidden;
}

.hero-copy h2 {
  max-width: 760px;
  font-size: clamp(24px, 3vw, 38px);
}

.hero-copy p:last-child {
  color: var(--muted);
  max-width: 660px;
}

.plant-map {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 14px;
  align-content: center;
}

.map-node {
  position: relative;
  z-index: 1;
  min-height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
  font-weight: 800;
}

.map-node.active {
  background: var(--accent);
  color: #ffffff;
}

.map-line {
  position: absolute;
  inset: 48% 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.metric-card {
  padding: 20px;
  display: grid;
  align-content: space-between;
  min-height: 160px;
}

.metric-card span,
.run-header,
.equipment-meta,
.timeline-meta {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  font-size: clamp(30px, 4vw, 48px);
}

.metric-card p,
.section-heading {
  margin: 0;
}

.section-block {
  padding: 24px;
}

.section-heading {
  margin-bottom: 18px;
}

.workflow-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.workflow-step,
.equipment-item,
.timeline-item,
.risk-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.workflow-step {
  min-height: 180px;
  padding: 16px;
}

.step-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 800;
}

.workflow-step h3,
.equipment-item h3,
.run-panel h3,
.risk-panel h3,
.side-panel h3,
.governance-grid h3 {
  margin: 14px 0 8px;
}

.workflow-step p,
.equipment-item p,
.side-panel p,
.risk-item p,
.governance-grid p,
.project-summary p {
  margin: 0;
  color: var(--muted);
}

.workflow-step small,
.equipment-item small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.project-section {
  display: grid;
  gap: 16px;
}

.project-grid,
.case-lanes {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.project-summary,
.project-strengths,
.case-lanes article,
.asset-match-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 18px;
}

.project-summary h3,
.project-strengths h3,
.case-lanes h3,
.asset-match-panel h3 {
  margin: 12px 0;
}

.asset-match-panel {
  display: grid;
  gap: 16px;
  scroll-margin-top: 24px;
}

.asset-match-heading,
.asset-group-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.asset-conclusion,
.asset-group-header p,
.asset-group-conclusion,
.open-checks {
  margin: 0;
  color: var(--muted);
}

.asset-match-groups {
  display: grid;
  gap: 14px;
}

.asset-group {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.asset-group h4 {
  margin: 0 0 6px;
  font-size: 18px;
}

.asset-table {
  display: grid;
  gap: 8px;
}

.asset-row {
  display: grid;
  grid-template-columns: 160px minmax(210px, 1.2fr) 90px minmax(170px, 0.9fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.asset-row strong {
  color: var(--accent-2);
}

.asset-row span,
.asset-row em {
  color: var(--muted);
  font-style: normal;
}

.open-checks {
  padding-left: 20px;
}

.project-facts {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.project-facts div,
.compact-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.project-facts dt,
.compact-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 0;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.strength-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.strength-card strong {
  font-size: 22px;
}

.strength-card span,
.compact-row span {
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.equipment-list {
  display: grid;
  gap: 10px;
}

.equipment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
}

.database-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.database-summary article {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.database-summary span,
.database-summary small,
.asset-db-note,
.asset-db-row span,
.asset-db-row em {
  color: var(--muted);
}

.database-summary strong {
  font-size: 30px;
}

.database-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 220px;
  gap: 10px;
  margin-bottom: 12px;
}

.database-tools input,
.database-tools select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
}

.asset-db-note {
  margin-bottom: 12px;
}

.asset-db-table {
  display: grid;
  gap: 8px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.asset-db-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.asset-db-row div {
  display: grid;
  gap: 4px;
}

.asset-db-row p {
  margin: 0;
}

.asset-db-row em {
  font-style: normal;
  font-size: 13px;
}

.document-list {
  display: grid;
  gap: 10px;
}

.document-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.document-row div {
  display: grid;
  gap: 6px;
}

.document-row a {
  color: var(--accent-2);
  font-weight: 800;
}

.document-row p,
.document-row span,
.document-row em {
  margin: 0;
  color: var(--muted);
}

.document-row em {
  font-style: normal;
  font-size: 13px;
}

.manual-tools {
  grid-template-columns: minmax(260px, 1fr) 180px 210px 220px;
}

.manual-queue-list {
  display: grid;
  gap: 10px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.manual-queue-row {
  display: grid;
  grid-template-columns: 170px minmax(210px, 0.8fr) minmax(260px, 1fr) minmax(260px, 1fr) minmax(240px, 0.8fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.manual-queue-head,
.manual-queue-row > div {
  display: grid;
  gap: 6px;
}

.manual-queue-row h3,
.manual-queue-row p {
  margin: 0;
}

.manual-queue-row p,
.manual-queue-row small,
.manual-queue-row span {
  color: var(--muted);
}

.manual-queue-row code {
  white-space: normal;
  color: var(--accent-2);
  font-family: inherit;
  font-weight: 700;
}

.candidate-docs {
  display: grid;
  gap: 5px;
}

.candidate-docs a {
  color: var(--accent-2);
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.pill.warning {
  background: #fff0d9;
  color: var(--warning);
}

.pill.danger {
  background: #ffe7e7;
  color: var(--danger);
}

.side-panel {
  padding: 20px;
  align-self: start;
}

.side-panel.muted {
  background: #f9fbf9;
}

.readiness-scale {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ece8;
  margin: 20px 0 10px;
}

.readiness-scale span {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.simulation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.run-panel,
.risk-panel {
  padding: 20px;
}

.run-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.parameter-grid {
  display: grid;
  gap: 16px;
  margin: 22px 0;
}

.parameter-grid label {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) 70px;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.risk-panel {
  display: grid;
  gap: 10px;
}

.risk-item {
  padding: 14px;
}

.risk-item strong {
  display: block;
}

.qc-timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.governance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.governance-grid article {
  padding: 18px;
}

dialog {
  width: min(520px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

dialog::backdrop {
  background: rgba(11, 18, 15, 0.45);
}

dialog form {
  position: relative;
  padding: 28px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .overview-grid,
  .workflow-board,
  .governance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  main {
    padding: 18px;
  }

  .topbar,
  .hero-panel,
  .two-column,
  .database-summary,
  .database-tools,
  .asset-db-row,
  .document-row,
  .manual-tools,
  .manual-queue-row,
  .project-grid,
  .case-lanes,
  .asset-match-heading,
  .asset-group-header,
  .asset-row,
  .simulation-grid,
  .overview-grid,
  .workflow-board,
  .governance-grid,
  .equipment-item,
  .timeline-item,
  .parameter-grid label {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-context {
    min-height: auto;
  }

  .strength-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* TT simulation cockpit dashboard */
body.sim-dashboard {
  display: grid;
  grid-template-columns: 250px minmax(1180px, 1fr);
  overflow: auto;
  background:
    radial-gradient(circle at 70% -10%, rgba(58, 139, 255, 0.18), transparent 36%),
    linear-gradient(135deg, #081420 0%, #0b1724 48%, #07111d 100%);
  color: #dcecff;
}

.sim-dashboard button,
.sim-dashboard select,
.sim-dashboard input {
  font: inherit;
}

.cockpit-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 14px;
  background: linear-gradient(180deg, rgba(10, 24, 39, 0.98), rgba(7, 16, 28, 0.98));
  border-right: 1px solid rgba(112, 170, 230, 0.16);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

.cockpit-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.cockpit-logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(71, 151, 255, 0.75);
  border-radius: 12px;
  color: #64adff;
  background: linear-gradient(145deg, rgba(36, 105, 186, 0.24), rgba(31, 214, 176, 0.14));
  font-weight: 900;
}

.cockpit-logo strong,
.cockpit-logo small,
.cockpit-nav a,
.cockpit-nav span {
  display: block;
}

.cockpit-logo small {
  color: #b3cbe6;
}

.cockpit-nav {
  display: grid;
  gap: 6px;
}

.cockpit-nav span {
  margin: 14px 12px 4px;
  color: #6686a8;
  font-size: 12px;
}

.cockpit-nav a,
.system-settings {
  min-height: 42px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #bdd5ee;
  text-decoration: none;
}

.cockpit-nav a.active,
.cockpit-nav a:hover,
.system-settings {
  border-color: rgba(75, 150, 255, 0.26);
  background: linear-gradient(90deg, rgba(42, 120, 225, 0.42), rgba(42, 120, 225, 0.12));
  color: #ffffff;
}

.cockpit-library {
  padding: 14px;
  border: 1px solid rgba(112, 170, 230, 0.16);
  border-radius: 12px;
  background: rgba(11, 27, 44, 0.7);
}

.cockpit-library h2,
.cockpit-library p {
  margin: 0;
}

.cockpit-library p {
  color: #83a4c6;
  font-size: 12px;
}

.system-settings {
  margin-top: auto;
}

.cockpit-main {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.cockpit-topbar {
  min-height: 50px;
  display: grid;
  grid-template-columns: 310px max-content minmax(420px, 1fr);
  gap: 18px;
  align-items: center;
}

.scenario-select {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8da9c8;
}

.scenario-select select {
  min-width: 190px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(100, 170, 255, 0.32);
  border-radius: 8px;
  background: #0d1d31;
  color: #eef7ff;
}

.simulation-controls {
  display: flex;
  gap: 8px;
}

.simulation-controls button,
.view-tools button,
.display-mode button {
  min-height: 36px;
  border: 1px solid rgba(100, 170, 255, 0.28);
  border-radius: 7px;
  background: rgba(12, 28, 48, 0.9);
  color: #cfe5ff;
  cursor: pointer;
}

.simulation-controls button {
  min-width: 76px;
  padding: 0 14px;
}

.simulation-controls .control-run,
.display-mode button.active {
  background: linear-gradient(180deg, #55a8ff, #2374d7);
  border-color: rgba(132, 199, 255, 0.84);
  color: #041422;
  font-weight: 900;
}

.simulation-controls .control-pause,
.simulation-controls .control-stop {
  color: #9ebadc;
}

.topbar-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  color: #8da9c8;
  font-size: 14px;
}

.topbar-status strong,
.admin-chip {
  color: #ffffff;
}

.topbar-status label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-status input[type="range"] {
  width: 190px;
}

.divider {
  width: 1px;
  height: 22px;
  background: rgba(137, 176, 215, 0.22);
}

.bell {
  color: #ff4b62;
}

.admin-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 10px;
}

.kpi-card,
.cockpit-panel,
.factory-panel {
  border: 1px solid rgba(94, 146, 204, 0.22);
  background:
    linear-gradient(180deg, rgba(23, 43, 67, 0.96), rgba(12, 28, 47, 0.96)),
    rgba(12, 28, 47, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.kpi-card {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 10px;
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(41, 111, 216, 0.22);
  border: 3px solid rgba(54, 132, 244, 0.72);
  color: #66b2ff;
  font-size: 22px;
}

.kpi-card.green .kpi-icon {
  border-color: rgba(71, 205, 91, 0.7);
  color: #62e974;
}

.kpi-card small,
.kpi-card strong,
.kpi-card b {
  display: block;
}

.kpi-card small {
  color: #92acc9;
}

.kpi-card strong {
  color: #ffffff;
  font-size: 25px;
  line-height: 1.1;
}

.kpi-card em {
  color: #c2daf5;
  font-size: 14px;
  font-style: normal;
}

.kpi-card b {
  color: #8ed5ff;
}

.sparkline {
  display: block;
  width: 120px;
  height: 22px;
  margin-top: 6px;
  background:
    linear-gradient(135deg, transparent 0 7%, #6fe042 8% 11%, transparent 12% 20%, #6fe042 21% 24%, transparent 25% 35%, #6fe042 36% 39%, transparent 40% 52%, #6fe042 53% 56%, transparent 57% 70%, #6fe042 71% 75%, transparent 76% 100%);
  filter: drop-shadow(0 0 4px rgba(101, 239, 77, 0.35));
}

.sparkline.blue {
  background:
    linear-gradient(135deg, transparent 0 7%, #4aa4ff 8% 11%, transparent 12% 20%, #4aa4ff 21% 24%, transparent 25% 35%, #4aa4ff 36% 39%, transparent 40% 52%, #4aa4ff 53% 56%, transparent 57% 70%, #4aa4ff 71% 75%, transparent 76% 100%);
}

.cockpit-grid {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 410px;
  gap: 10px;
}

.factory-panel,
.cockpit-panel {
  border-radius: 10px;
  overflow: hidden;
}

.factory-toolbar,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(94, 146, 204, 0.18);
  color: #90abc9;
}

.view-tools,
.display-mode {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-tools button,
.display-mode button {
  min-width: 34px;
  padding: 0 10px;
}

.factory-stage {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 12%),
    linear-gradient(24deg, rgba(255, 255, 255, 0.1), transparent 18%),
    #142131;
}

.factory-stage::before {
  content: "";
  position: absolute;
  inset: 32px 18px 18px;
  transform: perspective(900px) rotateX(55deg) rotateZ(-2deg);
  transform-origin: center top;
  border: 1px solid rgba(211, 225, 239, 0.24);
  background:
    linear-gradient(90deg, rgba(45, 232, 124, 0.5) 0 1.5%, transparent 1.5% 22%, rgba(45, 232, 124, 0.45) 22% 23.5%, transparent 23.5% 48%, rgba(45, 232, 124, 0.45) 48% 49.4%, transparent 49.4% 74%, rgba(45, 232, 124, 0.45) 74% 75.3%, transparent 75.3%),
    linear-gradient(0deg, rgba(45, 232, 124, 0.52) 0 2%, transparent 2% 34%, rgba(45, 232, 124, 0.45) 34% 36%, transparent 36% 68%, rgba(45, 232, 124, 0.4) 68% 70%, transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 64px),
    linear-gradient(135deg, #b6bec5, #e1e6e9 45%, #9fa9b1);
  box-shadow: 0 42px 90px rgba(0, 0, 0, 0.45);
}

.factory-stage::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18px;
  height: 70px;
  background: linear-gradient(180deg, rgba(9, 18, 30, 0), rgba(8, 17, 29, 0.72));
}

.zone-tag {
  position: absolute;
  z-index: 4;
  padding: 9px 14px;
  border-radius: 8px;
  background: rgba(27, 82, 144, 0.9);
  border: 1px solid rgba(96, 166, 255, 0.45);
  color: #dcecff;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.zone-tag::first-letter {
  color: #20d85b;
}

.zone-tag.raw { left: 7%; top: 70px; }
.zone-tag.granulation { left: 40%; top: 82px; }
.zone-tag.compression { right: 23%; top: 145px; }
.zone-tag.coating { left: 7%; top: 285px; }
.zone-tag.packaging { left: 47%; top: 328px; }
.zone-tag.warehouse { right: 8%; bottom: 88px; }

.sim-dashboard .visual-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.sim-dashboard .canvas-lines line {
  stroke: #20df65;
  stroke-width: 4;
  stroke-dasharray: 10 8;
  filter: drop-shadow(0 0 8px rgba(45, 235, 120, 0.66));
}

.sim-dashboard .canvas-lines .qc-line {
  stroke: #53a7ff;
}

.sim-dashboard .canvas-node {
  width: 144px;
  min-height: 110px;
  padding: 8px;
  border: 1px solid rgba(157, 203, 255, 0.34);
  border-radius: 10px;
  background: rgba(12, 31, 52, 0.82);
  color: #eef7ff;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(5px);
}

.sim-dashboard .canvas-node.selected {
  border-color: #4da2ff;
  box-shadow: 0 0 0 2px rgba(79, 160, 255, 0.18), 0 18px 34px rgba(0, 0, 0, 0.42);
}

.sim-dashboard .canvas-node .node-image {
  height: 54px;
  background: rgba(255, 255, 255, 0.08);
}

.sim-dashboard .canvas-node strong {
  margin-top: 6px;
  font-size: 12px;
}

.sim-dashboard .canvas-node small {
  color: #8fb1d3;
  font-size: 11px;
}

.right-stack {
  display: grid;
  gap: 10px;
  align-content: start;
}

.cockpit-panel {
  padding-bottom: 12px;
}

.panel-heading h2 {
  margin: 0;
  color: #dcecff;
  font-size: 16px;
}

.panel-heading span,
.panel-heading a {
  color: #93afd0;
  text-decoration: none;
}

.cockpit-panel > p,
.production-facts,
.status-list,
.alarm-list {
  margin: 0;
  padding: 12px 18px;
}

.cockpit-panel > p,
.production-facts,
.status-list,
.alarm-list,
.equipment-state {
  color: #b9cde3;
}

.progress-track {
  height: 10px;
  margin: 0 18px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(77, 108, 144, 0.32);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #418dff, #8fd5ff);
}

.production-facts {
  display: grid;
  gap: 8px;
}

.production-facts div,
.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.production-facts dt,
.production-facts dd {
  margin: 0;
}

.donut-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(#28c3a3 0 72%, #d9bd3a 72% 88%, #4aa4ff 88% 96%, #ff7b2f 96% 100%);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: #0f2135;
}

.status-list {
  display: grid;
  gap: 9px;
  list-style: none;
}

.status-list i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
}

.status-list .run { background: #28c3a3; }
.status-list .idle { background: #d9bd3a; }
.status-list .stop { background: #4aa4ff; }
.status-list .fault { background: #ff7b2f; }

.equipment-state,
.event-log table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.equipment-state th,
.equipment-state td,
.event-log td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(94, 146, 204, 0.13);
  text-align: left;
}

.equipment-state th {
  color: #86a5c5;
  font-weight: 600;
}

.equipment-state .ok {
  color: #2de36d;
}

.equipment-state .warn {
  color: #f2c044;
}

.parameter-panel .parameter-form,
.simulation-output-panel #visualSimulationOutput {
  padding: 12px 18px 0;
}

.sim-dashboard .selected-device-heading {
  background: rgba(45, 114, 202, 0.24);
}

.sim-dashboard .selected-device-heading span,
.sim-dashboard .parameter-form label,
.sim-dashboard .visual-run-summary span,
.sim-dashboard .visual-bottleneck p,
.sim-dashboard .visual-warnings,
.sim-dashboard .compact-row span,
.sim-dashboard .compact-row em,
.sim-dashboard .empty-state {
  color: #8eabc9;
}

.sim-dashboard .parameter-form input {
  border-color: rgba(94, 146, 204, 0.24);
  background: rgba(4, 14, 26, 0.58);
  color: #e8f4ff;
}

.sim-dashboard .source-link {
  color: #68b3ff;
}

.sim-dashboard .secondary-action {
  border-color: rgba(94, 146, 204, 0.3);
  background: rgba(13, 34, 57, 0.9);
  color: #dcecff;
}

.cockpit-bottom {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 0.9fr;
  gap: 10px;
}

.chart-panel {
  min-height: 205px;
}

.line-chart,
.bar-chart,
.inventory-chart {
  position: relative;
  height: 150px;
  margin: 10px 18px 0;
  border-left: 1px solid rgba(121, 164, 213, 0.18);
  border-bottom: 1px solid rgba(121, 164, 213, 0.18);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 64px);
}

.plan-line,
.actual-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  transform-origin: left center;
  filter: drop-shadow(0 0 5px currentColor);
}

.plan-line {
  bottom: 40px;
  color: #4898ff;
  background: linear-gradient(90deg, #4898ff, #62b5ff);
  transform: skewY(-13deg);
}

.actual-line {
  bottom: 30px;
  color: #48de69;
  background: linear-gradient(90deg, #48de69, #91ef55);
  transform: skewY(-18deg);
}

.bar-chart,
.inventory-chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: end;
  padding: 0 16px 22px;
}

.bar-chart span,
.inventory-chart span {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  height: 100%;
  gap: 8px;
}

.bar-chart span::before,
.bar-chart span::after,
.inventory-chart span::before,
.inventory-chart span::after {
  content: "";
  align-self: end;
  border-radius: 4px 4px 0 0;
}

.bar-chart span::before {
  height: var(--blue);
  background: #2f86eb;
}

.bar-chart span::after {
  height: var(--green);
  background: #2fb654;
}

.inventory-chart span::before {
  height: var(--now);
  background: #2d86e9;
}

.inventory-chart span::after {
  height: var(--safe);
  background: #2db95a;
}

.bar-chart b,
.inventory-chart b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  color: #9bb5d1;
  font-size: 12px;
  text-align: center;
}

.alarm-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.alarm-list li {
  display: grid;
  grid-template-columns: 18px 70px 1fr 54px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.alarm-list strong {
  color: #f3b94a;
}

.alarm-bad,
.alarm-warn {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #07111d;
  font-size: 10px;
}

.alarm-warn {
  background: #f0aa2f;
}

.alarm-bad {
  background: #f04d57;
}

.cockpit-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.62fr 1fr;
  gap: 10px;
}

.event-log td {
  color: #bdd1e8;
}

.load-bars {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.load-bars label {
  display: grid;
  grid-template-columns: 82px 1fr 44px;
  gap: 10px;
  align-items: center;
  color: #b9cde3;
}

.load-bars i {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(66, 101, 138, 0.28);
}

.load-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #398dff, #86d7ff);
}

.sim-dashboard .visual-run-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sim-dashboard .visual-run-summary article,
.sim-dashboard .visual-bottleneck {
  border-color: rgba(94, 146, 204, 0.22);
  background: rgba(4, 14, 26, 0.42);
}

.sim-dashboard .visual-bottleneck {
  margin-top: 10px;
}

.sim-dashboard .visual-node-results {
  max-height: 150px;
  overflow: auto;
}

.sim-dashboard .equipment-palette {
  gap: 8px;
}

.sim-dashboard .palette-card {
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 8px;
  border-color: rgba(94, 146, 204, 0.22);
  background: rgba(6, 18, 32, 0.72);
  color: #dcecff;
}

.sim-dashboard .palette-card img,
.sim-dashboard .equipment-fallback {
  width: 44px;
  height: 40px;
  border-radius: 7px;
}

.sim-dashboard .palette-card small {
  color: #8eabc9;
}

@media (max-width: 1280px) {
  body.sim-dashboard {
    grid-template-columns: 220px minmax(960px, 1fr);
  }

  .kpi-strip {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }

  .cockpit-grid,
  .cockpit-bottom,
  .cockpit-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Process flow design control screen */
body.flow-screen {
  display: grid;
  grid-template-rows: 62px 48px minmax(580px, 1fr) 190px 38px;
  min-width: 1380px;
  min-height: 100vh;
  overflow: auto;
  background:
    radial-gradient(circle at 65% -15%, rgba(49, 126, 224, 0.16), transparent 38%),
    linear-gradient(135deg, #07111d, #0a1929 54%, #07111d);
  color: #dcecff;
}

.flow-topbar,
.flow-meta,
.flow-footer {
  display: grid;
  align-items: center;
  border-bottom: 1px solid rgba(101, 162, 232, 0.16);
  background: rgba(7, 18, 31, 0.96);
}

.flow-topbar {
  grid-template-columns: 360px 1fr 560px;
  padding: 0 12px;
  gap: 16px;
}

.flow-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
}

.flow-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #dcecff;
  border-radius: 9px;
  font-weight: 900;
}

.flow-brand strong,
.flow-brand small {
  display: block;
}

.flow-brand small {
  color: #dcecff;
  font-weight: 800;
}

.flow-tabs {
  display: flex;
  gap: 8px;
}

.flow-tabs a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(104, 160, 224, 0.28);
  border-radius: 7px;
  background: rgba(9, 24, 42, 0.75);
  color: #c5daef;
  text-decoration: none;
}

.flow-tabs a.active {
  background: linear-gradient(180deg, rgba(50, 126, 224, 0.94), rgba(24, 74, 145, 0.94));
  border-color: #4b9cff;
  color: #ffffff;
}

.flow-tabs span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid currentColor;
}

.flow-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.flow-actions button,
.flow-actions select,
.flow-meta button,
.flow-canvas-panel button,
.flow-properties button,
.speed-pills button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(104, 160, 224, 0.28);
  border-radius: 6px;
  background: rgba(9, 24, 42, 0.86);
  color: #dcecff;
}

.flow-actions .primary-flow,
.flow-meta button:first-of-type,
.speed-pills .active {
  background: linear-gradient(180deg, #4b9cff, #236bd3);
  border-color: rgba(110, 183, 255, 0.82);
}

.alert-badge {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e02c42;
  color: #ffffff;
  font-size: 12px;
}

.flow-meta {
  grid-template-columns: 1.6fr 0.6fr 0.9fr 0.9fr 80px 88px;
  gap: 16px;
  padding: 0 14px;
  color: #9fb8d4;
}

.flow-meta strong {
  color: #ffffff;
}

.flow-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 250px minmax(760px, 1fr) 280px;
  gap: 6px;
  padding: 6px;
}

.flow-library,
.flow-canvas-panel,
.flow-properties,
.flow-card {
  border: 1px solid rgba(101, 162, 232, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 35, 57, 0.94), rgba(9, 24, 42, 0.96));
  overflow: hidden;
}

.flow-library {
  padding: 12px;
  overflow: auto;
}

.flow-library h2,
.flow-library h3,
.flow-properties h2,
.flow-properties h3,
.flow-card h2 {
  margin: 0;
  color: #e9f4ff;
}

.flow-library h2 {
  margin-bottom: 10px;
}

.flow-library h3 {
  margin: 14px 0 7px;
  color: #9fb8d4;
  font-size: 13px;
}

.flow-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(104, 160, 224, 0.2);
  border-radius: 6px;
  color: #8faaca;
  background: rgba(4, 14, 26, 0.4);
}

.flow-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #dcecff;
}

.flow-library article {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px;
  border-bottom: 1px solid rgba(104, 160, 224, 0.12);
  color: #c5daef;
}

.flow-library img,
.mini-fallback {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  object-fit: cover;
  background: rgba(87, 151, 230, 0.16);
}

.mini-fallback {
  display: grid;
  place-items: center;
  color: #79bbff;
  font-size: 12px;
  font-weight: 900;
}

.drop-box {
  min-height: 120px;
  margin-top: 14px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(122, 179, 242, 0.38);
  border-radius: 8px;
  color: #91a9c6;
  background: rgba(4, 14, 26, 0.24);
}

.flow-panel-head {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(101, 162, 232, 0.14);
}

.flow-panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.canvas-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9fb8d4;
  font-size: 12px;
}

.canvas-tools button {
  min-width: 34px;
  padding: 0 10px;
}

.canvas-tools button.active {
  background: rgba(50, 126, 224, 0.75);
}

.legend::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

.legend.green::before { background: #39c85d; }
.legend.purple::before { background: #9a61ff; }
.legend.blue::before { background: #3ea2ff; }

.flow-canvas {
  position: relative;
  height: calc(100% - 50px);
  min-height: 560px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 24px),
    #0b1a2a;
}

.flow-node,
.input-box,
.output-box,
.utility,
.utility-box {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(97, 153, 218, 0.42);
  border-radius: 8px;
  background: rgba(21, 48, 78, 0.9);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.flow-node {
  width: 138px;
  height: 110px;
  padding: 12px;
  display: grid;
  align-content: space-between;
}

.flow-node::before {
  content: "";
  height: 48px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), transparent 35%),
    linear-gradient(145deg, #9ca8b2, #d7dde2 46%, #76838e);
}

.flow-node.ok::after {
  content: "✓";
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #3bc858;
  color: #082014;
  font-weight: 900;
}

.flow-node.selected {
  border-color: #4b9cff;
  box-shadow: 0 0 0 2px rgba(75, 156, 255, 0.2), 0 14px 26px rgba(0, 0, 0, 0.3);
}

.flow-node b {
  color: #ffffff;
  font-size: 13px;
}

.flow-node span {
  color: #a6bfdc;
  font-size: 12px;
}

.input-box,
.output-box,
.utility-box {
  padding: 16px;
  color: #dcecff;
}

.input-box {
  left: 22px;
  top: 70px;
  width: 96px;
  height: 100px;
  border-style: dashed;
  border-color: #38c75a;
}

.output-box {
  right: 18px;
  top: 294px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.utility-box {
  left: 30px;
  bottom: 55px;
  width: 130px;
  border-style: dashed;
  border-color: #3ea2ff;
}

.utility {
  width: 150px;
  height: 72px;
  display: grid;
  place-items: center;
  text-align: center;
  border-style: dashed;
  border-color: rgba(62, 162, 255, 0.45);
  color: #aec7e4;
}

.n1 { left: 155px; top: 58px; }
.n2 { left: 340px; top: 58px; }
.n3 { left: 525px; top: 58px; }
.n4 { left: 710px; top: 58px; }
.n5 { left: 895px; top: 58px; }
.n6 { left: 90px; top: 265px; }
.n7 { left: 285px; top: 265px; }
.n8 { left: 480px; top: 265px; }
.n9 { left: 675px; top: 265px; }
.n10 { left: 870px; top: 265px; }
.u1 { left: 250px; bottom: 56px; }
.u2 { left: 445px; bottom: 56px; }
.u3 { left: 640px; bottom: 56px; }
.u4 { left: 835px; bottom: 56px; }

.flow-line {
  position: absolute;
  z-index: 2;
}

.flow-line.main {
  height: 4px;
  background: #35c85d;
  box-shadow: 0 0 8px rgba(53, 200, 93, 0.45);
}

.flow-line.main::after {
  content: "";
  position: absolute;
  right: -8px;
  top: -5px;
  border: 7px solid transparent;
  border-left-color: #35c85d;
}

.flow-line.control {
  height: 2px;
  border-top: 2px dashed #925eff;
}

.flow-line.utility-line {
  height: 2px;
  border-top: 2px dashed #3ea2ff;
}

.l1 { left: 118px; top: 120px; width: 35px; }
.l2 { left: 293px; top: 120px; width: 45px; }
.l3 { left: 478px; top: 120px; width: 45px; }
.l4 { left: 663px; top: 120px; width: 45px; }
.l5 { left: 848px; top: 120px; width: 45px; }
.l6 { left: 1033px; top: 120px; width: 24px; height: 138px; border-right: 4px solid #35c85d; background: transparent; }
.l7 { left: 228px; top: 325px; width: 55px; }
.l8 { left: 423px; top: 325px; width: 55px; }
.l9 { left: 618px; top: 325px; width: 55px; }
.l10 { left: 813px; top: 325px; width: 55px; }
.c1 { left: 245px; top: 220px; width: 690px; }
.c2 { left: 180px; top: 387px; width: 780px; }
.w1 { left: 160px; bottom: 122px; width: 760px; }
.w2 { left: 142px; bottom: 92px; width: 840px; }

.flow-properties {
  padding: 14px;
  overflow: auto;
}

.flow-properties h3 {
  margin-top: 12px;
  color: #cfe4fb;
}

.property-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0;
}

.property-tabs button.active {
  background: rgba(50, 126, 224, 0.68);
}

.property-form {
  display: grid;
  gap: 9px;
}

.property-form label {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
  align-items: center;
  color: #9fb8d4;
}

.property-form input {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid rgba(104, 160, 224, 0.24);
  border-radius: 5px;
  background: rgba(4, 14, 26, 0.42);
  color: #e7f2ff;
}

.device-info {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(104, 160, 224, 0.16);
}

.device-info dl {
  display: grid;
  gap: 8px;
  color: #a9c1dc;
}

.device-info div {
  display: flex;
  justify-content: space-between;
}

.device-info dt,
.device-info dd {
  margin: 0;
}

.device-info .ok,
.good {
  color: #35d66c;
}

.device-info button {
  width: 100%;
  margin-top: 10px;
  background: rgba(50, 126, 224, 0.52);
}

.flow-bottom {
  display: grid;
  grid-template-columns: 1fr 0.72fr 1fr 2.15fr;
  gap: 6px;
  padding: 0 6px 6px;
}

.flow-card {
  padding: 14px;
}

.green-donut {
  width: 118px;
  height: 118px;
  margin: 12px auto;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: conic-gradient(#45d259 0 100%);
  position: relative;
}

.green-donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: #0c2035;
}

.green-donut span,
.green-donut small {
  z-index: 1;
}

.green-donut span {
  font-size: 28px;
  font-weight: 900;
}

.flow-card p,
.flow-card dl,
.monitor table {
  color: #adc6e2;
}

.flow-card dl {
  display: grid;
  gap: 9px;
}

.flow-card dl div {
  display: flex;
  justify-content: space-between;
}

.flow-card dt,
.flow-card dd {
  margin: 0;
}

.speed-pills {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.monitor table {
  width: 100%;
  border-collapse: collapse;
}

.monitor td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(104, 160, 224, 0.12);
}

.flow-footer {
  grid-template-columns: repeat(4, 100px) 1fr;
  gap: 8px;
  padding: 0 12px;
}

.flow-footer a {
  color: #bdd4ef;
  text-decoration: none;
}

.flow-footer a.active {
  color: #ffffff;
}

.flow-footer span {
  justify-self: end;
  color: #9fb8d4;
}

/* Technology transfer simulation big screen */
body.tech-transfer-screen {
  display: grid;
  grid-template-columns: 244px minmax(1180px, 1fr);
  overflow: auto;
  background:
    radial-gradient(circle at 70% -15%, rgba(50, 139, 255, 0.16), transparent 35%),
    linear-gradient(135deg, #07111d 0%, #0b1a2a 55%, #07111d 100%);
  color: #dcecff;
}

.tt-left-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(9, 22, 36, 0.98), rgba(6, 15, 27, 0.99));
  border-right: 1px solid rgba(101, 162, 232, 0.18);
}

.tt-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  text-decoration: none;
}

.tt-logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(221, 237, 255, 0.86);
  border-radius: 9px;
  font-weight: 900;
}

.tt-logo strong,
.tt-logo small {
  display: block;
}

.tt-logo strong {
  font-size: 15px;
}

.tt-logo small {
  color: #d5e9ff;
  font-size: 18px;
  font-weight: 800;
}

.tt-side-nav {
  display: grid;
  gap: 5px;
}

.tt-side-nav a,
.collapse-button {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #bdd4ef;
  text-decoration: none;
  background: transparent;
}

.tt-side-nav a.active,
.tt-side-nav a:hover,
.collapse-button {
  border-color: rgba(72, 145, 255, 0.26);
  background: linear-gradient(90deg, rgba(35, 100, 187, 0.5), rgba(35, 100, 187, 0.12));
  color: #ffffff;
}

.sub-nav {
  display: grid;
  gap: 2px;
  margin: -2px 0 10px 18px;
  padding-left: 12px;
  border-left: 1px solid rgba(81, 151, 235, 0.34);
}

.sub-nav a {
  min-height: 30px;
  padding: 5px 10px;
  color: #aec7e4;
}

.collapse-button {
  margin-top: auto;
  text-align: left;
  cursor: pointer;
}

.tt-screen {
  min-width: 0;
  padding: 0 10px 12px;
  display: grid;
  gap: 8px;
}

.tt-topbar {
  height: 70px;
  display: grid;
  grid-template-columns: 170px minmax(640px, 1fr) 170px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid rgba(101, 162, 232, 0.14);
}

.tt-flow-title {
  padding-left: 12px;
  color: #ffffff;
  font-weight: 900;
}

.tt-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.tt-workflow a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px 0 10px;
  border: 1px solid rgba(126, 171, 225, 0.35);
  border-radius: 8px;
  color: #d1e2f7;
  text-decoration: none;
  background: rgba(9, 24, 42, 0.74);
}

.tt-workflow a:not(:last-child)::after {
  content: "›";
  position: absolute;
  right: -12px;
  color: #5c92d6;
}

.tt-workflow span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
}

.tt-workflow a.active {
  border-color: #4898ff;
  background: linear-gradient(180deg, rgba(45, 113, 205, 0.94), rgba(27, 75, 147, 0.94));
  color: #ffffff;
}

.tt-top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding-right: 18px;
}

.alert-dot {
  color: #ff4b62;
}

.tt-project-strip {
  min-height: 56px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 150px 0.85fr 0.9fr 110px;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(101, 162, 232, 0.16);
  border-radius: 10px;
  background: rgba(13, 30, 50, 0.88);
  color: #a9c1dc;
}

.tt-project-strip strong {
  color: #ffffff;
  font-weight: 700;
}

.status-live {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(37, 180, 93, 0.82);
  color: #eafff0;
}

.tt-project-strip select,
.tt-project-strip button,
.tt-card select,
.tt-card button,
.search-box input {
  border: 1px solid rgba(104, 160, 224, 0.3);
  border-radius: 7px;
  background: rgba(8, 22, 38, 0.9);
  color: #e7f2ff;
}

.tt-project-strip select {
  width: 64px;
  height: 30px;
}

.tt-project-strip button,
.tt-card button {
  min-height: 34px;
  padding: 0 12px;
  cursor: pointer;
}

.tt-project-strip button,
.tt-card button.active {
  background: linear-gradient(180deg, rgba(63, 140, 255, 0.82), rgba(29, 82, 156, 0.82));
  border-color: rgba(99, 170, 255, 0.78);
}

.tt-process-map,
.tt-card {
  border: 1px solid rgba(101, 162, 232, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(17, 36, 58, 0.94), rgba(10, 25, 43, 0.96));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.tt-panel-heading,
.tt-card-title {
  min-height: 44px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tt-panel-heading h2,
.tt-card-title h2,
.tt-card h2 {
  margin: 0;
  color: #e7f2ff;
  font-size: 16px;
}

.tt-panel-heading button,
.tt-card-title button {
  min-height: 30px;
}

.process-flow {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  padding: 12px 20px 18px;
}

.process-flow article {
  position: relative;
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #91a9c6;
}

.process-flow article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(50% + 26px);
  width: calc(100% - 38px);
  height: 2px;
  background: rgba(130, 158, 190, 0.34);
}

.process-flow article.done:not(:last-child)::after {
  background: #2cb85f;
  box-shadow: 0 0 8px rgba(44, 184, 95, 0.34);
}

.process-flow i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(162, 186, 213, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-style: normal;
}

.process-flow .done i {
  border-color: rgba(53, 202, 103, 0.7);
  color: #35ca67;
}

.process-flow .active i {
  border-color: #56a5ff;
  background: rgba(40, 113, 213, 0.38);
  color: #79bbff;
}

.process-flow strong {
  font-size: 12px;
  font-weight: 600;
}

.tt-layout-grid {
  display: grid;
  grid-template-columns: 0.92fr 0.7fr 1.4fr;
  gap: 8px;
}

.equipment-selector,
.parameter-config,
.schedule-card {
  min-height: 530px;
}

.filter-row {
  display: flex;
  gap: 8px;
}

.filter-row select {
  max-width: 150px;
  height: 34px;
  padding: 0 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 12px;
  padding: 0 10px;
  min-height: 36px;
  border: 1px solid rgba(104, 160, 224, 0.24);
  border-radius: 7px;
  color: #80a2c8;
  background: rgba(4, 14, 26, 0.34);
}

.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
}

.tech-transfer-screen .equipment-palette {
  margin: 0;
  padding: 0 14px 12px;
  display: grid;
  gap: 9px;
  max-height: 426px;
  overflow: auto;
}

.tech-transfer-screen .palette-card {
  grid-template-columns: 86px minmax(0, 1fr) 70px;
  grid-template-rows: auto auto;
  min-height: 104px;
  padding: 12px;
  border-color: rgba(92, 146, 209, 0.26);
  background: rgba(14, 33, 55, 0.78);
  color: #e7f2ff;
}

.tech-transfer-screen .palette-card:first-child {
  border-color: #3f91ff;
  background: linear-gradient(90deg, rgba(45, 105, 184, 0.54), rgba(14, 33, 55, 0.86));
}

.tech-transfer-screen .palette-card::after {
  content: "选择";
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: end;
  justify-self: end;
  min-width: 52px;
  padding: 6px 8px;
  border: 1px solid rgba(94, 146, 204, 0.35);
  border-radius: 6px;
  color: #cbe0f8;
  text-align: center;
  font-size: 12px;
}

.tech-transfer-screen .palette-card:first-child::after {
  content: "已选择";
  background: rgba(59, 119, 204, 0.38);
}

.tech-transfer-screen .palette-card img,
.tech-transfer-screen .equipment-fallback {
  grid-row: span 2;
  width: 74px;
  height: 74px;
  border-radius: 4px;
}

.tech-transfer-screen .palette-card small {
  color: #9eb6d1;
}

.parameter-config .parameter-form {
  padding: 0 14px 14px;
  max-height: 465px;
  overflow: auto;
}

.tech-transfer-screen .selected-device-heading {
  background: rgba(45, 105, 184, 0.24);
}

.tech-transfer-screen .selected-device-heading span,
.tech-transfer-screen .parameter-form label,
.tech-transfer-screen .empty-state,
.tech-transfer-screen .visual-run-summary span,
.tech-transfer-screen .visual-bottleneck p,
.tech-transfer-screen .compact-row span,
.tech-transfer-screen .compact-row em,
.tech-transfer-screen .visual-warnings {
  color: #8faaca;
}

.tech-transfer-screen .parameter-form input {
  min-height: 34px;
  border-color: rgba(104, 160, 224, 0.25);
  background: rgba(4, 14, 26, 0.46);
  color: #e7f2ff;
}

.tech-transfer-screen .source-link {
  color: #65afff;
}

.gantt-chart {
  position: relative;
  margin: 0 14px 14px;
  height: 454px;
  padding-top: 44px;
  overflow: hidden;
  border: 1px solid rgba(104, 160, 224, 0.18);
  background:
    repeating-linear-gradient(90deg, transparent 0 17.5%, rgba(130, 163, 201, 0.18) 17.5% calc(17.5% + 1px)),
    repeating-linear-gradient(0deg, transparent 0 40px, rgba(130, 163, 201, 0.12) 40px 41px),
    rgba(5, 17, 31, 0.24);
}

.gantt-days {
  position: absolute;
  inset: 0 0 auto 150px;
  height: 44px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  color: #9bb6d3;
  font-size: 12px;
  text-align: center;
}

.gantt-row {
  position: relative;
  display: grid;
  grid-template-columns: 148px 1fr;
  height: 40px;
  align-items: center;
}

.gantt-row b {
  padding-left: 14px;
  color: #b8cce3;
  font-weight: 600;
  font-size: 13px;
}

.gantt-row.active {
  background: rgba(50, 126, 224, 0.28);
}

.gantt-row i {
  position: absolute;
  left: calc(150px + var(--start));
  width: var(--width);
  height: 20px;
  border-radius: 3px;
  background: #31a750;
}

.gantt-row.active i {
  background: #4c9aff;
}

.gantt-row.waiting i {
  background: #6d7783;
}

.now-line {
  position: absolute;
  top: 44px;
  bottom: 0;
  left: 52%;
  width: 2px;
  background: #469cff;
  box-shadow: 0 0 12px rgba(70, 156, 255, 0.7);
}

.tt-bottom-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.15fr 1fr;
  gap: 8px;
}

.execution-card,
.realtime-card,
.result-card {
  min-height: 315px;
  padding: 14px;
}

.execution-preview {
  position: relative;
  height: 190px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid rgba(104, 160, 224, 0.2);
  border-radius: 7px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 70px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 50px),
    linear-gradient(135deg, #adb7bf, #e3e7ea 45%, #9aa5ad);
}

.execution-preview::before {
  content: "";
  position: absolute;
  inset: 40px 18px 18px;
  background:
    linear-gradient(90deg, rgba(35, 213, 91, 0.62) 0 3px, transparent 3px 38%, rgba(35, 213, 91, 0.52) 38% calc(38% + 3px), transparent calc(38% + 3px) 72%, rgba(35, 213, 91, 0.52) 72% calc(72% + 3px), transparent calc(72% + 3px)),
    linear-gradient(0deg, rgba(35, 213, 91, 0.62) 0 3px, transparent 3px 46%, rgba(35, 213, 91, 0.52) 46% calc(46% + 3px), transparent calc(46% + 3px));
  transform: perspective(700px) rotateX(52deg);
}

.zone-label {
  position: absolute;
  z-index: 3;
  left: 14px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(18, 62, 116, 0.78);
  color: #dcecff;
  font-size: 12px;
}

.tech-transfer-screen .visual-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.tech-transfer-screen .canvas-node {
  width: 112px;
  min-height: 86px;
  padding: 7px;
  border: 1px solid rgba(145, 195, 255, 0.36);
  border-radius: 8px;
  background: rgba(8, 23, 40, 0.78);
  color: #eff7ff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.tech-transfer-screen .canvas-node.selected {
  border-color: #4c9aff;
  box-shadow: 0 0 0 2px rgba(76, 154, 255, 0.2), 0 12px 24px rgba(0, 0, 0, 0.35);
}

.tech-transfer-screen .canvas-node .node-image {
  height: 40px;
  border-radius: 6px;
}

.tech-transfer-screen .canvas-node strong {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.2;
}

.tech-transfer-screen .canvas-node small {
  color: #95b1cf;
  font-size: 10px;
}

.tech-transfer-screen .canvas-lines line {
  stroke: #25cf5d;
  stroke-width: 3;
  stroke-dasharray: 8 7;
  filter: drop-shadow(0 0 6px rgba(37, 207, 93, 0.48));
}

.tech-transfer-screen .canvas-lines .qc-line {
  stroke: #4c9aff;
}

.execution-controls {
  display: flex;
  gap: 9px;
  margin-top: 12px;
}

.execution-controls button {
  min-width: 78px;
}

.execution-controls .control-run {
  background: linear-gradient(180deg, #56a9ff, #2e76d7);
  border-color: rgba(120, 190, 255, 0.75);
}

.speed-control {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  color: #9ab4d0;
}

.speed-control span {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  color: #9ab4d0;
  font-size: 12px;
}

.metric-gauges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.metric-gauges article {
  min-height: 116px;
  padding: 12px;
  border: 1px solid rgba(104, 160, 224, 0.2);
  border-radius: 7px;
  background: rgba(6, 18, 32, 0.4);
}

.metric-gauges small,
.metric-gauges strong,
.metric-gauges span {
  display: block;
}

.metric-gauges small {
  color: #8faaca;
}

.metric-gauges strong {
  margin: 8px 0 12px;
  color: #ffffff;
  font-size: 24px;
}

.metric-gauges em {
  font-size: 12px;
  font-style: normal;
  color: #bfd5ed;
}

.metric-gauges span {
  width: 76px;
  height: 36px;
  margin: 0 auto;
  border: 7px solid #37bd61;
  border-bottom-color: rgba(55, 189, 97, 0.18);
  border-radius: 80px 80px 0 0;
  text-align: center;
  line-height: 30px;
}

.trend-area {
  position: relative;
  height: 100px;
  margin-top: 14px;
  border-left: 1px solid rgba(104, 160, 224, 0.18);
  border-bottom: 1px solid rgba(104, 160, 224, 0.18);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 25px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 56px);
}

.trend-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 36px;
  height: 3px;
  background: linear-gradient(90deg, #37a0ff, #32c765 24%, #37a0ff 45%, #32c765 70%, #37a0ff);
  transform: skewY(-7deg);
  filter: drop-shadow(0 0 5px rgba(55, 160, 255, 0.55));
}

.limit {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 1px;
  border-top: 1px dashed;
}

.limit.upper {
  top: 26px;
  border-color: #e14d5a;
}

.limit.lower {
  bottom: 34px;
  border-color: #e9c04d;
}

.batch-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 20px;
  margin: 12px 0 0;
  color: #9ab4d0;
}

.batch-info div {
  display: flex;
  justify-content: space-between;
}

.batch-info dt,
.batch-info dd {
  margin: 0;
}

.success-mark {
  margin: 12px 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #31d064;
  font-size: 20px;
}

.result-card p {
  margin: 0 0 10px;
  color: #d6e7fa;
}

.quality-summary {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
}

.quality-donut {
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: conic-gradient(#347ee8 0 32%, #36be61 32% 98.6%, rgba(255, 255, 255, 0.12) 98.6% 100%);
  position: relative;
}

.quality-donut::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: #0c2035;
}

.quality-donut span,
.quality-donut small {
  position: relative;
  z-index: 1;
}

.quality-donut span {
  color: #ffffff;
  font-size: 23px;
  font-weight: 900;
}

.quality-donut small {
  color: #bdd4ed;
}

.quality-summary ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #bdd4ed;
}

.quality-summary li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(44, 194, 91, 0.4);
}

.quality-summary b {
  color: #ffffff;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.tech-transfer-screen .visual-run-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tech-transfer-screen .visual-run-summary article,
.tech-transfer-screen .visual-bottleneck {
  border-color: rgba(104, 160, 224, 0.2);
  background: rgba(4, 14, 26, 0.35);
}

.tech-transfer-screen .visual-bottleneck {
  margin-top: 8px;
}

.tech-transfer-screen .visual-node-results {
  max-height: 82px;
  overflow: auto;
}

@media (max-width: 1280px) {
  body.tech-transfer-screen {
    grid-template-columns: 220px minmax(960px, 1fr);
  }

  .tt-layout-grid,
  .tt-bottom-grid,
  .tt-project-strip {
    grid-template-columns: 1fr;
  }

  .tt-topbar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 12px 0;
  }
}
