/* CargaML — Design System
 * Adaptado del lenguaje visual de VipWeb (frontend/src/styles.css).
 * Tokens, glass cards, gradientes, animaciones.
 */

:root {
  --bg-base: #0a0b14;
  --bg-elevated: rgba(22, 24, 42, 0.6);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-card: rgba(22, 24, 42, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.16);
  --text: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.55);
  --text-dim: rgba(255, 255, 255, 0.35);
  --accent: #a78bfa;
  --accent-2: #38bdf8;
  --accent-3: #f472b6;
  --accent-glow: rgba(167, 139, 250, 0.4);
  --gradient: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
  --gradient-soft: linear-gradient(135deg, rgba(167, 139, 250, 0.15) 0%, rgba(56, 189, 248, 0.15) 100%);
  --gradient-text: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.55) 100%);
  --shadow-glow: 0 0 80px -10px rgba(167, 139, 250, 0.5);
  --shadow-card: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.4);
  --yellow: #fbbf24;
  --red: #ef4444;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(167, 139, 250, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 20% 100%, rgba(244, 114, 182, 0.08), transparent);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -1;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: var(--accent-glow); color: white; }

/* ─── Container & Layout ─────────────────────────────────────────────── */

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

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ─── Brand & Typography ─────────────────────────────────────────────── */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.brand-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
  animation: pulse 2s ease-in-out infinite;
}

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

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
}
h1 { font-size: 36px; line-height: 1.1; }
h2 { font-size: 28px; line-height: 1.2; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }

p { margin: 0; line-height: 1.6; color: var(--text-muted); }

.muted { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.dim { color: var(--text-dim); font-size: 13px; }
.tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero typography */
.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 24px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.5;
  margin: 0 0 32px;
}

/* ─── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--gradient);
  color: #0a0b14;
  box-shadow: 0 4px 24px -4px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px -4px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn:active { transform: translateY(0); }

.btn-xl { padding: 16px 28px; font-size: 15px; border-radius: 14px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: blur(20px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-bright);
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 14px;
  font-size: 13px;
  box-shadow: none;
  border-radius: 8px;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-glass); transform: none; }

.btn-yellow {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #0a0b14;
  box-shadow: 0 4px 24px -4px rgba(251, 191, 36, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-yellow:hover {
  box-shadow: 0 8px 40px -4px rgba(251, 191, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Cards ──────────────────────────────────────────────────────────── */

.card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 40%, transparent 60%, rgba(255, 255, 255, 0.05));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-link {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card-link:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-card);
}

.card-glow {
  background: var(--gradient-soft);
  border-color: var(--border-bright);
}

.card-icon {
  font-size: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

/* ─── Forms ──────────────────────────────────────────────────────────── */

.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.input,
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}
.input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  background: rgba(167, 139, 250, 0.06);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}
.input::placeholder { color: var(--text-dim); }

/* ─── Badges ─────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-active {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
.badge-warning {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}
.badge-accent {
  background: var(--gradient-soft);
  border-color: var(--border-bright);
  color: var(--text);
}

/* ─── Banners / Alerts ───────────────────────────────────────────────── */

.alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  margin-bottom: 16px;
}
.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.alert-success {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

/* ─── Grid utilities ─────────────────────────────────────────────────── */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ─── Animations ─────────────────────────────────────────────────────── */

.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.2s; }
.fade-in-3 { animation-delay: 0.3s; }
.fade-in-4 { animation-delay: 0.4s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float { animation: float 3s ease-in-out infinite; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(167, 139, 250, 0.2) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.glow { animation: glow 4s ease-in-out infinite; }

@keyframes flow-line {
  0% { transform: translateX(-100%); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* ─── Nav ────────────────────────────────────────────────────────────── */

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(10, 11, 20, 0.6);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-links {
  display: flex;
  gap: 4px;
  font-size: 14px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--bg-glass);
}
.nav-links a.active {
  color: var(--text);
  background: var(--bg-glass);
  font-weight: 600;
}

/* ─── Hero animated background mockup (for landing) ──────────────────── */

.mockup {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(40px) saturate(140%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.mockup-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.mockup-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--border);
}
.mockup-bar span:first-child { background: #ff5f57; }
.mockup-bar span:nth-child(2) { background: #fdbc2c; }
.mockup-bar span:nth-child(3) { background: #28c941; }

.flow-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.flow-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.15), transparent);
  animation: flow-line 3s linear infinite;
}

.flow-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--gradient-soft);
  border-radius: 999px;
  font-size: 18px;
  color: var(--accent);
}

/* ─── Pricing ─────────────────────────────────────────────────────────── */

.plan {
  position: relative;
  padding: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(40px) saturate(140%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.plan:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-card);
}
.plan-featured {
  border-color: rgba(167, 139, 250, 0.4);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.08) 0%, var(--bg-elevated) 60%);
  box-shadow: 0 0 60px -20px var(--accent-glow);
}
.plan-featured-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: var(--gradient);
  color: #0a0b14;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}
.plan-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-price-amount {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}
.plan-price-period { font-size: 14px; color: var(--text-muted); }
.plan-price-anchor {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: line-through;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.plan-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
}
.plan-features li::before {
  content: '✓';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-soft);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.plan-features li.dim { color: var(--text-dim); }
.plan-features li.dim::before {
  content: '–';
  background: var(--bg-glass);
  border-color: var(--border);
  color: var(--text-dim);
}

/* ─── Comparison table ─────────────────────────────────────────────── */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  font-size: 14px;
}
.compare-table th,
.compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg-glass);
}
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table .compare-us {
  background: rgba(167, 139, 250, 0.05);
  color: var(--text);
  font-weight: 600;
}
.compare-yes { color: #4ade80; }
.compare-no { color: var(--text-dim); }

/* ─── Step cards (Cómo funciona) ──────────────────────────────────── */

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 16px;
  align-items: center;
  backdrop-filter: blur(40px) saturate(140%);
}
.step-num {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  border-radius: 16px;
  font-size: 22px;
  font-weight: 800;
  color: #0a0b14;
  flex-shrink: 0;
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}

@media (min-width: 768px) {
  .step { grid-template-columns: auto 1fr 320px; }
}

/* ─── Floating WhatsApp button ────────────────────────────────────── */

.fab-wpp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #25D366;
  color: white;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 32px -8px rgba(37, 211, 102, 0.5);
  text-decoration: none;
  transition: all 0.2s ease;
}
.fab-wpp:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px rgba(37, 211, 102, 0.6);
}
.fab-wpp::before {
  content: '';
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.5 14.4c-.3-.1-1.7-.8-1.9-.9-.3-.1-.4-.1-.6.1s-.7.9-.9 1.1c-.2.2-.3.2-.6.1-.3-.1-1.2-.4-2.4-1.4-.9-.8-1.4-1.8-1.6-2.1-.2-.3 0-.4.1-.6.1-.1.3-.3.4-.5.1-.1.2-.3.3-.4.1-.2 0-.3 0-.5s-.6-1.4-.8-1.9c-.2-.5-.4-.4-.6-.4h-.5c-.2 0-.5.1-.7.3-.2.3-.9.9-.9 2.2 0 1.3.9 2.5 1.1 2.7.1.2 1.8 2.7 4.3 3.8 1.5.6 2.1.7 2.9.5.5-.1 1.5-.6 1.7-1.2.2-.6.2-1.1.1-1.2-.1-.1-.3-.2-.6-.3z M12 2C6.5 2 2 6.5 2 12c0 1.7.4 3.3 1.2 4.7L2 22l5.5-1.4c1.4.7 2.9 1 4.5 1 5.5 0 10-4.5 10-10S17.5 2 12 2zm0 18c-1.5 0-2.9-.4-4.1-1.1l-.3-.2-3.2.8.9-3.1-.2-.3C4.4 14.9 4 13.5 4 12c0-4.4 3.6-8 8-8s8 3.6 8 8-3.6 8-8 8z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ─── Calculator ──────────────────────────────────────────────────── */

.calc-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.calc-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-glass);
  border-radius: 999px;
  outline: none;
  border: 1px solid var(--border);
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--gradient);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px -2px var(--accent-glow);
}
.calc-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--gradient);
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  box-shadow: 0 4px 12px -2px var(--accent-glow);
}

/* ─── FAQ accordion ───────────────────────────────────────────────── */

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-item:hover { border-color: var(--border-bright); }
.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-item .faq-body {
  padding: 18px 22px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Footer ───────────────────────────────────────────────────────── */

.footer {
  margin-top: 80px;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── Onboarding checklist ───────────────────────────────────────── */

.onboard-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.onboard-step.done {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.2);
}
.onboard-check {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
}
.onboard-step.done .onboard-check {
  background: var(--green);
  border-color: var(--green);
  color: #0a0b14;
}
.onboard-step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ─── Empty states ─────────────────────────────────────────────────── */

.empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-glass);
  border: 1px dashed var(--border-bright);
  border-radius: 18px;
}
.empty-icon { font-size: 56px; margin-bottom: 12px; opacity: 0.5; }

/* ─── Utilities ───────────────────────────────────────────────────── */

.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; } .mt-16 { margin-top: 64px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; } .mb-16 { margin-bottom: 64px; }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .container, .container-wide, .container-narrow { padding: 24px 16px; }
  .step { grid-template-columns: 1fr; padding: 20px; }
  .step-num { width: 48px; height: 48px; font-size: 18px; }
}

/* ─── Tailwind dark-mode overrides ────────────────────────────────────
 * Las páginas internas (products/list.html, listings/wizard.html, etc.)
 * todavía usan Tailwind con clases de tema claro (bg-white, text-slate-900).
 * Estos overrides re-mapean esas clases al dark theme global sin tocar los
 * templates. Cuando migremos cada template al design system, podemos quitar
 * este bloque entero.
 */

/* Backgrounds */
.bg-white { background: var(--bg-elevated) !important; backdrop-filter: blur(20px) saturate(140%); }
.bg-slate-50 { background: var(--bg-glass) !important; }
.bg-slate-100 { background: rgba(255, 255, 255, 0.05) !important; }
.bg-slate-200 { background: rgba(255, 255, 255, 0.08) !important; }
.bg-slate-700, .bg-slate-800, .bg-slate-900 { background: rgba(22, 24, 42, 0.85) !important; }

/* Text */
.text-slate-900, .text-slate-800 { color: var(--text) !important; }
.text-slate-700 { color: rgba(255, 255, 255, 0.85) !important; }
.text-slate-600 { color: var(--text-muted) !important; }
.text-slate-500 { color: var(--text-muted) !important; }
.text-slate-400 { color: var(--text-dim) !important; }
.text-slate-300 { color: var(--text-muted) !important; }
.text-white { color: var(--text) !important; }

/* Borders */
.border-slate-100 { border-color: var(--border) !important; }
.border-slate-200 { border-color: var(--border) !important; }
.border-slate-300 { border-color: var(--border-bright) !important; }
.border-slate-400 { border-color: var(--border-bright) !important; }
.border { border-color: var(--border); }

/* Hover states */
.hover\:bg-slate-50:hover { background: var(--bg-glass) !important; }
.hover\:bg-slate-100:hover { background: rgba(255, 255, 255, 0.06) !important; }
.hover\:bg-slate-700:hover { background: rgba(22, 24, 42, 0.95) !important; }
.hover\:bg-slate-900:hover, .hover\:bg-slate-800:hover { background: rgba(0, 0, 0, 0.5) !important; }
.hover\:text-slate-900:hover { color: var(--text) !important; }
.hover\:border-slate-400:hover { border-color: var(--border-bright) !important; }

/* Form inputs over Tailwind */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"],
textarea, select {
  color-scheme: dark;
}
.border-slate-300:focus, input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent) !important; outline-offset: -2px; }

/* Tables */
.divide-slate-100 > tr:not(:last-child),
.divide-slate-100 > * + * { border-color: var(--border) !important; }
.divide-y > * + * { border-color: var(--border); }

/* Specific utilities used in inner pages */
.bg-emerald-100 { background: rgba(34, 197, 94, 0.15) !important; }
.text-emerald-900, .text-emerald-800 { color: #86efac !important; }
.border-emerald-300 { border-color: rgba(34, 197, 94, 0.3) !important; }
.bg-emerald-600 { background: var(--green) !important; color: #0a0b14 !important; }
.bg-emerald-700 { background: rgba(34, 197, 94, 0.8) !important; color: #0a0b14 !important; }
.hover\:bg-emerald-500:hover, .hover\:bg-emerald-600:hover { background: rgba(34, 197, 94, 0.7) !important; }

.bg-yellow-400 { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important; color: #0a0b14 !important; }
.hover\:bg-yellow-500:hover, .hover\:bg-yellow-300:hover { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; }
.bg-amber-50 { background: rgba(251, 191, 36, 0.08) !important; }
.border-amber-200 { border-color: rgba(251, 191, 36, 0.3) !important; }
.text-amber-700, .text-amber-800, .text-amber-900 { color: #fde68a !important; }

.bg-red-50 { background: rgba(239, 68, 68, 0.08) !important; }
.border-red-200 { border-color: rgba(239, 68, 68, 0.3) !important; }
.text-red-700, .text-red-800 { color: #fca5a5 !important; }
.bg-red-600 { background: var(--red) !important; }

.bg-brand-50 { background: rgba(167, 139, 250, 0.1) !important; }
.text-brand-500 { color: var(--accent) !important; }
.bg-brand-500, .bg-brand-600, .bg-brand-700 { background: var(--gradient) !important; color: #0a0b14 !important; }
.hover\:bg-brand-700:hover { background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%) !important; }

/* Shadow rebalance for dark */
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important; }
.shadow-lg { box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6) !important; }
.shadow-2xl { box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7) !important; }

/* kbd / code inline — used in shortcuts modals */
kbd, code {
  background: var(--bg-glass) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
}

/* HTMX panel detalle */
.bg-black\/30 { background: rgba(0, 0, 0, 0.6) !important; backdrop-filter: blur(4px); }


/* ─── Support Button (botón flotante) ──────────────────────────────────── */
.support-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  z-index: 80;
  background: rgba(22, 24, 42, 0.85);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.04),
    0 12px 32px -8px rgba(167, 139, 250, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  isolation: isolate;
}
.support-fab::before {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; z-index: 1;
}
.support-fab-glow {
  position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(167, 139, 250, 0.45), transparent 70%);
  filter: blur(8px); opacity: 0.65; z-index: -1; pointer-events: none;
}
.support-fab-icon { font-size: 24px; line-height: 1; z-index: 2; color: white; }
.support-fab:hover {
  transform: scale(1.06);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06),
    0 16px 48px -8px rgba(167, 139, 250, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.support-fab:active { transform: scale(0.96); }
.support-fab.is-open { background: rgba(22, 24, 42, 0.95); }

@keyframes support-pulse { 0%,100% { transform: scale(1); } 35% { transform: scale(1.08); } }
.support-fab.do-pulse {
  animation: support-pulse 1.6s ease-in-out;
  animation-iteration-count: 1; animation-delay: 1.2s;
}
.support-fab.do-pulse::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0;
  animation: support-ring 2.4s ease-out infinite;
  pointer-events: none; z-index: 0;
}
@keyframes support-ring {
  0%   { transform: scale(0.95); opacity: 0; }
  20%  { opacity: 0.55; }
  100% { transform: scale(1.55); opacity: 0; }
}

.support-popover {
  position: fixed; bottom: 96px; right: 24px;
  width: 340px; max-width: calc(100vw - 32px);
  background: rgba(13, 14, 28, 0.92);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 24px 80px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(167, 139, 250, 0.08);
  overflow: hidden; z-index: 79;
  animation: support-pop-in 0.22s cubic-bezier(.34,1.56,.64,1);
  transform-origin: bottom right;
  color: rgba(255, 255, 255, 0.92);
}
.support-popover::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.5;
}
@keyframes support-pop-in {
  0%   { opacity: 0; transform: translateY(8px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.support-popover-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.support-popover-title { font-size: 15px; font-weight: 600; color: white; letter-spacing: -0.01em; }
.support-popover-sub   { font-size: 11.5px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }
.support-popover-close {
  background: transparent; border: 0; color: rgba(255, 255, 255, 0.5);
  cursor: pointer; font-size: 14px; padding: 4px 8px; border-radius: 8px;
  transition: all 0.15s;
}
.support-popover-close:hover { color: white; background: rgba(255, 255, 255, 0.06); }
.support-popover-body { padding: 16px 16px 18px; }
.support-popover-prompt {
  font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px;
}
.support-popover-topics { display: flex; flex-direction: column; gap: 6px; }
.support-topic {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px; text-align: left; cursor: pointer;
  transition: all 0.18s ease;
}
.support-topic:hover {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.25);
  transform: translateX(2px);
}
.support-topic-icon { font-size: 16px; flex-shrink: 0; }
.support-topic-label { flex: 1; }
.support-topic-arrow { color: rgba(255, 255, 255, 0.35); font-size: 14px; transition: all 0.18s; }
.support-topic:hover .support-topic-arrow { color: var(--accent); transform: translateX(3px); }
.support-popover-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 10px; color: rgba(255, 255, 255, 0.35); font-size: 11px;
}
.support-popover-divider::before, .support-popover-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08);
}
.support-cta-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 14px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border: 0; border-radius: 12px;
  color: white; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.18s ease;
  box-shadow: 0 8px 24px -8px rgba(37, 211, 102, 0.55);
}
.support-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(37, 211, 102, 0.7);
}
.support-cta-primary:active { transform: translateY(0); }
.support-popover-foot { margin-top: 12px; text-align: center; font-size: 11px; color: rgba(255, 255, 255, 0.4); }

@media (max-width: 600px) {
  .support-fab { width: 52px; height: 52px; bottom: 18px; right: 18px; }
  .support-popover { right: 12px; left: 12px; bottom: 86px; width: auto; }
}

/* ─── Support Button v2: drag + chat embebido ──────────────────────────── */
.support-fab.is-dragging {
  cursor: grabbing !important;
  transition: none;
  box-shadow:
    0 0 0 3px rgba(167, 139, 250, 0.5),
    0 24px 48px -8px rgba(167, 139, 250, 0.8);
}
.support-fab:not(.is-dragging) { cursor: grab; }
.support-fab:not(.is-dragging):active { cursor: grabbing; }
.support-fab-grip {
  position: absolute; bottom: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(167, 139, 250, 0.9); color: white;
  font-size: 7px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -1px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  opacity: 0; transition: opacity 0.18s ease;
  pointer-events: none; z-index: 4;
}
.support-fab:hover .support-fab-grip { opacity: 1; }

.support-chat-stream {
  flex: 1; overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 380px; min-height: 220px;
  scroll-behavior: smooth;
}
.support-chat-stream::-webkit-scrollbar { width: 6px; }
.support-chat-stream::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.support-chat-msg {
  display: flex; gap: 8px; align-items: flex-end;
  animation: support-msg-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes support-msg-in { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: translateY(0); } }
.support-chat-msg.user { flex-direction: row-reverse; }
.support-chat-msg.bot, .support-chat-msg.system { align-self: flex-start; }
.support-chat-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
  box-shadow: 0 4px 12px -4px rgba(167, 139, 250, 0.5);
}
.support-chat-bubble {
  padding: 9px 12px; border-radius: 14px;
  font-size: 13px; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word; max-width: 230px;
}
.support-chat-msg.user .support-chat-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; border-bottom-right-radius: 4px;
}
.support-chat-msg.bot .support-chat-bubble {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92); border-bottom-left-radius: 4px;
}
.support-chat-msg.system .support-chat-bubble {
  background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fcd34d; font-size: 12px; border-bottom-left-radius: 4px;
}
.support-chat-typing { display: flex; align-items: center; gap: 4px; padding: 12px 14px; }
.support-chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.5);
  animation: support-typing 1.2s ease-in-out infinite;
}
.support-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.support-chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes support-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.support-chat-escalated {
  margin: 0 14px 8px; padding: 8px 10px;
  background: linear-gradient(90deg, rgba(167,139,250,0.12), rgba(56,189,248,0.08));
  border: 1px solid rgba(167,139,250,0.3); border-radius: 10px;
  font-size: 11.5px; color: rgba(255,255,255,0.85); line-height: 1.4;
}
.support-chat-composer {
  display: flex; gap: 6px; align-items: flex-end;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.support-chat-textarea {
  flex: 1; min-height: 36px; max-height: 100px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: white; font-size: 13px; font-family: inherit;
  resize: none; line-height: 1.4;
}
.support-chat-textarea:focus { outline: 0; border-color: var(--accent); background: rgba(167,139,250,0.06); }
.support-chat-send {
  width: 36px; height: 36px; border-radius: 10px; border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-size: 16px; font-weight: 700; cursor: pointer; flex-shrink: 0;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px -4px rgba(167,139,250,0.5);
}
.support-chat-send:hover { transform: translateY(-1px); }
.support-chat-send:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; transform: none; }
.support-chat-wapp-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 12px 12px; padding: 9px 12px;
  background: rgba(37,211,102,0.1); border: 1px solid rgba(37,211,102,0.35);
  border-radius: 10px; color: #25d366;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all 0.18s ease;
}
.support-chat-wapp-btn:hover { background: rgba(37,211,102,0.18); transform: translateY(-1px); }

.support-popover { right: 24px; bottom: 168px; }
@media (max-width: 600px) {
  .support-popover { right: 12px !important; left: 12px !important; width: auto !important; }
  .support-chat-bubble { max-width: 70vw; }
}
