/* ==========================================================================
   AQS PRO — Precision Engineering & Modern SaaS Stylesheet
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-soft: rgba(2, 132, 199, 0.1);
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.12);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.12);

  --grid-line: rgba(15, 23, 42, 0.045);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px -8px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 24px 54px -14px rgba(15, 23, 42, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --nav-bg: rgba(248, 250, 252, 0.84);
}

[data-theme="dark"] {
  --bg: #080f1d;
  --bg-alt: #0d1629;
  --surface: #111c33;
  --surface-2: #162340;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-soft: #7c8ea8;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);

  --primary: #38bdf8;
  --primary-dark: #0ea5e9;
  --primary-soft: rgba(56, 189, 248, 0.14);
  --accent: #fb923c;
  --accent-soft: rgba(251, 146, 60, 0.15);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);

  --grid-line: rgba(56, 189, 248, 0.06);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 14px 36px -8px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 60px -12px rgba(0, 0, 0, 0.65);
  --nav-bg: rgba(8, 15, 29, 0.82);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.font-mono, code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

code {
  font-size: 0.86em;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.container {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  padding: 2px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-pro {
  background: linear-gradient(135deg, #0284c7, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub { font-size: 0.68rem; color: var(--text-soft); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn svg { width: 19px; height: 19px; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 9px;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }

.btn-sm { padding: 9px 16px; font-size: 0.87rem; }
.btn-lg { padding: 14px 24px; font-size: 0.98rem; }
.btn-block { width: 100%; padding: 13px 20px; font-size: 0.95rem; }

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(2, 132, 199, 0.55);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -6px rgba(37, 99, 235, 0.65);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  border-bottom: 1px solid var(--border);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 50%, transparent 100%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
  pointer-events: none;
}
.hero-glow-1 { top: -180px; left: -100px; background: #0ea5e9; }
.hero-glow-2 { bottom: -200px; right: -120px; background: #f97316; opacity: 0.14; }

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22);
  flex-shrink: 0;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 3.8vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.text-gradient {
  background: linear-gradient(125deg, #0284c7 0%, #2563eb 52%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 0 0 30px;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 22px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.metric-value {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.metric-label { font-size: 0.78rem; color: var(--text-soft); font-weight: 600; }
.metric-divider { width: 1px; height: 32px; background: var(--border); }

/* CAD Viewport Mockup */
.cad-window {
  background: #0b1220;
  color: #e2e8f0;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(56, 189, 248, 0.14);
  overflow: hidden;
}

.cad-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: #111b2e;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  gap: 10px;
}

.cad-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.cad-filename { font-size: 0.74rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cad-status {
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

.cad-ribbon {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  background: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  overflow-x: auto;
}

.ribbon-tab {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 7px;
  white-space: nowrap;
}
.ribbon-tab.active {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.32);
}

.cad-viewport {
  padding: 14px 16px 12px;
  background:
    radial-gradient(circle at 50% 35%, rgba(14, 165, 233, 0.12), transparent 65%),
    #09101d;
}

.cad-canvas {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.55);
  padding: 6px;
  margin-bottom: 12px;
}

.iso-svg { width: 100%; height: auto; }

.cad-excel-bar {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  overflow: hidden;
}

.excel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: rgba(16, 185, 129, 0.12);
  border-bottom: 1px solid rgba(16, 185, 129, 0.22);
}
.excel-tag { font-size: 0.7rem; font-weight: 700; color: #34d399; }
.excel-meta { font-size: 0.68rem; color: #94a3b8; }

.excel-grid { font-size: 0.73rem; }
.ex-row {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 0.9fr 0.95fr;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
}
.ex-row:last-child { border-bottom: 0; }
.ex-header { background: rgba(255, 255, 255, 0.03); color: #94a3b8; font-weight: 600; font-size: 0.69rem; }
.val-ok { color: #38bdf8; font-weight: 700; }
.val-accent { color: #fb923c; font-weight: 700; }

.cad-cmdline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #060b14;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.74rem;
  overflow: hidden;
}
.cmd-prompt { color: #64748b; flex-shrink: 0; }
.cmd-typing { color: #38bdf8; font-weight: 700; }
.cmd-cursor {
  width: 7px;
  height: 14px;
  background: #38bdf8;
  animation: blink 1s steps(2) infinite;
}
.cmd-hint { color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   SECTIONS COMMON
   ========================================================================== */
.section { padding: 88px 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 52px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.section-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ==========================================================================
   PILLARS GRID
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.pillar-icon svg { width: 24px; height: 24px; }
.pillar-icon.blue { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.pillar-icon.emerald { background: rgba(5, 150, 105, 0.12); color: #059669; }
.pillar-icon.orange { background: rgba(249, 115, 22, 0.12); color: #ea580c; }
.pillar-icon.violet { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.pillar-icon.cyan { background: rgba(6, 182, 212, 0.12); color: #0891b2; }
.pillar-icon.rose { background: rgba(225, 29, 72, 0.12); color: #e11d48; }

.pillar-card h3 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; }
.pillar-card p { margin: 0; font-size: 0.93rem; color: var(--text-muted); }

/* ==========================================================================
   COMMANDS CATALOG
   ========================================================================== */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.pill {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 6px 16px -6px rgba(2, 132, 199, 0.65);
}

.search-box {
  position: relative;
  width: min(360px, 100%);
}
.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-soft);
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.catalog-status {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-bottom: 18px;
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cmd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.cmd-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.cmd-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cmd-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 8px;
}

.cmd-cat-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-soft);
}

.cmd-card h4 { margin: 0; font-size: 0.98rem; font-weight: 700; }
.cmd-card p { margin: 0; font-size: 0.86rem; color: var(--text-muted); line-height: 1.55; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 42px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  color: var(--text-muted);
}

/* ==========================================================================
   PRICING & CALCULATOR
   ========================================================================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  max-width: 960px;
  margin: 0 auto 40px;
}

.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.plan-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
}

.featured-ribbon {
  position: absolute;
  top: -13px;
  left: 32px;
  background: linear-gradient(135deg, #0284c7, #f97316);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.plan-name { font-size: 1.3rem; font-weight: 800; }
.plan-tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-muted);
}
.plan-tag.accent { background: var(--accent-soft); color: var(--accent); }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.price-num { font-size: 2.35rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.price-num small { font-size: 1.25rem; }
.price-unit { font-size: 0.9rem; color: var(--text-soft); font-weight: 600; }

.plan-desc { margin: 0 0 22px; font-size: 0.93rem; color: var(--text-muted); }

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}
.plan-list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.plan-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* Bậc ưu đãi theo nhóm */
.discount-ladder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 34px;
  box-shadow: var(--shadow-sm);
}

.ladder-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 20px;
}
.ladder-header h3 { margin: 0; font-size: 1.18rem; font-weight: 800; }
.ladder-header p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.ladder-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.ladder-step {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ladder-step:hover { border-color: var(--primary); transform: translateY(-2px); }
.ladder-step.active {
  background: var(--primary-soft);
  border: 2px solid var(--primary);
  box-shadow: 0 10px 22px -10px rgba(2, 132, 199, 0.5);
}
.ladder-step.included {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.tier-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.tier-qty { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.tier-pct { font-size: 1.45rem; font-weight: 800; color: var(--primary); }
.ladder-step.best .tier-pct { color: var(--accent); }
.tier-price { font-size: 0.77rem; font-weight: 600; color: var(--text-muted); }
.tier-note { font-size: 0.72rem; color: var(--text-soft); }

/* Calculator Box */
.calculator-box {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-md);
}

.calc-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 11px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.calc-left h3 { margin: 0 0 24px; font-size: 1.38rem; font-weight: 800; }

.calc-group { margin-bottom: 24px; }
.calc-group:last-child { margin-bottom: 0; }
.calc-label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 10px; }

.calc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.calc-label-row .calc-label { margin-bottom: 0; }

.seg-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-alt);
  padding: 5px;
  border-radius: 13px;
  border: 1px solid var(--border);
}

.seg-btn {
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s;
}
.seg-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.qty-stepper button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
}
.qty-stepper button:hover { background: var(--primary-soft); color: var(--primary); }
.qty-stepper input {
  width: 54px;
  height: 36px;
  border: 0;
  border-inline: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: center;
  font-size: 0.98rem;
  font-weight: 800;
  outline: none;
}

.range-slider {
  width: 100%;
  accent-color: var(--primary);
  height: 7px;
  cursor: pointer;
  margin: 6px 0 16px;
}

.quick-qty {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qq-btn {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.18s;
}
.qq-btn:hover { border-color: var(--primary); color: var(--primary); }
.qq-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.summary-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.05rem;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.discount-chip {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--success);
  background: var(--success-soft);
  padding: 4px 11px;
  border-radius: 999px;
}
.discount-chip.none {
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
}

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 18px;
}
.sum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.sum-row strong { color: var(--text); text-align: right; }
.text-strike { text-decoration: line-through; color: var(--text-soft); }

.calc-breakdown {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bd-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin-bottom: 2px;
}
.bd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.bd-row strong { color: var(--text); }
.bd-pct {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  padding: 1px 6px;
  border-radius: 5px;
  margin-left: 4px;
}
.bd-pct.zero {
  color: var(--text-soft);
  background: var(--bg-alt);
}

.summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 14px;
  margin-bottom: 18px;
}
.total-label { font-size: 0.82rem; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.total-save { font-size: 0.84rem; font-weight: 700; color: var(--success); }
.total-amount { font-size: 1.7rem; font-weight: 800; color: var(--primary); white-space: nowrap; }

.summary-actions { display: flex; flex-direction: column; gap: 10px; }
.summary-footnote { margin: 12px 0 0; font-size: 0.78rem; color: var(--text-soft); line-height: 1.5; }

/* ==========================================================================
   LICENSING COMPARISON & STEPS
   ========================================================================== */
.license-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.license-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.license-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.license-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.license-icon svg { width: 26px; height: 26px; }
.license-icon.code { background: rgba(2, 132, 199, 0.13); color: #0284c7; }
.license-icon.usb { background: rgba(249, 115, 22, 0.14); color: #ea580c; }

.license-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.06em;
}
.license-header h3 { margin: 2px 0 0; font-size: 1.18rem; font-weight: 800; }
.license-desc { margin: 0 0 18px; color: var(--text-muted); font-size: 0.94rem; }

.license-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.license-features li {
  position: relative;
  padding-left: 22px;
  font-size: 0.91rem;
  color: var(--text-muted);
}
.license-features li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1.3;
}

.steps-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}
.step-num {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.step-item h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; }
.step-item p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.step-arrow { font-size: 1.4rem; font-weight: 700; color: var(--border-strong); }

/* ==========================================================================
   AUTHOR & CONTACT
   ========================================================================== */
.author-layout {
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  gap: 28px;
  align-items: stretch;
}

.author-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.author-avatar-wrap {
  position: relative;
  margin-bottom: 22px;
}

.avatar-ring {
  width: 210px;
  height: 210px;
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #38bdf8, #f97316);
  box-shadow: 0 18px 40px -12px rgba(2, 132, 199, 0.45);
}

.author-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 4px solid var(--surface);
}

.verified-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.verified-badge svg { width: 14px; height: 14px; }

.author-name { margin: 8px 0 4px; font-size: 1.55rem; font-weight: 800; }
.author-role { margin: 0 0 16px; font-size: 0.94rem; font-weight: 600; color: var(--primary); }
.author-bio { margin: 0 0 22px; font-size: 0.93rem; color: var(--text-muted); line-height: 1.7; }

.author-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.author-tags span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}

.contact-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.contact-item:hover { border-color: var(--primary); }

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.contact-icon img { width: 28px; height: 28px; object-fit: contain; }
.contact-icon svg { width: 22px; height: 22px; }
.zalo-bg { background: rgba(0, 104, 255, 0.1); }
.mail-bg { background: rgba(234, 88, 12, 0.12); color: #ea580c; }
.tele-bg { background: rgba(34, 158, 217, 0.12); }
.group-bg { background: rgba(16, 185, 129, 0.12); color: #059669; }

.contact-body { flex: 1; min-width: 0; }
.contact-label { display: block; font-size: 0.76rem; color: var(--text-soft); font-weight: 600; }
.contact-value {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}
.contact-value:hover { color: var(--primary); }

.contact-btns { display: flex; gap: 7px; flex-shrink: 0; }

.mini-btn {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.18s;
}
.mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.mini-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.mini-btn.primary:hover { background: var(--primary-dark); color: #fff; }

.group-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.group-chip {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 12px;
  border-radius: 8px;
  transition: background-color 0.2s;
}
.group-chip:hover { background: var(--primary); color: #fff; }

.contact-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: 16px;
  padding: 18px 20px;
}
.contact-cta-box strong {
  display: block;
  font-size: 0.96rem;
  color: var(--text);
  margin-bottom: 4px;
}
.contact-cta-box p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.contact-cta-box .btn { padding: 11px 18px; font-size: 0.9rem; flex-shrink: 0; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-container { max-width: 860px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.faq-item summary {
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 12px 0 0; color: var(--text-muted); font-size: 0.93rem; }

/* ==========================================================================
   FOOTER, FLOATING BUTTON, MODAL & TOAST
   ========================================================================== */
.footer {
  padding: 34px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.footer-title { font-weight: 800; font-size: 0.96rem; }
.footer-sub { font-size: 0.82rem; color: var(--text-soft); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.84rem; color: var(--text-muted); }
.footer-meta a:hover { color: var(--primary); }

.floating-zalo {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, #0068ff, #0284c7);
  color: #fff;
  padding: 10px 16px 10px 11px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 12px 28px -6px rgba(0, 104, 255, 0.55);
  transition: transform 0.2s;
}
.floating-zalo:hover { transform: translateY(-3px); }
.floating-zalo img { width: 28px; height: 28px; border-radius: 50%; background: #fff; padding: 2px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 24px);
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  z-index: 250;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-layout,
  .calculator-box,
  .author-layout { grid-template-columns: 1fr; }
  .pillars-grid,
  .commands-grid { grid-template-columns: repeat(2, 1fr); }
  .ladder-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-strip { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: 74px 0 auto 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 16px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 48px 0 64px; }
  .section { padding: 64px 0; }
  .pillars-grid,
  .commands-grid,
  .plans-grid,
  .license-grid { grid-template-columns: 1fr; }
  .contact-cta-box { flex-direction: column; align-items: stretch; text-align: left; }
  .ladder-grid { grid-template-columns: repeat(2, 1fr); }
  .calculator-box { padding: 22px; }
  .contact-item { flex-wrap: wrap; }
  .contact-btns { width: 100%; justify-content: flex-end; }
  .floating-zalo span { display: none; }
  .floating-zalo { padding: 10px; }
}
