/* =====================================================
   PEI App — Estilos Principales
   Posicionarte en Internet
   Paleta: #3D3D3D (oscuro) | #F5A623 (naranja) | #fff
   ===================================================== */

/* ---------- RESET & BASE ---------- */
.pei-app *,
.pei-app *::before,
.pei-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.pei-app {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: #3D3D3D;
  background: #F7F8FA;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.pei-app a { text-decoration: none; }
.pei-app ul { list-style: none; }
.pei-app input, .pei-app button, .pei-app select, .pei-app textarea {
  font-family: inherit;
}

/* ---------- LOGO ---------- */
.pei-logo { height: 44px; display: inline-block; vertical-align: middle; }
.pei-logo-wrap { display: flex; align-items: center; gap: 10px; }
.pei-logo-centered { justify-content: center; margin-bottom: 20px; }
.pei-app-name, .pei-auth-app-name {
  font-size: 22px;
  font-weight: 800;
  color: #3D3D3D;
  letter-spacing: -0.5px;
}

/* ---------- TOPBAR ---------- */
.pei-topbar {
  background: #fff;
  border-bottom: 1px solid #E8E9EB;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.pei-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pei-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pei-plan-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.pei-user-name { font-size: 14px; font-weight: 500; color: #555; }
.pei-logout-btn {
  font-size: 13px;
  color: #999;
  border: 1px solid #ddd;
  padding: 5px 12px;
  border-radius: 6px;
  transition: all .2s;
}
.pei-logout-btn:hover { color: #3D3D3D; border-color: #aaa; }

/* ---------- LAYOUT ---------- */
.pei-dashboard-layout {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 64px);
}

/* ---------- SIDEBAR ---------- */
.pei-sidebar {
  width: 220px;
  min-width: 220px;
  background: #fff;
  border-right: 1px solid #E8E9EB;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.pei-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}
.pei-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  transition: all .15s;
  cursor: pointer;
}
.pei-nav-item:hover { background: #F5A62315; color: #F5A623; }
.pei-nav-item.active { background: #F5A62320; color: #F5A623; font-weight: 700; }
.pei-sidebar-upgrade {
  margin: auto 12px 12px;
  background: linear-gradient(135deg, #3D3D3D, #555);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: #fff;
  font-size: 13px;
}
.pei-sidebar-upgrade p { margin-bottom: 10px; line-height: 1.4; }

/* ---------- MAIN CONTENT ---------- */
.pei-main-content {
  flex: 1;
  padding: 32px;
  min-width: 0;
}
.pei-section { display: none; }
.pei-section.active { display: block; }
.pei-section h2 {
  font-size: 22px;
  font-weight: 800;
  color: #3D3D3D;
  margin-bottom: 6px;
}
.pei-section-sub { color: #777; font-size: 14px; margin-bottom: 24px; }

/* ---------- WELCOME CARD ---------- */
.pei-welcome-card {
  background: linear-gradient(135deg, #3D3D3D 0%, #555 100%);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}
.pei-welcome-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(245,166,35,.12);
  border-radius: 50%;
}
.pei-welcome-text h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.pei-welcome-text p  { opacity: .85; font-size: 15px; margin-bottom: 20px; }
.pei-welcome-art { opacity: .85; }
.pei-welcome-svg { width: 120px; height: 90px; }

/* ---------- STATS ---------- */
.pei-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.pei-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #E8E9EB;
  transition: box-shadow .2s;
}
.pei-stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.pei-stat-icon { font-size: 28px; }
.pei-stat-info { display: flex; flex-direction: column; }
.pei-stat-num  { font-size: 22px; font-weight: 800; color: #3D3D3D; }
.pei-stat-label{ font-size: 12px; color: #999; }

/* ---------- PROGRESS CARD ---------- */
.pei-progress-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #E8E9EB;
  margin-bottom: 24px;
}
.pei-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.pei-progress-header h3 { font-size: 16px; font-weight: 700; }
.pei-progress-pct { font-size: 22px; font-weight: 800; color: #F5A623; }
.pei-progress-bar-wrap {
  background: #F0F0F0;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}
.pei-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #F5A623, #FF8C00);
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(.22,1,.36,1);
}
.pei-progress-hint { font-size: 13px; color: #777; }

/* ---------- DIAGNÓSTICO CTA ---------- */
.pei-diagnostico-cta {
  background: linear-gradient(135deg, #FFF8EC, #FFEFD5);
  border: 2px dashed #F5A623;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.pei-diagnostico-cta-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.pei-diagnostico-emoji { font-size: 36px; }
.pei-diagnostico-cta h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.pei-diagnostico-cta p  { font-size: 14px; color: #666; }
.pei-diagnostico-cta .pei-btn { white-space: nowrap; margin-left: auto; }

/* ---------- NEXT STEPS ---------- */
.pei-next-steps {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #E8E9EB;
}
.pei-next-steps h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.pei-steps-list { display: flex; flex-direction: column; gap: 12px; }
.pei-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #E8E9EB;
}
.pei-step-done    { background: #F0FFF4; border-color: #28A745; opacity: .7; }
.pei-step-active  { background: #FFF8EC; border-color: #F5A623; }
.pei-step-upgrade { background: #FFF5F5; border-color: #DC3545; }
.pei-step-pending { background: #F9F9F9; }
.pei-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #3D3D3D;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.pei-step-done .pei-step-num { background: #28A745; }
.pei-step-upgrade .pei-step-num { background: #DC3545; }
.pei-step-content strong { display: block; font-size: 14px; margin-bottom: 4px; }
.pei-step-content p { font-size: 13px; color: #777; margin-bottom: 10px; }

/* ---------- BOTONES ---------- */
.pei-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.pei-btn-accent {
  background: #F5A623;
  color: #fff;
  border-color: #F5A623;
}
.pei-btn-accent:hover {
  background: #E09520;
  border-color: #E09520;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245,166,35,.4);
}
.pei-btn-outline {
  background: transparent;
  color: #3D3D3D;
  border-color: #D0D0D0;
}
.pei-btn-outline:hover { border-color: #3D3D3D; background: #F5F5F5; }
.pei-btn-primary { background: #3D3D3D; color: #fff; border-color: #3D3D3D; }
.pei-btn-primary:hover { background: #2A2A2A; }
.pei-btn-danger  { background: #DC3545; color: #fff; border-color: #DC3545; }
.pei-btn-danger:hover { background: #C82333; }
.pei-btn-whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.pei-btn-whatsapp:hover { background: #1DAA55; }
.pei-btn-locked {
  background: #F0F0F0;
  color: #999;
  border-color: #E0E0E0;
  cursor: default;
}
.pei-btn-disabled { opacity: .5; cursor: not-allowed; }
.pei-btn-sm  { padding: 7px 14px; font-size: 13px; }
.pei-btn-lg  { padding: 14px 28px; font-size: 16px; }
.pei-btn-full { width: 100%; }

.pei-btn-mp {
  background: #009EE3;
  color: #fff;
  border-color: #009EE3;
  width: 100%;
  margin-bottom: 8px;
}
.pei-btn-mp:hover { background: #0087C2; }
.pei-btn-paypal {
  background: #003087;
  color: #fff;
  border-color: #003087;
  width: 100%;
}
.pei-btn-paypal:hover { background: #001F5B; }

/* ---------- RECURSOS ---------- */
.pei-recursos-grupo { margin-bottom: 32px; }
.pei-grupo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pei-nivel-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.pei-nivel-free        { background: #F0F0F0; color: #555; }
.pei-nivel-starter     { background: #E8F5E9; color: #2E7D32; }
.pei-nivel-crecimiento { background: #FFFDE7; color: #F57F17; }
.pei-nivel-delegado    { background: #FFEBEE; color: #C62828; }

.pei-upgrade-chip {
  display: inline-block;
  padding: 4px 12px;
  background: #FFF8EC;
  border: 1px solid #F5A623;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #E09520;
  transition: all .2s;
}
.pei-upgrade-chip:hover { background: #F5A623; color: #fff; }

.pei-recursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.pei-recurso-card {
  background: #fff;
  border: 1px solid #E8E9EB;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all .2s;
}
.pei-recurso-unlocked:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.pei-recurso-locked { opacity: .65; background: #F9F9F9; }
.pei-recurso-icon { font-size: 28px; }
.pei-recurso-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pei-recurso-info p  { font-size: 12px; color: #888; }
.pei-locked-hint { font-size: 12px; color: #F5A623 !important; font-style: italic; }
.pei-recurso-card .pei-btn { margin-top: auto; }

/* ---------- SERVICIOS ---------- */
.pei-servicios-grid { display: flex; flex-direction: column; gap: 24px; }
.pei-servicio-nivel {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E8E9EB;
  overflow: hidden;
  position: relative;
}
.pei-servicio-nivel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.pei-servicio-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.pei-servicio-col {
  padding: 20px 24px;
  border-right: 1px solid #F0F0F0;
}
.pei-servicio-col:last-child { border-right: none; }
.pei-servicio-col h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.pei-servicio-col ul li {
  padding: 5px 0;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #F5F5F5;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pei-servicio-col ul li::before { content: '→'; color: #F5A623; font-weight: 700; }
.pei-locked-item { opacity: .35; }
.pei-locked-item::before { content: '🔒' !important; }
.pei-soporte-box {
  background: #F8F8F8;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
}
.pei-soporte-box strong { font-size: 12px; display: block; margin-bottom: 6px; color: #3D3D3D; }
.pei-nivel-bloqueado { opacity: .85; }
.pei-nivel-upgrade-overlay {
  padding: 16px 24px;
  background: linear-gradient(0deg, #fff 60%, transparent);
  text-align: center;
}

/* ---------- MI PLAN ---------- */
.pei-mi-plan-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E8E9EB;
  padding: 28px;
  max-width: 600px;
}
.pei-mi-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.pei-plan-nombre { display: block; font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.pei-plan-tagline { font-size: 14px; color: #888; }
.pei-plan-precio { font-size: 22px; font-weight: 800; color: #F5A623; }
.pei-plan-features li {
  padding: 8px 0;
  border-bottom: 1px solid #F0F0F0;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.pei-check { color: #28A745; font-weight: 700; }
.pei-upgrade-cta {
  background: #FFF8EC;
  border-radius: 10px;
  padding: 16px;
  margin-top: 20px;
}
.pei-upgrade-cta p { font-size: 14px; margin-bottom: 10px; }

/* ---------- SOPORTE ---------- */
.pei-soporte-opciones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.pei-soporte-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E8E9EB;
  padding: 24px;
  text-align: center;
  transition: all .2s;
}
.pei-soporte-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.pei-soporte-icon { font-size: 36px; margin-bottom: 12px; }
.pei-soporte-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.pei-soporte-card p  { font-size: 13px; color: #777; margin-bottom: 16px; }

/* ---------- PLANES PAGE ---------- */
.pei-planes-hero {
  text-align: center;
  padding: 60px 24px 40px;
  background: linear-gradient(135deg, #3D3D3D 0%, #555 100%);
  color: #fff;
}
.pei-planes-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.pei-planes-hero p  { font-size: 16px; opacity: .85; margin-bottom: 28px; }

/* Billing toggle */
.pei-billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.1);
  padding: 8px 20px;
  border-radius: 40px;
}
.pei-toggle-label { font-size: 14px; font-weight: 600; opacity: .7; }
.pei-toggle-label.active { opacity: 1; }
.pei-toggle-switch { position: relative; width: 44px; height: 24px; }
.pei-toggle-switch input { opacity: 0; width: 0; height: 0; }
.pei-toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.3);
  border-radius: 999px;
  cursor: pointer;
  transition: .3s;
}
.pei-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .3s;
}
.pei-toggle-switch input:checked + .pei-toggle-slider { background: #F5A623; }
.pei-toggle-switch input:checked + .pei-toggle-slider::before { transform: translateX(20px); }
.pei-ahorro-badge {
  background: #F5A623;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.pei-planes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
}
.pei-plan-card {
  background: #fff;
  border-radius: 16px;
  border: 2px solid #E8E9EB;
  overflow: hidden;
  position: relative;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.pei-plan-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.12); transform: translateY(-4px); }
.pei-plan-popular { border-color: #F5A623; }
.pei-plan-active   { border-color: #28A745; }
.pei-popular-ribbon,
.pei-current-ribbon {
  position: absolute;
  top: 12px; right: -28px;
  padding: 4px 36px;
  font-size: 11px;
  font-weight: 700;
  transform: rotate(40deg);
  white-space: nowrap;
}
.pei-popular-ribbon { background: #F5A623; color: #fff; }
.pei-current-ribbon { background: #28A745; color: #fff; }
.pei-plan-header {
  padding: 24px 20px;
  text-align: center;
}
.pei-plan-badge-icon { font-size: 28px; display: block; margin-bottom: 4px; }
.pei-plan-header h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.pei-plan-tagline-small { font-size: 13px; color: #888; margin-bottom: 12px; }
.pei-plan-price {
  margin-top: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.pei-price-currency { font-size: 14px; font-weight: 700; color: #3D3D3D; margin-bottom: 6px; }
.pei-price-amount   { font-size: 36px; font-weight: 900; color: #3D3D3D; }
.pei-price-free     { font-size: 28px; font-weight: 900; color: #28A745; }
.pei-price-period   { font-size: 14px; color: #999; margin-bottom: 6px; }
.pei-plan-features-list {
  padding: 0 20px 16px;
  flex: 1;
}
.pei-plan-features-list li {
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid #F5F5F5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.pei-check-icon { font-weight: 700; flex-shrink: 0; }
.pei-plan-locked-preview {
  padding: 12px 20px;
  background: #F9F9F9;
  border-top: 1px solid #F0F0F0;
}
.pei-locked-label { font-size: 11px; color: #F5A623; font-weight: 600; margin-bottom: 6px; }
.pei-locked-preview-item {
  font-size: 12px;
  color: #ccc;
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pei-locked-preview-item::before { content: '🔒'; font-size: 10px; }
.pei-plan-cta {
  padding: 16px 20px;
  border-top: 1px solid #F0F0F0;
}
.pei-gateway-buttons { display: flex; flex-direction: column; gap: 8px; }

/* ---------- TABLA COMPARATIVA ---------- */
.pei-comparativa {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}
.pei-comparativa h2 { font-size: 24px; font-weight: 800; margin-bottom: 24px; text-align: center; }
.pei-table-wrap { overflow-x: auto; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.pei-compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}
.pei-compare-table thead tr { background: #3D3D3D; color: #fff; }
.pei-compare-table th { padding: 14px 16px; text-align: center; font-weight: 700; }
.pei-compare-table th:first-child { text-align: left; }
.pei-compare-table td { padding: 10px 16px; text-align: center; border-bottom: 1px solid #F0F0F0; }
.pei-compare-table td:first-child { text-align: left; font-weight: 500; color: #3D3D3D; }
.pei-compare-table tbody tr:hover { background: #FAFAFA; }
.pei-table-group { background: #F8F8F8; font-weight: 700; color: #555; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.pei-yes { color: #28A745; font-weight: 700; }
.pei-no  { color: #ccc; }
.pei-col-popular { background: #FFF8EC; }

/* ---------- FAQ ---------- */
.pei-faq { max-width: 800px; margin: 0 auto; padding: 20px 24px 40px; }
.pei-faq h2 { font-size: 24px; font-weight: 800; margin-bottom: 24px; text-align: center; }
.pei-faq-list { display: flex; flex-direction: column; gap: 8px; }
.pei-faq-item { border-radius: 10px; border: 1px solid #E8E9EB; overflow: hidden; }
.pei-faq-q {
  width: 100%;
  background: #fff;
  border: none;
  padding: 16px 20px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pei-faq-q::after { content: '+'; font-size: 20px; color: #F5A623; }
.pei-faq-q.open::after { content: '−'; }
.pei-faq-a {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all .3s;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}
.pei-faq-a.open { padding: 12px 20px 16px; max-height: 200px; }

/* ---------- CTA FINAL ---------- */
.pei-planes-cta-final {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(135deg, #3D3D3D, #555);
  color: #fff;
}
.pei-planes-cta-final h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.pei-planes-cta-final p  { font-size: 16px; opacity: .85; margin-bottom: 24px; }

/* ---------- DIAGNÓSTICO ---------- */
.pei-diag-intro {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}
.pei-diag-intro h1 { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.pei-diag-intro p  { font-size: 16px; color: #666; margin-bottom: 24px; }
.pei-diag-meta-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
  font-size: 14px;
  color: #888;
}
.pei-diag-quiz {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px;
}
.pei-diag-progress-wrap {
  background: #F0F0F0;
  border-radius: 999px;
  height: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.pei-diag-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #F5A623, #FF8C00);
  border-radius: 999px;
  transition: width .4s;
}
.pei-diag-progress-label { text-align: right; font-size: 12px; color: #999; margin-bottom: 28px; }
.pei-diag-question { display: none; }
.pei-diag-question.active { display: block; animation: fadeSlideIn .3s ease; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.pei-q-icon { font-size: 40px; text-align: center; margin-bottom: 12px; }
.pei-diag-question h2 {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.4;
}
.pei-q-opciones { display: flex; flex-direction: column; gap: 10px; }
.pei-opcion-label { cursor: pointer; }
.pei-radio-input { display: none; }
.pei-opcion-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid #E8E9EB;
  border-radius: 10px;
  background: #fff;
  transition: all .2s;
}
.pei-opcion-box:hover { border-color: #F5A623; background: #FFF8EC; }
.pei-radio-input:checked + .pei-opcion-box {
  border-color: #F5A623;
  background: #FFF8EC;
}
.pei-radio-input:checked + .pei-opcion-box .pei-opcion-check { color: #F5A623; font-weight: 700; }
.pei-opcion-check { font-size: 18px; flex-shrink: 0; }
.pei-opcion-text { font-size: 14px; font-weight: 500; }
.pei-q-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}
.pei-q-nav .pei-btn { flex: 1; }

/* Resultado */
.pei-diag-loading { text-align: center; padding: 60px 24px; }
.pei-dot-pulse {
  width: 60px; height: 60px;
  background: #F5A623;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.8); opacity: .6; }
}
.pei-diag-resultado {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px;
  animation: fadeSlideIn .4s ease;
}
.pei-resultado-header {
  display: flex;
  gap: 24px;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E8E9EB;
  padding: 28px;
  margin-bottom: 24px;
}
.pei-resultado-score-circle { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.pei-score-svg { width: 120px; height: 120px; }
.pei-score-arc { transition: stroke-dasharray 1.5s cubic-bezier(.22,1,.36,1); }
.pei-score-num {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  font-size: 22px;
  font-weight: 900;
  color: #F5A623;
}
.pei-score-label {
  position: absolute;
  top: 66%; left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.pei-resultado-text h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
.pei-resultado-text p  { font-size: 14px; color: #666; line-height: 1.6; }
.pei-resultado-plan { background: #fff; border-radius: 12px; border: 1px solid #E8E9EB; padding: 24px; margin-bottom: 24px; }
.pei-resultado-plan h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.pei-recomendado-card { padding: 16px; background: #FFF8EC; border-radius: 10px; border: 2px solid #F5A623; }
.pei-resultado-cta { text-align: center; }
.pei-resultado-cta p { font-size: 14px; color: #666; margin-bottom: 12px; }

/* ---------- AUTH PAGES ---------- */
.pei-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3D3D3D 0%, #555 50%, #3D3D3D 100%);
  padding: 24px;
}
.pei-auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.pei-auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.pei-auth-card h1 { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.pei-auth-sub { text-align: center; color: #888; font-size: 14px; margin-bottom: 24px; }
.pei-auth-form { display: flex; flex-direction: column; gap: 14px; }
.pei-field { display: flex; flex-direction: column; gap: 5px; }
.pei-field label { font-size: 13px; font-weight: 600; color: #3D3D3D; }
.pei-field input {
  padding: 11px 14px;
  border: 2px solid #E8E9EB;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color .2s;
  outline: none;
  width: 100%;
}
.pei-field input:focus { border-color: #F5A623; }
.pei-field input.pei-input-error { border-color: #DC3545; }
.pei-password-wrap { position: relative; }
.pei-password-wrap input { padding-right: 44px; }
.pei-toggle-pass {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
}
.pei-field-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pei-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}
.pei-checkbox-label a { color: #F5A623; }
.pei-terms-field { margin-top: 4px; }
.pei-forgot-wrap { text-align: right; }
.pei-forgot-link { font-size: 13px; color: #F5A623; }
.pei-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #ccc;
  font-size: 12px;
}
.pei-auth-divider::before,
.pei-auth-divider::after { content: ''; flex: 1; height: 1px; background: #E8E9EB; }
.pei-auth-benefits {
  margin-top: 20px;
  background: #F8F8F8;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
}
.pei-auth-benefits p { font-weight: 700; margin-bottom: 8px; }
.pei-auth-benefits ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.pei-auth-benefits li { color: #555; }
.pei-auth-diag-cta { margin-top: 16px; text-align: center; font-size: 13px; color: #888; }
.pei-auth-diag-cta a { color: #F5A623; font-weight: 600; }
.pei-auth-msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 4px;
}
.pei-msg-error { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }
.pei-msg-success { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }

/* ---------- LOADING / SPINNER ---------- */
.pei-spinner {
  width: 40px; height: 40px;
  border: 4px solid #F0F0F0;
  border-top-color: #F5A623;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pei-checkout-loading {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pei-loading-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  min-width: 220px;
}
.pei-loading-box p { font-size: 14px; color: #555; margin-top: 12px; }

/* ---------- MODAL ---------- */
.pei-modal { position: fixed; inset: 0; z-index: 9998; }
.pei-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.pei-modal-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  min-width: 320px;
  max-width: 90%;
  text-align: center;
}
.pei-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}
.pei-modal-body h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.pei-modal-body p  { font-size: 14px; color: #666; margin-bottom: 20px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .pei-planes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .pei-sidebar { display: none; }
  .pei-main-content { padding: 20px 16px; }
  .pei-stats-row { grid-template-columns: repeat(2, 1fr); }
  .pei-planes-grid { grid-template-columns: 1fr; padding: 20px 16px; }
  .pei-welcome-art { display: none; }
  .pei-resultado-header { flex-direction: column; text-align: center; }
  .pei-servicio-cols { grid-template-columns: 1fr; }
  .pei-field-row-2col { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pei-stats-row { grid-template-columns: 1fr; }
  .pei-auth-card { padding: 24px; }
  .pei-topbar-inner { padding: 0 12px; }
  .pei-user-name { display: none; }
}
