/* =========================================================
   ImplantTrace — Landing page tư vấn & báo giá
   Theme + Block 1 "Xương sống truy xuất nguồn gốc"
   ========================================================= */

:root {
  /* Nền tối (block xương sống) */
  --bg-900: #0a1020;
  --bg-800: #0f1830;
  --surface: #16223f;
  --surface-2: #1c2c50;
  --ink: #f7fbff;
  --muted: #c7eaff;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);

  /* Màu định danh từng bộ phận */
  --c-kho: #2dd4bf;
  /* teal  */
  --c-sale: #60a5fa;
  /* blue  */
  --c-ketoan: #fbbf24;
  /* amber */
  --c-admin: #a78bfa;
  /* violet */
  --c-danger: #f4727a;
  /* đỏ — nhược điểm cách làm cũ */

  /* Accent CTA */
  --accent: #c2410c;
  --accent-ink: #fff;

  /* Nền sáng (section khác) */
  --light: #f5f8fd;
  --light-2: #eaf0fa;
  --ink-dark: #061a3a;
  --muted-dark: #123f75;

  /* Layout block 1 */
  --lane-h: 116px;
  --label-w: clamp(70px, 16vw, 176px);
  --col-w: 112px;
  --group-head-h: 46px;

  --radius: 14px;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.7);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-dark);
  background: var(--light);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

h1,
h2 {
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

a {
  color: inherit;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.78em 1.35em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 26px -12px rgba(194, 65, 12, 0.8);
}

.btn-primary:hover {
  box-shadow: 0 16px 34px -12px rgba(194, 65, 12, 0.9);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.eyebrow-light {
  color: var(--c-kho);
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 16, 32, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.18rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  color: var(--c-kho);
  font-size: 1.3em;
}

.brand-text strong,
.brand strong {
  color: var(--c-kho);
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  margin-left: 0;
}

/* ============ HERO ============ */
.hero {
  background: radial-gradient(1100px 520px at 78% -10%, #1c2c54 0%, transparent 60%), var(--bg-900);
  color: var(--ink);
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  margin: 0.4rem 0 1rem;
}

.hero h1 .hl {
  color: var(--c-kho);
}

.lead {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--muted);
  max-width: 46ch;
}

.lead strong {
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.hero-stats li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-800));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

.stat-num {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--c-kho);
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ============ BLOCK 1: XƯƠNG SỐNG ============ */
.backbone {
  background:
    radial-gradient(900px 480px at 12% 0%, #16224a 0%, transparent 55%),
    radial-gradient(900px 520px at 95% 100%, #181a44 0%, transparent 55%),
    var(--bg-900);
  color: var(--ink);
  padding: clamp(3.2rem, 7vw, 6rem) 0;
}

.section-head {
  max-width: 70ch;
  margin-bottom: 2.4rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
  margin-bottom: 0.9rem;
}

.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-lead strong {
  color: var(--ink);
}

.section-lead em {
  color: var(--c-kho);
  font-style: normal;
  font-size: 0.95rem;
}

.backbone-stage {
  position: relative;
  display: grid;
  gap: 1.15rem;
  background: linear-gradient(180deg, rgba(28, 44, 80, 0.4), rgba(15, 24, 48, 0.4));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1rem, 2.5vw, 1.8rem);
  box-shadow: var(--shadow);
}

.stage-actions {
  display: flex;
  justify-content: flex-end;
}

.stage-fullscreen-toggle {
  padding: 0.35rem 0.75rem;
  width: auto;
  height: auto;
  justify-content: center;
  align-items: center;
  line-height: 1.4;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Thanh chuyển kịch bản (scenario tabs) ---- */
.scenario-tabs {
  justify-self: start;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.3rem;
  margin-top: -0.4rem;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.scenario-tab {
  border: 0;
  cursor: pointer;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.scenario-tab:hover {
  color: var(--ink);
}

.scenario-tab.is-active {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong), 0 8px 18px -12px rgba(0, 0, 0, 0.85);
}

.scenario-tab:focus-visible {
  outline: 2px solid var(--c-kho);
  outline-offset: 2px;
}

.backbone-stage:fullscreen,
.backbone-stage.is-fullscreen-fallback {
  --lane-h: 126px;
  --label-w: clamp(96px, 15vw, 220px);
  --col-w: clamp(126px, 10vw, 156px);
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(1rem, 2vw, 2rem);
  border-radius: 0;
  background:
    radial-gradient(1100px 540px at 12% 0%, rgba(22, 34, 74, 0.95) 0%, transparent 58%),
    radial-gradient(1000px 620px at 95% 100%, rgba(24, 26, 68, 0.95) 0%, transparent 60%),
    var(--bg-900);
  overflow: auto;
}

.backbone-stage.is-fullscreen-fallback {
  position: fixed;
  inset: 0;
  z-index: 120;
  height: 100dvh;
}

.backbone-stage:fullscreen::backdrop {
  background: rgba(6, 10, 20, 0.88);
}

.backbone-stage:fullscreen .stage-actions,
.backbone-stage.is-fullscreen-fallback .stage-actions {
  position: sticky;
  top: 0;
  z-index: 8;
  padding-bottom: 0.75rem;
  background: linear-gradient(180deg, rgba(10, 16, 32, 0.96), rgba(10, 16, 32, 0));
}

.backbone-stage:fullscreen .timeline,
.backbone-stage.is-fullscreen-fallback .timeline {
  overflow: auto;
  max-height: min(72dvh, 920px);
  padding-bottom: 0.75rem;
}

body.has-stage-fullscreen {
  overflow: hidden;
}

/* ---- Swimlanes ---- */
.swimlanes {
  display: grid;
  grid-template-columns: var(--label-w) 1fr;
  gap: 0;
}

.lane-labels {
  display: flex;
  flex-direction: column;
}

.lane-labels.has-process-groups {
  padding-top: var(--group-head-h);
}

.lane-label {
  height: var(--lane-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 0.7rem 0.6rem 0;
  background: none;
  border: 0;
  border-right: 2px solid var(--lane-color, var(--line));
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  width: 100%;
  border-radius: 8px 0 0 8px;
  transition: background 0.2s ease;
}

.lane-label:hover {
  background: rgba(255, 255, 255, 0.04);
}

.lane-label.is-active {
  background: color-mix(in srgb, var(--lane-color) 14%, transparent);
}

.lane-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--lane-color);
  display: inline-block;
  box-shadow: 0 0 12px var(--lane-color);
}

.lane-name {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.lane-role {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.lane-toggle {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---- Timeline (scroll ngang) ---- */
.timeline {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
}

.lane-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps, 9), minmax(var(--col-w), 1fr));
  grid-template-rows: repeat(4, var(--lane-h));
  /* chừa chỗ cho token nằm dưới node hàng cuối (Admin) khỏi bị cắt */
  padding-bottom: 44px;
}

.lane-grid.has-process-groups {
  padding-top: var(--group-head-h);
}

.process-group-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--group-head-h);
  display: grid;
  grid-template-columns: repeat(var(--steps, 9), minmax(var(--col-w), 1fr));
  align-items: end;
  z-index: 4;
  pointer-events: none;
}

.process-group-label {
  min-width: 0;
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  padding: 0.3rem 0.55rem;
  text-align: center;
  color: color-mix(in srgb, var(--ink) 80%, var(--muted));
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
  border-radius: 9px 9px 0 0;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line-strong);
  border-bottom: 3px solid var(--line-strong);
}

/* Lớp vạch ngăn dọc đậm giữa các nhóm (chạy hết chiều cao lưới, nằm sau node) */
.process-group-dividers {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--steps, 9), minmax(var(--col-w), 1fr));
  z-index: 1;
  pointer-events: none;
}

.process-group-col {
  border-left: 2px solid var(--line-strong);
}

.process-group-col.is-last {
  border-right: 2px solid var(--line-strong);
}

/* dải nền từng làn */
.lane-band {
  grid-column: 1 / -1;
  align-self: stretch;
  border-bottom: 1px dashed var(--line);
  position: relative;
}

.lane-band::after {
  /* đường ray mờ giữa làn */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dashed color-mix(in srgb, var(--lane-color) 35%, transparent);
}

.lane-band.is-active {
  background: color-mix(in srgb, var(--lane-color) 9%, transparent);
}

.lane-band[data-lane="admin"] {
  background: repeating-linear-gradient(45deg, rgba(167, 139, 250, 0.05) 0 10px, transparent 10px 20px);
  border-top: 1px dashed color-mix(in srgb, var(--c-admin) 45%, transparent);
}

.lane-band-tag {
  position: absolute;
  right: 8px;
  top: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--lane-color) 70%, white);
  text-transform: uppercase;
  opacity: 0.8;
}

/* ---- Connectors (SVG) ---- */
.connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.conn-base {
  display: none;
}

/* Khung xương luồng: đường ray nét LIỀN mảnh nối các node dọc luồng chính.
   Dùng nét liền (khác mọi line phụ nét đứt) để phân tầng thị giác, tránh "rối"
   vì quá nhiều line mờ giống nhau. Luôn hiển thị ở mọi tab, nằm dưới cùng;
   đường progress sáng chạy đè lên phần đã đi. */
.conn-track {
  fill: none;
  stroke: color-mix(in srgb, var(--muted) 52%, transparent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conn-progress {
  fill: none;
  stroke: var(--c-kho);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--c-kho));
  stroke-dasharray: 18 10;
  animation: progress-flow 1.1s linear infinite;
  transition: stroke-dashoffset 0.5s ease;
}

.conn-fork-focus {
  transition: opacity 0.2s ease;
}

/* vòng lặp quay về (staple nét đứt mảnh) */
.conn-loop {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-dasharray: 3 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.65;
}

/* đốm sáng chạy dọc vòng lặp về node đích (chỉ hiện khi đang chọn nhánh) */
.conn-loop-comet {
  fill: none;
  stroke: var(--comet-color, var(--c-kho));
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 86;
  filter: drop-shadow(0 0 5px var(--comet-color, var(--c-kho)));
  animation: comet-run 1.5s linear infinite;
}

@keyframes comet-run {
  from {
    stroke-dashoffset: 100;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes progress-flow {
  from {
    stroke-dashoffset: 28;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .conn-progress,
  .conn-loop-comet {
    animation: none;
  }
}

/* đường nối node trạng thái đổi/trả (Sale) → node phòng ban (Kho/Kế toán/Admin) */
.conn-status-link {
  fill: none;
  stroke: var(--link-color, var(--muted));
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 4 6;
  opacity: 0.28;
  transition: opacity 0.2s ease, stroke-width 0.2s ease;
}

.conn-status-link.is-active {
  stroke-width: 3.5;
  opacity: 1;
  stroke-dasharray: 14 10;
  filter: drop-shadow(0 0 6px var(--link-color, var(--muted)));
  animation: progress-flow 1.1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .conn-status-link.is-active {
    animation: none;
  }
}

/* ---- Node ---- */
.node {
  grid-row: var(--row);
  grid-column: var(--col);
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: min(118px, 92%);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.55rem 0.6rem;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid color-mix(in srgb, var(--node-color) 45%, var(--line));
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.node:hover {
  transform: translateY(-3px);
  border-color: var(--node-color);
}

.node-index {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--node-color) 28%, var(--bg-800));
  color: #fff;
}

.node-title {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
}

.node.is-done {
  border-color: color-mix(in srgb, var(--node-color) 60%, var(--line));
}

.node.is-active {
  background: color-mix(in srgb, var(--node-color) 22%, var(--surface));
  border-color: var(--node-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--node-color) 25%, transparent), 0 14px 30px -14px var(--node-color);
}

.node.is-active .node-index {
  background: var(--node-color);
}

/* ---- Node rẽ nhánh (fork sau Kiểm kê) ---- */
.node-branch {
  gap: 0.22rem;
}

/* node đích của vòng lặp — nhấp nháy khi chọn nhánh tương ứng */
.node.is-loop-target {
  border-color: var(--node-color);
  animation: loop-pulse 1.15s ease-in-out infinite;
}

@keyframes loop-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--node-color) 50%, transparent);
  }

  50% {
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--node-color) 0%, transparent);
  }
}

/* node phòng ban được gắn với trạng thái đổi/trả đang chọn */
.node.is-linked {
  border-color: var(--node-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--node-color) 22%, transparent);
}

/* ---- Node trỏ sang nhóm "Đổi trả hàng" (link) ---- */
.node-link {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.node-link .node-index {
  background: color-mix(in srgb, var(--accent) 85%, #000);
  color: #fff;
}

.node-link .node-title {
  color: color-mix(in srgb, var(--accent) 32%, var(--ink));
}

.node-link:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px -14px var(--accent);
}

/* node trỏ đang mở line — viền liền + nhấp nháy accent */
.node-link.is-link-source {
  border-style: solid;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  animation: loop-pulse 1.15s ease-in-out infinite;
}

.node-link.is-active {
  border-style: solid;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent), 0 14px 30px -14px var(--accent);
}

/* line nối node trỏ → node đích bên nhóm Đổi/Trả */
.conn-link {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 10;
  filter: drop-shadow(0 0 6px var(--accent));
  animation: progress-flow 1.1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .conn-link {
    animation: none;
  }
}

/* ---- QR token (nằm DƯỚI node, trỏ mũi tên lên node đang active) ---- */
.qr-token {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  transform: translate(-50%, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 7px;
  border-radius: 9px;
  background: #fff;
  color: #06101f;
  box-shadow: 0 0 0 3px var(--token-color, var(--c-kho)), 0 10px 26px -8px rgba(0, 0, 0, 0.85);
  transition: transform 0.55s cubic-bezier(0.6, 0, 0.2, 1), box-shadow 0.4s ease;
  pointer-events: none;
  will-change: transform;
}

/* mũi tên tam giác ở mép trên token, chỉ lên node phía trên */
.qr-token::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: var(--token-color, var(--c-kho));
  filter: drop-shadow(0 -2px 5px color-mix(in srgb, var(--token-color, var(--c-kho)) 70%, transparent));
}

.qr-glyph {
  font-size: 1.15rem;
  line-height: 1;
}

.qr-uid {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* ---- Lane info panel (trách nhiệm bộ phận) ---- */
.lane-panel {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--lane-color, var(--line)) 40%, var(--line));
  background: color-mix(in srgb, var(--lane-color, #fff) 8%, var(--bg-800));
  display: none;
}

.lane-panel.is-open {
  display: block;
  animation: fade-in 0.25s ease;
}

.lane-panel-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.lane-panel-head .lane-dot {
  box-shadow: 0 0 10px var(--lane-color);
}

.lane-panel-role {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.lane-panel ul {
  margin: 0;
  padding: 0.9rem 1.4rem 1.1rem;
  display: grid;
  gap: 0.5rem;
}

.lane-panel li {
  color: var(--ink);
  font-size: 0.92rem;
}

.lane-panel li::marker {
  color: var(--lane-color);
}

/* ---- Step detail: so sánh "Cách cũ (nhược điểm)" vs "Số hóa với CRM (ưu điểm)" ---- */
.step-detail {
  margin-top: 1.3rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius);
  background: var(--bg-800);
  border: 1px solid var(--line);
  border-left: 4px solid var(--step-color, var(--c-kho));
  display: grid;
  gap: 1rem;
}

/* Đầu panel: badge bộ phận + tên mốc */
.sd-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.sd-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--step-color) 22%, transparent);
  color: color-mix(in srgb, var(--step-color) 75%, white);
  border: 1px solid color-mix(in srgb, var(--step-color) 45%, transparent);
}

.sd-title {
  font-size: 1.25rem;
  font-weight: 800;
  flex-basis: 100%;
}

.sd-branch-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 999px;
  color: color-mix(in srgb, var(--step-color) 80%, white);
  background: color-mix(in srgb, var(--step-color) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--step-color) 45%, transparent);
}

/* Lưới 2 cột so sánh */
.sd-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  align-items: stretch;
  position: relative;
}

/* Mũi tên chuyển hóa cũ → mới ở khe giữa (ẩn trên mobile) */
.sd-compare::before {
  content: "→";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  z-index: 2;
  font-size: 1rem;
  font-weight: 800;
  color: var(--bg-900);
  background: var(--step-color, var(--c-kho));
  box-shadow: 0 0 0 4px var(--bg-800);
}

.sd-col {
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.sd-col-old {
  background: color-mix(in srgb, var(--c-danger) 8%, var(--bg-900));
  border-color: color-mix(in srgb, var(--c-danger) 32%, transparent);
}

.sd-col-new {
  background: color-mix(in srgb, var(--step-color) 9%, var(--bg-900));
  border-color: color-mix(in srgb, var(--step-color) 40%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--step-color) 22%, transparent),
    0 14px 34px -20px color-mix(in srgb, var(--step-color) 90%, transparent);
}

/* Đầu cột chỉ còn 1 tag — căn trái, tạo khoảng thở trước phần mô tả */
.sd-col-head {
  display: flex;
  align-items: center;
  margin-bottom: 0.15rem;
}

.sd-col-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.32em 0.7em;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.sd-col-tag::before {
  font-size: 0.95em;
  line-height: 1;
}

.sd-tag-old {
  color: color-mix(in srgb, var(--c-danger) 80%, white);
  background: color-mix(in srgb, var(--c-danger) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-danger) 45%, transparent);
}

.sd-tag-old::before {
  content: "✕";
}

.sd-tag-new {
  color: color-mix(in srgb, var(--step-color) 78%, white);
  background: color-mix(in srgb, var(--step-color) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--step-color) 50%, transparent);
}

.sd-tag-new::before {
  content: "✓";
}

.sd-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.1rem 0 0;
}

.sd-sub {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0.3rem 0 0;
  opacity: 0.85;
}

.sd-sub-pain {
  color: color-mix(in srgb, var(--c-danger) 70%, white);
}

.sd-sub-benefit {
  color: color-mix(in srgb, var(--step-color) 70%, white);
}

/* Danh sách nhược điểm (cột cũ) */
.sd-pains {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.sd-pains li {
  position: relative;
  padding-left: 1.45em;
  font-size: 0.84rem;
  color: var(--ink);
  line-height: 1.4;
}

.sd-pains li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--c-danger);
}

/* Danh sách ưu điểm (cột mới) */
.sd-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.sd-benefits li {
  position: relative;
  padding-left: 1.45em;
  font-size: 0.84rem;
  color: var(--ink);
  line-height: 1.4;
}

.sd-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--step-color);
}

@media (max-width: 680px) {
  .sd-compare {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .sd-compare::before {
    content: "↓";
    top: auto;
    left: 50%;
    /* đặt ngay khe giữa 2 cột khi xếp dọc */
    top: calc(50% - 0.9rem);
  }
}

/* ============ PLACEHOLDER SECTIONS ============ */
.placeholder {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--light);
}

.placeholder-alt {
  background: var(--light-2);
}

.placeholder h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--ink-dark);
  margin-bottom: 0.8rem;
}

.placeholder-note {
  color: var(--muted-dark);
  max-width: 60ch;
  border-left: 3px dashed #c3cee0;
  padding-left: 1rem;
  font-style: italic;
  margin-bottom: 1.4rem;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--bg-900);
  color: var(--ink);
  padding: 2.4rem 0 1.4rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-footer {
  font-size: 1.1rem;
}

.footer-tag {
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.footer-fine {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 1.6rem 0 0;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  :root {
    --lane-h: 104px;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .lane-role {
    display: none;
  }

  .stage-fullscreen-toggle {
    width: auto;
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* =========================================================
   BLOCK 2: HẠNG MỤC MỞ RỘNG (GIAI ĐOẠN 2) — nền sáng
   ========================================================= */
.phase2 {
  background:
    radial-gradient(1000px 460px at 92% -10%, #e9f0ff 0%, transparent 55%),
    radial-gradient(900px 520px at -5% 110%, #f1ebff 0%, transparent 55%),
    var(--light);
  color: var(--ink-dark);
  padding: clamp(3.2rem, 7vw, 6rem) 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.p2-head {
  max-width: 80ch;
}

.p2-head h2 {
  color: var(--ink-dark);
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
  margin-bottom: 0.9rem;
}

.eyebrow-p2 {
  color: #6d28d9;
}

.p2-lead {
  color: var(--muted-dark);
  font-size: 1.05rem;
}

.p2-lead strong {
  color: var(--ink-dark);
}

.p2-lead em {
  color: #0f4c81;
  font-style: normal;
  font-size: 0.95rem;
  font-weight: 700;
}

/* ---- Trục chiến lược ---- */
.p2-axes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.p2-axis {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.55rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 34px -26px rgba(15, 23, 42, 0.6);
}

.p2-axis-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: #6d28d9;
  padding: 0.34em 0.75em;
  border-radius: 999px;
  white-space: nowrap;
}

.p2-axis-ops .p2-axis-label {
  background: #0f4c81;
}

.p2-axis-items {
  color: var(--muted-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---- Lưới thẻ ---- */
.p2-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: start;
}

@media (max-width: 920px) {
  .p2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* ---- Thẻ sản phẩm ---- */
.p2-card {
  --p2: #6d28d9;
  position: relative;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 48px -32px rgba(15, 23, 42, 0.55);
  transition: box-shadow 0.25s ease, transform 0.18s ease, border-color 0.2s ease;
}

.p2-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--p2), color-mix(in srgb, var(--p2) 40%, #fff));
}

.p2-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--p2) 40%, rgba(15, 23, 42, 0.09));
  box-shadow: 0 28px 56px -30px color-mix(in srgb, var(--p2) 55%, rgba(15, 23, 42, 0.5));
}

.p2-card.is-open {
  grid-column: 1 / -1;
  transform: none;
  border-color: color-mix(in srgb, var(--p2) 55%, transparent);
  box-shadow: 0 32px 72px -32px color-mix(in srgb, var(--p2) 60%, rgba(15, 23, 42, 0.5));
}

/* ---- Đầu thẻ (nút bấm) ---- */
.p2-card-head {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  font-family: inherit;
  padding: 1.25rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.p2-head-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.p2-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--p2);
  background: color-mix(in srgb, var(--p2) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--p2) 28%, transparent);
}

.p2-icon svg {
  width: 24px;
  height: 24px;
}

.p2-code {
  font-weight: 800;
  color: var(--p2);
  font-size: 0.98rem;
}

.p2-dir {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.32em 0.7em;
  border-radius: 999px;
  color: color-mix(in srgb, var(--p2) 72%, var(--ink-dark));
  background: color-mix(in srgb, var(--p2) 13%, #fff);
  border: 1px solid color-mix(in srgb, var(--p2) 30%, transparent);
}

.p2-chev {
  margin-left: auto;
  color: var(--muted-dark);
  transition: transform 0.28s ease;
  flex-shrink: 0;
  display: inline-flex;
}

.p2-card.is-open .p2-chev {
  transform: rotate(180deg);
  color: var(--p2);
}

.p2-title {
  display: block;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink-dark);
  line-height: 1.28;
}

.p2-tagline {
  display: block;
  font-size: 0.9rem;
  color: var(--muted-dark);
  line-height: 1.45;
}

.p2-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.p2-solves {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.p2-badge {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.26em 0.55em;
  border-radius: 6px;
  color: color-mix(in srgb, var(--c-danger) 62%, #7a1020);
  background: color-mix(in srgb, var(--c-danger) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--c-danger) 38%, transparent);
}

.p2-more {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--p2);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.p2-more svg {
  width: 15px;
  height: 15px;
}

/* ---- Thân thẻ (mở rộng bằng grid-rows) ---- */
.p2-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.p2-card.is-open .p2-body {
  grid-template-rows: 1fr;
}

.p2-body-inner {
  overflow: hidden;
  min-height: 0;
}

.p2-detail {
  padding: 0.4rem 1.3rem 1.4rem;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.p2-goal {
  margin-top: 1.1rem;
  background: color-mix(in srgb, var(--p2) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--p2) 20%, transparent);
  border-left: 4px solid var(--p2);
  border-radius: 12px;
  padding: 0.9rem 1.05rem;
  color: var(--ink-dark);
  font-size: 0.94rem;
  line-height: 1.55;
}

.p2-goal b {
  color: var(--p2);
}

.p2-cols {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.4rem;
  margin-top: 1.15rem;
}

@media (max-width: 780px) {
  .p2-cols {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.p2-col {
  min-width: 0;
}

.p2-col+.p2-col .p2-sec-title:not(:first-child) {
  margin-top: 1.2rem;
}

.p2-sec-title {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p2);
  margin: 0 0 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}


.p2-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.p2-features li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.89rem;
  color: var(--muted-dark);
  line-height: 1.55;
}

.p2-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--p2);
}

.p2-features b {
  color: var(--ink-dark);
  font-weight: 700;
}

.p2-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  counter-reset: p2step;
}

.p2-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.89rem;
  color: var(--muted-dark);
  line-height: 1.55;
  counter-increment: p2step;
}

.p2-steps li::before {
  content: counter(p2step);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--p2) 13%, #fff);
  color: var(--p2);
  border: 1px solid color-mix(in srgb, var(--p2) 34%, transparent);
  font-size: 0.74rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.p2-values {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.p2-values li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.89rem;
  color: var(--ink-dark);
  line-height: 1.5;
}

.p2-values li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--p2);
  font-weight: 800;
}

.p2-note {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--p2) 5%, #fff);
  border: 1px dashed color-mix(in srgb, var(--p2) 38%, transparent);
  font-size: 0.85rem;
  color: var(--muted-dark);
  line-height: 1.5;
}

.p2-note svg {
  width: 18px;
  height: 18px;
  color: var(--p2);
  flex-shrink: 0;
  margin-top: 1px;
}

.p2-examples {
  margin-top: 1.3rem;
}

.p2-example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
  margin-top: 0.75rem;
}

.p2-example {
  background: color-mix(in srgb, var(--p2) 4%, #fff);
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.86rem;
  color: var(--muted-dark);
  line-height: 1.55;
  box-shadow: 0 14px 34px -28px rgba(15, 23, 42, 0.6);
}

.p2-example p {
  margin: 0;
}

.p2-example-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-weight: 800;
  color: var(--ink-dark);
  font-size: 0.85rem;
}

.p2-example-title svg {
  width: 16px;
  height: 16px;
  color: var(--p2);
  flex-shrink: 0;
}

/* ---- Phase 2 redesign: thẻ gọn + pop-up trung tâm ---- */
.phase2 {
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.p2-head {
  max-width: 68ch;
}

.p2-lead {
  max-width: 66ch;
}

.p2-lead em {
  color: #0f4c81;
  font-weight: 700;
}

.p2-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: stretch;
  margin-top: 1.8rem;
}

.p2-card {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--p2) 28%, rgba(15, 23, 42, 0.1));
  background: #fff;
  box-shadow: 0 14px 34px -28px rgba(15, 23, 42, 0.62);
}

.p2-card::before {
  inset: 0 auto 0 0;
  width: 4px;
  height: auto;
  background: var(--p2);
}

.p2-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--p2) 62%, rgba(15, 23, 42, 0.1));
  box-shadow: 0 20px 46px -30px color-mix(in srgb, var(--p2) 58%, rgba(15, 23, 42, 0.62));
}

.p2-card-head {
  min-height: 220px;
  height: 100%;
  padding: 1.05rem 1rem 1rem 1.1rem;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 0.75rem;
}

.p2-card-head:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--p2) 48%, transparent);
  outline-offset: -3px;
}

.p2-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--p2);
  background: color-mix(in srgb, var(--p2) 9%, #fff);
  border-color: color-mix(in srgb, var(--p2) 24%, transparent);
}

.p2-title {
  align-self: end;
  color: var(--p2);
  font-size: clamp(1.08rem, 1.35vw, 1.28rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.p2-tagline {
  color: var(--muted-dark);
  font-size: 0.84rem;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.p2-more {
  margin-left: 0;
  justify-self: start;
  color: var(--p2);
  font-size: 0.82rem;
  gap: 0.35rem;
}

.p2-more svg {
  width: 16px;
  height: 16px;
}

body.has-p2-modal {
  overflow: hidden;
}

.p2-modal[hidden] {
  display: none;
}

.p2-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 2.4vw, 1.6rem);
}

.p2-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.p2-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 96vw);
  max-height: min(86dvh, 820px);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--p2) 34%, rgba(15, 23, 42, 0.12));
  box-shadow: 0 32px 90px -34px rgba(15, 23, 42, 0.72);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.p2-modal.is-open .p2-modal-backdrop,
.p2-modal.is-open .p2-modal-panel {
  opacity: 1;
}

.p2-modal.is-open .p2-modal-panel {
  transform: none;
}

.p2-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--p2) 24%, rgba(15, 23, 42, 0.12));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--p2);
  cursor: pointer;
}

.p2-modal-close svg {
  width: 18px;
  height: 18px;
}

.p2-modal-close:hover,
.p2-modal-close:focus-visible {
  background: color-mix(in srgb, var(--p2) 9%, #fff);
  outline: none;
}

.p2-modal-content {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.p2-modal-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.35rem 4.4rem 1.15rem 1.45rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, color-mix(in srgb, var(--p2) 8%, #fff), #fff);
}

.p2-modal-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--p2);
  background: color-mix(in srgb, var(--p2) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--p2) 28%, transparent);
}

.p2-modal-icon svg {
  width: 26px;
  height: 26px;
}

.p2-modal-kicker {
  display: block;
  color: var(--p2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.p2-modal-head h3 {
  margin: 0;
  color: var(--p2);
  font-size: clamp(1.35rem, 2.7vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.p2-modal-head p {
  margin: 0.55rem 0 0;
  color: var(--muted-dark);
  max-width: 72ch;
}

.p2-modal-scroll {
  min-height: 0;
  overflow: auto;
  padding: 1.25rem 1.45rem 1.5rem;
}

.p2-detail {
  padding: 0;
  border-top: 0;
}

.p2-goal {
  margin-top: 0;
  border-radius: 8px;
}

.p2-cols {
  gap: 1rem;
}

.p2-features li,
.p2-steps li,
.p2-values li {
  font-size: 0.9rem;
}

.p2-note,
.p2-example {
  border-radius: 8px;
}

@media (max-width: 1080px) {
  .p2-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .p2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .p2-card-head {
    min-height: 190px;
  }

  .p2-modal-head {
    grid-template-columns: 1fr;
    padding: 1.2rem 3.8rem 1rem 1.1rem;
  }

  .p2-modal-icon {
    width: 42px;
    height: 42px;
  }

  .p2-modal-scroll {
    padding: 1.05rem 1.1rem 1.25rem;
  }
}

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

  .p2-card-head {
    min-height: 168px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .p2-modal-backdrop,
  .p2-modal-panel {
    transition: none;
  }
}

/* =========================================================
   BLOCK 3: TIMELINE TRIỂN KHAI (nền tối) — Gantt tương tác
   ========================================================= */
.roadmap {
  background: var(--bg-900);
  color: var(--ink);
  padding: clamp(3.2rem, 7vw, 6rem) 0;
}

.rm-head {
  max-width: 76ch;
  margin-bottom: 1.4rem;
}

.rm-head h2 {
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
  margin-bottom: 0.9rem;
}

.eyebrow-rm {
  color: var(--accent);
}

.rm-lead {
  color: var(--muted);
}

/* ---- Gantt ---- */
.rm-gantt-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

.rm-gantt {
  min-width: 1080px;
  background: linear-gradient(180deg, var(--surface), var(--bg-800));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.rm-gantt-body {
  --rm-label-w: clamp(150px, 16vw, 205px);
  display: grid;
  grid-template-columns: var(--rm-label-w) repeat(12, minmax(56px, 1fr));
  grid-template-rows: auto repeat(9, 58px) auto;
  position: relative;
  column-gap: 0;
}

/* cột nền theo tháng = gridline + vùng bấm chọn tháng */
.rm-col {
  border-left: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
}

.rm-col:hover {
  background: rgba(255, 255, 255, 0.035);
}

.rm-col.is-active {
  background: linear-gradient(180deg, rgba(255, 106, 69, 0.16), rgba(255, 106, 69, 0.03));
  box-shadow: inset 1px 0 0 rgba(255, 106, 69, 0.45), inset -1px 0 0 rgba(255, 106, 69, 0.45);
}

.rm-corner {
  align-self: end;
  grid-column: 1;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  padding: 0 0.45rem 0.55rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rm-mhead {
  align-self: end;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  user-select: none;
  padding: 0.35rem 0 0.55rem;
  transition: color 0.15s ease;
}

.rm-mhead:hover {
  color: var(--ink);
}

.rm-mhead.is-active {
  color: var(--accent);
}

.rm-rowlabel {
  align-self: center;
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-right: 0.45rem;
  font-size: 0.76rem;
  color: var(--ink);
  font-weight: 600;
  overflow: visible;
  min-width: 0;
}

.rm-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rm-rowlabel-txt {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.rm-msrow {
  font-weight: 700;
  color: var(--muted);
}

.rm-msrow svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.rm-bar {
  align-self: center;
  position: relative;
  z-index: 1;
  height: 30px;
  margin: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0 0.45rem;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)), var(--rm);
  color: var(--bg-900);
  cursor: pointer;
  box-shadow: 0 6px 16px -10px var(--rm);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
  overflow: hidden;
  font-family: inherit;
}

.rm-bar-label {
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rm-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px var(--rm);
  z-index: 6;
}

.rm-gantt-body.has-sel .rm-bar {
  opacity: 0.34;
  filter: saturate(0.7);
}

.rm-gantt-body.has-sel .rm-bar.is-linked {
  opacity: 1;
  filter: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 10px 22px -8px var(--rm);
}

.rm-star-mark {
  align-self: center;
  justify-self: center;
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: var(--accent);
  line-height: 0;
  border-radius: 6px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.rm-star-mark svg {
  width: 17px;
  height: 17px;
}

.rm-star-mark:hover {
  transform: scale(1.2);
  background: rgba(255, 106, 69, 0.12);
}

.rm-star-mark.is-active {
  filter: drop-shadow(0 0 6px rgba(255, 106, 69, 0.7));
  transform: scale(1.2);
}

/* tooltip nổi (position:fixed, không bị clip) */
.rm-tip {
  position: fixed;
  z-index: 200;
  transform: translate(-50%, -100%);
  background: #0a1020;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  max-width: 260px;
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.rm-tip.show {
  opacity: 1;
}

.rm-tip b {
  display: block;
  color: var(--ink);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.rm-tip .rm-tip-meta {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.rm-tip .rm-tip-meta strong {
  color: var(--accent);
}

.rm-tip .rm-tip-group {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rm);
  background: color-mix(in srgb, var(--rm) 16%, transparent);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

/* ---- Chi tiết theo tháng ---- */
.rm-month-detail {
  background: linear-gradient(180deg, var(--surface), var(--bg-800));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.5rem);
}

.rm-md-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.rm-md-num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--bg-900);
  background: var(--accent);
  border-radius: 9px;
  padding: 0.32rem 0.7rem;
  white-space: nowrap;
}

.rm-md-title {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 800;
  color: var(--ink);
}

.rm-md-flag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 106, 69, 0.12);
  border: 1px solid rgba(255, 106, 69, 0.35);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
}

.rm-md-flag svg {
  width: 13px;
  height: 13px;
}

.rm-md-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.rm-md-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.rm-md-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rm);
}

.rm-md-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.4rem;
}

.rm-md-sec {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
}

.rm-md-work {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.rm-md-work li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.rm-md-work li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-kho);
}

.rm-md-deliver {
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 12px;
  padding: 0.95rem 1.05rem;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.55;
}

/* ---- Responsive Block 3 ---- */
@media (max-width: 860px) {
  .rm-md-cols {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 620px) {
  .rm-md-flag {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .rm-bar,
  .rm-col,
  .rm-mhead,
  .rm-star-mark,
  .rm-tip {
    transition: none;
  }
}

/* =========================================================
   BLOCK 4: BÁO GIÁ TRỌN GÓI (nền sáng — dễ đọc & dễ in)
   Chủ đích: số theo hạng mục nhỏ & đều; tổng để nhẹ ở cuối.
   ========================================================= */
.quote {
  /* đường/nền cục bộ cho nền sáng */
  --q-line: rgba(6, 26, 58, 0.12);
  --q-line-soft: rgba(6, 26, 58, 0.07);
  --q-head-bg: #f4f7fc;
  --q-hover: #f6f9fe;
  --q-core: #0d9488;
  /* teal đậm — trùng nhóm Lõi ở Gantt */
  --q-dash: #7c3aed;
  /* violet — Dashboard */
  --q-ext: #db2777;
  /* hồng đậm — Mở rộng */

  background:
    radial-gradient(900px 500px at 92% -8%, #eaf0fa 0%, transparent 55%),
    var(--light);
  color: var(--ink-dark);
  padding: clamp(3.2rem, 7vw, 6rem) 0;
}

.q-head {
  max-width: 74ch;
  margin-bottom: 1.5rem;
}

.q-head h2 {
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
  margin-bottom: 0.9rem;
}

.eyebrow-q {
  color: var(--accent);
}

.q-lead {
  color: var(--muted-dark);
  font-size: 1.05rem;
}

.q-lead strong {
  color: var(--ink-dark);
}

.promo-price-was {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  width: fit-content;
}

.promo-price-was::after {
  content: "";
  position: absolute;
  left: -0.08em;
  right: -0.08em;
  top: 52%;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(194, 65, 12, 0.92), rgba(15, 118, 110, 0.76));
  transform: rotate(-4deg);
  transform-origin: center;
  pointer-events: none;
}

.q-offer {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 0 0 1.3rem;
  padding: 1.05rem 1.15rem;
  background:
    radial-gradient(320px 160px at 100% 0%, rgba(194, 65, 12, 0.12), transparent 68%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(29, 78, 216, 0.08));
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 18px;
  box-shadow: 0 18px 38px -30px rgba(6, 26, 58, 0.35);
}

.q-offer-copy {
  min-width: 0;
}

.q-offer-kicker {
  display: inline-block;
  margin-bottom: 0.38rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--q-core);
}

.q-offer-title {
  display: block;
  color: var(--ink-dark);
  font-size: 1.03rem;
  line-height: 1.4;
}

.q-offer-text {
  margin: 0.42rem 0 0;
  color: var(--muted-dark);
  font-size: 0.9rem;
  line-height: 1.55;
}

.q-offer-price {
  display: grid;
  justify-items: end;
  gap: 0.28rem;
  text-align: right;
  white-space: nowrap;
}

.q-offer-was {
  color: var(--muted-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.q-offer-now {
  color: #c2410c;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1;
  font-weight: 900;
}

.q-offer-note {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--q-core);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* ---- Dải trấn an ---- */
.q-assure {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.q-assure li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-dark);
  background: #fff;
  border: 1px solid var(--q-line);
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
}

.q-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.14);
  color: var(--q-core);
  font-size: 0.66rem;
  font-weight: 900;
  flex-shrink: 0;
}

/* ---- Bảng ---- */
.q-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid var(--q-line);
  border-radius: var(--radius);
  box-shadow: 0 24px 55px -34px rgba(6, 26, 58, 0.4);
}

.q-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.q-table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted-dark);
  padding: 0.85rem 1rem;
  background: var(--q-head-bg);
  border-bottom: 1px solid var(--q-line);
  white-space: nowrap;
}

.q-table tbody td {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--q-line-soft);
  vertical-align: middle;
  transition: background 0.18s ease;
}

.q-table tbody tr:first-child td {
  border-top: 0;
}

.q-table tbody tr:not(.q-row-bonus):hover td {
  background: var(--q-hover);
}

.q-c-no {
  width: 72px;
  text-align: center;
}

.q-c-name {
  width: 56%;
  min-width: 320px;
  white-space: normal;
}

.q-c-cost {
  text-align: right;
}

.q-c-cost,
.q-c-group {
  white-space: nowrap;
}

.q-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding-inline: 0.55rem;
  border-radius: 10px;
  background: #eef2f9;
  color: var(--muted-dark);
  font-weight: 800;
  font-size: 0.8rem;
}

.q-name {
  display: block;
  font-weight: 700;
  color: var(--ink-dark);
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: normal;
}

.q-scope {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--muted-dark);
  max-width: 54ch;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.q-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.16rem 0.62rem;
  border-radius: 999px;
  white-space: nowrap;
}

.q-tag-core {
  color: var(--q-core);
  background: rgba(13, 148, 136, 0.12);
}

.q-tag-dash {
  color: var(--q-dash);
  background: rgba(124, 58, 237, 0.12);
}

.q-tag-ext {
  color: var(--q-ext);
  background: rgba(219, 39, 119, 0.10);
}

.q-tag-bonus {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.12);
}

.q-c-cost {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-dark);
  font-size: 1.02rem;
}

.q-c-cost em {
  font-style: normal;
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--muted-dark);
  margin-left: 0.12rem;
}

.q-parent-core,
.q-child-core {
  --q-row-accent: var(--q-core);
}

.q-parent-dash,
.q-child-dash {
  --q-row-accent: var(--q-dash);
}

.q-parent-ext,
.q-child-ext {
  --q-row-accent: var(--q-ext);
}

.q-parent-row td {
  background: color-mix(in srgb, var(--q-row-accent) 4%, #fff);
}

.q-parent-row:hover td {
  background: color-mix(in srgb, var(--q-row-accent) 8%, #fff);
}

.q-parent-row .q-no {
  background: color-mix(in srgb, var(--q-row-accent) 14%, #eef2f9);
  color: color-mix(in srgb, var(--q-row-accent) 72%, var(--ink-dark));
}

.q-parent-row .q-c-name,
.q-child-row .q-c-name {
  position: relative;
}

.q-parent-row .q-c-name::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.7rem;
  bottom: 0.7rem;
  width: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--q-row-accent) 82%, #fff);
}

.q-parent-row .q-name,
.q-parent-row .q-scope {
  padding-left: 1rem;
}

.q-parent-row .q-c-group,
.q-child-row .q-c-group,
.q-row-bonus .q-c-group {
  white-space: normal;
}

.q-row-kind,
.q-child-group-ref {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted-dark);
  letter-spacing: 0.03em;
}

.q-child-row td {
  background: color-mix(in srgb, var(--q-row-accent) 2.5%, #fff);
}

.q-child-row:hover td {
  background: color-mix(in srgb, var(--q-row-accent) 5%, #fff);
}

.q-child-row .q-c-name {
  padding-left: 2.4rem;
}

.q-child-row .q-c-name::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 1px;
  background: color-mix(in srgb, var(--q-row-accent) 28%, #fff);
}

.q-child-row .q-c-name::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 1.45rem;
  width: 0.9rem;
  height: 1px;
  background: color-mix(in srgb, var(--q-row-accent) 28%, #fff);
}

.q-child-parent {
  display: block;
  margin-bottom: 0.16rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--q-row-accent) 48%, var(--muted-dark));
}

.q-no-sub {
  min-width: 46px;
  height: 26px;
  padding-inline: 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: color-mix(in srgb, var(--q-row-accent) 10%, #eef2f9);
  color: color-mix(in srgb, var(--q-row-accent) 72%, var(--ink-dark));
}

.q-scope-list {
  display: grid;
  gap: 0.34rem;
  margin-top: 0.4rem;
}

.q-scope-item {
  position: relative;
  display: block;
  padding-left: 0.95rem;
  font-size: 0.81rem;
  color: var(--muted-dark);
  line-height: 1.5;
}

.q-scope-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--q-row-accent) 72%, #fff);
}

.q-child-row .q-c-cost {
  font-size: 0.92rem;
}

/* Dòng hạng mục cha: ghi chú nhỏ thay cho giá gộp cả nhóm */
.q-cost-detail {
  display: inline-grid;
  justify-items: end;
  gap: 0.16rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--muted-dark);
}

.q-cost-detail em {
  font-style: normal;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  margin-left: 0;
  color: color-mix(in srgb, var(--q-row-accent) 58%, var(--muted-dark));
}

.q-row-bonus td {
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(194, 65, 12, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.05), rgba(255, 248, 243, 0.72));
  border-top: 1px solid rgba(15, 118, 110, 0.16);
}

.q-row-bonus:hover {
  background: transparent;
}

.q-row-bonus .q-c-cost {
  white-space: normal;
}

.q-no-bonus {
  background: rgba(15, 118, 110, 0.14);
  color: #0f766e;
  font-size: 1rem;
}

.q-cost-promo {
  display: inline-grid;
  justify-items: end;
  gap: 0.18rem;
}

.q-cost-was {
  color: var(--muted-dark);
  font-size: 1.02rem;
  font-weight: 700;
}

.q-cost-now {
  color: #c2410c;
  font-size: 1.28rem;
  line-height: 1;
  font-weight: 900;
}

.q-cost-note {
  display: block;
  margin-top: 0.18rem;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* Tổng: hiện diện nhưng nhẹ — màu muted, kèm câu trấn an & bối cảnh */
.q-total td {
  padding: 1.05rem 1rem;
  background: var(--q-head-bg);
  border-top: 2px solid var(--q-line);
}

.q-total-label {
  font-weight: 800;
  color: var(--ink-dark);
  font-size: 0.98rem;
}

.q-total-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted-dark);
}

.q-total-amt {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--muted-dark);
  line-height: 1.1;
}

.q-total-amt small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-dark);
  opacity: 0.8;
}

.q-unit {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--muted-dark);
}

.q-unit strong {
  color: var(--ink-dark);
  font-weight: 700;
}

/* ---- Ghi chú ---- */
.q-notes {
  margin-top: 1.7rem;
  background: #fff;
  border: 1px solid var(--q-line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
}

.q-notes h3 {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.q-notes ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.42rem;
  color: var(--muted-dark);
  font-size: 0.9rem;
  line-height: 1.5;
}

.q-notes li strong {
  color: var(--ink-dark);
  font-weight: 700;
}

/* ---- Responsive Block 4 ---- */
@media (max-width: 560px) {
  .q-offer {
    grid-template-columns: 1fr;
    padding: 0.95rem 1rem;
  }

  .q-offer-price {
    justify-items: start;
    text-align: left;
    white-space: normal;
  }

  .q-c-name {
    min-width: 280px;
  }

  .q-scope,
  .q-scope-item {
    font-size: 0.78rem;
  }

  .q-parent-row .q-name,
  .q-parent-row .q-scope {
    padding-left: 0.85rem;
  }

  .q-child-row .q-c-name {
    padding-left: 1.9rem;
  }

  .q-child-row .q-c-name::before,
  .q-child-row .q-c-name::after {
    left: 0.78rem;
  }

  .q-child-row .q-c-name::after {
    width: 0.7rem;
  }

  .q-child-parent,
  .q-row-kind,
  .q-child-group-ref {
    font-size: 0.66rem;
  }

  .q-c-cost {
    font-size: 0.96rem;
  }

  .q-cost-detail {
    font-size: 0.72rem;
  }

  .q-total-amt {
    font-size: 1.3rem;
  }
}

/* ---- In ấn: gọn, tiết kiệm mực, không cắt dòng ---- */
@media print {
  .quote {
    background: #fff;
    padding: 0.5rem 0;
  }

  .q-tablewrap {
    overflow: visible;
    box-shadow: none;
  }

  .q-table {
    min-width: 0;
  }

  .q-table tbody tr,
  .q-total,
  .q-notes {
    break-inside: avoid;
  }
}

/* =========================================================
   BLOCK 4.5: AMC / Bảo trì năm 2+
   Gọn, tập trung vào phí duy trì và ranh giới phạm vi.
   ========================================================= */
.amc {
  --amc-line: rgba(6, 26, 58, 0.12);
  --amc-line-soft: rgba(6, 26, 58, 0.07);
  --amc-ink-soft: #32537f;
  --amc-surface: #ffffff;
  --amc-surface-alt: #f6f9fe;
  --amc-accent: #0f766e;
  --amc-accent-2: #1d4ed8;
  --amc-price: #c2410c;
  --amc-danger: #b91c1c;

  background:
    radial-gradient(900px 500px at 88% -8%, #eef4fd 0%, transparent 58%),
    linear-gradient(180deg, #fbfdff 0%, #f5f8fd 100%);
  color: var(--ink-dark);
  padding: clamp(3.2rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--amc-line-soft);
}

.eyebrow-amc {
  color: var(--amc-accent);
}

.amc-head {
  max-width: 76ch;
  margin-bottom: 1.8rem;
}

.amc-head h2 {
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
  margin-bottom: 0.9rem;
}

.amc-lead {
  color: var(--muted-dark);
  font-size: 1.05rem;
}

.amc-lead strong {
  color: var(--ink-dark);
}

.amc-lead em {
  color: var(--amc-accent-2);
  font-style: normal;
  font-size: 0.95rem;
}

.amc-shell {
  background: var(--amc-surface);
  border: 1px solid var(--amc-line);
  border-radius: 22px;
  padding: clamp(1.1rem, 2.7vw, 1.9rem);
  box-shadow: 0 24px 55px -34px rgba(6, 26, 58, 0.32);
}

.amc-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.amc-metric {
  background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
  border: 1px solid var(--amc-line-soft);
  border-radius: 16px;
  padding: 1rem 1rem 1.05rem;
}

.amc-metric-strong {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(29, 78, 216, 0.08));
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: 0 14px 28px -26px rgba(15, 118, 110, 0.45);
}

.amc-metric-k {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--amc-ink-soft);
}

.amc-metric-v {
  display: block;
  margin-top: 0.38rem;
  font-size: clamp(1.08rem, 2vw, 1.4rem);
  line-height: 1.15;
  color: var(--ink-dark);
}

.amc-metric-was {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

.amc-metric-v-free {
  color: var(--amc-price);
}

.amc-metric-sub {
  margin: 0.45rem 0 0;
  color: var(--muted-dark);
  font-size: 0.88rem;
  line-height: 1.5;
}

.amc-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.amc-panel,
.amc-pricecard {
  background: var(--amc-surface-alt);
  border: 1px solid var(--amc-line-soft);
  border-radius: 18px;
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.amc-panel-head {
  margin-bottom: 0.9rem;
}

.amc-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amc-accent);
  margin-bottom: 0.35rem;
}

.amc-panel-head h3,
.amc-detail-card h4 {
  margin: 0;
}

.amc-panel-head h3 {
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--ink-dark);
}

.amc-pillgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  flex: 1;
  align-content: start;
}

.amc-pillcard {
  background: #fff;
  border: 1px solid var(--amc-line-soft);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  box-shadow: 0 14px 28px -26px rgba(6, 26, 58, 0.45);
}

.amc-pillcard h4 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--ink-dark);
}

.amc-pillcard p {
  margin: 0;
  color: var(--muted-dark);
  font-size: 0.86rem;
  line-height: 1.5;
}

.amc-pricecard {
  background:
    radial-gradient(460px 220px at 100% 0%, rgba(194, 65, 12, 0.12), transparent 68%),
    linear-gradient(180deg, #fff 0%, #fff8f3 100%);
}

.amc-offer {
  margin-bottom: 0.95rem;
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(194, 65, 12, 0.16);
  box-shadow: 0 14px 30px -28px rgba(194, 65, 12, 0.45);
}

.amc-offer-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.66rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--amc-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.amc-offer-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.8rem;
  margin-top: 0.7rem;
}

.amc-offer-was {
  color: var(--muted-dark);
  font-size: 0.95rem;
  font-weight: 700;
}

.amc-offer-now {
  color: var(--amc-price);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1;
  font-weight: 900;
}

.amc-offer-copy {
  margin: 0.55rem 0 0;
  color: var(--muted-dark);
  font-size: 0.88rem;
  line-height: 1.52;
}

.amc-price-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--ink-dark);
}

.amc-price-copy {
  margin: 0.7rem 0 0.9rem;
  color: var(--muted-dark);
  font-size: 0.9rem;
  line-height: 1.55;
}

.amc-price-copy strong {
  color: var(--ink-dark);
}

.amc-mini {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.48rem;
  color: var(--muted-dark);
  font-size: 0.84rem;
  line-height: 1.48;
}

.amc-pricecard .amc-mini {
  margin-top: auto;
}

.amc-mini li::marker,
.amc-detail-card li::marker {
  color: var(--amc-accent);
}

.amc-disclosures {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.amc-detail {
  background: #fff;
  border: 1px solid var(--amc-line-soft);
  border-radius: 16px;
  overflow: hidden;
}

.amc-detail summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1rem 3.2rem 1rem 1.05rem;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink-dark);
}

.amc-detail summary::-webkit-details-marker {
  display: none;
}

.amc-detail summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.1);
  color: var(--amc-accent);
  font-size: 1.1rem;
  font-weight: 600;
}

.amc-detail[open] summary {
  background: var(--amc-surface-alt);
  border-bottom: 1px solid var(--amc-line-soft);
}

.amc-detail[open] summary::after {
  content: "−";
}

.amc-detail-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  padding: 1rem 1.05rem 1.05rem;
}

.amc-detail-body-full {
  grid-template-columns: 1fr;
}

.amc-detail-card {
  background: var(--amc-surface-alt);
  border: 1px solid var(--amc-line-soft);
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.amc-detail-card h4 {
  font-size: 0.92rem;
  color: var(--ink-dark);
  margin-bottom: 0.55rem;
}

.amc-detail-card ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.42rem;
  color: var(--muted-dark);
  font-size: 0.84rem;
  line-height: 1.5;
}

.amc-detail-card-alert {
  border-left: 3px solid rgba(185, 28, 28, 0.45);
  background: linear-gradient(180deg, #fff8f8 0%, #fff 100%);
}

.amc-detail-card-alert h4 {
  color: var(--amc-danger);
}

/* ---- Responsive Block 4.5 ---- */
@media (max-width: 980px) {
  .amc-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .amc-overview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .amc-metrics,
  .amc-pillgrid,
  .amc-detail-body {
    grid-template-columns: 1fr;
  }

  .amc-shell {
    padding: 1rem;
    border-radius: 18px;
  }

  .amc-panel,
  .amc-pricecard,
  .amc-metric,
  .amc-detail summary,
  .amc-detail-card {
    border-radius: 14px;
  }

  .amc-detail summary {
    padding-right: 3rem;
  }
}

/* ---- In ấn Block 4.5 ---- */
@media print {
  .amc {
    background: #fff;
    padding: 0.5rem 0;
  }

  .amc-shell {
    box-shadow: none;
  }

  .amc-detail {
    break-inside: avoid;
  }
}

/* =========================================================
   Block 5 — Lộ trình triển khai & thanh toán
   ========================================================= */
.roadmap {
  --rp-line: rgba(6, 26, 58, 0.12);
  --rp-line-soft: rgba(6, 26, 58, 0.07);
  --rp-core: #0d9488;
  --rp-rest: #db2777;
  --rp-hold: #94a3b8;
  --rp-accent: #1d4ed8;
  --rp-head-bg: #f4f7fc;

  background:
    radial-gradient(900px 500px at 8% -8%, #eaf0fa 0%, transparent 55%),
    var(--light);
  color: var(--ink-dark);
  padding: clamp(3.2rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--rp-line-soft);
}

.eyebrow-rp {
  color: var(--rp-accent);
}

.rp-head {
  max-width: 76ch;
  margin-bottom: 1.8rem;
}

.rp-head h2 {
  font-size: clamp(1.6rem, 3.3vw, 2.5rem);
  margin-bottom: 0.9rem;
}

.rp-lead {
  color: var(--muted-dark);
  font-size: 1.05rem;
}

.rp-lead strong {
  color: var(--ink-dark);
}

.rp-lead em {
  color: var(--rp-accent);
  font-style: normal;
  font-size: 0.95rem;
}

/* ---- Khung timeline ---- */
.rp-flow {
  background: #fff;
  border: 1px solid var(--rp-line);
  border-radius: var(--radius);
  box-shadow: 0 24px 55px -34px rgba(6, 26, 58, 0.4);
  padding: clamp(1.1rem, 2.6vw, 1.9rem);
}

/* Dải 2 chặng */
.rp-phases {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0.55rem;
  margin-bottom: 2rem;
}

.rp-phase {
  border-radius: 10px;
  padding: 0.7rem 0.95rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.rp-phase-core {
  background: linear-gradient(100deg, #0d9488, #0ea5a0);
}

.rp-phase-rest {
  background: linear-gradient(100deg, #db2777, #e0559a);
}

.rp-phase-k {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.92;
}

.rp-phase-t {
  font-size: 0.92rem;
  font-weight: 700;
}

.rp-phase-a {
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}

/* Các mốc thanh toán */
.rp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 0.9rem;
}

.rp-step {
  display: grid;
  grid-template-rows: 40px auto;
}

.rp-step-rail {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-step-rail::before,
.rp-step-rail::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: #dbe3ef;
}

.rp-step-rail::before {
  left: 0;
  right: 50%;
}

.rp-step-rail::after {
  left: 50%;
  right: 0;
}

.rp-step:first-child .rp-step-rail::before,
.rp-step:last-child .rp-step-rail::after {
  display: none;
}

/* màu từng đoạn nối theo chặng */
.rp-step:nth-child(1) .rp-step-rail::after {
  background: var(--rp-core);
}

.rp-step:nth-child(2) .rp-step-rail::before {
  background: var(--rp-core);
}

.rp-step:nth-child(2) .rp-step-rail::after {
  background: var(--rp-rest);
}

.rp-step:nth-child(3) .rp-step-rail::before {
  background: var(--rp-rest);
}

.rp-step:nth-child(3) .rp-step-rail::after {
  background: var(--rp-hold);
}

.rp-step:nth-child(4) .rp-step-rail::before {
  background: var(--rp-hold);
}

.rp-step-dot {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--rp-hold);
  box-shadow: 0 0 0 4px #fff;
}

.rp-step:nth-child(1) .rp-step-dot {
  border-color: var(--rp-core);
}

.rp-step:nth-child(2) .rp-step-dot {
  border-color: var(--rp-core);
  background: var(--rp-core);
}

.rp-step:nth-child(3) .rp-step-dot {
  border-color: var(--rp-rest);
  background: var(--rp-rest);
}

.rp-step:nth-child(4) .rp-step-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.rp-step-body {
  margin-top: 0.85rem;
  height: 100%;
  background: #fbfcfe;
  border: 1px solid var(--rp-line-soft);
  border-radius: 12px;
  padding: 0.9rem 0.95rem;
}

.rp-step-when {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

.rp-step-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.52rem;
  border-radius: 999px;
  margin: 0.32rem 0.3rem 0 0;
}

.rp-tag-core {
  color: var(--rp-core);
  background: rgba(13, 148, 136, 0.12);
}

.rp-tag-rest {
  color: var(--rp-rest);
  background: rgba(219, 39, 119, 0.10);
}

.rp-tag-hold {
  color: var(--accent);
  background: rgba(194, 65, 12, 0.10);
}

.rp-step-title {
  margin: 0.5rem 0 0.6rem;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--ink-dark);
}

.rp-pays {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.rp-pay {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.1rem 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--rp-line-soft);
}

.rp-pay:first-child {
  border-top: 0;
  padding-top: 0;
}

.rp-pay-lb {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-dark);
}

.rp-pay-amt {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rp-pay-sub {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  color: var(--muted-dark);
}

.rp-pay-sum .rp-pay-lb {
  font-weight: 800;
  color: var(--ink-dark);
}

.rp-pay-sum .rp-pay-amt {
  color: var(--rp-rest);
}

/* ---- Giá từng phần theo chặng ---- */
.rp-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.4rem;
}

.rp-group {
  background: #fff;
  border: 1px solid var(--rp-line);
  border-top: 3px solid var(--rp-core);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.rp-group-rest {
  border-top-color: var(--rp-rest);
}

.rp-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.rp-group-k {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rp-core);
}

.rp-group-rest .rp-group-k {
  color: var(--rp-rest);
}

.rp-group-tot {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rp-parts {
  list-style: none;
  margin: 0 0 0.7rem;
  padding: 0;
}

.rp-parts li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--rp-line-soft);
  font-size: 0.9rem;
}

.rp-parts li:first-child {
  border-top: 0;
}

.rp-part-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2f9;
  color: var(--muted-dark);
  font-weight: 800;
  font-size: 0.72rem;
}

.rp-part-name {
  color: var(--ink-dark);
  font-weight: 600;
}

.rp-part-cost {
  font-weight: 700;
  color: var(--ink-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rp-group-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.7rem;
  border-top: 2px solid var(--rp-line);
  font-size: 0.82rem;
  color: var(--muted-dark);
}

.rp-group-foot strong {
  font-size: 1.02rem;
  color: var(--ink-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---- Bảng lịch thanh toán ---- */
.rp-tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid var(--rp-line);
  border-radius: var(--radius);
  box-shadow: 0 24px 55px -34px rgba(6, 26, 58, 0.4);
  margin-top: 1.4rem;
}

.rp-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.rp-table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted-dark);
  padding: 0.85rem 1rem;
  background: var(--rp-head-bg);
  border-bottom: 1px solid var(--rp-line);
  white-space: nowrap;
}

.rp-table tbody td {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--rp-line-soft);
  vertical-align: middle;
}

.rp-table tbody tr:first-child td {
  border-top: 0;
}

.rp-table td:first-child {
  font-weight: 800;
  color: var(--ink-dark);
  white-space: nowrap;
}

.rp-c-amt,
.rp-c-cum {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rp-c-amt {
  font-weight: 800;
  color: var(--ink-dark);
}

.rp-c-cum {
  color: var(--muted-dark);
  font-weight: 600;
}

.rp-r-t8 td {
  background: rgba(29, 78, 216, 0.045);
}

.rp-r-hold td {
  background: rgba(194, 65, 12, 0.05);
}

.rp-r-hold td:first-child {
  color: var(--accent);
}

.rp-total td {
  padding: 1.05rem 1rem;
  background: var(--rp-head-bg);
  border-top: 2px solid var(--rp-line);
}

.rp-total-label {
  font-weight: 800;
  color: var(--ink-dark);
  font-size: 0.98rem;
}

.rp-total-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted-dark);
}

.rp-total-amt {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink-dark);
  line-height: 1.1;
}

.rp-total-amt small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-dark);
}

/* ---- Ghi chú ---- */
.rp-notes {
  margin-top: 1.6rem;
  background: #fff;
  border: 1px solid var(--rp-line);
  border-left: 3px solid var(--rp-accent);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
}

.rp-notes h3 {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rp-accent);
}

.rp-notes ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.42rem;
  color: var(--muted-dark);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rp-notes li strong {
  color: var(--ink-dark);
  font-weight: 700;
}

/* ---- Responsive Block 5 ---- */
@media (max-width: 720px) {
  .rp-phases {
    grid-template-columns: 1fr;
  }

  .rp-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rp-step {
    grid-template-rows: none;
    grid-template-columns: 34px 1fr;
    column-gap: 0.7rem;
  }

  .rp-step-rail {
    grid-row: 1 / -1;
  }

  .rp-step-rail::before,
  .rp-step-rail::after {
    top: auto;
    bottom: auto;
    left: 50%;
    right: auto;
    width: 3px;
    height: 50%;
    transform: translateX(-50%);
  }

  .rp-step-rail::before {
    top: 0;
  }

  .rp-step-rail::after {
    bottom: 0;
  }

  .rp-step-body {
    margin-top: 0;
    margin-bottom: 1.1rem;
  }

  .rp-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .rp-total-amt {
    font-size: 1.2rem;
  }
}

/* ---- In ấn Block 5 ---- */
@media print {
  .roadmap {
    background: #fff;
    padding: 0.5rem 0;
  }

  .rp-flow,
  .rp-tablewrap {
    box-shadow: none;
  }

  .rp-tablewrap {
    overflow: visible;
  }

  .rp-table {
    min-width: 0;
  }

  .rp-step,
  .rp-group,
  .rp-table tbody tr,
  .rp-total,
  .rp-notes {
    break-inside: avoid;
  }
}
