/* ==========================================================
   KodexIA — Estilos
   Baseado no design original (logo K, fontes serif + sans)
   ========================================================== */

:root {
  --bg:           #ffffff;
  --bg-soft:      #f7f8fa;
  --bg-cream:     #faf9f6;
  --bg-dark:      #0a0e1a;
  --bg-deeper:    #050810;

  --primary:      #1e3a8a;
  --primary-deep: #0c1c4d;
  --accent:       #2563eb;
  --accent-bright:#3b82f6;
  --accent-soft:  #dbeafe;
  --accent-ghost: #eff6ff;
  --gold:         #d97706;

  --text:         #0a0e1a;
  --text-muted:   #4b5563;
  --text-soft:    #6b7280;
  --text-faint:   #9ca3af;

  --border:       #e5e7eb;
  --border-soft:  #f1f3f5;

  --success:        #059669;
  --success-bg:     #ecfdf5;
  --success-border: #a7f3d0;
  --danger:         #dc2626;
  --danger-bg:      #fef2f2;
  --danger-border:  #fecaca;

  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
  font-weight: 400;
}
::selection { background: var(--accent); color: white; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.serif { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; }
.mono  { font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace; }

.container        { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 880px;  margin: 0 auto; padding: 0 28px; }
.muted { color: var(--text-muted); }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: all 0.35s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--border-soft);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.logo {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--text);
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.7; }
.logo-mark {
  width: 30px; height: 30px;
  background: var(--text);
  border-radius: 7px;
  display: grid; place-items: center;
  color: white;
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: "";
  position: absolute;
  right: -3px; top: 50%;
  width: 4px; height: 4px;
  background: var(--accent-bright);
  border-radius: 50%;
  transform: translateY(-50%);
}
.logo-word { font-weight: 600; font-size: 1.08rem; letter-spacing: -0.02em; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 0.93rem; color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 18px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.92rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: all 0.25s var(--ease);
  border: 1.5px solid transparent;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn-dark {
  background: var(--text); color: white;
}
.btn-dark:hover {
  background: var(--bg-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(10, 14, 26, 0.35);
}
.btn-light {
  background: var(--bg-soft); color: var(--text);
  border-color: var(--border);
}
.btn-light:hover { background: var(--border-soft); }
.btn-outline {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--bg-soft); border-color: var(--text-soft); }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  padding: 11px 16px;
}
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 14px 26px; font-size: 0.98rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 180px 28px 120px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-ghost) 0%, transparent 60%),
    #ffffff;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 50% 50% at 50% 30%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 30%, black 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 36px;
  box-shadow: 0 1px 2px rgba(10, 14, 26, 0.04);
}
.hero-eyebrow .dot {
  width: 18px; height: 18px;
  background: var(--bg);
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border);
}
.hero-eyebrow .dot::after {
  content: "";
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2); }
  50%      { box-shadow: 0 0 0 5px rgba(5, 150, 105, 0); }
}

.hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--text);
  margin: 0 auto 32px;
  max-width: 14ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  position: relative;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.08em;
  height: 0.08em;
  background: var(--accent);
  opacity: 0.2;
  border-radius: 99px;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto 44px;
  font-weight: 400;
}
.hero-cta {
  display: flex; gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 880px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 36px;
}
.hero-stat {
  text-align: center;
  padding: 0 16px;
  border-right: 1px solid var(--border-soft);
}
.hero-stat:last-child { border-right: 0; }
.hero-stat .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.hero-stat .lbl {
  font-size: 0.78rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ============ SECTIONS ============ */
section { padding: 130px 28px; position: relative; }
.section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.section-num::after {
  content: "";
  flex: 1; height: 1px;
  background: var(--border);
  max-width: 60px;
}
.section-eyebrow {
  font-size: 0.82rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin-bottom: 18px;
}
.section-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 18ch;
  margin-bottom: 24px;
}
.section-lede {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 580px;
  font-weight: 400;
}

/* ============ MANIFESTO ============ */
.manifesto {
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.manifesto-quote {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
}
.manifesto-quote em { font-style: italic; color: var(--accent); }
.principles { display: grid; gap: 28px; }
.principle {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 20px;
  align-items: start;
}
.principle-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
  padding-top: 4px;
}
.principle h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.principle p { color: var(--text-muted); line-height: 1.6; font-size: 0.96rem; }

/* ============ USE CASES ============ */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 60px;
}
.uc-card {
  background: var(--bg);
  padding: 48px 40px;
  transition: background 0.4s var(--ease);
  position: relative;
}
.uc-card:hover { background: var(--bg-soft); }
.uc-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 32px;
  display: block;
  font-style: italic;
}
.uc-card h3 {
  font-size: 1.32rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.uc-card p { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }

/* ============ HOW ============ */
.how { background: var(--bg); }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 70px;
  position: relative;
}
.how-step {
  padding: 0 32px;
  border-right: 1px dashed var(--border);
}
.how-step:last-child { border-right: 0; }
.how-step:first-child { padding-left: 0; }
.how-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 24px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.how-step h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.015em;
  font-weight: 400;
}
.how-step p { color: var(--text-muted); line-height: 1.6; font-size: 0.96rem; }

/* ============ COMPARE ============ */
.compare { background: var(--bg-soft); }
.compare-wrap {
  margin-top: 60px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr 0.8fr;
  padding: 22px 28px;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.2s;
}
.compare-row:last-child { border-bottom: 0; }
.compare-row:hover { background: var(--bg-soft); }
.compare-row.head {
  background: var(--bg-cream);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  font-weight: 600;
}
.compare-row.head .cell-us {
  background: var(--text);
  color: white;
  border-radius: 6px;
  padding: 8px 12px;
  margin: -8px -8px -8px 0;
}
.compare-row .cell-feat { font-weight: 500; color: var(--text); font-size: 0.96rem; }
.compare-row .cell { text-align: center; font-size: 0.92rem; color: var(--text-muted); font-weight: 500; }
.compare-row .cell-us { color: var(--text); font-weight: 600; }
.check { color: var(--success); font-weight: 700; }
.xmark { color: var(--danger); font-weight: 700; }
.partial { color: var(--gold); font-weight: 700; }

/* ============ PRICING ============ */
.pricing { background: var(--bg); }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 60px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.plan {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 32px 32px;
  display: flex; flex-direction: column;
  transition: all 0.35s var(--ease);
  position: relative;
}
.plan:hover { transform: translateY(-3px); border-color: var(--text-soft); }
.plan-name {
  font-size: 0.78rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 8px;
}
.plan-tag {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.plan-price {
  display: flex; align-items: baseline;
  gap: 6px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.plan-price .currency {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
  align-self: flex-start;
  margin-top: 8px;
}
.plan-price .amount {
  font-family: 'DM Serif Display', serif;
  font-size: 3.4rem;
  color: var(--text);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.plan-price .cents {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--text-muted);
  align-self: flex-start;
  margin-top: 6px;
}
.plan-price .per {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-left: 4px;
}
.plan-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
  min-height: 44px;
}
.plan-features { list-style: none; margin-bottom: 32px; flex: 1; }
.plan-features li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
}
.plan-features li svg { color: var(--success); flex-shrink: 0; margin-top: 3px; }
.plan.featured {
  background: var(--text);
  color: white;
  border-color: var(--text);
  box-shadow: 0 24px 60px -20px rgba(10, 14, 26, 0.4);
}
.plan.featured .plan-name   { color: rgba(255,255,255,0.6); }
.plan.featured .plan-tag    { color: white; }
.plan.featured .plan-price .currency,
.plan.featured .plan-price .cents { color: rgba(255,255,255,0.7); }
.plan.featured .plan-price .amount { color: white; }
.plan.featured .plan-price .per    { color: rgba(255,255,255,0.6); }
.plan.featured .plan-desc   { color: rgba(255,255,255,0.7); }
.plan.featured .plan-features li { color: rgba(255,255,255,0.92); }
.plan.featured .plan-features li svg { color: #6ee7b7; }
.plan.featured .btn-dark { background: white; color: var(--text); }
.plan.featured .btn-dark:hover { background: #f1f5f9; }
.plan-badge {
  position: absolute;
  top: -10px; left: 32px;
  background: var(--gold);
  color: white;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============ FAQ ============ */
.faq { background: var(--bg); }
.faq-list {
  margin-top: 60px;
  border-top: 1px solid var(--border);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: none; border: 0;
  padding: 28px 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
.faq-q:hover { color: var(--accent); }
.faq-q .plus {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  transition: all 0.3s var(--ease);
  color: var(--text-muted);
}
.faq-item.open .faq-q .plus {
  background: var(--text);
  color: white;
  border-color: var(--text);
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.5s var(--ease);
}
.faq-a-inner {
  padding: 0 0 28px;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.98rem;
  max-width: 720px;
}

/* ============ FINAL CTA ============ */
.final-cta {
  background: var(--text);
  color: white;
  text-align: center;
  padding: 140px 28px;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 25% 20%, rgba(37, 99, 235, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 50% 70% at 75% 80%, rgba(217, 119, 6, 0.12) 0%, transparent 50%);
  pointer-events: none;
}
.final-cta-inner { position: relative; z-index: 1; }
.final-cta h2 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 16ch;
  margin-left: auto; margin-right: auto;
}
.final-cta p {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  max-width: 540px;
  margin: 0 auto 44px;
}
.final-cta .btn-dark { background: white; color: var(--text); }
.final-cta .btn-dark:hover { background: #f1f5f9; }
.final-cta .btn-outline { color: white; border-color: rgba(255, 255, 255, 0.2); }
.final-cta .btn-outline:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ FOOTER ============ */
footer {
  background: var(--bg-deeper);
  color: rgba(255, 255, 255, 0.6);
  padding: 80px 28px 40px;
}
.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand .logo { color: white; margin-bottom: 20px; }
.footer-brand .logo .logo-mark { background: white; color: var(--text); }
.footer-brand .logo .logo-mark::after { background: var(--accent); }
.footer-brand .logo-word { color: white; }
.footer-brand p { font-size: 0.92rem; line-height: 1.6; max-width: 320px; }
.footer-col h5 {
  color: white;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  max-width: 1240px; margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============ SCROLL ANIMATIONS ============ */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ AUTH (login / register) ============ */
.auth-page {
  padding: 140px 28px 80px;
  min-height: 100vh;
  background: var(--bg);
}
.auth-wrap {
  max-width: 440px;
  margin: 0 auto;
}
.auth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 1px 2px rgba(10, 14, 26, 0.04);
}
.auth-card h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--text);
}
.auth-card .lede {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 26px;
}
.form { display: flex; flex-direction: column; gap: 16px; }
.form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.88rem; font-weight: 500; color: var(--text);
}
.form input, .form select, .form textarea {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  transition: all 0.2s;
  outline: none;
  font-size: 0.95rem;
}
.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form textarea { min-height: 120px; resize: vertical; font-family: inherit; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }
.auth-card .alt {
  text-align: center;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.auth-card .alt a { color: var(--accent); font-weight: 500; }
.auth-card .alt a:hover { text-decoration: underline; }

/* ============ Flash ============ */
.flash {
  max-width: 560px; margin: 0 auto 18px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
  border: 1px solid;
  font-size: 0.93rem;
}
.flash-ok  { background: var(--success-bg); color: #047857; border-color: #a7f3d0; }
.flash-err { background: var(--danger-bg);  color: #b91c1c; border-color: #fecaca; }
.flash-warn{ background: #fffbeb; color: #b45309; border-color: #fde68a; }
.flash-info{ background: var(--accent-ghost); color: var(--primary); border-color: var(--accent-soft); }

/* ============ DASHBOARD ============ */
.dash {
  padding: 130px 28px 80px;
  min-height: 100vh;
  background: var(--bg-soft);
}
.dash-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
}
.dash-side {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  height: fit-content;
  position: sticky; top: 100px;
}
.dash-user {
  padding: 8px 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 14px;
}
.dash-user .name { font-weight: 600; color: var(--text); }
.dash-user .email { font-size: 0.85rem; color: var(--text-muted); }
.dash-side a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.93rem;
  margin-bottom: 4px;
  transition: all 0.2s;
}
.dash-side a:hover { background: var(--bg-soft); color: var(--text); }
.dash-side a.active { background: var(--text); color: white; }
.dash-side a.danger { color: var(--danger); }
.dash-side a.danger:hover { background: var(--danger-bg); }
.dash-main { min-width: 0; }
.dash-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 16px;
}
.dash-head h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.dash-head .muted { font-size: 0.95rem; }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.stat .lbl {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat .val {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
  line-height: 1;
  font-family: 'Outfit', sans-serif;
}
.stat .sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th {
  text-align: left; padding: 12px 14px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
td { padding: 14px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
tr:hover td { background: var(--bg-soft); }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
}
.tag-waiting, .tag-pending  { background: #fffbeb; color: #b45309; }
.tag-active                 { background: var(--accent-ghost); color: var(--accent); }
.tag-closed                 { background: #f3f4f6; color: #4b5563; }
.tag-approved               { background: var(--success-bg); color: #047857; }
.tag-rejected               { background: var(--danger-bg); color: #b91c1c; }
.tag-new                    { background: var(--accent-ghost); color: var(--accent); }
.tag-reviewing              { background: #fffbeb; color: #b45309; }
.tag-suspended              { background: #fee2e2; color: #b91c1c; }
.tag-cancelled              { background: #f3f4f6; color: #4b5563; }

/* ============ CHAT ============ */
.chat-wrap { padding: 110px 28px 40px; min-height: 100vh; background: var(--bg-soft); }
.chat-shell {
  max-width: 980px; margin: 0 auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(10, 14, 26, 0.04);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: calc(100vh - 150px);
  min-height: 540px;
}
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  background: var(--text);
  color: white;
}
.chat-head .av {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.16);
  display: grid; place-items: center;
  font-weight: 600;
  font-family: 'DM Serif Display', serif;
}
.chat-head .meta { flex: 1; }
.chat-head .meta .name { font-weight: 600; font-size: 1rem; }
.chat-head .meta .status { font-size: 0.82rem; opacity: 0.7; }
.chat-head .pill {
  background: rgba(255,255,255,0.14);
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}

.chat-body {
  padding: 22px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 30%, rgba(37,99,235,0.04), transparent 60%),
    #fcfdff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg { display: flex; gap: 10px; max-width: 75%; }
.msg .av {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 600; font-size: 0.78rem;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.msg .bubble {
  padding: 11px 16px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.95rem;
  word-wrap: break-word;
}
.msg .time { font-size: 0.72rem; color: var(--text-soft); margin-top: 4px; }
.msg-user  { align-self: flex-end; flex-direction: row-reverse; }
.msg-user  .bubble { background: var(--text); color: white; border-bottom-right-radius: 4px; }
.msg-user  .av { background: var(--accent); color: white; }
.msg-admin .bubble { background: white; border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.msg-admin .av { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.msg-system { align-self: center; max-width: 80%; }
.msg-system .bubble {
  background: var(--accent-ghost);
  color: var(--primary);
  border: 1px dashed var(--accent-soft);
  font-size: 0.85rem;
  text-align: center;
}

.chat-form {
  display: flex; gap: 10px;
  padding: 16px 18px;
  background: white;
  border-top: 1px solid var(--border);
}
.chat-form input {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 99px;
  outline: none;
  transition: all 0.2s;
}
.chat-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.chat-form button {
  padding: 11px 22px;
  border-radius: 99px;
  background: var(--text);
  color: white;
  font-weight: 500;
  transition: all 0.25s var(--ease);
}
.chat-form button:hover { background: var(--bg-dark); transform: translateY(-1px); }
.chat-form button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ============ FLOATING CHAT BUTTON ============ */
.float-chat {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--text);
  color: white;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(10, 14, 26, 0.35);
  z-index: 50;
  transition: all 0.3s var(--ease);
}
.float-chat:hover { transform: scale(1.08) rotate(-6deg); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .manifesto-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
  .compare-row { grid-template-columns: 1.4fr 0.6fr 0.6fr 0.6fr 0.6fr; padding: 18px 20px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { position: static; }
}
@media (max-width: 768px) {
  .container, .container-narrow { padding: 0 20px; }
  section { padding: 90px 20px; }
  .nav-links, .nav .btn:not(.float-chat) { display: none; }
  .hero { padding: 140px 20px 80px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .hero-stat:nth-child(2) { border-right: 0; }
  .hero-stat { border-right: 0; padding: 0 12px; }
  .usecases-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; gap: 32px; }
  .how-step { padding: 0; border-right: 0; border-bottom: 1px dashed var(--border); padding-bottom: 32px; }
  .how-step:last-child { border-bottom: 0; padding-bottom: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .compare-row { grid-template-columns: 1.5fr 1fr 1fr; font-size: 0.85rem; padding: 16px 18px; }
  .compare-row .cell:nth-child(3),
  .compare-row .cell:nth-child(4) { display: none; }
  .final-cta { padding: 100px 24px; }
  .cards-grid { grid-template-columns: 1fr; }
  .auth-page { padding: 120px 20px 60px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 2.6rem; }
}
