/* ==========================================================================
   DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-glass: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(56, 189, 248, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  
  --primary-accent: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.25);
  
  --green-accent: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.25);
  
  --gold-accent: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  
  --whatsapp-color: #25d366;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   TYPOGRAPHY & UTILITIES
   ========================================================================== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

strong {
  color: #ffffff;
}

.text-center { text-align: center; }
.text-green { color: var(--green-accent); }
.green { color: var(--green-accent) !important; }
.orange { color: var(--gold-accent) !important; }
.blue { color: var(--primary-accent) !important; }
.m-top { margin-top: 40px; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-whatsapp {
  background-color: var(--whatsapp-color);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.btn-sponsor {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-sponsor:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-solid {
  background-color: var(--primary-accent);
  color: var(--text-dark);
}

.btn-solid:hover {
  background-color: #7dd3fc;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-highlight);
  color: var(--primary-accent);
}

.btn-outline:hover {
  background: var(--primary-glow);
  color: #ffffff;
}

.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

.btn-copy {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.btn-copy:hover {
  background-color: var(--primary-accent);
  color: var(--text-dark);
}

/* ==========================================================================
   TOP HEADER
   ========================================================================== */
.top-header {
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-accent);
  background: var(--primary-glow);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.brand-name {
  font-size: 1.4rem;
  color: #ffffff;
}

.brand-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.highlight-code {
  color: var(--gold-accent);
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   HERO SECTION & KPIS
   ========================================================================== */
.hero-section {
  padding: 40px 0 20px 0;
  background: radial-gradient(circle at top center, rgba(56, 189, 248, 0.12) 0%, rgba(15, 23, 42, 0) 70%);
}

.target-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold-accent);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 2.2rem;
  color: #ffffff;
  margin-bottom: 12px;
  max-width: 900px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 850px;
  margin-bottom: 30px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-main);
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
}

.kpi-card.highlight {
  border-color: var(--primary-accent);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(56, 189, 248, 0.08) 100%);
}

.kpi-card.active-mode {
  border-color: var(--green-accent);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(34, 197, 94, 0.08) 100%);
}

.kpi-val {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

.kpi-card.highlight .kpi-val { color: var(--primary-accent); }
.kpi-card.active-mode .kpi-val { color: var(--green-accent); }

.kpi-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   NAVIGATION TABS
   ========================================================================== */
.nav-tabs-wrapper {
  border-bottom: 1px solid var(--border-color);
  margin-top: 20px;
  background: rgba(15, 23, 42, 0.6);
  position: sticky;
  top: 73px;
  z-index: 90;
  backdrop-filter: blur(10px);
}

.nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: var(--primary-accent);
  background: var(--primary-glow);
  border: 1px solid var(--border-highlight);
}

/* ==========================================================================
   MAIN TAB CONTENT
   ========================================================================== */
.main-content {
  padding: 40px 20px 80px 20px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

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

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

.section-header {
  margin-bottom: 30px;
}

.section-header h3 {
  font-size: 1.6rem;
  color: #ffffff;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   TAB 1: CALCULADORA ROI
   ========================================================================== */
.calculator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-main);
}

.slider-box {
  background: rgba(15, 23, 42, 0.5);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.slider-header label {
  font-weight: 600;
  font-size: 1.1rem;
}

.slider-val-badge {
  background: var(--primary-accent);
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  padding: 4px 14px;
  border-radius: 20px;
}

#kits-range {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: #334155;
  outline: none;
  accent-color: var(--primary-accent);
  cursor: pointer;
}

.slider-marks {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.target-mark {
  color: var(--gold-accent);
  font-weight: 700;
}

.roi-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.roi-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.roi-card.highlight-card {
  border-color: var(--green-accent);
  background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.roi-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.roi-badge.popular {
  color: var(--green-accent);
}

.roi-card h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

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

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.calculation-result {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-top: auto;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.res-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.res-val {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-accent);
}

.res-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ESCALERA DE GANANCIAS */
.ladder-box {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--radius-md);
}

.ladder-box h4 {
  margin-bottom: 6px;
}

.ladder-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ladder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.ladder-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

.ladder-step.active-step {
  border-color: var(--green-accent);
}

.ladder-step.target-step {
  border-color: var(--gold-accent);
  background: rgba(245, 158, 11, 0.08);
}

.step-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.step-price {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-accent);
}

.step-cc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ladder-note {
  font-size: 0.78rem !important;
  font-style: italic;
  margin-top: 14px;
  margin-bottom: 0 !important;
}

/* ==========================================================================
   TAB 2: PROPUESTA ESTRUCTURADA
   ========================================================================== */
.proposal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

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

.info-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
}

.icon-box {
  font-size: 2rem;
  margin-bottom: 12px;
}

.info-card h4 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: #ffffff;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.comparison-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.styled-table th, .styled-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.styled-table th {
  background: rgba(15, 23, 42, 0.8);
  color: var(--primary-accent);
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

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

/* ==========================================================================
   TAB 3: RETO C9 DETOX
   ========================================================================== */
.challenge-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.timeline-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
}

.step-num {
  display: inline-block;
  background: var(--primary-glow);
  color: var(--primary-accent);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.step-content h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.poster-download-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(30, 41, 59, 0.8) 100%);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* ==========================================================================
   TAB 4: VIAJE CARTAGENA
   ========================================================================== */
.incentive-hero-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid var(--gold-accent);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-bottom: 30px;
}

.incentive-badge {
  color: var(--gold-accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.incentive-hero-card h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

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

.level-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.level-tag.gold { background: var(--gold-glow); color: var(--gold-accent); }
.level-tag.platinum { background: var(--primary-glow); color: var(--primary-accent); }

.level-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.level-reqs {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TAB 5: GUIONES & OBJECIONES
   ========================================================================== */
.scripts-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.script-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.script-header h4 {
  font-size: 1.05rem;
  color: var(--primary-accent);
}

.script-body {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed var(--border-color);
  padding: 16px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  white-space: pre-wrap;
}

.objections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.obj-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
}

.obj-q {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-accent);
  margin-bottom: 8px;
}

.obj-a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TAB 6: CRM PROSPECTOS
   ========================================================================== */
.crm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.crm-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.crm-stat-card.highlight-stat {
  border-color: var(--gold-accent);
  background: rgba(245, 158, 11, 0.05);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.crm-form-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 30px;
}

.crm-form-box h4 {
  margin-bottom: 16px;
}

.gym-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input, .form-group select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--primary-accent);
}

.crm-list-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.crm-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.table-responsive {
  overflow-x: auto;
}

.badge-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-por_contactar { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.status-cita_agendada { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status-presentado { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.status-cerrado_referidor { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.status-cerrado_mayorista { background: rgba(34, 197, 94, 0.2); color: #4ade80; }

.btn-del {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
}

.btn-del:hover { background: #ef4444; color: #fff; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
  background-color: #0b1120;
  border-top: 1px solid var(--border-color);
  padding: 50px 0 20px 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-brand h4 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.footer-contact h5 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.link-footer {
  color: var(--whatsapp-color);
  font-weight: 700;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
  .header-container { flex-direction: column; align-items: flex-start; }
  .header-actions { width: 100%; }
  .btn { flex: 1; text-align: center; }
  .hero-title { font-size: 1.6rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .nav-tabs-wrapper { top: 120px; }
}
