:root {
  --bg-main: #0b1220;
  --bg-panel: rgba(255, 255, 255, 0.06);
  --bg-panel-strong: rgba(255, 255, 255, 0.1);
  --text-primary: #f5f7fa;
  --text-secondary: #b8c0cc;
  --text-muted: #7c8798;
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent-blue: #60a5fa;
  --accent-teal: #2dd4bf;
  --accent-amber: #f4b860;
  --risk-low: #4caf50;
  --risk-medium: #f6c344;
  --risk-high: #f97316;
  --risk-critical: #ef4444;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 40px rgba(96, 165, 250, 0.15);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --blur-panel: blur(18px);
  --sidebar-width: 264px;
  --topbar-height: 88px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-main);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-primary);
  font-family:
    "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", Inter,
    system-ui, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 70% 10%, rgba(244, 184, 96, 0.18), transparent 24rem),
    radial-gradient(circle at 25% 20%, rgba(45, 212, 191, 0.12), transparent 20rem),
    linear-gradient(135deg, #070d17 0%, #0b1220 42%, #111827 100%);
}

body.risk-ticker-active {
  padding-bottom: 42px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.ambient-network {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
}

.ambient-network::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.048) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 68px 68px;
  transform: perspective(600px) rotateX(58deg) translateY(-16%);
  transform-origin: top;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 78%, transparent);
  animation: ambient-grid-pan 22s linear infinite;
  will-change: background-position, transform;
}

.ambient-network::after {
  content: "";
  position: absolute;
  inset: -12%;
  background:
    linear-gradient(108deg, transparent 0 22%, rgba(96, 165, 250, 0.14) 22.2%, transparent 22.72% 54%, rgba(45, 212, 191, 0.11) 54.2%, transparent 54.72%),
    linear-gradient(154deg, transparent 0 36%, rgba(244, 184, 96, 0.11) 36.2%, transparent 36.7% 72%, rgba(96, 165, 250, 0.09) 72.2%, transparent 72.7%);
  background-size: 1180px 760px, 920px 640px;
  filter: drop-shadow(0 0 18px rgba(96, 165, 250, 0.08));
  mask-image: radial-gradient(circle at 58% 44%, #000 0 52%, transparent 78%);
  opacity: 0.9;
  animation: ambient-link-pan 16s ease-in-out infinite alternate;
  will-change: transform, background-position;
}

.route {
  position: absolute;
  height: 1px;
  width: 70vw;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.6), transparent);
  filter: drop-shadow(0 0 16px rgba(96, 165, 250, 0.44));
  animation: drift-route 10s linear infinite;
}

.route::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 80px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(245, 247, 250, 0.88), transparent);
  filter: blur(0.6px);
  animation: route-pulse 3.8s ease-in-out infinite;
}

.route-a {
  top: 18%;
  left: -18%;
  transform: rotate(13deg);
}

.route-b {
  top: 51%;
  right: -16%;
  transform: rotate(-18deg);
  animation-delay: -5s;
}

.route-c {
  bottom: 13%;
  left: -12%;
  transform: rotate(-8deg);
  animation-delay: -9s;
}

.route-d {
  top: 34%;
  right: -24%;
  background: linear-gradient(90deg, transparent, rgba(244, 184, 96, 0.62), transparent);
  transform: rotate(26deg);
  animation-delay: -12s;
}

@keyframes drift-route {
  from {
    translate: -8vw 0;
  }
  to {
    translate: 18vw 0;
  }
}

@keyframes route-pulse {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  18% {
    opacity: 0.86;
  }
  72% {
    opacity: 0.52;
  }
  100% {
    transform: translateX(70vw);
    opacity: 0;
  }
}

@keyframes ambient-grid-pan {
  0% {
    background-position: 0 0, 0 0;
    transform: perspective(600px) rotateX(58deg) translateY(-16%) translateX(0);
  }
  100% {
    background-position: 72px 144px, 144px 72px;
    transform: perspective(600px) rotateX(58deg) translateY(-15%) translateX(22px);
  }
}

@keyframes ambient-link-pan {
  0% {
    background-position: 0 0, 0 0;
    transform: translate3d(-18px, 10px, 0);
  }
  100% {
    background-position: 220px -120px, -160px 180px;
    transform: translate3d(26px, -14px, 0);
  }
}

.shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked #app {
  display: none;
}

.modal-backdrop[aria-hidden="true"] {
  display: none !important;
}

body.auth-locked #login-modal {
  display: flex;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 26px;
  border-right: 1px solid var(--line-soft);
  background: rgba(7, 13, 23, 0.78);
  padding: 22px 18px;
  backdrop-filter: var(--blur-panel);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(244, 184, 96, 0.4);
  border-radius: 10px;
  color: var(--accent-amber);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  background: linear-gradient(145deg, rgba(244, 184, 96, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 28px rgba(244, 184, 96, 0.12);
}

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

.brand strong {
  font-size: 16px;
}

.brand span {
  color: var(--text-muted);
  font-size: 12px;
}

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

.nav-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  transform: translateX(3px);
  border-color: rgba(96, 165, 250, 0.22);
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.16), rgba(255, 255, 255, 0.03));
  color: var(--text-primary);
}

.nav-icon {
  color: var(--accent-teal);
  font-size: 16px;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.page-risk-ticker {
  position: fixed;
  right: 0;
  bottom: 0;
  left: var(--sidebar-width);
  z-index: 30;
  display: none;
  height: 38px;
  overflow: hidden;
  border-top: 1px solid rgba(239, 68, 68, 0.42);
  background: rgba(12, 15, 23, 0.94);
  box-shadow: 0 -10px 28px rgba(239, 68, 68, 0.08);
  backdrop-filter: blur(16px);
}

.page-risk-ticker.active {
  display: block;
}

.page-risk-track {
  display: inline-flex;
  align-items: center;
  gap: 42px;
  min-width: max-content;
  height: 100%;
  color: #ff5555;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(239, 68, 68, 0.38);
  animation: page-risk-scroll 180s linear infinite;
}

.page-risk-track span::before {
  content: "风险提示";
  display: inline-flex;
  margin-right: 10px;
  border: 1px solid rgba(239, 68, 68, 0.55);
  border-radius: 999px;
  padding: 2px 8px;
  color: #ffd2d2;
  font-size: 12px;
  font-weight: 700;
}

@keyframes page-risk-scroll {
  0% {
    opacity: 1;
    transform: translateX(100vw);
  }
  18% {
    opacity: 1;
    transform: translateX(-100%);
  }
  22%,
  100% {
    opacity: 0;
    transform: translateX(-100%);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(11, 18, 32, 0.72);
  padding: 16px 18px;
  backdrop-filter: var(--blur-panel);
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-amber);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-family: "Source Han Serif SC", "SimSun", Georgia, serif;
  font-size: clamp(21px, 2.4vw, 34px);
  font-weight: 600;
}

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

.user-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(45, 212, 191, 0.07);
  color: var(--text-secondary);
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-action span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(244, 184, 96, 0.22);
  color: var(--accent-amber);
  font-weight: 700;
}

.motion-toggle span {
  color: var(--accent-teal);
  font-weight: 800;
}

.motion-toggle.is-off span {
  color: var(--text-muted);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(96, 165, 250, 0.14);
}

.time-box {
  min-width: 144px;
  border-left: 1px solid var(--line-soft);
  padding-left: 14px;
  text-align: right;
}

.time-box span,
.time-box strong {
  display: block;
}

.time-box span {
  color: var(--text-muted);
  font-size: 12px;
}

.time-box strong {
  font-family: "DIN Alternate", "Arial Narrow", Inter, sans-serif;
  font-size: 20px;
}

.view {
  display: none;
  margin-top: 18px;
  animation: view-enter 520ms ease both;
}

.view.active {
  display: block;
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-band {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(110deg, rgba(7, 13, 23, 0.96) 0 36%, rgba(7, 13, 23, 0.52) 68%, rgba(17, 24, 39, 0.9)),
    radial-gradient(circle at 82% 24%, rgba(244, 184, 96, 0.2), transparent 18rem);
  box-shadow: var(--shadow-soft);
}

#hero-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(720px, 70%);
  padding: clamp(32px, 5vw, 70px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  border: 1px solid rgba(244, 184, 96, 0.28);
  border-radius: 999px;
  background: rgba(244, 184, 96, 0.08);
  color: var(--accent-amber);
  padding: 4px 10px;
  font-size: 12px;
}

.hero-copy h2 {
  margin: 24px 0 18px;
  max-width: 680px;
  font-family: "Source Han Serif SC", "SimSun", Georgia, serif;
  font-size: clamp(42px, 6vw, 78px);
  font-weight: 600;
  line-height: 1.06;
}

.hero-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.json-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-action,
.ghost-action {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0 15px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.compact-action {
  min-height: 38px;
}

.primary-action {
  background: linear-gradient(135deg, #f4b860, #f59e0b);
  color: #0b1220;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.18);
}

.ghost-action {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-primary);
}

.primary-action:hover,
.ghost-action:hover {
  transform: translateY(-2px);
}

.hero-panel {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 1;
  width: min(320px, calc(100% - 68px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(11, 18, 32, 0.58);
  padding: 18px;
  backdrop-filter: var(--blur-panel);
}

.hero-panel span,
.hero-panel strong {
  display: block;
}

.hero-panel span {
  color: var(--accent-teal);
  font-size: 12px;
}

.hero-panel strong {
  margin: 8px 0;
  font-size: 18px;
}

.hero-panel p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metric-grid.compact {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.metric-card,
.panel,
.screen-panel {
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(11, 18, 32, 0.62);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--blur-panel);
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  border-radius: var(--radius-md);
  padding: 18px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #60a5fa) 28%, transparent);
  filter: blur(24px);
}

.metric-card:hover,
.panel:hover {
  border-color: rgba(96, 165, 250, 0.22);
}

.metric-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.metric-card.raci-kpi {
  width: 100%;
  border-color: var(--line-soft);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.metric-card.raci-kpi.active {
  border-color: color-mix(in srgb, var(--accent, #60a5fa) 64%, rgba(255, 255, 255, 0.18));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent, #60a5fa) 22%, transparent), rgba(255, 255, 255, 0.04)),
    rgba(11, 18, 32, 0.72);
  box-shadow: var(--shadow-soft), 0 0 0 1px color-mix(in srgb, var(--accent, #60a5fa) 40%, transparent);
}

.metric-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.metric-value {
  display: block;
  margin: 12px 0 8px;
  font-family: "DIN Alternate", "Arial Narrow", Inter, sans-serif;
  font-size: 34px;
  font-weight: 800;
}

.metric-trend {
  color: var(--text-muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 14px;
  margin-top: 14px;
}

.panel {
  min-width: 0;
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color 180ms ease;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.template-publish-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.template-publisher {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.panel h3,
.panel h4,
.screen-panel h3 {
  margin: 0;
  font-size: 18px;
}

.flow-overview {
  min-height: 350px;
}

.process-river {
  position: relative;
  display: grid;
  min-height: 270px;
  align-items: center;
  overflow: hidden;
}

.river-row {
  position: relative;
  display: grid;
  grid-template-columns: 128px 1fr 56px;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
}

.river-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.river-fill {
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.18), var(--color), rgba(244, 184, 96, 0.7));
  box-shadow: 0 0 22px color-mix(in srgb, var(--color) 45%, transparent);
  animation: shimmer 2.6s ease-in-out infinite;
}

@keyframes shimmer {
  50% {
    filter: brightness(1.25);
  }
}

.load-list,
.flow-list,
.risk-list,
.coord-list {
  display: grid;
  gap: 10px;
}

.load-item {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 12px;
  align-items: center;
}

.load-bar {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.load-bar span {
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
}

.workload-panel {
  grid-column: 1 / -1;
}

.workload-summary {
  display: grid;
  gap: 14px;
}

.workload-total {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.workload-total span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
  color: var(--text-muted);
}

.workload-total b {
  color: var(--text-primary);
  font-size: 28px;
}

.efficiency-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.25fr) minmax(360px, 0.75fr);
  gap: 14px;
}

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

.efficiency-row {
  display: grid;
  grid-template-columns: 46px minmax(210px, 1.6fr) repeat(4, minmax(66px, 0.7fr));
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  color: var(--text-secondary);
}

.efficiency-row.header {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  padding-block: 0;
}

.efficiency-row > strong,
.efficiency-row b {
  color: var(--text-primary);
}

.efficiency-row div {
  display: grid;
  gap: 3px;
}

.efficiency-row div span {
  color: var(--text-muted);
  font-size: 12px;
}

.workload-profile-table .efficiency-row {
  grid-template-columns: minmax(76px, 0.8fr) minmax(260px, 1.8fr) repeat(5, minmax(72px, 0.7fr));
}

.workload-risk {
  color: var(--risk-high);
}

.efficiency-chart {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(96, 165, 250, 0.04);
  padding: 12px;
}

.efficiency-chart svg {
  width: 100%;
  min-height: 230px;
}

.efficiency-grid line {
  stroke: rgba(255, 255, 255, 0.08);
}

.efficiency-axis text {
  fill: var(--text-muted);
  font-size: 12px;
}

.efficiency-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.efficiency-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.efficiency-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--legend);
}

.ring-row {
  display: grid;
  grid-template-columns: 154px 1fr;
  gap: 20px;
  align-items: center;
}

.progress-ring {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(11, 18, 32, 0.96) 55%, transparent 56%),
    conic-gradient(var(--accent-teal) calc(var(--value) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.progress-ring span {
  font-family: "DIN Alternate", "Arial Narrow", Inter, sans-serif;
  font-size: 31px;
  font-weight: 800;
}

.mini-stat-list {
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
}

.mini-stat-list b {
  color: var(--accent-amber);
  font-size: 22px;
}

.risk-map,
.risk-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.risk-cell {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--risk-color) var(--intensity), rgba(255, 255, 255, 0.04));
  color: var(--text-primary);
  font-size: 12px;
}

button.risk-cell {
  width: 100%;
  cursor: pointer;
}

.risk-cell.active {
  border-color: rgba(244, 184, 96, 0.68);
  box-shadow: 0 0 0 1px rgba(244, 184, 96, 0.28), var(--shadow-glow);
}

.risk-cell strong,
.risk-cell span {
  display: block;
}

.risk-cell span {
  color: var(--text-secondary);
  font-size: 11px;
}

.section-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 8px;
}

.section-mini-head strong {
  color: var(--text-primary);
}

.section-mini-head span {
  color: var(--text-muted);
  font-size: 12px;
}

.risk-history-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.risk-history-item {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
  cursor: pointer;
}

.risk-history-item.active {
  border-color: rgba(255, 190, 92, 0.92);
  background:
    linear-gradient(90deg, rgba(255, 176, 49, 0.2), rgba(96, 165, 250, 0.12)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 190, 92, 0.42),
    0 0 24px rgba(255, 176, 49, 0.22),
    inset 4px 0 0 rgba(255, 190, 92, 0.95);
}

.risk-history-item p,
.risk-history-item span {
  display: block;
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.risk-owner-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.risk-stat-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.risk-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.risk-stat-row b {
  color: var(--accent-amber);
}

.disposal-record {
  margin-top: 12px;
  border: 1px solid rgba(244, 184, 96, 0.28);
  border-radius: var(--radius-md);
  background: rgba(244, 184, 96, 0.08);
  padding: 12px;
}

.attention-panel {
  margin-top: 14px;
}

.attention-layout,
.coord-layout,
.raci-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 14px;
}

.attention-table,
.raci-table {
  overflow: auto;
}

.table-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr 0.8fr 1.1fr;
  gap: 10px;
  align-items: center;
  min-width: 720px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 0;
}

.table-row.header {
  color: var(--text-muted);
  font-size: 12px;
}

.ai-panel {
  min-height: 220px;
  border: 1px solid rgba(244, 184, 96, 0.22);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(244, 184, 96, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(11, 18, 32, 0.64);
  padding: 18px;
}

.ai-panel p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.status-pill,
.risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.low {
  --badge: var(--risk-low);
  color: #b6f0c0;
}

.medium {
  --badge: var(--risk-medium);
  color: #ffe59a;
}

.high {
  --badge: var(--risk-high);
  color: #ffc08f;
}

.critical {
  --badge: var(--risk-critical);
  color: #ffb4b4;
}

.status-pill.low,
.status-pill.medium,
.status-pill.high,
.status-pill.critical,
.risk-badge.low,
.risk-badge.medium,
.risk-badge.high,
.risk-badge.critical {
  border-color: color-mix(in srgb, var(--badge) 55%, transparent);
  background: color-mix(in srgb, var(--badge) 13%, transparent);
}

.workbench,
.designer-grid,
.risk-layout {
  display: grid;
  gap: 14px;
}

.three-column {
  grid-template-columns: 300px minmax(440px, 1fr) 320px;
}

.designer-grid {
  grid-template-columns: 260px minmax(520px, 1fr) 340px;
}

.risk-layout {
  grid-template-columns: 300px minmax(420px, 1fr) 320px;
}

.execution-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 360px;
  gap: 14px;
}

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

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

.execution-summary-grid div {
  min-height: 78px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
}

.execution-summary-grid strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.execution-summary-grid span {
  display: block;
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 13px;
}

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

.execution-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-muted);
  padding: 0 13px;
  cursor: pointer;
}

.execution-tabs button.active {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(96, 165, 250, 0.18);
  color: var(--text-main);
}

.execution-tabs button em {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-size: 12px;
  font-style: normal;
  line-height: 22px;
  text-align: center;
}

.execution-tabs button.active em {
  background: rgba(244, 184, 96, 0.22);
  color: var(--accent);
}

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

.execution-item {
  display: grid;
  gap: 8px;
  min-height: 100px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  padding: 13px;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.execution-item:hover,
.message-item:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(96, 165, 250, 0.075);
}

.execution-item.active,
.message-item.active,
.task-query-row.active {
  border-color: rgba(255, 190, 92, 0.92);
  background:
    linear-gradient(90deg, rgba(255, 176, 49, 0.2), rgba(96, 165, 250, 0.12)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 190, 92, 0.42),
    0 0 30px rgba(255, 176, 49, 0.25),
    inset 4px 0 0 rgba(255, 190, 92, 0.95);
}

.execution-item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.execution-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.execution-item-head span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 13px;
}

.execution-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  padding: 13px;
  cursor: pointer;
}

.message-item.unread {
  border-color: rgba(244, 184, 96, 0.46);
  background: rgba(244, 184, 96, 0.08);
}

.message-item.active {
  border-color: rgba(255, 190, 92, 0.92);
  background:
    linear-gradient(90deg, rgba(255, 176, 49, 0.2), rgba(96, 165, 250, 0.12)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 190, 92, 0.42),
    0 0 30px rgba(255, 176, 49, 0.25),
    inset 4px 0 0 rgba(255, 190, 92, 0.95);
}

.message-item p {
  margin: 0;
  color: var(--text-muted);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip,
.segment {
  min-height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 12px;
}

.chip.active,
.segment.active {
  border-color: rgba(96, 165, 250, 0.38);
  background: rgba(96, 165, 250, 0.16);
  color: var(--text-primary);
}

.segmented {
  display: inline-flex;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px;
}

.segment {
  border-color: transparent;
}

.flow-card,
.risk-item,
.coord-item,
.task-card,
.palette-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.task-card {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.palette-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.flow-card,
.risk-item,
.coord-item,
.task-card,
.palette-item {
  position: relative;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.flow-card:hover,
.risk-item:hover,
.coord-item:hover,
.task-card:hover,
.palette-item:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(96, 165, 250, 0.075);
}

.flow-card.active,
.risk-item.active,
.coord-item.active,
.palette-item.active {
  transform: translateY(-2px);
  border-color: rgba(255, 190, 92, 0.92);
  background:
    linear-gradient(90deg, rgba(255, 176, 49, 0.2), rgba(96, 165, 250, 0.12)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 190, 92, 0.42),
    0 0 30px rgba(255, 176, 49, 0.28),
    inset 4px 0 0 rgba(255, 190, 92, 0.95);
}

.flow-card.active::after,
.risk-item.active::after,
.coord-item.active::after,
.palette-item.active::after {
  content: "当前选中";
  position: absolute;
  top: 10px;
  right: 12px;
  border: 1px solid rgba(255, 190, 92, 0.7);
  border-radius: 999px;
  background: rgba(255, 176, 49, 0.18);
  color: #ffd995;
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
}

.flow-card strong,
.risk-item strong,
.coord-item strong,
.task-card strong,
.palette-item strong {
  display: block;
  margin-bottom: 8px;
}

.flow-card p,
.risk-item p,
.coord-item p,
.task-card p,
.palette-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.flow-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.flow-card-head strong {
  margin-bottom: 0;
}

.flow-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.flow-card-actions .compact-action {
  min-height: 30px;
  padding: 5px 9px;
}

.flow-risk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.risk-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.risk-tag.low {
  border-color: rgba(76, 175, 80, 0.36);
  background: rgba(76, 175, 80, 0.12);
  color: #b6f0c0;
}

.risk-tag.medium {
  border-color: rgba(246, 195, 68, 0.36);
  background: rgba(246, 195, 68, 0.12);
  color: #f8dea2;
}

.risk-tag.high {
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(249, 115, 22, 0.14);
  color: #ffc49a;
}

.risk-tag.critical {
  border-color: rgba(239, 68, 68, 0.46);
  background: rgba(239, 68, 68, 0.14);
  color: #ffb4b4;
}

.runtime-canvas {
  position: relative;
  min-height: 610px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(7, 13, 23, 0.52);
  background-size: 36px 36px;
}

.runtime-stage {
  position: relative;
  min-width: 100%;
  min-height: 610px;
}

.flow-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.flow-node {
  position: absolute;
  display: grid;
  width: 176px;
  min-height: 88px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--node-color) 62%, rgba(255, 255, 255, 0.18));
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--node-color) 22%, transparent), transparent 70%),
    rgba(11, 18, 32, 0.88);
  box-shadow: 0 0 28px color-mix(in srgb, var(--node-color) 18%, transparent);
  cursor: pointer;
  padding: 12px;
  text-align: center;
  z-index: 2;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.flow-node::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid color-mix(in srgb, var(--node-color) 35%, transparent);
  border-radius: 18px;
  opacity: 0;
}

.flow-node.current::before,
.flow-node.late::before,
.flow-node.blocked::before {
  animation: pulse-node 1.8s ease-in-out infinite;
}

.flow-node:hover {
  transform: translateY(-4px) scale(1.02);
}

.flow-node.selected {
  transform: translateY(-6px) scale(1.045);
  border-color: rgba(255, 190, 92, 0.98);
  background:
    radial-gradient(circle at top, rgba(255, 190, 92, 0.28), transparent 68%),
    rgba(20, 24, 36, 0.96);
  box-shadow:
    0 0 0 2px rgba(255, 190, 92, 0.68),
    0 0 0 8px rgba(255, 190, 92, 0.16),
    0 0 42px rgba(255, 176, 49, 0.52);
  animation: selected-node-flash 1.35s ease-in-out infinite;
}

.flow-node.selected::before {
  inset: -14px;
  border-color: rgba(255, 190, 92, 0.82);
  opacity: 1;
  animation: selected-node-ring 1.35s ease-in-out infinite;
}

.flow-node.selected::after {
  content: "当前节点";
  position: absolute;
  top: -14px;
  right: -12px;
  border: 1px solid rgba(255, 190, 92, 0.9);
  border-radius: 999px;
  background: rgba(255, 176, 49, 0.22);
  color: #ffe2a8;
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
}

@keyframes pulse-node {
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes selected-node-flash {
  50% {
    box-shadow:
      0 0 0 2px rgba(255, 215, 130, 0.92),
      0 0 0 11px rgba(255, 190, 92, 0.22),
      0 0 58px rgba(255, 176, 49, 0.68);
  }
}

@keyframes selected-node-ring {
  50% {
    transform: scale(1.08);
    opacity: 0.72;
  }
}

.flow-node small,
.designer-node small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
}

.lane-label {
  position: absolute;
  left: 0;
  width: 132px;
  border-right: 1px solid var(--line-soft);
  color: var(--text-muted);
  padding: 14px;
}

.lane-band {
  position: absolute;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.018);
}

.node-detail {
  display: grid;
  gap: 12px;
}

.detail-block {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.detail-block span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-block strong {
  display: block;
}

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

.log-list p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.confirm-form {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(45, 212, 191, 0.06);
  padding: 12px;
}

.confirm-form label {
  color: var(--text-muted);
  font-size: 12px;
}

.confirm-form textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  padding: 10px 11px;
  resize: vertical;
}

.node-palette {
  display: grid;
  gap: 9px;
}

.template-list {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.template-section {
  display: grid;
  gap: 8px;
}

.template-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent-amber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-empty {
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.template-item {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 10px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.template-item:hover,
.template-item.active {
  transform: translateY(-2px);
  border-color: rgba(244, 184, 96, 0.36);
  background: rgba(244, 184, 96, 0.09);
}

.template-item p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.template-item.pending {
  border-color: color-mix(in srgb, var(--accent-blue) 40%, var(--line-soft));
}

.template-meta-editor {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(130px, 0.7fr) repeat(4, auto);
  gap: 8px;
  margin-bottom: 12px;
}

.template-meta-editor input {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  padding: 10px 11px;
}

.section-divider {
  height: 1px;
  margin: 14px 0;
  background: var(--line-soft);
}

.designer-canvas {
  position: relative;
  min-height: 675px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(7, 13, 23, 0.5);
  background-size: 32px 32px;
}

.designer-canvas.readonly .designer-node {
  cursor: default;
}

.designer-svg {
  pointer-events: auto;
}

.designer-edge-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  cursor: pointer;
  pointer-events: stroke;
}

.designer-edge {
  fill: none;
  stroke: rgba(96, 165, 250, 0.56);
  stroke-width: 2;
  stroke-dasharray: 8 8;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.22));
}

.designer-edge.selected {
  stroke: var(--accent-amber);
  stroke-width: 3;
  filter: drop-shadow(0 0 16px rgba(244, 184, 96, 0.55));
}

.designer-node {
  position: absolute;
  width: 170px;
  min-height: 82px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top, rgba(96, 165, 250, 0.14), transparent 70%),
    rgba(11, 18, 32, 0.92);
  cursor: grab;
  padding: 12px;
  user-select: none;
}

.node-delete {
  position: absolute;
  top: -10px;
  right: -10px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(239, 68, 68, 0.48);
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.16);
  color: #ffd1d1;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.designer-node:hover .node-delete,
.designer-node.active .node-delete {
  opacity: 1;
}

.node-delete:hover {
  transform: scale(1.08);
  background: rgba(239, 68, 68, 0.28);
}

.node-port {
  position: absolute;
  top: 50%;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid rgba(45, 212, 191, 0.72);
  border-radius: 50%;
  background: rgba(11, 18, 32, 0.92);
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.28);
  cursor: crosshair;
  transform: translateY(-50%);
}

.node-port::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-teal);
}

.port-in {
  left: -8px;
}

.port-out {
  right: -8px;
}

.edge-draft {
  position: absolute;
  z-index: 6;
  height: 2px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-amber));
  box-shadow: 0 0 16px rgba(244, 184, 96, 0.45);
  pointer-events: none;
}

.designer-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 28px);
  color: var(--text-muted);
  font-size: 12px;
}

.designer-hint span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.74);
  padding: 5px 9px;
}

.designer-node.active {
  border-color: var(--accent-amber);
  box-shadow: 0 0 26px rgba(244, 184, 96, 0.22);
}

.designer-node:active {
  cursor: grabbing;
}

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

.edge-tools {
  margin-top: 14px;
}

.edge-tool-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(244, 184, 96, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(244, 184, 96, 0.07);
  padding: 12px;
}

.edge-tool-card span {
  color: var(--text-muted);
  font-size: 12px;
}

.ghost-action.danger {
  border-color: rgba(239, 68, 68, 0.42);
  color: #ffc6c6;
}

.ghost-action.warning {
  border-color: rgba(246, 195, 68, 0.45);
  color: #ffe59a;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--text-muted);
  font-size: 12px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  padding: 10px 11px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}

.field-help {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.multi-select-field {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
}

.multi-select-field summary {
  display: block;
  overflow: hidden;
  padding: 10px 11px;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.multi-select-field[open] summary {
  border-bottom: 1px solid var(--line-soft);
}

.multi-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.16);
  padding: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}

.check-pill input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-amber);
}

.check-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-pill:has(input:checked) {
  border-color: rgba(244, 184, 96, 0.55);
  background: rgba(244, 184, 96, 0.12);
  color: var(--text-primary);
}

.multi-confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  padding: 9px 8px 10px;
}

.multi-confirm-row span {
  min-width: 0;
  color: var(--text-muted);
  font-size: 11px;
  text-align: right;
}

.json-preview {
  margin-top: 14px;
}

.json-preview span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

pre {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.24);
  color: #d7e8ff;
  padding: 12px;
  white-space: pre-wrap;
}

.raci-table .raci-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(125px, 0.9fr)) minmax(230px, 1.35fr);
  gap: 8px;
  align-items: stretch;
  min-width: 1120px;
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 0;
}

.raci-table button.raci-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.raci-table .template-row .raci-cell {
  min-height: 72px;
}

.raci-table .node-header,
.raci-table .node-row {
  margin-left: 24px;
  min-width: calc(1120px - 24px);
}

.raci-table .node-header .raci-cell {
  color: var(--text-muted);
  font-size: 12px;
}

.raci-node-table {
  border-left: 1px solid rgba(96, 165, 250, 0.26);
  margin-bottom: 8px;
  padding-left: 8px;
}

.raci-table .raci-row.highlight .raci-cell {
  border-color: rgba(244, 184, 96, 0.48);
  background:
    linear-gradient(145deg, rgba(244, 184, 96, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(11, 18, 32, 0.72);
}

.raci-table .raci-row.muted-issue .raci-cell {
  opacity: 0.62;
}

.raci-cell {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 9px;
  font-size: 13px;
}

.raci-row.header .raci-cell {
  color: var(--text-muted);
  font-size: 12px;
}

.raci-cell > span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.advice-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.advice-cell p {
  flex-basis: 100%;
  margin: 4px 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.avatar {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.35), rgba(244, 184, 96, 0.22));
  color: var(--text-primary);
  font-size: 12px;
}

.responsibility-graph {
  position: relative;
  min-height: 500px;
  overflow: hidden;
}

.graph-line {
  position: absolute;
  height: 1px;
  transform-origin: 0 0;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.15), rgba(96, 165, 250, 0.72));
}

.graph-person {
  position: absolute;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 50%;
  background: rgba(11, 18, 32, 0.85);
  box-shadow: 0 0 28px rgba(96, 165, 250, 0.12);
  text-align: center;
}

.graph-person span {
  color: var(--text-muted);
  font-size: 11px;
}

.risk-matrix {
  grid-template-columns: repeat(6, 1fr);
}

.risk-center {
  min-height: 640px;
}

.risk-detail {
  display: grid;
  gap: 12px;
}

.risk-rule-panel {
  margin-top: 18px;
}

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

.risk-rule-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 250px;
  border: 1px solid color-mix(in srgb, var(--rule-color), rgba(255, 255, 255, 0.16) 62%);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rule-color) 15%, rgba(255, 255, 255, 0.04)), rgba(255, 255, 255, 0.025));
  padding: 16px;
}

.risk-rule-card.low {
  --rule-color: var(--risk-low);
}

.risk-rule-card.medium {
  --rule-color: var(--risk-medium);
}

.risk-rule-card.high {
  --rule-color: var(--risk-high);
}

.risk-rule-card.critical {
  --rule-color: var(--risk-critical);
}

.risk-rule-card strong {
  color: var(--rule-color);
  font-size: 18px;
}

.risk-rule-card p {
  margin: 0;
  color: var(--text-main);
  line-height: 1.6;
}

.risk-rule-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.55;
}

.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
  overflow: auto;
}

.task-board.query-mode {
  display: block;
}

.task-column {
  min-height: 560px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.task-column h4 {
  margin: 0 0 12px;
}

.task-column .task-card + .task-card {
  margin-top: 10px;
}

.task-monthly-panel {
  margin-top: 16px;
}

.month-filter-form {
  display: flex;
  align-items: end;
  gap: 10px;
}

.month-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.month-filter-form input {
  min-width: 160px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(11, 18, 32, 0.72);
  color: var(--text-primary);
  padding: 10px 12px;
}

.task-monthly-report {
  display: grid;
  gap: 14px;
}

.monthly-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.monthly-kpis span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  padding: 12px;
}

.monthly-kpis b {
  color: var(--text-primary);
  font-size: 26px;
}

.monthly-grid {
  display: grid;
  grid-template-columns: minmax(760px, 1.45fr) minmax(300px, 0.55fr);
  gap: 14px;
}

.monthly-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.monthly-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.9fr) minmax(86px, 0.7fr) 68px 86px 68px 86px minmax(180px, 1.2fr) minmax(160px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 980px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  padding: 10px 12px;
}

.monthly-row.header {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  padding-block: 0;
}

.monthly-row strong,
.monthly-row b {
  color: var(--text-primary);
}

.monthly-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.monthly-tags span {
  border: 1px solid rgba(244, 184, 96, 0.22);
  border-radius: 999px;
  background: rgba(244, 184, 96, 0.08);
  color: var(--text-secondary);
  padding: 4px 8px;
  font-size: 12px;
}

.monthly-tag-button {
  border: 1px solid rgba(244, 184, 96, 0.24);
  border-radius: 999px;
  background: rgba(244, 184, 96, 0.08);
  color: var(--text-secondary);
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.monthly-tag-button:hover,
.monthly-tag-button.active {
  border-color: rgba(244, 184, 96, 0.58);
  background: rgba(244, 184, 96, 0.16);
  color: var(--text-primary);
}

.monthly-tags.risk-tags span {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(96, 165, 250, 0.08);
}

.monthly-tags.large {
  margin-bottom: 14px;
}

.monthly-side {
  min-width: 0;
}

.monthly-risk-bars {
  display: grid;
  gap: 8px;
}

.monthly-risk-row {
  display: grid;
  grid-template-columns: 50px 36px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--text-secondary);
}

.monthly-risk-row i {
  display: block;
  width: var(--w);
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
}

.monthly-advice {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.monthly-abnormal-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.monthly-analysis {
  color: var(--text-secondary);
  line-height: 1.6;
}

.monthly-abnormal-list {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
}

.monthly-abnormal-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: var(--radius-sm);
  background: rgba(11, 18, 32, 0.46);
  padding: 12px;
}

.monthly-abnormal-item p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.monthly-abnormal-item .detail-block,
.monthly-abnormal-item .ghost-action {
  grid-column: 1 / -1;
}

.task-query-panel {
  display: grid;
  gap: 12px;
}

.task-query-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px auto auto;
  gap: 10px;
  align-items: center;
}

.task-query-toolbar input,
.task-query-toolbar select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(7, 13, 23, 0.42);
  color: var(--text-primary);
  padding: 11px 12px;
}

.task-query-table {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.task-query-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(200px, 1.2fr) minmax(96px, 0.7fr) minmax(96px, 0.7fr) minmax(120px, 0.7fr);
  gap: 10px;
  align-items: center;
  min-width: 820px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  text-align: left;
  padding: 12px;
}

.task-query-row.header {
  color: var(--text-muted);
  background: rgba(96, 165, 250, 0.08);
}

.task-query-row.active {
  border-color: rgba(255, 190, 92, 0.92);
  background:
    linear-gradient(90deg, rgba(255, 176, 49, 0.2), rgba(96, 165, 250, 0.12)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(255, 190, 92, 0.42),
    0 0 30px rgba(255, 176, 49, 0.25),
    inset 4px 0 0 rgba(255, 190, 92, 0.95);
}

.task-status {
  display: inline-flex;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.08);
  color: var(--text-primary);
  font-style: normal;
  padding: 3px 9px;
}

.task-flow-detail {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: var(--radius-md);
  background: rgba(96, 165, 250, 0.05);
  padding: 12px;
}

.task-flow-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.task-flow-head span {
  color: var(--text-muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.archive-risk-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(244, 184, 96, 0.24);
  border-radius: 999px;
  background: rgba(244, 184, 96, 0.08);
  color: var(--text-secondary);
  padding: 7px 10px;
  font-size: 12px;
}

.archive-risk-toggle input {
  width: auto;
  accent-color: var(--accent-amber);
}

.archive-risk-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(244, 184, 96, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(244, 184, 96, 0.055);
  padding: 12px;
}

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

.archive-risk-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.archive-risk-item p,
.archive-risk-item em {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.archive-risk-item em {
  color: var(--accent-amber);
  font-style: normal;
}

.archive-risk-item.high,
.archive-risk-item.critical {
  border-color: rgba(239, 68, 68, 0.34);
}

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

.task-node-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 0.9fr;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  padding: 10px;
}

.task-node-row p,
.task-node-row em,
.task-node-notes {
  grid-column: 1 / -1;
  margin: 0;
}

.task-node-row em {
  color: var(--accent-amber);
  font-style: normal;
}

.task-node-row.issue {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.11);
}

.task-node-row.warning {
  border-color: rgba(244, 184, 96, 0.45);
  background: rgba(244, 184, 96, 0.09);
}

.task-node-row.pending {
  opacity: 0.72;
}

.task-node-notes {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.task-node-notes p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.coordination-notes {
  border-color: rgba(244, 184, 96, 0.22);
}

.coord-source-note {
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(45, 212, 191, 0.06);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 12px;
  padding: 12px;
}

.coord-item span {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border: 1px solid rgba(244, 184, 96, 0.24);
  border-radius: 999px;
  color: var(--accent-amber);
  font-size: 12px;
  padding: 3px 9px;
}

.coord-item.running {
  border-color: rgba(244, 184, 96, 0.62);
  background: rgba(244, 184, 96, 0.1);
  box-shadow: 0 0 0 1px rgba(244, 184, 96, 0.18);
}

.coord-item.pending {
  opacity: 0.52;
  color: var(--text-muted);
  border-color: rgba(124, 135, 152, 0.22);
}

.coord-detail {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

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

.coord-summary div,
.coord-log-form {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.coord-summary span,
.coord-log-form label {
  color: var(--text-muted);
  font-size: 12px;
}

.coord-summary strong {
  display: block;
  margin-top: 6px;
}

.coord-log-form {
  display: grid;
  gap: 10px;
}

.coord-log-form label {
  display: grid;
  gap: 6px;
}

.coord-log-form input,
.coord-log-form select,
.coord-log-form textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  padding: 10px 11px;
}

.coord-log-form textarea {
  resize: vertical;
}

.coord-runtime-departments {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(45, 212, 191, 0.06);
  padding: 10px;
}

.runtime-coord-list {
  max-height: 190px;
  overflow: auto;
}

.coordination-confirm-form input,
.coordination-confirm-form select {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  padding: 10px 11px;
}

.check-line {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.check-line input {
  width: auto;
}

.node-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.node-control-box {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(244, 184, 96, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(244, 184, 96, 0.06);
  padding: 12px;
}

.node-control-box h4 {
  margin: 0;
}

.control-form,
.control-request-list {
  display: grid;
  gap: 8px;
}

.control-form label {
  color: var(--text-muted);
  font-size: 12px;
}

.control-form textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  padding: 10px 11px;
  resize: vertical;
}

.control-form input,
.control-form select,
.transfer-current {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  padding: 10px 11px;
}

.transfer-box p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.transfer-form {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.control-request {
  border: 1px solid rgba(244, 184, 96, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.16);
  padding: 10px;
}

.control-request p,
.control-history p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.coord-timeline {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 24px;
}

.coord-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 1px;
  background: linear-gradient(var(--accent-blue), var(--accent-amber));
}

.timeline-item {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 16px rgba(244, 184, 96, 0.8);
}

.bigscreen {
  min-height: calc(100vh - 132px);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at center, rgba(96, 165, 250, 0.12), transparent 30rem),
    linear-gradient(135deg, rgba(7, 13, 23, 0.96), rgba(11, 18, 32, 0.82));
  padding: 20px;
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.35);
}

.bigscreen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  border-bottom: 1px solid var(--line-soft);
}

.bigscreen-header p {
  margin: 0 0 8px;
  color: var(--accent-amber);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bigscreen-header h2 {
  margin: 0;
  font-family: "Source Han Serif SC", "SimSun", Georgia, serif;
  font-size: clamp(28px, 3vw, 48px);
}

.bigscreen-time {
  text-align: right;
}

.bigscreen-time span,
.bigscreen-time strong {
  display: block;
}

.bigscreen-time strong {
  font-family: "DIN Alternate", "Arial Narrow", Inter, sans-serif;
  font-size: 32px;
}

.bigscreen-body {
  display: grid;
  grid-template-columns: 260px minmax(420px, 1fr) 300px;
  gap: 14px;
  margin-top: 16px;
}

.screen-panel {
  border-radius: var(--radius-md);
  padding: 16px;
}

.screen-center {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    rgba(7, 13, 23, 0.6);
  background-size: 42px 42px;
}

#screen-network {
  width: 100%;
  height: 100%;
}

.screen-stats,
.screen-risk-bars,
.screen-alerts {
  display: grid;
  gap: 10px;
}

.screen-stat,
.screen-alert {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.screen-stat strong {
  display: block;
  font-family: "DIN Alternate", "Arial Narrow", Inter, sans-serif;
  font-size: 30px;
}

.funnel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.funnel span {
  display: block;
  width: var(--w);
  min-height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.22), rgba(45, 212, 191, 0.34));
  padding: 7px 10px;
}

.risk-bar {
  display: grid;
  gap: 6px;
}

.risk-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.risk-bar-track span {
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--c);
}

.screen-ticker {
  overflow: hidden;
  min-height: 50px;
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
}

.access-backdrop {
  z-index: 90;
  padding: 0;
  background: #090B0E;
  backdrop-filter: none;
}

.access-gateway {
  --page-bg: #090B0E;
  --page-bg-secondary: #11151A;
  --text-main: #F1EEE8;
  --text-muted-login: rgba(241, 238, 232, 0.58);
  --login-line-soft: rgba(255, 255, 255, 0.12);
  --accent-warm: #CDA46A;
  --accent-warm-soft: rgba(205, 164, 106, 0.35);
  --error-muted: #9F5C55;
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 34%, rgba(205, 151, 91, 0.12), transparent 34%),
    linear-gradient(115deg, #090B0E 0%, #101318 48%, #080A0D 100%);
  color: var(--text-main);
}

.access-gateway::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
  opacity: 0.38;
  pointer-events: none;
  animation: access-grid-drift 18s linear infinite;
}

.access-gateway::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 11, 14, 0.1), transparent 42%, rgba(9, 11, 14, 0.52)),
    radial-gradient(circle at 50% 46%, transparent 0 34%, rgba(0, 0, 0, 0.34) 78%);
  pointer-events: none;
}

.access-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  animation: access-bg-breathe 8s ease-in-out infinite alternate;
}

.perspective-lines,
.link-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.perspective-lines path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
  stroke-dasharray: 420 760;
  stroke-dashoffset: 0;
  animation: access-line-flow 12s linear infinite;
}

.perspective-lines path:nth-child(2) {
  animation-delay: -2.4s;
}

.perspective-lines path:nth-child(3) {
  animation-delay: -4.8s;
}

.perspective-lines path:nth-child(4) {
  animation-delay: -7.2s;
}

.perspective-lines path:nth-child(5) {
  animation-delay: -9.6s;
}

.link-path path {
  fill: none;
  stroke: rgba(210, 164, 105, 0.55);
  stroke-width: 1;
  opacity: 0.72;
  stroke-dasharray: 34 520;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 10px rgba(205, 164, 106, 0.28));
  animation: access-gold-signal 5.6s ease-in-out infinite;
}

.link-path circle {
  fill: #CDA46A;
  opacity: 0.34;
  transform-box: fill-box;
  transform-origin: center;
  animation: access-node-pulse 5.6s ease-in-out infinite;
}

.link-path circle:nth-of-type(2) {
  animation-delay: 0.45s;
}

.link-path circle:nth-of-type(3) {
  animation-delay: 0.9s;
}

.link-path circle:nth-of-type(4) {
  animation-delay: 1.35s;
}

.link-path circle:nth-of-type(5) {
  animation-delay: 1.8s;
}

.access-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) 360px;
  gap: max(72px, 8vw);
  align-items: center;
  width: min(1280px, calc(100vw - 160px));
  height: 100%;
  margin: 0 auto;
}

.access-title-block {
  transform: translateY(-4px);
  animation: access-copy-in 900ms cubic-bezier(0.2, 0.72, 0.18, 1) both;
}

.access-title-block p {
  margin: 0 0 22px;
  color: rgba(241, 238, 232, 0.45);
  font-size: 10px;
  letter-spacing: 0.32em;
}

.access-title-block h1 {
  margin: 0;
  color: #F1EEE8;
  font-family: "Source Han Serif SC", "Noto Serif SC", "SimSun", Georgia, serif;
  font-size: clamp(54px, 6.1vw, 88px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.05;
  white-space: nowrap;
}

.access-title-block span {
  display: block;
  margin-top: 26px;
  color: rgba(241, 238, 232, 0.62);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.12em;
}

.access-panel {
  display: grid;
  gap: 24px;
  width: 360px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  padding: 4px 0 4px 42px;
  animation: access-panel-in 980ms cubic-bezier(0.2, 0.72, 0.18, 1) 120ms both;
}

.access-panel h2 {
  margin: 0 0 8px;
  color: rgba(241, 238, 232, 0.7);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.line-field {
  display: grid;
  gap: 5px;
}

.line-field > span:first-child {
  color: rgba(241, 238, 232, 0.55);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.line-field input {
  width: 100%;
  height: 54px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: transparent;
  color: #F1EEE8;
  font-size: 16px;
  outline: none;
  padding: 0;
}

.line-field input::placeholder {
  color: rgba(241, 238, 232, 0.32);
}

.line-field:focus-within > span:first-child {
  color: rgba(241, 238, 232, 0.9);
}

.line-field:focus-within input {
  border-bottom-color: #CDA46A;
}

.password-line {
  position: relative;
  display: block;
}

.password-line input {
  padding-right: 54px;
}

.password-line button {
  position: absolute;
  right: 0;
  top: 0;
  height: 54px;
  border: 0;
  background: transparent;
  color: rgba(241, 238, 232, 0.48);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.boot-error {
  min-height: 20px;
  margin: -6px 0 0;
  color: #9F5C55;
  font-size: 13px;
}

.enter-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #F1EEE8;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
}

.enter-link i {
  font-style: normal;
  animation: access-arrow-nudge 1.8s ease-in-out infinite;
}

.enter-link:active {
  transform: scale(0.985);
}

.enter-link:disabled {
  cursor: wait;
  opacity: 0.64;
}

@keyframes access-grid-drift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 54px 30px, -36px 42px;
  }
}

@keyframes access-bg-breathe {
  0% {
    filter: brightness(0.9) saturate(0.92);
    transform: scale(1);
  }
  100% {
    filter: brightness(1.16) saturate(1.08);
    transform: scale(1.018);
  }
}

@keyframes access-line-flow {
  0% {
    stroke-dashoffset: 0;
    stroke: rgba(255, 255, 255, 0.045);
  }
  42% {
    stroke: rgba(255, 255, 255, 0.13);
  }
  100% {
    stroke-dashoffset: -1180;
    stroke: rgba(255, 255, 255, 0.055);
  }
}

@keyframes access-gold-signal {
  0% {
    stroke-dashoffset: 0;
    opacity: 0.35;
  }
  35%,
  58% {
    opacity: 0.98;
  }
  100% {
    stroke-dashoffset: -620;
    opacity: 0.42;
  }
}

@keyframes access-node-pulse {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.72);
  }
  45% {
    opacity: 1;
    transform: scale(1.85);
  }
}

@keyframes access-copy-in {
  0% {
    opacity: 0;
    transform: translateX(-24px) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(-4px);
  }
}

@keyframes access-panel-in {
  0% {
    opacity: 0;
    transform: translateX(28px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes access-arrow-nudge {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.72;
  }
  50% {
    transform: translateX(9px);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .access-layout {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 56px;
    width: calc(100vw - 56px);
  }

  .access-title-block h1 {
    font-size: 54px;
  }

  .access-panel {
    width: 100%;
    padding-left: 28px;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.modal-backdrop.hidden {
  display: none;
}

.admin-modal {
  width: min(1180px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.12), transparent 24rem),
    rgba(11, 18, 32, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  padding: 20px;
}

.compact-modal {
  width: min(560px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-family: "Source Han Serif SC", "SimSun", Georgia, serif;
  font-size: 28px;
}

.modal-form {
  margin-top: 16px;
}

.password-modal {
  width: min(520px, 100%);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: #FCA5A5;
  font-size: 13px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--text-muted);
  font-size: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.admin-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
}

.admin-list {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.admin-item,
.permission-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
}

.admin-item p {
  margin: 7px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.inline-form {
  display: grid;
  gap: 8px;
}

.inline-form.multi {
  grid-template-columns: 1fr;
}

.inline-form input,
.inline-form select,
.inline-form textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  padding: 10px 11px;
}

.inline-form textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}

.form-actions,
.row-actions,
.permission-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.form-actions {
  justify-content: flex-start;
}

.row-actions,
.permission-head {
  justify-content: space-between;
}

.row-actions .ghost-action,
.permission-head .ghost-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.permission-matrix {
  display: grid;
  gap: 10px;
}

.permission-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

#ticker-track {
  display: inline-flex;
  gap: 38px;
  align-items: center;
  min-height: 50px;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
}

@keyframes ticker {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

body.compact .metric-card {
  min-height: 104px;
  padding: 14px;
}

body.compact .panel {
  padding: 14px;
}

@media (max-width: 1280px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .dashboard-grid,
  .attention-layout,
  .coord-layout,
  .raci-layout,
  .three-column,
  .execution-layout,
  .designer-grid,
  .risk-layout,
  .efficiency-layout,
  .monthly-grid,
  .bigscreen-body {
    grid-template-columns: 1fr;
  }

  .risk-rule-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .monthly-kpis {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .workload-total {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .runtime-canvas,
  .designer-canvas {
    min-height: 560px;
  }

  .coord-summary {
    grid-template-columns: 1fr;
  }
}

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

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

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 14px;
  }

  .page-risk-ticker {
    left: 0;
  }

  .topbar,
  .bigscreen-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
  }

  .hero-copy {
    width: 100%;
    padding: 30px 20px 190px;
  }

  .hero-copy h2 {
    font-size: 38px;
  }

  .metric-grid,
  .metric-grid.compact,
  .risk-map,
  .risk-matrix,
  .risk-rule-grid,
  .monthly-kpis,
  .workload-total,
  .task-board {
    grid-template-columns: 1fr;
  }

  .month-filter-form {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .efficiency-row {
    grid-template-columns: 1fr 1fr;
  }

  .efficiency-row.header {
    display: none;
  }

  .time-box {
    min-width: auto;
  }
}
