﻿:root {
  --bg: #eef5fb;
  --card: rgba(255, 255, 255, 0.86);
  --ink: #10243f;
  --muted: #5c7190;
  --line: #c9d9ec;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --green: #0f9f80;
  --amber: #d97706;
  --red: #d24d57;
  --purple: #6d28d9;
  --shadow: 0 24px 80px rgba(21, 55, 95, 0.13);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at 88% 16%, rgba(15, 159, 128, 0.14), transparent 30%),
    linear-gradient(135deg, #f6f9fc 0%, var(--bg) 100%);
}

button, select, input { font: inherit; }

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border-radius: 34px;
  padding: 34px;
  color: white;
  background:
    linear-gradient(130deg, rgba(5, 20, 42, 0.98), rgba(12, 48, 88, 0.94)),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.5), transparent 28%);
  box-shadow: var(--shadow);
}

.hero::before, .hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(58, 180, 230, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.hero::before { width: 680px; height: 680px; right: -190px; top: -320px; }
.hero::after { width: 430px; height: 430px; right: 120px; top: 88px; }

.topbar, .hero-grid, main { position: relative; z-index: 1; }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  border-bottom: 1px solid rgba(167, 219, 255, 0.25);
  padding-bottom: 22px;
}

.eyebrow, .section-label {
  color: #1fd0ff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin: 0; }

h1 { margin-top: 8px; font-size: clamp(30px, 4vw, 54px); letter-spacing: 0; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  color: #d9efff;
  white-space: nowrap;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #35e7a4;
  box-shadow: 0 0 20px #35e7a4;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: stretch;
  padding-top: 46px;
}

.hero-copy h2 {
  max-width: 820px;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 760px;
  margin-top: 22px;
  color: #bed2e7;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 14px; margin-top: 30px; }

.primary-btn, .ghost-btn {
  cursor: pointer;
  border: 0;
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  color: #08213b;
  background: linear-gradient(135deg, #59e3ff, #78f2c0);
  box-shadow: 0 16px 36px rgba(0, 210, 255, 0.22);
}

.ghost-btn {
  color: #eaf7ff;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
}

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

.hero-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.signal-card {
  min-height: 128px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
}

.signal-card strong { display: block; font-size: 22px; margin-bottom: 12px; }
.signal-card span { color: #cae0f4; line-height: 1.55; }
.signal-card.blue { box-shadow: inset 4px 0 0 #5aa4ff; }
.signal-card.green { box-shadow: inset 4px 0 0 #35e7a4; }
.signal-card.amber { box-shadow: inset 4px 0 0 #ffc46b; }
.signal-card.purple { box-shadow: inset 4px 0 0 #b197ff; }

main { margin-top: 24px; }

.control-strip {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1fr 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid rgba(166, 190, 222, 0.65);
  box-shadow: 0 16px 50px rgba(24, 57, 94, 0.08);
  backdrop-filter: blur(14px);
}

.control-strip label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

select, input[type="range"] { width: 100%; }

select {
  border: 1px solid #d5e1f0;
  color: var(--ink);
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

.range-label b { color: var(--blue); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.kpi-card, .panel {
  background: var(--card);
  border: 1px solid rgba(166, 190, 222, 0.68);
  box-shadow: 0 16px 50px rgba(24, 57, 94, 0.08);
  backdrop-filter: blur(14px);
}

.kpi-card {
  min-height: 134px;
  border-radius: 26px;
  padding: 22px;
}

.kpi-card span { color: var(--muted); font-weight: 800; }
.kpi-card strong { display: block; margin-top: 10px; font-size: 38px; letter-spacing: 0; }
.kpi-card small { display: block; margin-top: 8px; color: #7588a4; line-height: 1.5; }

.workspace-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 18px;
  margin-top: 18px;
}

.workspace-grid.capability-layout {
  grid-template-columns: minmax(0, 1.75fr) minmax(340px, .85fr);
}

.workspace-grid.two-columns { grid-template-columns: 1fr 1fr; }

.panel {
  border-radius: 30px;
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-heading h3 { margin-top: 6px; font-size: 24px; letter-spacing: 0; }
.panel-heading.compact { margin-bottom: 18px; }

.panel-badge {
  border-radius: 999px;
  padding: 8px 12px;
  background: #e9f2ff;
  color: #41628c;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.panel-badge.local { background: #e6fbf6; color: #087862; }

.chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr) 20px) minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.chain-node {
  min-width: 0;
  min-height: 126px;
  border-radius: 18px;
  padding: 15px 10px;
  background: #f8fbff;
  border: 1px solid #d4e3f5;
  transition: transform .25s ease, border .25s ease, box-shadow .25s ease;
}

.chain-node.active {
  border-color: var(--blue);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.16);
  transform: translateY(-3px);
}

.chain-node b {
  color: var(--blue);
  font-size: 13px;
}

.chain-node strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.35;
}

.chain-node span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chain-arrow {
  position: relative;
  width: 20px;
  height: 20px;
  justify-self: center;
}

.chain-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 5px;
  top: 9px;
  height: 2px;
  border-radius: 999px;
  background: #6e8caf;
}

.chain-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 5px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #6e8caf;
}

.chain-node.active + .chain-arrow::before { background: var(--blue); }
.chain-node.active + .chain-arrow::after { border-left-color: var(--blue); }
.chain-arrow.feedback::before { background: var(--green); }
.chain-arrow.feedback::after { border-left-color: var(--green); }

.readiness-list { display: grid; gap: 12px; }

.readiness-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dce8f6;
}

.check-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(15, 159, 128, 0.1);
}

.readiness-item.warn .check-dot { background: var(--amber); box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.12); }
.readiness-item.risk .check-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(210, 77, 87, 0.12); }
.readiness-item strong { display: block; }
.readiness-item span { color: var(--muted); font-size: 13px; }
.readiness-item em { color: var(--muted); font-style: normal; font-weight: 800; }

.business-map {
  min-height: 360px;
  border-radius: 24px;
  padding: 10px;
  background:
    linear-gradient(90deg, rgba(37,99,235,.07) 1px, transparent 1px),
    linear-gradient(rgba(37,99,235,.07) 1px, transparent 1px),
    #f8fbff;
  background-size: 34px 34px;
  overflow: hidden;
}

.business-map-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 340px;
}

.business-edge {
  fill: none;
  stroke: #5f7fa5;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#business-arrow path { fill: #5f7fa5; }

.edge-label rect {
  fill: #f8fbff;
  stroke: #d7e4f2;
  stroke-width: 1;
}

.edge-label text {
  fill: #526a84;
  font-size: 13px;
  font-weight: 800;
}

.business-node rect {
  fill: #fff;
  stroke: #8fb4dd;
  stroke-width: 2;
  filter: drop-shadow(0 10px 14px rgba(24, 57, 94, 0.08));
}

.business-node.green rect { fill: #f1fffb; stroke: #36aa8f; }
.business-node.amber rect { fill: #fff9ed; stroke: #e0a23c; }
.business-node.purple rect { fill: #f8f5ff; stroke: #8a68dd; }

.node-title {
  fill: #14263d;
  font-size: 19px;
  font-weight: 900;
}

.node-subtitle {
  fill: #60758e;
  font-size: 13px;
  font-weight: 700;
}

.control-bars { display: grid; gap: 15px; }
.control-bar strong { display: flex; justify-content: space-between; margin-bottom: 8px; }
.control-bar span { color: var(--muted); }
.bar-track { height: 12px; border-radius: 999px; background: #e8eef6; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }

.note-card {
  margin-top: 22px;
  border-radius: 22px;
  padding: 18px;
  background: #fff9ed;
  border: 1px solid #f3d5a3;
}

.note-card strong { color: var(--amber); font-size: 18px; }
.note-card p { margin-top: 8px; color: #5f4a2a; line-height: 1.7; }

.timeline { display: grid; gap: 14px; }
.timeline-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: center; }
.timeline-row b { color: var(--muted); }
.time-lane { position: relative; height: 46px; border-radius: 16px; background: #edf3fa; overflow: hidden; }
.time-block {
  position: absolute;
  top: 8px;
  height: 30px;
  border-radius: 12px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(24,57,94,.14);
}
.time-block.blue { background: var(--blue); }
.time-block.green { background: var(--green); }
.time-block.amber { background: var(--amber); }
.time-block.purple { background: var(--purple); }
.time-block.maint { background: repeating-linear-gradient(45deg, #64748b, #64748b 8px, #94a3b8 8px, #94a3b8 16px); }

.analysis-stack { display: grid; gap: 12px; }
.analysis-item {
  padding: 15px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dce8f6;
}
.analysis-item strong { display: block; }
.analysis-item p { margin-top: 7px; color: var(--muted); line-height: 1.6; }
.run-log {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  color: #d9faff;
  background: #0b223a;
  line-height: 1.6;
  min-height: 74px;
}

.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.back-home { color: #dcecff; font-size: 13px; font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(220,236,255,.45); }
.back-home:hover { color: #fff; }
.back-home:focus-visible { outline: 3px solid #f6a623; outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .62; transform: none !important; }

@media (max-width: 1100px) {
  .hero-grid, .workspace-grid, .workspace-grid.capability-layout, .workspace-grid.two-columns, .control-strip, .kpi-grid { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .chain-node { width: 100%; min-height: 104px; padding: 18px; }
  .chain-node strong { font-size: 20px; }
  .chain-node span { font-size: 14px; }
  .chain-arrow { width: 24px; height: 28px; }
  .chain-arrow::before { left: 11px; right: auto; top: 0; bottom: 6px; width: 2px; height: auto; }
  .chain-arrow::after {
    left: 6px;
    right: auto;
    top: auto;
    bottom: 0;
    border-top: 7px solid #6e8caf;
    border-right: 6px solid transparent;
    border-bottom: 0;
    border-left: 6px solid transparent;
  }
  .chain-node.active + .chain-arrow::after { border-top-color: var(--blue); border-left-color: transparent; }
  .chain-arrow.feedback::after { border-top-color: var(--green); border-left-color: transparent; }
}

@media (max-width: 680px) {
  .app-shell { padding: 14px; }
  .hero { padding: 22px; border-radius: 24px; }
  .topbar { flex-direction: column; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .hero-panel { grid-template-columns: 1fr; }
  .hero-copy h2 { font-size: 36px; }
  .hero-actions { flex-direction: column; }
  .panel { padding: 18px; border-radius: 22px; }
  .panel-heading { flex-direction: column; }
}
