/* ==========================================================================
   Entre Mundos - Design System & Custom CSS (Clean & Refined Version)
   ========================================================================== */

:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Color Palette */
  --color-bg: #f9f6f1;
  --color-surface: #ffffff;
  --color-surface-translucent: rgba(255, 255, 255, 0.85);

  --color-forest: #2a382b;
  --color-sage: #5b755e;
  --color-sage-light: #e8eee8;
  
  --color-terracota: #c86d51;
  --color-terracota-light: #fbeee9;
  
  --color-gold: #d4af37;
  --color-gold-light: #fcf8e8;

  --color-text-main: #232b24;
  --color-text-muted: #6b776c;
  --color-border: #e2ded7;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;

  --shadow-sm: 0 2px 10px rgba(42, 56, 43, 0.04);
  --shadow-md: 0 8px 24px rgba(42, 56, 43, 0.07);
  --shadow-lg: 0 16px 40px rgba(42, 56, 43, 0.1);

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

/* Header Styling */
.app-header {
  background: var(--color-forest);
  color: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand { display: flex; align-items: center; gap: 1rem; }
.brand-logo { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); padding: 4px; }
.brand-text h1 { font-family: var(--font-primary); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.brand-subtitle { font-size: 0.8rem; opacity: 0.85; font-weight: 400; }
.header-user-status { display: flex; align-items: center; gap: 1.25rem; }

.status-pill {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.icon-sparkle { color: var(--color-gold); width: 16px; height: 16px; }

.progress-ring-container { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.progress-ring-bg { stroke: rgba(255, 255, 255, 0.2); stroke-width: 3.5; fill: transparent; }
.progress-ring-circle { stroke: var(--color-gold); stroke-width: 3.5; stroke-dasharray: 113.097; stroke-dashoffset: 113.097; stroke-linecap: round; fill: transparent; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.5s ease-in-out; }
.progress-ring-text { position: absolute; font-size: 0.72rem; font-weight: 700; color: #ffffff; }

.app-container { display: flex; flex: 1; max-width: 1400px; width: 100%; margin: 0 auto; }
.app-nav { width: 280px; background: var(--color-surface); border-right: 1px solid var(--color-border); padding: 1.75rem 1.25rem; display: flex; flex-direction: column; gap: 0.45rem; }

.nav-item {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1.15rem; border: none; background: transparent; color: var(--color-text-muted); font-family: var(--font-primary); font-size: 0.95rem; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition-fast); text-align: left; width: 100%;
}

.nav-item i { width: 20px; height: 20px; stroke-width: 2.2; }
.nav-item:hover { background: var(--color-sage-light); color: var(--color-forest); }
.nav-item.active { background: var(--color-sage-light); color: var(--color-forest); border-left: 4px solid var(--color-terracota); }

.app-main { flex: 1; padding: 2.25rem 3rem; overflow-y: auto; }
.tab-content { display: none; animation: fadeIn 0.35s ease-in-out; }
.tab-content.active { display: block; }

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

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; gap: 1rem; flex-wrap: wrap; }
.section-header h2 { font-family: var(--font-primary); font-size: 1.85rem; font-weight: 700; color: var(--color-forest); }
.section-header p { color: var(--color-text-muted); font-size: 0.98rem; }

.hero-banner { background: linear-gradient(135deg, var(--color-forest) 0%, #3e5240 100%); color: #ffffff; padding: 2.5rem 2.75rem; border-radius: var(--radius-lg); margin-bottom: 2rem; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-md); }
.hero-text h2 { font-family: var(--font-primary); font-size: 1.85rem; margin-bottom: 0.5rem; }
.hero-text p { opacity: 0.9; max-width: 600px; font-size: 1rem; }
.hero-badge { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); padding: 0.75rem 1.25rem; border-radius: var(--radius-md); display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--color-surface); padding: 1.6rem; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 1.25rem; border: 1px solid var(--color-border); }
.stat-icon { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.icon-terracota { background: var(--color-terracota-light); color: var(--color-terracota); }
.icon-sage { background: var(--color-sage-light); color: var(--color-sage); }
.icon-gold { background: var(--color-gold-light); color: var(--color-gold); }
.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 0.85rem; color: var(--color-text-muted); font-weight: 500; }
.stat-value { font-family: var(--font-primary); font-size: 1.3rem; font-weight: 700; color: var(--color-forest); }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.card { background: var(--color-surface); border-radius: var(--radius-md); padding: 2rem; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; color: var(--color-forest); }
.card-header h3 { font-family: var(--font-primary); font-size: 1.25rem; font-weight: 700; }
.card-subtitle { color: var(--color-text-muted); font-size: 0.92rem; margin-bottom: 1.25rem; }

.quick-buttons-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.card-inspiration blockquote { font-family: var(--font-primary); font-style: italic; font-size: 1.15rem; color: var(--color-forest); border-left: 4px solid var(--color-terracota); padding-left: 1rem; margin-bottom: 0.75rem; }
.quote-author { display: block; font-size: 0.85rem; color: var(--color-text-muted); font-weight: 600; }
.quick-tasks-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.quick-task-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.1rem; background: var(--color-bg); border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 500; }

/* Sub-Pestañas Internas */
.subtab-content {
  display: none;
  animation: fadeIn 0.35s ease-in-out;
}

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

/* Enlaces a Documentos Oficiales de Young Living */
.official-links-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.official-links-box h4 {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  color: var(--color-forest);
  margin-bottom: 0.35rem;
}

.official-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.official-link-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--color-border);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  color: var(--color-forest);
  font-family: var(--font-primary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.official-link-btn:hover {
  border-color: var(--color-sage);
  background: var(--color-sage-light);
  transform: translateY(-2px);
}

.official-link-btn i {
  color: var(--color-sage);
  width: 18px;
  height: 18px;
}

.official-link-btn .link-ext-icon {
  margin-left: auto;
  color: var(--color-text-muted);
  width: 16px;
  height: 16px;
}

.external-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-forest);
  text-decoration: none;
  background: #ffffff;
  padding: 0.5rem 0.85rem;
  border-radius: 50px;
  border: 1px solid var(--color-border);
  transition: var(--transition-fast);
}

.external-link-badge:hover {
  border-color: var(--color-sage);
  background: var(--color-sage-light);
}

/* Estilos para la Guía de Compliance */
.compliance-examples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.compliance-card {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
}

.comp-wrong {
  background: var(--color-terracota-light);
  border-color: var(--color-terracota);
}

.comp-wrong .comp-header {
  color: #a33b1e;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.comp-right {
  background: var(--color-sage-light);
  border-color: var(--color-sage);
}

.comp-right .comp-header {
  color: var(--color-forest);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

/* Estilos de Comparativa Legal: Multinivel vs Piramidal */
.legal-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.legal-card {
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-legal {
  background: var(--color-sage-light);
  border-color: var(--color-sage);
}

.legal-legal h4 {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  color: var(--color-forest);
}

.legal-piramidal {
  background: var(--color-terracota-light);
  border-color: var(--color-terracota);
}

.legal-piramidal h4 {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  color: #a33b1e;
}

/* Estilos de Estrategias para Compartir (Presencial vs Redes) */
.sharing-strategies-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.strategy-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-top: 5px solid var(--color-sage);
  box-shadow: var(--shadow-sm);
}

.strat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.strat-icon {
  font-size: 2.2rem;
  background: var(--color-bg);
  padding: 0.5rem 0.75rem;
  border-radius: 14px;
}

.strat-header h4 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  color: var(--color-forest);
  line-height: 1.2;
}

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

/* Tarjetas del Bono Avance de Rango */
.rank-advancement-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.advancement-card {
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.adv-badge {
  font-family: var(--font-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  background: var(--color-gold-light);
  color: var(--color-gold);
  display: inline-block;
  width: fit-content;
}

.advancement-card h4 {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  color: var(--color-forest);
  font-weight: 700;
}

.advancement-card p {
  font-size: 0.88rem;
  color: var(--color-text-main);
}

/* PESTAÑA 1: ¿DE DÓNDE SALEN LAS COMISIONES? */
.phase-selector-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.phase-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-family: var(--font-primary);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.phase-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.phase-btn:hover { border-color: var(--color-sage); color: var(--color-forest); }
.phase-btn.active { background: var(--color-forest); color: #ffffff; border-color: var(--color-forest); }
.phase-btn.active .phase-num { background: rgba(255, 255, 255, 0.25); color: #ffffff; }

.phase-card-box { display: none; animation: fadeIn 0.35s ease-in-out; }
.phase-card-box.active { display: block; }
.phase-main-card { padding: 2.5rem; border-top: 5px solid var(--color-sage); }

.border-sage { border-top-color: var(--color-sage); }
.border-gold { border-top-color: var(--color-gold); }
.border-terracota { border-top-color: var(--color-terracota); }
.border-forest { border-top-color: var(--color-forest); }

.card-tag {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-sage { background: var(--color-sage-light); color: var(--color-sage); }
.tag-gold { background: var(--color-gold-light); color: var(--color-gold); }
.tag-terracota { background: var(--color-terracota-light); color: var(--color-terracota); }
.tag-forest { background: var(--color-sage-light); color: var(--color-forest); }
.tag-royal { background: var(--color-forest); color: #ffffff; }

.phase-main-card h3 { font-family: var(--font-primary); font-size: 1.6rem; color: var(--color-forest); margin-bottom: 0.5rem; }
.phase-intro { font-size: 1.02rem; color: var(--color-text-muted); max-width: 800px; margin-bottom: 1.25rem; }

.sub-header-title {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  color: var(--color-forest);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Reglas y Cajas Espaciosas */
.rule-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.rule-icon { font-size: 2.2rem; background: #ffffff; padding: 0.75rem; border-radius: 16px; line-height: 1; box-shadow: var(--shadow-sm); }
.rule-text h4 { font-family: var(--font-primary); font-size: 1.2rem; color: var(--color-forest); margin-bottom: 0.4rem; }
.rule-example { margin-top: 0.75rem; background: #ffffff; padding: 0.75rem 1rem; border-radius: var(--radius-sm); border-left: 3px solid var(--color-sage); font-size: 0.92rem; }

.clarifications-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.clar-card { background: #ffffff; border: 1px solid var(--color-border); padding: 1.5rem; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.clar-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.clar-card h4 { font-family: var(--font-primary); font-size: 1.1rem; color: var(--color-forest); margin-bottom: 0.35rem; }
.clar-card p { font-size: 0.92rem; color: var(--color-text-main); }

.bonuses-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.bonus-card { background: var(--color-bg); border: 1px solid var(--color-border); padding: 1.6rem; border-radius: var(--radius-md); position: relative; }

.b-badge { font-family: var(--font-primary); font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.65rem; border-radius: 50px; background: var(--color-sage); color: #ffffff; display: inline-block; margin-bottom: 0.75rem; }
.b-gold { background: var(--color-gold); }
.b-terracota { background: var(--color-terracota); }
.b-royal { background: var(--color-forest); }

.bonus-card h4 { font-family: var(--font-primary); font-size: 1.15rem; color: var(--color-forest); margin-bottom: 0.4rem; }
.bonus-card p { font-size: 0.9rem; color: var(--color-text-main); }

.total-example-callout { background: var(--color-gold-light); border: 1px solid rgba(212, 175, 55, 0.4); padding: 1.5rem; border-radius: var(--radius-md); }
.total-example-callout h4 { font-family: var(--font-primary); font-size: 1.15rem; color: var(--color-forest); margin-bottom: 0.35rem; }

.concept-breakdown-card { background: #ffffff; border: 1.5px solid var(--color-border); padding: 1.75rem; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.concept-breakdown-card h4 { font-family: var(--font-primary); font-size: 1.2rem; color: var(--color-forest); margin-bottom: 0.5rem; }
.concept-breakdown-card p { font-size: 0.95rem; color: var(--color-text-main); margin-bottom: 0.5rem; }

.info-box-highlight { background: var(--color-sage-light); border-left: 4px solid var(--color-sage); padding: 1.5rem; border-radius: var(--radius-md); }
.info-box-highlight h4 { font-family: var(--font-primary); font-size: 1.15rem; color: var(--color-forest); margin-bottom: 0.4rem; }
.warning-highlight { background: var(--color-terracota-light); border-left-color: var(--color-terracota); }

/* ILUSTRACIÓN DE NIVELES EN ESCALERA VERTICAL */
.levels-illustration-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 2rem;
  border-radius: var(--radius-md);
}

.levels-illustration-card h4 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  color: var(--color-forest);
  margin-bottom: 0.35rem;
}

.levels-vertical-ladder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.ladder-step {
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.step-badge-label {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  white-space: nowrap;
}

.step-you .step-badge-label { background: var(--color-forest); color: #ffffff; }
.step-l1 .step-badge-label { background: var(--color-sage-light); color: var(--color-sage); }
.step-l2 .step-badge-label { background: var(--color-gold-light); color: var(--color-gold); }
.step-l3 .step-badge-label { background: var(--color-terracota-light); color: var(--color-terracota); }

.step-info { display: flex; flex-direction: column; }
.step-info strong { font-family: var(--font-primary); font-size: 1.02rem; color: var(--color-forest); }
.step-earning { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.2rem; }
.ladder-connector { font-size: 1.2rem; color: var(--color-sage); }

/* ESTILOS DE LA PESTAÑA: MAPA DE RANGOS */
.rank-category-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.rank-filter-btn {
  padding: 0.7rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.rank-filter-btn:hover { border-color: var(--color-sage); color: var(--color-forest); }
.rank-filter-btn.active { background: var(--color-forest); color: #ffffff; border-color: var(--color-forest); }

.ranks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.75rem;
}

.rank-card-interactive {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  border-top: 4px solid var(--color-sage);
}

.rank-header-badge {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  background: var(--color-sage-light);
  color: var(--color-sage);
  text-transform: uppercase;
}

.badge-gold { background: var(--color-gold-light); color: var(--color-gold); }
.badge-terracota { background: var(--color-terracota-light); color: var(--color-terracota); }
.badge-royal { background: var(--color-forest); color: #ffffff; }

.rank-card-interactive h3 {
  font-family: var(--font-primary);
  font-size: 1.35rem;
  color: var(--color-forest);
  padding-right: 4rem;
}

.rank-req-box {
  background: var(--color-bg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.rank-req-box strong { color: var(--color-forest); }

.rank-bonus-pill {
  background: var(--color-gold-light);
  border: 1px solid var(--color-gold);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-forest);
}

.rank-income-tag {
  background: var(--color-forest);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  text-align: center;
  margin-top: auto;
}

.rank-income-info { font-size: 0.85rem; color: var(--color-text-muted); margin-top: auto; }

.terms-duo-clean { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.clean-term-card { background: var(--color-bg); border: 1px solid var(--color-border); padding: 1.75rem; border-radius: var(--radius-md); }
.c-term-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.c-term-icon { font-size: 1.75rem; }
.c-term-header h4 { font-family: var(--font-primary); font-size: 1.2rem; color: var(--color-forest); }
.c-term-highlight { background: #ffffff; padding: 0.85rem 1rem; border-radius: var(--radius-sm); border-left: 3px solid var(--color-sage); margin-top: 1rem; font-size: 0.88rem; }

.placement-simple-box { background: var(--color-sage-light); border: 1px solid var(--color-sage); padding: 1.5rem; border-radius: var(--radius-md); }
.placement-simple-box h4 { font-family: var(--font-primary); font-size: 1.15rem; color: var(--color-forest); margin-bottom: 0.4rem; }

.quiz-single-box { background: var(--color-bg); border: 1px solid var(--color-border); padding: 1.75rem; border-radius: var(--radius-md); }
.quiz-single-box h4 { font-family: var(--font-primary); font-size: 1.15rem; color: var(--color-forest); margin-bottom: 0.35rem; }

.quiz-options { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 1rem; }
.quiz-opt-btn { background: #ffffff; border: 2px solid var(--color-border); padding: 1rem 1.25rem; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; text-align: left; cursor: pointer; transition: var(--transition-fast); }
.quiz-opt-btn:hover { border-color: var(--color-sage); }
.quiz-opt-btn.selected-correct { background: #e6f4ea; border-color: #34a853; color: #137333; font-weight: 600; }
.quiz-opt-btn.selected-wrong { background: #fce8e6; border-color: #ea4335; color: #c5221f; }
.quiz-feedback { margin-top: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 600; }
.quiz-feedback.success { background: #e6f4ea; color: #137333; border: 1px solid #a8dab5; }
.quiz-feedback.error { background: #fce8e6; color: #c5221f; border: 1px solid #f5b7b1; }
.quiz-feedback.hidden { display: none; }

.phase-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.margin-top { margin-top: 1.75rem; }

/* REDISEÑO DEL GLOSARIO DE TÉRMINOS */
.glos-search-bar-container {
  width: 100%;
  max-width: 650px;
}

.glos-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--color-sage);
  width: 20px;
  height: 20px;
}

.glos-search-input {
  width: 100%;
  padding: 1.1rem 1.25rem 1.1rem 3.2rem;
  border: 1.5px solid var(--color-border);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.glos-search-input:focus {
  outline: none;
  border-color: var(--color-sage);
  box-shadow: 0 0 0 4px rgba(91, 117, 94, 0.15);
}

.glossary-category-bar {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.glossary-cat-btn {
  padding: 0.7rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.glossary-cat-btn:hover { border-color: var(--color-sage); color: var(--color-forest); }
.glossary-cat-btn.active { background: var(--color-forest); color: #ffffff; border-color: var(--color-forest); }

.dictionary-modern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.dict-card-modern {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--transition-fast);
}

.dict-card-modern:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-sage);
}

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

.dict-badge {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  text-transform: uppercase;
}

.badge-sage { background: var(--color-sage-light); color: var(--color-sage); }
.badge-gold { background: var(--color-gold-light); color: var(--color-gold); }
.badge-terracota { background: var(--color-terracota-light); color: var(--color-terracota); }
.badge-royal { background: var(--color-forest); color: #ffffff; }

.dict-icon-container {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.dict-card-modern h3 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  color: var(--color-forest);
  line-height: 1.2;
}

.dict-card-modern p {
  font-size: 0.93rem;
  color: var(--color-text-main);
  line-height: 1.5;
}

.dict-tip-box {
  background: var(--color-sage-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.82rem;
  color: var(--color-forest);
  margin-top: 0.35rem;
}

/* CHECKLIST DINÁMICO DE REQUISITOS DE RANGO */
.rank-dynamic-checklist-box {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.rank-checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.rank-progress-badge {
  background: var(--color-forest);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 0.95rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.congrats-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(230, 168, 87, 0.18), rgba(212, 122, 98, 0.18));
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  animation: fadeIn 0.4s ease-out;
}

.congrats-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.congrats-body h4 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  color: var(--color-forest);
  margin-bottom: 0.25rem;
}

.congrats-body p {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0;
}

.rank-checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* PLANIFICADOR SEMANAL POR DÍAS */
.weekly-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.day-card {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.day-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--color-border);
}

.day-badge {
  align-self: flex-start;
  background: var(--color-forest);
  color: #ffffff;
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  letter-spacing: 0.05em;
}

.day-badge.b-gold { background: var(--color-gold); color: #ffffff; }
.day-badge.b-forest { background: var(--color-sage); color: #ffffff; }
.day-badge.b-terracota { background: var(--color-terracota); color: #ffffff; }
.day-badge.b-royal { background: #5c6b73; color: #ffffff; }

.day-header h4 {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  color: var(--color-forest);
  margin: 0;
}

.day-tasks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* HELP 5 FLYER STYLES */
.help5-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.help5-card {
  background: #ffffff;
  border: 1.5px solid #2b78c5;
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.help5-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.help5-badge {
  width: 64px;
  height: 64px;
  background: #2b78c5;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 10px rgba(43, 120, 197, 0.25);
}

.help5-card h4 {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  color: #2b78c5;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.help5-card p {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.4;
  margin: 0;
}

.badge-new-tag {
  display: inline-block;
  background: #e74c3c;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  transform: rotate(-3deg);
}

/* Guide Container */
.guide-container { display: flex; flex-direction: column; gap: 1.75rem; }
.guide-intro h3 { font-family: var(--font-primary); font-size: 1.4rem; color: var(--color-forest); margin-bottom: 0.4rem; }
.guide-phases { display: flex; flex-direction: column; gap: 1.25rem; }
.phase-card { display: flex; align-items: flex-start; gap: 1.5rem; background: var(--color-bg); padding: 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.phase-number { background: var(--color-forest); color: #ffffff; font-family: var(--font-primary); font-weight: 700; font-size: 0.85rem; padding: 0.5rem 1rem; border-radius: 50px; white-space: nowrap; }
.phase-content h4 { font-family: var(--font-primary); font-size: 1.15rem; color: var(--color-forest); margin-bottom: 0.5rem; }

/* Buttons & Inputs */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.5rem; border-radius: var(--radius-sm); font-family: var(--font-primary); font-size: 0.95rem; font-weight: 600; border: none; cursor: pointer; transition: var(--transition-fast); }
.btn-primary { background: var(--color-terracota); color: #ffffff; }
.btn-primary:hover { background: #b55d42; box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-forest); }
.btn-outline:hover { background: var(--color-bg); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* Form Styles */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: end; }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; justify-content: flex-end; }
.form-group.full-width { grid-column: span 2; }
.form-group label { font-size: 0.88rem; font-weight: 600; color: var(--color-forest); display: flex; align-items: flex-end; min-height: 2.4rem; line-height: 1.25; }
.form-input { padding: 0.75rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.95rem; background: #ffffff; width: 100%; height: 46px; }
textarea.form-input { height: auto; }
.form-input:focus { outline: none; border-color: var(--color-sage); box-shadow: 0 0 0 3px rgba(91, 117, 94, 0.15); }

/* Custom Checkboxes */
.custom-checkbox { display: flex; align-items: flex-start; gap: 0.85rem; cursor: pointer; font-size: 0.95rem; user-select: none; padding: 0.5rem 0; }
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark { height: 22px; width: 22px; background-color: #ffffff; border: 2px solid var(--color-border); border-radius: 6px; flex-shrink: 0; margin-top: 2px; transition: var(--transition-fast); }
.custom-checkbox:hover input ~ .checkmark { border-color: var(--color-sage); }
.custom-checkbox input:checked ~ .checkmark { background-color: var(--color-sage); border-color: var(--color-sage); }
.checkmark:after { content: ""; position: absolute; display: none; }
.custom-checkbox input:checked ~ .checkmark:after { display: block; }
.custom-checkbox .checkmark:after { margin-left: 6px; margin-top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* Workbook tabs & Sub-pestañas */
.workbook-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--color-border); overflow-x: auto; padding-bottom: 2px; }
.wb-tab-btn { padding: 0.75rem 1.25rem; background: transparent; border: none; font-family: var(--font-primary); font-size: 0.95rem; font-weight: 600; color: var(--color-text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: var(--transition-fast); }
.wb-tab-btn:hover { color: var(--color-forest); }
.wb-tab-btn.active { color: var(--color-forest); border-bottom-color: var(--color-terracota); }
.wb-content { display: none; }
.wb-content.active { display: block; }

/* Table styles */
.data-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.data-table th, .data-table td { padding: 1.1rem; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.92rem; }
.data-table th { background: var(--color-bg); font-family: var(--font-primary); font-weight: 700; color: var(--color-forest); }

/* Calculator Layout */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.calc-results { background: var(--color-sage-light); padding: 1.75rem; border-radius: var(--radius-md); display: flex; flex-direction: column; gap: 1.25rem; }
.result-box { background: #ffffff; padding: 1rem 1.25rem; border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 0.25rem; }
.res-title { font-size: 0.82rem; color: var(--color-text-muted); font-weight: 600; }
.res-value { font-family: var(--font-primary); font-size: 1.5rem; font-weight: 700; color: var(--color-forest); }
.res-badge { font-family: var(--font-primary); font-size: 1.1rem; font-weight: 700; color: var(--color-terracota); }

/* Modals & Utility Classes */
.hidden { display: none !important; }
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; overflow-y: auto; }
.modal-backdrop.hidden { display: none !important; }
.modal-card { background: #ffffff; width: 92%; max-width: 540px; max-height: 88vh; overflow-y: auto; border-radius: var(--radius-md); padding: 1.75rem; box-shadow: var(--shadow-lg); scrollbar-width: thin; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; position: sticky; top: 0; background: #ffffff; padding-bottom: 0.5rem; z-index: 10; border-bottom: 1px solid var(--color-border); }
.btn-close { background: transparent; border: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--color-text-muted); padding: 0 0.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; }

/* Mobile Responsive & Fixed Bottom Navigation Bar */
@media (max-width: 900px) {
  .app-container { flex-direction: column; padding-bottom: 70px; }
  .app-nav { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100vw; 
    height: 64px; 
    background: #ffffff; 
    border-right: none; 
    border-top: 1.5px solid var(--color-border); 
    z-index: 900; 
    padding: 0.25rem 0.5rem; 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08); 
    overflow-x: auto;
  }
  .nav-item { 
    flex-direction: column; 
    gap: 0.2rem; 
    padding: 0.35rem 0.5rem; 
    font-size: 0.72rem; 
    font-weight: 600; 
    text-align: center; 
    border: none !important; 
    color: var(--color-text-muted); 
    border-radius: var(--radius-sm);
  }
  .nav-item.active { 
    background: rgba(196, 112, 89, 0.1); 
    color: var(--color-terracota); 
  }
  .nav-item i { font-size: 1.15rem; }
  .dashboard-grid, .calc-grid, .form-grid, .clarifications-grid, .terms-duo-clean, .rank-advancement-cards-grid, .legal-comparison-grid, .sharing-strategies-grid, .compliance-examples-grid { grid-template-columns: 1fr; flex-direction: column; }
  .phase-card { flex-direction: column; gap: 0.75rem; }
  .app-main { padding: 1rem 0.85rem; }
}
