/* ═══════════════════════════════════════════════════════════════════════════
   MilkWave — Main Stylesheet
   CowHub Tecnologia Ltda (MilkSat)
   Dark theme — Design System
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ───────────────────────────────────────────────────────── */
:root {
  --blue: #1d4ed8;
  --blue2: #3b82f6;
  --blue3: #60a5fa;
  --cyan: #06b6d4;
  --cyan2: #22d3ee;
  --cyan3: #67e8f9;
  --green: #10b981;
  --green2: #34d399;
  --amber: #f59e0b;
  --amber2: #fbbf24;
  --red: #ef4444;
  --red2: #f87171;
  --purple: #8b5cf6;
  --purple2: #a78bfa;
  --bg: #060d18;
  --bg2: #0c1929;
  --bg3: #0f2040;
  --bg4: #142850;
  --bg5: #1a3260;
  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --text4: #475569;
  --border: rgba(59, 130, 246, 0.15);
  --border2: rgba(255, 255, 255, 0.06);
  --border3: rgba(59, 130, 246, 0.3);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow2: 0 8px 40px rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --radius2: 8px;
  --radius3: 6px;
  --transition: 0.25s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --nav-h: 64px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue2);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--cyan2);
}

ul, ol {
  list-style: none;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

p {
  color: var(--text2);
  line-height: 1.7;
}

strong {
  color: var(--text);
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid var(--border2);
  margin: 1.5rem 0;
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: var(--bg4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--blue);
}

/* ── Typography ──────────────────────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--blue2) 0%, var(--cyan2) 50%, var(--blue3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.label-sm {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* ── Layout Utilities ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-lg {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.text-center { text-align: center; }
.text-left { text-align: left; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(6, 13, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.navbar-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-user-info {
  text-align: right;
}

.navbar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.navbar-user-email {
  font-size: 11px;
  color: var(--text3);
}

.navbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ── Hero Section ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(29, 78, 216, 0.25) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
              var(--bg);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(29, 78, 216, 0.15);
  border: 1px solid var(--border3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan2);
  margin-bottom: 24px;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text2);
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  animation: floatOrb linear infinite;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--blue) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation-duration: 20s;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
  bottom: 0;
  right: -50px;
  animation-duration: 25s;
  animation-delay: -10s;
}

.hero-orb-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  top: 40%;
  right: 10%;
  animation-duration: 30s;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% { transform: translate(0px, 0px) scale(1); }
  25% { transform: translate(20px, -30px) scale(1.05); }
  50% { transform: translate(-10px, 20px) scale(0.95); }
  75% { transform: translate(-25px, -10px) scale(1.02); }
  100% { transform: translate(0px, 0px) scale(1); }
}

/* ── Floating Metric Badges ──────────────────────────────────────────────── */
.metric-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(12, 25, 41, 0.9);
  border: 1px solid var(--border3);
  border-radius: var(--radius);
  padding: 12px 20px;
  backdrop-filter: blur(12px);
  animation: floatBadge 4s ease-in-out infinite;
  text-decoration: none;
}

.metric-badge:nth-child(2) { animation-delay: -1s; }
.metric-badge:nth-child(3) { animation-delay: -2s; }
.metric-badge:nth-child(4) { animation-delay: -3s; }

@keyframes floatBadge {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.metric-badge-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--cyan2);
  line-height: 1;
}

.metric-badge-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Section Headings ────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan2);
  margin-bottom: 12px;
}

.section-tag::before,
.section-tag::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--cyan2);
  opacity: 0.5;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 16px;
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(29, 78, 216, 0.2);
  border-color: var(--border3);
}

.card-glass {
  background: rgba(12, 25, 41, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(29, 78, 216, 0.15);
}

.card-glow {
  position: relative;
  overflow: hidden;
}

.card-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  opacity: 0;
  transition: opacity var(--transition);
}

.card-glow:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.card-icon-blue {
  background: rgba(29, 78, 216, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue2);
}

.card-icon-cyan {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--cyan2);
}

.card-icon-green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--green2);
}

.card-icon-amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber2);
}

.card-icon-purple {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--purple2);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.card-text {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}

.btn:hover::after {
  background: rgba(255,255,255,0.05);
}

.btn:active {
  transform: scale(0.97);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 15px;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue2) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.5);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border3);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--blue2);
  color: var(--blue2);
  background: rgba(59, 130, 246, 0.08);
}

.btn-cyan {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan2) 100%);
  color: var(--bg);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
}

.btn-cyan:hover {
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
  color: var(--bg);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text2);
  border: 1px solid var(--border2);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  border-color: var(--border);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--red);
  color: var(--red2);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-loading {
  pointer-events: none;
}

.btn-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Badges / Pills ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-blue {
  background: rgba(29, 78, 216, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue3);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--cyan2);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--green2);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber2);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red2);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--purple2);
}

/* ── Pill Tags ───────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: var(--bg3);
}

thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border2);
  transition: background var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

tbody td {
  padding: 14px 16px;
  color: var(--text2);
  vertical-align: middle;
}

tbody td strong {
  color: var(--text);
}

.table-highlight {
  background: rgba(6, 182, 212, 0.06) !important;
}

.table-highlight td {
  color: var(--text) !important;
  font-weight: 600;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}

.form-label span.req {
  color: var(--red2);
  margin-left: 3px;
}

.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder {
  color: var(--text4);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-error {
  font-size: 12px;
  color: var(--red2);
  display: none;
}

.form-error.visible {
  display: block;
}

.form-hint {
  font-size: 12px;
  color: var(--text3);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border3);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.25s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-lg {
  max-width: 900px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 0;
  gap: 16px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg4);
  color: var(--text);
}

.modal-body {
  padding: 20px 28px 28px;
}

.modal-footer {
  padding: 0 28px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Stepper ─────────────────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
  position: relative;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step-item.completed:not(:last-child)::after {
  background: linear-gradient(90deg, var(--blue2), var(--cyan2));
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--bg3);
  color: var(--text3);
  transition: all 0.3s ease;
  z-index: 1;
}

.step-item.active .step-circle {
  border-color: var(--blue2);
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue2);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.step-item.completed .step-circle {
  border-color: var(--cyan2);
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan2);
}

.step-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
}

.step-item.active .step-label {
  color: var(--text2);
  font-weight: 600;
}

.step-item.completed .step-label {
  color: var(--cyan2);
}

.step-content {
  display: none;
  animation: fadeUp 0.3s ease;
}

.step-content.active {
  display: block;
}

/* ── Right Nav Dots ──────────────────────────────────────────────────────── */
.nav-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg4);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.nav-dot:hover,
.nav-dot.active {
  background: var(--blue2);
  border-color: var(--blue2);
  transform: scale(1.4);
}

.nav-dot-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-dot:hover .nav-dot-tooltip {
  opacity: 1;
}

/* ── Business Plan Sections ──────────────────────────────────────────────── */
.bp-section {
  padding: 72px 0;
  scroll-margin-top: var(--nav-h);
}

.bp-cover {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--nav-h) 24px 60px;
  background: radial-gradient(ellipse 70% 50% at 50% 10%, rgba(29, 78, 216, 0.2) 0%, transparent 60%),
              var(--bg);
  position: relative;
  overflow: hidden;
}

.bp-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
}

.bp-cover-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.bp-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red2);
  margin-bottom: 24px;
}

.bp-title {
  font-size: clamp(60px, 10vw, 110px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 20px;
}

.bp-subtitle {
  font-size: clamp(16px, 2vw, 21px);
  color: var(--text2);
  margin-bottom: 16px;
  font-weight: 400;
}

.bp-company {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 48px;
}

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

.kpi-card {
  background: rgba(12, 25, 41, 0.7);
  border: 1px solid var(--border3);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
  text-align: center;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan2);
  line-height: 1;
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.kpi-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
}

/* ── Problems & Solutions expandable cards ───────────────────────────────── */
.problem-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.problem-card:hover {
  border-color: var(--border3);
}

.problem-card-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.problem-card-header:hover {
  background: rgba(59, 130, 246, 0.04);
}

.problem-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.problem-chevron {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.problem-card.open .problem-chevron {
  transform: rotate(180deg);
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue2);
}

.problem-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.problem-card.open .problem-card-body {
  max-height: 400px;
}

.problem-card-inner {
  padding: 0 24px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.problem-block {
  padding: 16px;
  border-radius: var(--radius2);
}

.problem-block-red {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.problem-block-green {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.problem-block-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.problem-block-label-red { color: var(--red2); }
.problem-block-label-green { color: var(--green2); }

.problem-block-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}

/* ── Architecture Layers ─────────────────────────────────────────────────── */
.arch-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin: 40px 0;
}

.arch-layer {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 28px 20px;
  text-align: center;
  position: relative;
  transition: background var(--transition);
}

.arch-layer:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.arch-layer:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.arch-layer:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--blue2);
  z-index: 2;
  background: var(--bg2);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border3);
}

.arch-layer:hover {
  background: var(--bg3);
  border-color: var(--border3);
  z-index: 1;
}

.arch-layer-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan2);
  margin-bottom: 10px;
}

.arch-layer-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

.arch-layer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.arch-layer-text {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

/* ── Revenue / Flywheel ──────────────────────────────────────────────────── */
.revenue-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.revenue-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition);
}

.revenue-item:hover {
  border-color: var(--border3);
  transform: translateY(-2px);
}

.revenue-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.revenue-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.revenue-sublabel {
  font-size: 12px;
  color: var(--text3);
}

/* ── TAM/SAM/SOM Visual ──────────────────────────────────────────────────── */
.market-circles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin: 40px 0;
}

.market-circle {
  text-align: center;
}

.market-circle-ring {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border: 3px solid;
  position: relative;
}

.market-circle-tam {
  --size: 180px;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(29, 78, 216, 0.1);
}

.market-circle-sam {
  --size: 140px;
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.1);
}

.market-circle-som {
  --size: 100px;
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.15);
}

.market-circle-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.market-circle-value {
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 700;
  font-family: var(--font-mono);
}

.market-circle-sub {
  font-size: 10px;
  color: var(--text3);
}

/* ── Financial Scenarios Tabs ────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--bg3);
  border-radius: var(--radius2);
  padding: 4px;
  margin-bottom: 24px;
  width: fit-content;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: var(--radius3);
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
}

.tab-btn.active {
  background: var(--bg4);
  color: var(--text);
  border: 1px solid var(--border3);
}

.tab-btn:hover:not(.active) {
  color: var(--text2);
  background: rgba(255,255,255,0.04);
}

.tab-content {
  display: none;
  animation: fadeUp 0.25s ease;
}

.tab-content.active {
  display: block;
}

/* ── Roadmap Timeline ────────────────────────────────────────────────────── */
.roadmap-timeline {
  position: relative;
  padding-left: 32px;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--cyan) 50%, var(--green) 100%);
}

.roadmap-item {
  position: relative;
  padding-bottom: 32px;
}

.roadmap-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue2);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.roadmap-period {
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan2);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.roadmap-phase {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.roadmap-desc {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 10px;
  line-height: 1.6;
}

.roadmap-milestone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
  font-size: 12px;
  color: var(--green2);
  font-weight: 600;
}

/* ── Capital Allocation ──────────────────────────────────────────────────── */
.capital-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--cyan) 100%);
  transition: width 1s ease;
}

.capital-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.capital-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.capital-item-label {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
}

.capital-item-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
}

.capital-track {
  height: 6px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
}

/* ── NDA Wizard ──────────────────────────────────────────────────────────── */
.nda-wrap {
  min-height: 100vh;
  background: var(--bg);
  padding: calc(var(--nav-h) + 40px) 24px 60px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.nda-card {
  width: 100%;
  max-width: 720px;
  background: var(--bg2);
  border: 1px solid var(--border3);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow2);
}

.nda-header {
  text-align: center;
  margin-bottom: 36px;
}

.nda-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.nda-subtitle {
  font-size: 14px;
  color: var(--text3);
}

.nda-progress {
  width: 100%;
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.nda-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue2), var(--cyan2));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.nda-reading-progress {
  width: 100%;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  margin-bottom: 4px;
  overflow: hidden;
}

.nda-reading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan2));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nda-text-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 24px;
  max-height: 380px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text2);
  margin-bottom: 16px;
}

.nda-text-box h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 8px;
}

.nda-text-box p {
  margin-bottom: 12px;
}

.nda-hash-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius3);
  padding: 10px 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text3);
  word-break: break-all;
  margin-bottom: 16px;
}

/* ── Canvas Signature ────────────────────────────────────────────────────── */
.signature-wrap {
  border: 2px dashed var(--border3);
  border-radius: var(--radius2);
  background: var(--bg3);
  overflow: hidden;
  margin-bottom: 12px;
  cursor: crosshair;
  position: relative;
}

.signature-wrap canvas {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
}

.signature-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--text4);
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.signature-hint.hidden {
  opacity: 0;
}

/* ── Admin Panel ─────────────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: 220px;
  overflow-y: auto;
}

.admin-sidebar-item {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.admin-sidebar-item:hover,
.admin-sidebar-item.active {
  color: var(--text);
  background: rgba(59, 130, 246, 0.08);
  border-left-color: var(--blue2);
}

.admin-main {
  margin-left: 220px;
  padding: calc(var(--nav-h) + 32px) 32px 32px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
  margin-top: 4px;
}

/* ── Login Page ──────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(29, 78, 216, 0.2) 0%, transparent 60%),
              var(--bg);
  position: relative;
}

.login-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--border3);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow2);
}

.login-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 20px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text3);
  text-align: center;
  margin-bottom: 32px;
}

.otp-input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.otp-digit {
  width: 48px;
  height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: var(--radius2);
  color: var(--text);
  transition: border-color var(--transition);
  caret-color: var(--cyan2);
}

.otp-digit:focus {
  outline: none;
  border-color: var(--blue2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.otp-timer {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 16px;
}

.otp-timer span {
  color: var(--cyan2);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ── Alert / Toast ───────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius2);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--red2);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--green2);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--blue3);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  min-width: 280px;
  max-width: 400px;
  box-shadow: var(--shadow2);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Watermark overlay ───────────────────────────────────────────────────── */
#watermark-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

/* ── DevTools Block Screen ───────────────────────────────────────────────── */
#devtools-block {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
}

#devtools-block.active {
  display: flex;
}

#devtools-block h2 {
  color: var(--red2);
  font-size: 24px;
}

#devtools-block p {
  color: var(--text3);
  font-size: 15px;
  max-width: 400px;
}

/* ── Loading Overlay ─────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: opacity 0.5s ease;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--bg3);
  border-top-color: var(--blue2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Section dividers ────────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border3), transparent);
  margin: 0;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand span {
  color: var(--cyan2);
}

.footer-text {
  font-size: 12px;
  color: var(--text3);
  max-width: 500px;
  margin: 0 auto 8px;
}

.footer-confidential {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red2);
  margin-top: 12px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .arch-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .arch-layer:nth-child(2)::after {
    display: none;
  }

  .arch-layer:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .arch-layer:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .nav-dots {
    display: none;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-main {
    margin-left: 0;
    padding: calc(var(--nav-h) + 24px) 20px 24px;
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .problem-card-inner {
    grid-template-columns: 1fr;
  }

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

  .stepper {
    gap: 4px;
  }

  .step-label {
    display: none;
  }

  .market-circles {
    gap: 16px;
  }

  .market-circle-tam { --size: 130px; }
  .market-circle-sam { --size: 100px; }
  .market-circle-som { --size: 75px; }

  .hero-badges {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nda-card {
    padding: 24px;
  }

  .login-card {
    padding: 28px 24px;
  }

  .tab-bar {
    width: 100%;
  }

  .tab-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
  }

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

  .arch-flow {
    grid-template-columns: 1fr;
  }

  .arch-layer {
    border-radius: 0;
    border-bottom: none;
  }

  .arch-layer:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .arch-layer:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
    border-bottom: 1px solid var(--border);
  }

  .arch-layer:not(:last-child)::after {
    content: '↓';
    right: auto;
    left: 50%;
    top: auto;
    bottom: -14px;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  :root {
    --nav-h: 56px;
  }

  .container,
  .container-lg {
    padding: 0 16px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .kpi-value {
    font-size: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 14px;
  }

  .otp-input-group {
    gap: 6px;
  }

  .otp-digit {
    width: 42px;
    height: 52px;
    font-size: 20px;
  }
}

/* ── Print block ─────────────────────────────────────────────────────────── */
@media print {
  body {
    display: none !important;
  }
}

/* ── Utility: no-select ──────────────────────────────────────────────────── */
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* ── Highlight color override ────────────────────────────────────────────── */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text);
}

/* ── Reading progress bar ───────────────────────────────────────────────── */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  z-index: 10000;
  transition: width 0.1s linear;
}

/* ── Metric cards ────────────────────────────────────────────────────────── */
.metric-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.metric-card .metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue2), var(--cyan2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.metric-card .metric-label {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Flywheel ────────────────────────────────────────────────────────────── */
.flywheel-container {
  position: relative;
  width: 380px;
  height: 380px;
  margin: 0 auto;
}
.flywheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
  color: white;
  z-index: 2;
  box-shadow: 0 0 30px rgba(59,130,246,0.4);
}
.flywheel-item {
  position: absolute;
  width: 120px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 0.78rem;
  text-align: center;
  color: var(--text);
}
.flywheel-connector {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue2), transparent);
  transform-origin: 0 0;
}

/* ── Scenario tabs ────────────────────────────────────────────────────────── */
.scenario-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.scenario-tab {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}
.scenario-tab:hover {
  border-color: var(--blue2);
  color: var(--text);
}
.scenario-tab.active {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  border-color: var(--blue2);
  color: white;
  font-weight: 600;
}
.scenario-panel {
  display: none;
}
.scenario-panel.active {
  display: block;
}

/* ── Architecture layers ─────────────────────────────────────────────────── */
.arch-layer {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.arch-layer:hover {
  border-color: var(--blue2);
  transform: translateX(4px);
}
.arch-layer-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.arch-layer-title {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}
.arch-layer-desc {
  color: var(--text2);
  font-size: 0.82rem;
  margin-top: 2px;
}
.arch-arrow {
  text-align: center;
  color: var(--blue2);
  font-size: 1.2rem;
  margin: -4px 0;
}

/* ── TAM/SAM/SOM visual ─────────────────────────────────────────────────── */
.tam-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tam-ring {
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tam-ring.tam { background: rgba(29,78,216,0.15); border: 1px solid rgba(29,78,216,0.4); }
.tam-ring.sam { background: rgba(6,182,212,0.12); border: 1px solid rgba(6,182,212,0.35); }
.tam-ring.som { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.35); }
.tam-ring-label { font-weight: 700; font-size: 1rem; }
.tam-ring-value { font-size: 1.1rem; font-weight: 800; }
.tam-ring-desc { font-size: 0.8rem; color: var(--text2); margin-top: 2px; }

/* ── Investment breakdown bars ───────────────────────────────────────────── */
.invest-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.invest-bar-label {
  width: 200px;
  font-size: 0.85rem;
  color: var(--text2);
  flex-shrink: 0;
}
.invest-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
}
.invest-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 1s ease;
}
.invest-bar-value {
  width: 90px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
  color: var(--text);
  flex-shrink: 0;
}

/* ── Roadmap phases ──────────────────────────────────────────────────────── */
.roadmap-phases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.roadmap-phase {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
}
.roadmap-phase::after {
  content: '→';
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue2);
  font-size: 1rem;
  z-index: 1;
}
.roadmap-phase:last-child::after {
  display: none;
}
.roadmap-phase-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}
.roadmap-phase-period {
  font-size: 0.7rem;
  color: var(--cyan2);
  font-weight: 600;
  margin-bottom: 4px;
}
.roadmap-phase-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.roadmap-phase-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.roadmap-phase-items li {
  font-size: 0.72rem;
  color: var(--text2);
  padding: 2px 0;
  padding-left: 12px;
  position: relative;
}
.roadmap-phase-items li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--blue2);
}
@media (max-width: 1024px) {
  .roadmap-phases {
    grid-template-columns: repeat(2, 1fr);
  }
  .roadmap-phase::after {
    display: none;
  }
}
@media (max-width: 600px) {
  .roadmap-phases {
    grid-template-columns: 1fr;
  }
  .flywheel-container {
    width: 300px;
    height: 300px;
  }
}
