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

:root {
  --bg: #0a0e1a;
  --bg-alt: #0f1525;
  --primary: #4f8ef7;
  --primary-dark: #2563eb;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #1e2d4a;
  --card-bg: #111827;
  --radius: 10px;
  --font: 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 28px;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(79, 142, 247, 0.12) 0%, transparent 70%);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 760px;
  margin: 0 auto 20px;
}

.hero .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 36px;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ── Metrics bar ── */
.metrics {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}

.metric .value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.metric .label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Sections ── */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }

h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

p { color: var(--text-muted); margin-bottom: 14px; }
p strong { color: var(--text); }

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

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

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.card p { font-size: 0.9rem; margin: 0; }

/* ── Tags ── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.tag-list span {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.88rem;
}

/* ── Contact ── */
.contact { text-align: center; }
.contact p { margin-bottom: 28px; }

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

footer p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  nav { display: none; }
  .hero { padding: 64px 0 48px; }
}

/* ════════════════════════════════════
   AUTH PAGE (login.html)
════════════════════════════════════ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.auth-logo {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 28px;
}

.auth-card h1 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.auth-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #3c4043;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-google:hover {
  background: #f1f3f4;
  transform: translateY(-1px);
}

.auth-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 24px;
  line-height: 1.6;
}

.auth-note a { color: var(--primary); text-decoration: none; }

/* ════════════════════════════════════
   DASHBOARD (dashboard.html)
════════════════════════════════════ */
.dash-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* Sidebar */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
}

.sidebar-logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 36px;
  padding-left: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(79, 142, 247, 0.12);
  color: var(--text);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
}

.sidebar-site-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.sidebar-site-link:hover {
  color: var(--accent);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-logout:hover { border-color: var(--primary); color: var(--text); }

/* Main content */
.dash-main {
  margin-left: 220px;
  flex: 1;
  padding: 40px 36px;
  max-width: 960px;
}

.dash-section { display: block; }
.dash-section.hidden { display: none; }

/* Dashboard header */
.dash-header { margin-bottom: 28px; }
.dash-header h2 { font-size: 1.4rem; margin: 6px 0 4px; }
.dash-meta { font-size: 0.78rem; color: var(--text-muted); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #7C3AED;
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Accent color for savings metrics */
.stat-value.accent { color: #34D399; }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
  overflow: hidden;
}

.stat-value {
  display: block;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-bar select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
}

.btn-sm { padding: 8px 18px; font-size: 0.88rem; }

/* Table */
.table-wrap { overflow-x: auto; }

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.dash-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
}

.dash-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: #111827; }
.dash-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-table .saved { color: #34D399; font-weight: 600; }
.dash-table .file { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c4c9e2; }

/* Economy bar inline */
.bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar { height: 6px; border-radius: 3px; background: #34D399; min-width: 2px; }
.bar-wrap span { font-size: 0.78rem; color: #34D399; white-space: nowrap; font-weight: 600; }

/* Charts */
.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.chart-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.chart-box h3 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

canvas { max-height: 260px; }

/* Section box */
.section-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

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

/* ── Demo ── */
.demo-form { display: flex; flex-direction: column; gap: 12px; }

.demo-form textarea {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 14px 16px;
  resize: vertical;
  width: 100%;
}

.demo-form textarea:focus { outline: none; border-color: var(--primary); }

.demo-controls { display: flex; gap: 10px; align-items: center; }

.demo-controls select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  flex: 1;
}

/* ── API Keys ── */
.key-input {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  flex: 1;
}
.key-input:focus { outline: none; border-color: var(--primary); }

.key-alert {
  background: #0f2a1a;
  border: 1px solid #34D399;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.key-alert-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #34D399;
  margin-bottom: 10px;
}
.key-alert-row { display: flex; align-items: center; gap: 12px; }
.key-code {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.82rem;
  color: #fff;
  word-break: break-all;
  flex: 1;
}
.key-docs {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(52, 211, 153, 0.2);
}

.key-docs-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.key-docs-link {
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.key-docs-link:hover { color: #fff; }

.key-docs-snippet-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.key-docs-snippet {
  background: #0a0e1a;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: #c4c9e2;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.6;
}

.key-prefix {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.key-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.key-status--ok  { background: rgba(52,211,153,.15); color: #34D399; }
.key-status--rev { background: rgba(248,113,113,.1);  color: #F87171; }

.btn-revoke {
  background: transparent;
  border: 1px solid #F87171;
  color: #F87171;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-revoke:hover { background: rgba(248,113,113,.1); }

/* ── Prompt compare ── */
.prompt-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}

.prompt-arrow {
  font-size: 1.4rem;
  color: #34D399;
  padding-top: 40px;
  font-weight: 700;
}

.prompt-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.prompt-box--after { border-color: #34D399; }

.prompt-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.prompt-label--before { color: #F87171; }
.prompt-label--after  { color: #34D399; }

.prompt-tokens {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.prompt-pre {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.6;
}

/* Caixa "Com HANE" exibe o prompt injetado completo, sem corte */
.prompt-box--after .prompt-pre {
  max-height: none;
  overflow-y: visible;
}

@media (max-width: 720px) {
  .prompt-compare { grid-template-columns: 1fr; }
  .prompt-arrow { padding-top: 0; text-align: center; }
}

.tag {
  display: inline-block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.78rem;
  color: #7C3AED;
}

/* ── Aplicações (index.html) ── */
.subtitle-sm {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 8px;
  margin-bottom: 0;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.app-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.app-icon {
  font-size: 1.7rem;
  display: block;
}

.app-card h3 {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-tag {
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.02em;
}

.app-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.app-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-list li {
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.app-note {
  font-size: 0.78rem !important;
  color: #a78bfa !important;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px !important;
}

/* ── Admin key prompt ── */
.admin-key-prompt {
  background: var(--card-bg);
  border: 1px solid #FBBF24;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.admin-key-prompt p {
  font-size: 0.82rem;
  color: #FBBF24;
  margin-bottom: 10px;
}

.admin-key-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-key-row input {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
  font-family: monospace;
  font-size: 0.85rem;
}

/* ── Admin filters ── */
.admin-filter {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-filter label {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-filter select {
  padding: 5px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  font-size: 0.84rem;
  cursor: pointer;
}

/* ── Admin stat mini-grid ── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.admin-stat .val {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-stat .lbl {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Misc */
.dash-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0;
}

.dash-hint code {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.loading { color: var(--text-muted); font-size: 0.88rem; }

.apikey-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 480px;
}

.hidden { display: none !important; }

/* ════════════════════════════════════
   HERO REDESIGN (index.html)
════════════════════════════════════ */

/* Override hero para layout split */
.hero { padding: 80px 0 70px; text-align: left; }

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 44px; }
  .hero { text-align: center; }
  .hero-ctas, .hero-proof { justify-content: center; }
}

.hero-badge {
  display: inline-block;
  background: rgba(79,142,247,.1);
  border: 1px solid rgba(79,142,247,.28);
  color: var(--primary);
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: .5px;
  margin-bottom: 20px;
}

.hero-h1-pain     { color: var(--text-muted); }
.hero-h1-solution { color: var(--primary); }

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.hero-proof {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: .8rem;
  color: var(--text-muted);
}
.hero-proof span { display: flex; align-items: center; gap: 4px; }
.hero-proof strong { color: #34d399; }

/* ── Code animation block ── */
.code-demo-wrap {
  background: #080c18;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(0,0,0,.55);
}

.code-demo-bar {
  background: #0d1120;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-demo-dots { display: flex; gap: 5px; }
.code-demo-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.code-demo-dots span:nth-child(1) { background: #f87171; }
.code-demo-dots span:nth-child(2) { background: #fbbf24; }
.code-demo-dots span:nth-child(3) { background: #34d399; }

.code-demo-file {
  font-family: monospace;
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: 4px;
  transition: opacity .3s;
}

.code-slide { display: none; }
.code-slide.active { display: block; animation: slideIn .35s ease; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.code-panel {
  padding: 16px 18px;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: .75rem;
  line-height: 1.65;
  color: #94a3b8;
  min-height: 130px;
}

.code-panel div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-kw  { color: #7eb8f7; }
.line-fn  { color: #a5f3fc; }
.line-str { color: #86efac; }
.line-cmt { color: #475569; }

.code-divider {
  background: #0d1120;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.code-divider-arrow { color: #34d399; font-size: .82rem; font-weight: 700; }

.token-counter {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: monospace;
  font-size: .72rem;
}
.token-before { color: #f87171; text-decoration: line-through; }
.token-after  { color: #34d399; font-weight: 700; }
.token-pct    {
  background: rgba(52,211,153,.12);
  color: #34d399;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.code-panel.hane { background: rgba(52,211,153,.025); }
.code-panel.hane .line-label { color: #7eb8f7; font-weight: 600; min-width: 90px; display: inline-block; }
.code-panel.hane .line-val   { color: #e2e8f0; }

/* ════════════════════════════════════
   SCROLL REVEAL
════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Formulário de contato ──────────────────────────────────────────────── */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 800px) {
  .contact-split { grid-template-columns: 1fr; gap: 32px; }
}

.contact-copy h2 { margin-bottom: 12px; }
.contact-copy p  { color: var(--text-muted); font-size: .95rem; margin-bottom: 10px; }
.contact-email a { color: var(--primary); text-decoration: none; }
.contact-email a:hover { text-decoration: underline; }

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

.cf-row { display: flex; flex-direction: column; gap: 5px; }
.cf-row label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .4px;
  text-transform: uppercase;
}
.cf-row input,
.cf-row textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.cf-row input:focus,
.cf-row textarea:focus { border-color: var(--primary); }

.cf-error {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.35);
  border-radius: 8px;
  color: #f87171;
  font-size: .85rem;
  padding: 10px 14px;
}
.cf-success {
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.35);
  border-radius: 8px;
  color: #34d399;
  font-size: .9rem;
  padding: 10px 14px;
}

/* ── CTA mid-page ───────────────────────────────────────────────────────── */
.cta-mid { background: linear-gradient(135deg, #0d1120 0%, #0f1e3a 100%); }
.cta-mid-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-mid-text h2 { margin-bottom: 8px; font-size: 1.5rem; }
.cta-mid-text p  { color: var(--text-muted); font-size: .95rem; max-width: 500px; }
.cta-mid-btn { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 700px) {
  .cta-mid-inner { flex-direction: column; text-align: center; }
  .cta-mid-text p { max-width: 100%; }
}

/* ── Como funciona — 3 passos ───────────────────────────────────────────── */
.how-header { text-align: center; margin-bottom: 48px; }
.how-header h2 { margin-bottom: 0; }

.how-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
}

.how-step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
}
.how-num {
  font-size: .7rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.how-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}
.how-step h3 { font-size: 1rem; margin-bottom: 8px; }
.how-step p  { color: var(--text-muted); font-size: .88rem; line-height: 1.6; }

.how-connector {
  width: 48px;
  flex-shrink: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  align-self: center;
  margin-bottom: 4px;
}

@media (max-width: 800px) {
  .how-steps { flex-direction: column; align-items: center; gap: 0; }
  .how-step   { max-width: 100%; width: 100%; }
  .how-connector { width: 2px; height: 32px; background: linear-gradient(180deg, var(--primary), transparent); margin: 0 auto; }
}

/* ── Tabela comparativa ─────────────────────────────────────────────────── */
.compare-wrap { overflow-x: auto; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.compare-table th,
.compare-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.compare-table thead th {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
}
.compare-table tbody tr:hover { background: rgba(79,142,247,.04); }

.col-raw  { color: #f87171; text-align: center; }
.col-hane { color: #34d399; font-weight: 600; text-align: center; }
.col-gain { text-align: center; }

thead .col-raw  { color: #f87171; }
thead .col-hane { color: #34d399; }

.gain-tag {
  display: inline-block;
  background: rgba(52,211,153,.12);
  color: #34d399;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.gain-tag.neutral { background: rgba(148,163,184,.12); color: var(--text-muted); }

.td-sub { font-size: .75rem; color: var(--text-muted); display: block; }

.compare-note {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Header scroll ──────────────────────────────────────────────────────── */
header {
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
header.scrolled {
  background: rgba(10, 14, 28, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

/* ── FAQ accordion ───────────────────────────────────────────────────────── */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item.open { border-color: var(--primary); }

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: .97rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color .2s;
}
.faq-q:hover { color: var(--primary); }

.faq-icon {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform .25s ease;
  line-height: 1;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 20px;
}
.faq-item.open .faq-a {
  max-height: 200px;
  padding: 0 20px 18px;
}
.faq-a p {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
  margin: 0;
}

/* ── Mobile — bloco de código no hero ──────────────────────────────────── */
@media (max-width: 600px) {
  .code-demo-wrap { font-size: .7rem; }
  .code-panel { font-size: .68rem; min-height: 110px; padding: 12px; }
  .code-panel div { white-space: pre-wrap; overflow: visible; text-overflow: unset; }
  .code-divider { padding: 6px 12px; font-size: .7rem; }
  .token-pct { font-size: .65rem; padding: 2px 6px; }
  .code-demo-bar { padding: 8px 12px; font-size: .72rem; }
}

@media (max-width: 700px) {
  .sidebar { display: none; }
  .dash-main { margin-left: 0; padding: 24px 16px; }
}

/* ── ROI box ─────────────────────────────────────────────────────────────── */
.roi-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.roi-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.roi-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.roi-subtitle {
  font-size: .75rem;
  color: var(--text-muted);
}
.roi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 800px) {
  .roi-grid { grid-template-columns: repeat(2, 1fr); }
}
.roi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.roi-card--saved,
.roi-card--mult { border-color: rgba(52,211,153,.3); }
.roi-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.roi-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.roi-value.accent { color: #34D399; }
.roi-sub {
  font-size: .72rem;
  color: var(--text-muted);
}
.roi-note {
  margin-top: 14px;
  font-size: .72rem;
  color: var(--text-muted);
}

/* ── Demo flash card ─────────────────────────────────────────────────────── */
.demo-flash {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(52,211,153,.1), rgba(124,58,237,.08));
  border: 1px solid rgba(52,211,153,.3);
  border-radius: 12px;
  padding: 18px 22px;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s ease, transform .4s ease;
}
.demo-flash--animate {
  opacity: 1;
  transform: none;
}
.demo-flash-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}
.demo-flash-title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}
.demo-flash-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  font-size: .9rem;
  color: var(--text);
}
.demo-flash-stats strong { color: #34D399; }
.demo-flash-sep { color: var(--border); }

/* ── Demo tabs ───────────────────────────────────────────────────────────── */
.demo-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.demo-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  padding: 8px 14px 10px;
  transition: color .2s, border-color .2s;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
}
.demo-tab:hover { color: var(--text); }
.demo-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.demo-tab-hint {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ── Demo dropzone ───────────────────────────────────────────────────────── */
.demo-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.demo-dropzone:hover,
.demo-dropzone--over  { border-color: var(--primary); background: rgba(79,142,247,.04); }
.demo-dropzone--ready { border-color: #34D399; background: rgba(52,211,153,.04); }

.demo-drop-icon {
  font-size: 2.2rem;
  line-height: 1;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.demo-drop-label { font-size: .95rem; font-weight: 600; margin-bottom: 6px; }
.demo-drop-hint  { font-size: .8rem; color: var(--text-muted); }
.demo-drop-selected { font-size: .85rem; color: #34D399; font-weight: 600; margin-top: 8px; }

.demo-bench-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .83rem;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

/* ── Documentos processados — badge métrica antiga ───────────────────────── */
.docs-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.35);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.docs-notice strong { color: #FBBF24; }

.badge-antigo {
  display: inline-block;
  background: rgba(251,191,36,.15);
  border: 1px solid rgba(251,191,36,.4);
  color: #FBBF24;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 4px;
}

.row-antigo td {
  opacity: .72;
}
.row-antigo td:last-child {
  opacity: 1;
}
