/* ============================================================
   PORTAL TITANES — SISTEMA DE DISEÑO "BOSQUE PREMIUM"
   Paleta: Verde bosque + Dorado champagne + Cremas
   Vibe: real estate sólido + banca privada elegante
   ============================================================ */

/* ----- Google Fonts: cargados via <link> en index.html (paralelo, no bloquea render) ----- */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* ----- FONDOS — cremas premium ----- */
  --bg-page:        #FAF7F2;   /* marfil crema (papel premium) */
  --bg-surface:     #FFFFFF;
  --bg-elevated:    #FFFFFF;
  --bg-subtle:      #F0EDE5;   /* sand */
  --bg-warm:        #F5F0E6;   /* sand más cálido */
  --bg-overlay:     rgba(27, 58, 46, 0.45);

  /* ----- TEXTO ----- */
  --text-primary:   #1A1A1A;   /* charcoal */
  --text-secondary: #3D3D3D;
  --text-muted:     #595959;  /* WCAG AA 7.0:1 sobre blanco (antes 4.5:1) */
  --text-subtle:    #767676;  /* WCAG AA 4.5:1 sobre blanco */
  --text-inverse:   #FAF7F2;

  /* ----- ACENTO PRIMARIO — Verde bosque profundo ----- */
  --accent-primary:       #1B3A2E;
  --accent-primary-hover: #2D4A3A;
  --accent-primary-deep:  #102218;
  --accent-primary-soft:  rgba(27, 58, 46, 0.08);
  --accent-primary-veil:  rgba(27, 58, 46, 0.04);

  /* ----- ACENTO SECUNDARIO — Sage (verde verdoso suave) ----- */
  --accent-sage:          #5B7F6D;
  --accent-sage-hover:    #4A6B5A;
  --accent-sage-soft:     rgba(91, 127, 109, 0.12);

  /* ----- ACENTO DORADO — Champagne premium ----- */
  --accent-gold:          #C9A063;
  --accent-gold-hover:    #B8924A;
  --accent-gold-deep:     #997336;
  --accent-gold-light:    #DCBE85;
  --accent-gold-soft:     rgba(201, 160, 99, 0.14);
  --accent-gold-veil:     rgba(201, 160, 99, 0.06);

  /* Conservar referencias legacy del portal (compatibilidad) */
  --cvv-blue:       var(--accent-primary);
  --cvv-deep-blue:  var(--accent-primary-deep);
  --cvv-orange:     var(--accent-gold);
  --cvv-bg:         var(--bg-page);
  --cvv-bg-soft:    var(--bg-subtle);
  --cvv-surface:    var(--bg-surface);
  --cvv-border:     var(--border-default);
  --cvv-muted:      var(--text-muted);
  --cvv-text:       var(--text-primary);

  /* ----- ESTADOS ----- */
  --success:      #2D7A50;
  --success-soft: rgba(45, 122, 80, 0.10);
  --warning:      #B07520;
  --warning-soft: rgba(176, 117, 32, 0.12);
  --danger:       #A8311F;
  --danger-soft:  rgba(168, 49, 31, 0.10);
  --info:         #2D4A6B;
  --info-soft:    rgba(45, 74, 107, 0.10);

  /* ----- BORDES ----- */
  --border-subtle:  rgba(26, 26, 26, 0.06);
  --border-default: rgba(26, 26, 26, 0.10);
  --border-strong:  rgba(26, 26, 26, 0.18);
  --border-gold:    rgba(201, 160, 99, 0.35);
  --border-sage:    rgba(91, 127, 109, 0.25);

  /* ----- SOMBRAS — premium, sutiles ----- */
  --shadow-xs:    0 1px 2px rgba(27, 58, 46, 0.04);
  --shadow-sm:    0 1px 3px rgba(27, 58, 46, 0.06), 0 1px 2px rgba(27, 58, 46, 0.04);
  --shadow-md:    0 4px 12px rgba(27, 58, 46, 0.06), 0 2px 4px rgba(27, 58, 46, 0.04);
  --shadow-lg:    0 12px 32px rgba(27, 58, 46, 0.08), 0 4px 8px rgba(27, 58, 46, 0.04);
  --shadow-xl:    0 24px 48px rgba(27, 58, 46, 0.12), 0 8px 16px rgba(27, 58, 46, 0.06);
  --shadow-gold:  0 4px 16px rgba(201, 160, 99, 0.22);
  --shadow-sage:  0 4px 16px rgba(91, 127, 109, 0.18);

  /* ----- RADIUS ----- */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   18px;
  --radius-pill: 999px;

  /* ----- TIPOGRAFÍA ----- */
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif:  'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-mono:   'SF Mono', Monaco, Consolas, monospace;

  /* ----- ESPACIADO (sistema 4px) ----- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ----- TRANSITIONS ----- */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET + BASE TIPOGRÁFICA
   ============================================================ */

body {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* cv02-cv11: alternative glyphs de Inter (1 con serif, l curva, mejor lectura)
     'ccmp' + 'mark': forzar composición correcta de marcas combinantes (tildes en á/é/í/ó/ú/ñ)
     'kern' + 'liga': kerning y ligaduras estándar */
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'kern' 1, 'liga' 1, 'ccmp' 1, 'mark' 1;
  text-rendering: optimizeLegibility;
  font-variant-ligatures: common-ligatures;
}

h1, h2, h3, .serif {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

h1 { font-size: 32px; line-height: 1.15; }
h2 { font-size: 24px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.005em; }

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--accent-gold-hover); }

/* ============================================================
   COMPONENTES PREMIUM — overrides sobre styles.css legacy
   ============================================================ */

/* CARDS */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-fast);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-default);
}

/* BOTONES */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}
.btn-primary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
  color: #fff;
  border: none;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 160, 99, 0.34);
}

.btn-sage {
  background: var(--accent-sage);
  color: #fff;
  border-color: var(--accent-sage);
}
.btn-sage:hover {
  background: var(--accent-sage-hover);
  border-color: var(--accent-sage-hover);
}

.btn-secondary, .btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover, .btn-outline:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }

/* INPUTS */
input, select, textarea {
  font-family: var(--font-sans);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-soft);
}

/* SIDEBAR */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
}

.nav-btn {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}
.nav-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.nav-btn.active {
  background: var(--accent-primary-soft);
  color: var(--accent-primary);
  font-weight: 600;
}
.nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  background: var(--accent-gold);
  border-radius: 0 2px 2px 0;
}

.nav-section {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: var(--space-4) var(--space-4) var(--space-2);
}

/* HEADER / TOP BAR */
header, .app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

/* HERO DASHBOARD — verde bosque + acento dorado */
.hero-card, [class*="hero-card"], .dashboard-hero, .welcome-hero {
  background: linear-gradient(135deg, #1B3A2E 0%, #2D4A3A 50%, #3D5A48 100%);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero-card::after,
.welcome-hero::after,
.dashboard-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(201, 160, 99, 0.22), transparent 60%);
  pointer-events: none;
}

.welcome-hero h1,
.welcome-hero p,
.welcome-hero .hero-stat label,
.welcome-hero .hero-stat value,
.dashboard-hero h1,
.dashboard-hero p {
  color: #fff;
}

.welcome-hero .hero-stat label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* KPI cells — números importantes con serif */
.kpi value, .hero-stat value, .kpi-value {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* TABLES */
table {
  font-family: var(--font-sans);
}
table thead th {
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
  text-align: left;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 11px;
}
table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}
table tbody tr:hover {
  background: var(--bg-subtle);
}

/* TOASTS */
.toast {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-default);
  font-family: var(--font-sans);
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* PROGRESS BAR — meta mes */
.progress-bar {
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  height: 8px;
}
.progress-bar .fill {
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-primary));
  border-radius: var(--radius-pill);
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* MODALS */
.modal, [class*="modal"], dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-subtle);
}

/* SCROLLBARS sutiles */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* DIVIDERS gold accent */
.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  margin: var(--space-6) 0;
}

/* BADGE / CHIP */
.badge, .chip {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

/* FOCUS visible accesibilidad */
*:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   ANIMACIONES SUTILES (corporativo = sin exceso)
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.view.active, [data-view].active {
  animation: fadeIn var(--transition-base);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   FRASE MOTIVACIONAL DEL DÍA — hero del dashboard
   ============================================================ */
.frase-motivacional {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 24px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  max-width: 720px;
  flex-wrap: wrap;
  position: relative;
  animation: fadeInFrase 800ms 200ms cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.frase-motivacional .frase-icon {
  color: var(--accent-gold);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(201, 160, 99, 0.5);
}

.frase-motivacional .frase-texto {
  flex: 1;
  min-width: 200px;
}

.frase-motivacional .frase-autor {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  margin-left: auto;
  padding-left: 10px;
}

@keyframes fadeInFrase {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 640px) {
  .frase-motivacional {
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    padding: 12px 14px;
  }
  .frase-motivacional .frase-autor {
    margin-left: 0;
    padding-left: 0;
  }
}

/* Login bordes dorados */
#loginScreen .login-box, #loginScreen .card {
  border-top: 3px solid var(--accent-gold);
}

/* ============================================================
   DASHBOARD REFRESH — Fase C
   ============================================================ */

/* HERO — KPIs con jerarquía visual */
.welcome-hero {
  padding: var(--space-8) var(--space-8) var(--space-6);
  margin-bottom: var(--space-6);
}

.welcome-hero h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.welcome-hero > p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin: 0 0 14px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.hero-stat {
  position: relative;
  padding: 4px 0;
}

.hero-stat label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65) !important;
  margin-bottom: 6px;
}

.hero-stat value {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:not(:last-child)::after { display: none; }
  .welcome-hero h1 { font-size: 28px; }
}

/* ACCIONES RÁPIDAS — cards con hover destacado */
.quick-actions, .acciones-rapidas, [class*="quick-action"] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
}

.quick-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.quick-action:hover {
  background: var(--bg-warm);
  border-color: var(--accent-gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quick-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gold);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}
.quick-action:hover::before { transform: scaleX(1); }

.quick-action svg {
  color: var(--accent-primary);
  width: 28px;
  height: 28px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.quick-action:hover svg {
  color: var(--accent-gold-hover);
  transform: scale(1.1);
}

.quick-action > div:last-child,
.quick-action span {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

/* META DEL MES — refinada */
.meta-card, [data-card="meta"], .dashboard-grid .card:has(#metaProgress) {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-warm));
  border: 1px solid var(--border-default);
}

/* REWARD HERO (banner próxima recompensa) — Override paleta Bosque */
.reward-hero {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-sage) 60%, var(--accent-primary-hover) 100%) !important;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.reward-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 50%;
  height: 160%;
  background: radial-gradient(circle, rgba(201, 160, 99, 0.28), transparent 65%);
  pointer-events: none;
}
.reward-hero .rh-eyebrow {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.reward-hero h3 {
  font-family: var(--font-serif) !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 6px 0 8px !important;
  letter-spacing: -0.01em;
}
.reward-hero .rh-desc {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 13px;
}
.reward-hero .rh-progress {
  background: rgba(255, 255, 255, 0.18) !important;
  height: 6px;
  border-radius: 3px;
  margin: 14px 0 10px;
  overflow: hidden;
}
.reward-hero .rh-fill {
  background: linear-gradient(90deg, var(--accent-gold-light), var(--accent-gold)) !important;
  height: 100%;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(201, 160, 99, 0.5);
}
.reward-hero .rh-stats {
  display: flex;
  gap: var(--space-5);
  color: #fff;
}
.reward-hero .rh-stats > div {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  opacity: 0.85;
  letter-spacing: 0.04em;
}
.reward-hero .rh-stats strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-gold-light);
}
.reward-hero.unlocked {
  background: linear-gradient(135deg, var(--accent-gold-deep), var(--accent-gold)) !important;
}

/* "TU PROGRESO EN TITANES" — Onboarding card refinada */
#dashOnboarding,
.onboarding-card,
[id="dashOnboarding"] {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-warm) 100%);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
}
#dashOnboarding h3,
.onboarding-card h3 {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
}
#dashOnboarding .progress-bar .fill,
.onboarding-card .progress-bar .fill {
  background: linear-gradient(90deg, var(--accent-sage), var(--accent-primary));
}

/* EMPTY STATES mejorados */
.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-default);
}
.empty-state a {
  color: var(--accent-primary);
  font-weight: 600;
  border-bottom: 1px solid var(--accent-gold);
  padding-bottom: 1px;
  transition: all var(--transition-fast);
}
.empty-state a:hover {
  color: var(--accent-gold-hover);
}

/* Activity items refinados */
.activity-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: padding var(--transition-fast);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { padding-left: 6px; }
.activity-item strong {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}
.activity-item .meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.activity-item .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  margin-right: 8px;
  vertical-align: middle;
}

/* Next events card */
.next-event {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-left: 3px solid var(--accent-gold);
}
.next-event:hover {
  background: var(--bg-warm);
  transform: translateX(3px);
}
.next-event .when {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.next-event .what {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin: 2px 0;
}
.next-event .where {
  font-size: 11px;
  color: var(--text-muted);
}

/* Card-header consistent */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}
.card-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}
.card-header a {
  font-size: 11px;
  color: var(--accent-gold-hover);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card-header a:hover {
  color: var(--accent-primary);
}

/* ============================================================
   LIGA TITANES HUB — tabs Ranking + Battle Royale
   ============================================================ */
.liga-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 18px;
  width: fit-content;
}

.liga-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.liga-tab:hover {
  color: var(--text-primary);
}

.liga-tab.active {
  background: var(--bg-surface);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.liga-tab.active svg {
  color: var(--accent-gold);
}

.liga-tab .badge-live {
  background: linear-gradient(135deg, #DC2626, #991B1B);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
  animation: pulse-live 2s ease-in-out infinite;
  margin-left: 2px;
}

/* Mobile: tabs full width */
@media (max-width: 640px) {
  .liga-tabs {
    width: 100%;
  }
  .liga-tab {
    flex: 1;
    justify-content: center;
    padding: 10px 8px;
    font-size: 12px;
  }
  .liga-tab span:not(.badge-live) {
    white-space: nowrap;
  }
}

/* ============================================================
   SIDEBAR REFINADO — Fase B
   ============================================================ */

/* Sidebar layout más generoso */
.sidebar {
  padding: var(--space-5) 0 var(--space-4);
  width: 240px;
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-3);
}
.sidebar .brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.sidebar .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.sidebar .brand-text strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.sidebar .brand-text span {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-top: 2px;
}

/* Nav buttons spacing y estilo */
.sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-3);
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13.5px;
  position: relative;
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform var(--transition-fast);
}

.nav-btn:hover svg {
  transform: scale(1.08);
}

.nav-btn span:not(.badge):not(.badge-live) {
  flex: 1;
  min-width: 0;
}

.nav-btn .badge {
  background: var(--accent-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Battle Royale - badge LIVE pulsante */
.nav-btn.nav-battle .badge-live {
  background: linear-gradient(135deg, #DC2626, #991B1B);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
  animation: pulse-live 2s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35); transform: scale(1); }
  50% { box-shadow: 0 2px 12px rgba(220, 38, 38, 0.6); transform: scale(1.04); }
}

.nav-section {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: var(--space-5) var(--space-3) 6px;
  margin-top: 2px;
}
.nav-section:first-child { padding-top: 0; }

/* ============================================================
   HEADER REFINADO
   ============================================================ */
header.app-header,
header,
.top-bar {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: var(--space-3);
}

/* Breadcrumb sutil */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* User menu refinado — avatar + nombre + dropdown */
.user-menu, #userMenu {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.user-menu:hover, #userMenu:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-sm);
}

#userAvatar, .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-sage));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-serif);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.2);
}

#userName, .user-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

/* "Salir" botón discreto */
.user-menu a[href*="logout"], .user-menu .logout-btn,
#userMenu a[href*="logout"], #userMenu .logout-btn,
.user-menu span:last-child:not(#userName) {
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-left: 1px solid var(--border-subtle);
  margin-left: 4px;
  transition: color var(--transition-fast);
}
.user-menu a[href*="logout"]:hover, .user-menu .logout-btn:hover,
#userMenu a[href*="logout"]:hover, #userMenu .logout-btn:hover {
  color: var(--danger);
}

/* Bell icon mejorado */
#notifBell {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}
#notifBell:hover {
  background: var(--bg-subtle);
  border-color: var(--border-default);
}

/* ============================================================
   FASE D — MOBILE RESPONSIVE + MICRO-INTERACCIONES
   ============================================================ */

/* Hamburger button (visible solo en mobile) */
.hamburger-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-default);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: all var(--transition-fast);
}
.hamburger-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--accent-gold);
}
.hamburger-btn svg {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
}

/* Backdrop cuando sidebar mobile abierto */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* ============================================================
   BREAKPOINTS MOBILE
   ============================================================ */

@media (max-width: 900px) {
  /* Sidebar drawer en mobile */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
  }
  .sidebar.open,
  .sidebar.mobile-open { transform: translateX(0); }

  /* Backdrop cuando sidebar abierto */
  .sidebar.mobile-open ~ .sidebar-backdrop,
  .sidebar.open ~ .sidebar-backdrop {
    display: block;
    opacity: 1;
  }

  /* Hamburger visible */
  .hamburger-btn { display: inline-flex; }

  /* Main toma todo el ancho */
  .app-shell {
    grid-template-columns: 1fr !important;
  }
  main, .app-main {
    padding-left: var(--space-3) !important;
    padding-right: var(--space-3) !important;
  }

  /* Header mobile */
  header.app-header, header, .top-bar {
    padding: 0 var(--space-3);
  }

  /* Breadcrumb más simple en mobile */
  .breadcrumb { font-size: 12px; }

  /* User menu — ocultar nombre, solo avatar */
  .user-menu, #userMenu {
    padding: 4px;
  }
  #userName, .user-name {
    display: none;
  }
  .user-menu a[href*="logout"], #userMenu a[href*="logout"],
  .user-menu .logout-btn {
    display: none;
  }
}

@media (max-width: 720px) {
  /* Hero más compacto */
  .welcome-hero {
    padding: var(--space-5) var(--space-4) var(--space-4);
  }
  .welcome-hero h1 {
    font-size: 26px;
  }
  .welcome-hero > p {
    font-size: 11px;
  }

  /* Frase motivacional reducida */
  .frase-motivacional {
    font-size: 13px;
    padding: 10px 12px;
    margin: 12px 0 18px;
  }
  .frase-motivacional .frase-autor {
    font-size: 10px;
  }

  /* Dashboard grid: 1 col en mobile */
  .dashboard-grid, [class*="dashboard-grid"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-3);
  }

  /* Cards: padding reducido */
  .card {
    padding: var(--space-4) var(--space-3);
  }

  /* Quick actions: 2 col grid */
  .quick-actions, .acciones-rapidas {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .quick-action {
    padding: var(--space-4) var(--space-2);
  }
  .quick-action svg { width: 22px; height: 22px; }
  .quick-action span, .quick-action > div:last-child {
    font-size: 12px;
  }

  /* Reward hero compact */
  .reward-hero h3 { font-size: 22px !important; }
  .reward-hero .rh-stats { gap: var(--space-3); flex-wrap: wrap; }
  .reward-hero .rh-stats strong { font-size: 18px; }

  /* Tablas scroll horizontal */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Modales full-screen en mobile */
  .modal, dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 92vh !important;
    margin: 4vh auto !important;
    border-radius: var(--radius-md) !important;
  }
  .modal-content, .modal-body {
    padding: var(--space-4) !important;
  }

  /* Inputs táctil-friendly (min 44px) */
  input, select, textarea, button {
    min-height: 44px;
    font-size: 16px; /* evita zoom iOS */
  }
  input[type="checkbox"], input[type="radio"] {
    min-height: auto;
  }

  /* Buttons full-width en mobile cuando son el CTA principal */
  .modal button[class*="btn-primary"],
  .modal button[class*="btn-gold"] {
    width: 100%;
  }

  /* Notif dropdown full width */
  #notifDropdown {
    width: 95vw !important;
    right: 2.5vw !important;
    max-width: 95vw !important;
  }

  /* Footer apilado */
  .app-footer .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .welcome-hero h1 { font-size: 22px; }
  .hero-stat value { font-size: 26px; }
  .hero-stat label { font-size: 9px; }
}

/* ============================================================
   SKELETON LOADERS premium
   ============================================================ */
@keyframes skeleton-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton, .spinner {
  background: linear-gradient(
    90deg,
    var(--bg-subtle) 0%,
    var(--bg-warm) 50%,
    var(--bg-subtle) 100%
  );
  background-size: 400px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.spinner {
  height: 80px;
  margin: 20px 0;
}

/* Skeleton text variants */
.skeleton-text {
  height: 12px;
  margin: 8px 0;
  border-radius: 3px;
}
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-text.long { width: 95%; }

/* ============================================================
   MICRO-INTERACCIONES — botones, links, hover states
   ============================================================ */

/* Botones generales con ripple-like feedback */
.btn, button.btn, [type="submit"] {
  position: relative;
  overflow: hidden;
}
.btn:active, button.btn:active, [type="submit"]:active {
  transform: scale(0.97);
}

/* Toast slide-in suave */
@keyframes toast-slide-in {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast {
  animation: toast-slide-in 350ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* View transitions */
.view {
  display: none;
}
.view.active, [data-view].active {
  display: block;
  animation: fadeInUp 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Card hover lift sutil */
.card {
  will-change: transform, box-shadow;
}

/* Number animation - cuando cambia un KPI */
@keyframes number-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); color: var(--accent-gold); }
  100% { transform: scale(1); }
}
.value-animated {
  animation: number-pop 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Focus visible refinado */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection color personalizada */
::selection {
  background: var(--accent-gold-soft);
  color: var(--accent-primary);
}

/* Link underline elegante */
.app-shell a:not(.btn):not(.nav-btn):not([class*="hero"]):not(.powered-logo) {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 250ms ease;
}
.app-shell a:not(.btn):not(.nav-btn):not([class*="hero"]):not(.powered-logo):hover {
  background-size: 100% 1px;
}

/* ============================================================
   POWERED BY MART TECHNOLOGIES — crédito al desarrollador
   ============================================================ */
.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.92;
  transition: opacity var(--transition-base);
}
.powered-by:hover { opacity: 1; }

.powered-by .powered-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
}

.powered-by .powered-logo {
  display: inline-flex;
  align-items: center;
  color: #1F4068; /* azul navy real del logo MART */
  transition: color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}
.powered-by .powered-logo:hover {
  color: var(--accent-gold);
  transform: translateY(-1px);
}
.powered-by .powered-logo img {
  height: 38px;
  width: auto;
  display: block;
}

/* Login: powered by debajo del card, MUY visible */
.powered-by-login {
  display: flex;
  margin-top: 32px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  align-items: center;
  gap: 14px;
  font-size: 14px !important;
}
.powered-by-login .powered-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
}
.powered-by-login .powered-logo img {
  height: 46px !important; /* grande en login */
}
.login-screen .powered-by-login {
  color: rgba(255, 255, 255, 0.92);
}
.login-screen .powered-by-login .powered-label {
  color: rgba(255, 255, 255, 0.85);
}
.login-screen .powered-by-login .powered-logo {
  color: #fff;
}
.login-screen .powered-by-login .powered-logo:hover {
  color: var(--accent-gold-light, #E5C18C);
  transform: translateY(-1px) scale(1.02);
}

/* Footer global de la app */
.app-footer {
  margin-top: var(--space-12);
  padding: var(--space-6) var(--space-8);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}
.app-footer .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  max-width: 1400px;
  margin: 0 auto;
}
.app-footer .footer-left {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.app-footer .powered-by {
  font-size: 12px;
}
.app-footer .powered-by .powered-label {
  font-size: 10px;
}
.app-footer .powered-by .powered-logo img {
  height: 32px;
}

/* Sidebar footer — Powered by MART permanente */
.sidebar-footer {
  margin-top: auto;
  padding: 18px 14px 22px;
  border-top: 1px solid var(--border-subtle, rgba(0,0,0,0.08));
  background: linear-gradient(180deg, transparent, rgba(27, 58, 46, 0.04));
}
.powered-by-sidebar {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px !important;
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}
.powered-by-sidebar:hover {
  background: rgba(27, 58, 46, 0.06);
  transform: translateY(-1px);
}
.powered-by-sidebar .powered-label {
  font-size: 9px !important;
  color: var(--text-subtle, #94A3B8) !important;
  letter-spacing: 0.18em !important;
}
.powered-by-sidebar .powered-logo {
  color: #1F4068; /* azul navy real del logo MART */
}
.powered-by-sidebar .powered-logo img {
  height: 36px;
  width: auto;
  display: block;
}
.powered-by-sidebar:hover .powered-logo {
  color: var(--accent-gold);
}

/* Ajuste para que sidebar use flex column y el footer quede pegado abajo */
.sidebar {
  display: flex;
  flex-direction: column;
}
.sidebar > nav {
  flex: 1;
  overflow-y: auto;
}

/* Mobile */
@media (max-width: 640px) {
  .app-footer .footer-content {
    justify-content: center;
    text-align: center;
  }
  .powered-by-login {
    margin-top: 20px;
  }
}

/* ============================================================
   BATTLE ROYALE — UI dramática
   ============================================================ */

/* Hero principal */
.battle-hero {
  position: relative;
  background: linear-gradient(135deg, #1A0F0A 0%, #2D1810 50%, #1B3A2E 100%);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  margin-bottom: 18px;
  overflow: hidden;
  color: #fff;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(201,160,99,0.15);
}
.battle-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(168, 49, 31, 0.3), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(201, 160, 99, 0.25), transparent 50%);
  pointer-events: none;
}
.battle-hero-content { position: relative; z-index: 1; }

.battle-badge {
  display: inline-block;
  background: linear-gradient(135deg, #A8311F, #6B1F12);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(168, 49, 31, 0.4);
  animation: pulse-glow 2.5s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(168, 49, 31, 0.4); }
  50% { box-shadow: 0 4px 20px rgba(168, 49, 31, 0.7); }
}

.battle-hero h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  color: #fff;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.battle-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.battle-stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  backdrop-filter: blur(8px);
}
.battle-stat .stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.battle-stat .stat-value {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #fff;
  margin-top: 4px;
}
.battle-stat .stat-value strong {
  font-size: 22px;
  color: var(--accent-gold-light);
}
.battle-stat .countdown {
  color: var(--accent-gold-light);
  font-weight: 700;
  font-family: var(--font-sans);
}

.battle-premio {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(201, 160, 99, 0.18), rgba(201, 160, 99, 0.06));
  border: 1px solid rgba(201, 160, 99, 0.4);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
}
.battle-premio .premio-icon { font-size: 22px; }
.battle-premio strong { color: var(--accent-gold-light); }

/* MI TARJETA destacada */
.battle-mycard {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-warm));
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}
.battle-mycard.eliminated {
  background: linear-gradient(135deg, #2A1A1A, #3D2424);
  border-color: rgba(168, 49, 31, 0.5);
  color: #fff;
}
.battle-mycard.eliminated .mycard-name {
  text-decoration: line-through;
  opacity: 0.7;
}

.mycard-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mycard-position {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 32px;
}
.position-num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
}

.mycard-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.mycard-hearts {
  font-size: 24px;
  display: flex;
  gap: 4px;
  margin: 4px 0;
}

.mycard-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.mycard-crown {
  font-size: 48px;
  filter: drop-shadow(0 0 12px rgba(201, 160, 99, 0.7));
  animation: crown-bounce 2s ease-in-out infinite;
}
@keyframes crown-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.mycard-skull {
  font-size: 56px;
  filter: grayscale(0.5);
}

.mycard-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #FF6B6B;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mycard-message {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(168, 49, 31, 0.15);
  border-left: 3px solid #A8311F;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  font-style: italic;
}

/* Corazones */
.heart {
  display: inline-block;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s;
}
.heart.full {
  color: #DC2626;
  text-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
}
.heart.empty {
  color: var(--text-subtle);
  opacity: 0.5;
}

/* Survivors grid */
.survivors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.survivor-card {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-fast);
}
.survivor-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-warm);
  transform: translateY(-2px);
}
.survivor-card.me {
  background: linear-gradient(135deg, var(--accent-gold-soft), var(--bg-warm));
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-gold);
}
.survivor-card.leader {
  border: 2px solid var(--accent-gold);
  background: linear-gradient(135deg, var(--accent-gold-soft), var(--bg-surface));
}
.leader-crown {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(201, 160, 99, 0.5));
}
.survivor-pos {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary);
  min-width: 32px;
}
.survivor-info { flex: 1; min-width: 0; }
.survivor-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.2;
}
.survivor-hearts {
  font-size: 13px;
  margin-top: 4px;
}
.survivor-hearts .heart { font-size: 14px; }
.survivor-pts {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

/* Eliminated grid */
.eliminated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.eliminated-card {
  background: rgba(168, 49, 31, 0.05);
  border: 1px dashed rgba(168, 49, 31, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  filter: grayscale(0.5);
}
.elim-skull { font-size: 24px; }
.elim-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: line-through;
  text-decoration-color: rgba(168, 49, 31, 0.5);
}
.elim-meta { font-size: 11px; color: var(--text-muted); }

/* Rounds timeline */
.rounds-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.round-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}
.round-step.active {
  border: 2px solid var(--accent-gold);
  background: linear-gradient(135deg, var(--accent-gold-soft), var(--bg-surface));
  box-shadow: var(--shadow-gold);
}
.round-step.done {
  background: var(--bg-warm);
  opacity: 0.85;
}
.round-step.pending { opacity: 0.6; }
.round-icon { font-size: 22px; }
.round-num {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.round-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Temporada finalizada */
.battle-finalizada {
  text-align: center;
  padding: 50px 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-gold);
  box-shadow: var(--shadow-xl);
}
.finalizada-confetti {
  font-size: 56px;
  margin-bottom: 12px;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.champion-card {
  background: linear-gradient(135deg, #1B3A2E, #2D4A3A);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin: 20px auto;
  max-width: 480px;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 20px 60px rgba(27, 58, 46, 0.3), 0 0 40px rgba(201, 160, 99, 0.25);
  position: relative;
}
.champion-crown {
  font-size: 64px;
  filter: drop-shadow(0 0 24px rgba(201, 160, 99, 0.8));
  animation: crown-bounce 2s ease-in-out infinite;
  margin-bottom: 8px;
}
.champion-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--accent-gold-light);
  margin-bottom: 4px;
}
.champion-name {
  font-family: var(--font-serif);
  font-size: 32px;
  margin: 6px 0;
  color: #fff;
}
.champion-stats {
  font-size: 13px;
  opacity: 0.85;
}
.champion-prize {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(201, 160, 99, 0.2);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent-gold);
}

/* Podio */
.podio {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 14px;
  align-items: end;
  max-width: 600px;
  margin: 0 auto;
}
.podio-step {
  background: var(--bg-subtle);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 14px;
  text-align: center;
}
.podio-step.pos-1 {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover));
  color: #fff;
  height: 130px;
  order: 2;
}
.podio-step.pos-2 {
  background: linear-gradient(135deg, #C0C0C0, #909090);
  color: #fff;
  height: 100px;
  order: 1;
}
.podio-step.pos-3 {
  background: linear-gradient(135deg, #B87333, #8B5A24);
  color: #fff;
  height: 80px;
  order: 3;
}
.podio-medal { font-size: 36px; line-height: 1; }
.podio-name {
  font-weight: 700;
  font-size: 13px;
  margin: 4px 0;
}
.podio-pts {
  font-size: 11px;
  opacity: 0.9;
}

/* Mobile responsive */
@media (max-width: 720px) {
  .battle-stats-row { grid-template-columns: repeat(2, 1fr); }
  .survivors-grid, .eliminated-grid { grid-template-columns: 1fr; }
  .mycard-content { flex-direction: column; text-align: center; }
}

/* ============================================================
   POLISH PASS — Login + Dashboard inconsistencies (v40)
   ============================================================ */

/* #1 Login: titulo a 32px Playfair Display */
#loginScreen .login-card h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--cvv-deep-blue, #102218);
  margin: 14px 0 4px;
}
#loginScreen .login-card .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin: 0 0 24px;
}

/* #2 Login: boton "Iniciar sesion" con fondo bosque + texto blanco */
#loginScreen .login-card button[type="submit"] {
  background: var(--accent-primary, #1B3A2E);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 12px rgba(27, 58, 46, 0.18);
  width: 100%;
  margin-top: 6px;
}
#loginScreen .login-card button[type="submit"]:hover {
  background: #14302a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(27, 58, 46, 0.28);
}
#loginScreen .login-card button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(27, 58, 46, 0.2);
}

/* #3 "Powered by MART" legible (11px / 13px label) */
.powered-by { font-size: 11px; }
.powered-by .powered-label { font-size: 10px; }
.powered-by-login { font-size: 12px; }
.powered-by-login .powered-label { font-size: 11px; }

/* #4 Hero stats label sin !important */
.hero-stat label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; }

/* #5 Warning card border-left token */
.card.card-warning,
.card[data-variant="warning"] {
  border-left: 4px solid var(--accent-gold, #C9A063);
}

/* Login inputs polish (placeholders + focus state) */
#loginScreen .login-card input[type="text"],
#loginScreen .login-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
#loginScreen .login-card input[type="text"]:focus,
#loginScreen .login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--accent-primary, #1B3A2E);
  box-shadow: 0 0 0 3px rgba(27, 58, 46, 0.12);
}
#loginScreen .login-card input::placeholder {
  color: rgba(0, 0, 0, 0.32);
  font-size: 13px;
}

/* Meta del mes — migrado de inline styles a clases */
.meta-month .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.meta-month .meta-pct {
  font-size: 12px;
  color: var(--cvv-muted);
  font-weight: 600;
}
.meta-month .meta-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--cvv-muted);
  font-style: italic;
}

/* Links pequenitos en card-header (Ver tour, etc.) */
.card-header .card-link-sm {
  font-size: 12px;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}
.card-header .card-link-sm:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

/* Iconos Lucide dentro de card titles */
.card-header h3 .ico {
  vertical-align: -3px;
  margin-right: 6px;
  color: var(--accent-primary);
}

/* ============================================================
   ASISTENTE CLUSTER-FIRST — Wizard de cotización
   ============================================================ */
.assistant-hero {
  background: linear-gradient(135deg, #1B3A2E 0%, #2D5A47 100%);
  color: #fff;
  padding: 24px 28px;
  border-radius: 14px;
  margin-bottom: 22px;
  box-shadow: 0 6px 18px rgba(27,58,46,0.16);
  position: relative;
  overflow: hidden;
}
.assistant-hero::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(201,160,99,0.22), transparent);
  border-radius: 50%;
}
.assistant-hero-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
}
.assistant-hero-icon {
  font-size: 48px;
  line-height: 1;
}
.assistant-hero-text {
  flex: 1;
  min-width: 240px;
}
.assistant-hero-text h3 {
  margin: 0 0 4px;
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.assistant-hero-text p {
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.55;
}
.assistant-hero #btnOpenAssistant {
  background: #C9A063;
  color: #1B3A2E;
  font-weight: 800;
  padding: 12px 22px;
  font-size: 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}
.assistant-hero #btnOpenAssistant:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(201,160,99,0.4);
}

/* Modal overlay */
.assistant-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, 0.72);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .25s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.assistant-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 1024px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: slideUp .35s cubic-bezier(.16,1,.3,1);
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.assistant-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.assistant-step-indicator {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold, #C9A063);
  margin-bottom: 4px;
}
.assistant-modal-title {
  margin: 0;
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--cvv-deep-blue, #102218);
}
.assistant-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #94A3B8;
  padding: 4px 10px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.assistant-close:hover {
  background: rgba(0,0,0,0.05);
  color: #1F2937;
}

.assistant-progress {
  height: 4px;
  background: rgba(27,58,46,0.08);
  position: relative;
}
.assistant-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary, #1B3A2E), var(--accent-gold, #C9A063));
  transition: width .4s cubic-bezier(.16,1,.3,1);
}

.assistant-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}
.assistant-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 28px;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: #FAFBFC;
  flex-wrap: wrap;
}
.assistant-modal-footer .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.assistant-subtxt {
  color: var(--text-muted, #64748B);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.5;
}

/* Paso 1: cards de plazo */
.assistant-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.assistant-card {
  background: #FAF7F2;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  --card-color: var(--accent-primary);
}
.assistant-card:hover {
  background: #F0EDE5;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(27,58,46,0.08);
}
.assistant-card.selected {
  background: #fff;
  border-color: var(--card-color);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1), inset 0 0 0 2px var(--card-color);
}
.assistant-card-icon {
  font-size: 36px;
  margin-bottom: 6px;
}
.assistant-card-title {
  font-weight: 700;
  font-size: 14px;
  color: #102218;
}
.assistant-card-sub {
  font-size: 11px;
  color: #64748B;
  margin: 4px 0 10px;
}
.assistant-card-tag {
  display: inline-block;
  background: var(--card-color);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* Paso 2: cluster list */
.assistant-cluster-list {
  display: grid;
  gap: 12px;
}
.assistant-cluster-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-left: 4px solid #5B7F6D;
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  transition: all .2s;
  display: block;
  width: 100%;
}
.assistant-cluster-card:hover {
  border-color: var(--accent-primary, #1B3A2E);
  box-shadow: 0 4px 12px rgba(27,58,46,0.1);
}
.assistant-cluster-card.selected {
  background: #F0EDE5;
  border-left-color: var(--accent-gold, #C9A063);
  box-shadow: inset 0 0 0 2px var(--accent-gold);
}
.assistant-cluster-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
  flex-wrap: wrap;
}
.assistant-cluster-name {
  font-size: 16px;
  color: #102218;
}
.assistant-cluster-tipo {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  margin-left: 8px;
}
.assistant-cluster-tipo.habitacional { background: #DCFCE7; color: #166534; }
.assistant-cluster-tipo.comercial    { background: #FEF3C7; color: #92400E; }
.assistant-cluster-fecha {
  font-size: 11px;
  color: #64748B;
}
.assistant-cluster-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.assistant-cluster-stats .stat {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: #64748B;
}
.assistant-cluster-stats .stat strong {
  font-size: 16px;
  color: #102218;
  font-weight: 700;
}
.assistant-cluster-stats .stat.plusvalia strong { color: #16A34A; }

/* Paso 3: lote grid */
.assistant-lote-filters {
  margin-bottom: 14px;
  font-size: 13px;
}
.assistant-lote-filters input {
  margin-left: 8px;
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 13px;
}
.assistant-lote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}
.assistant-lote-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.assistant-lote-card:hover {
  border-color: var(--accent-primary, #1B3A2E);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.assistant-lote-card.selected {
  border-color: var(--accent-gold, #C9A063);
  background: #FAF7F2;
  box-shadow: 0 0 0 2px var(--accent-gold);
}
.assistant-lote-id {
  font-family: monospace;
  font-size: 11px;
  color: #64748B;
  margin-bottom: 4px;
}
.assistant-lote-stat {
  font-size: 12px;
  color: #475569;
  margin: 2px 0;
}
.assistant-lote-stat strong { color: #102218; }
.assistant-lote-precio {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-primary, #1B3A2E);
  margin-top: 6px;
}

/* Paso 4: planes grid */
.assistant-descuento-asesor {
  background: #FEF9E7;
  border: 1px solid #F59E0B;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.assistant-descuento-asesor label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}
.assistant-descuento-asesor input[type="range"] {
  width: 100%;
  accent-color: var(--accent-primary, #1B3A2E);
}
.assistant-desc-warn {
  margin-top: 10px;
  font-size: 12px;
}
.assistant-desc-warn .warn {
  background: #FEE2E2;
  color: #991B1B;
  padding: 8px 12px;
  border-radius: 6px;
}
.assistant-desc-warn .ok {
  color: #075985;
  font-size: 11px;
}

.assistant-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.assistant-plan-card {
  background: #fff;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
  transition: all .2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.assistant-plan-card:hover {
  border-color: var(--accent-primary, #1B3A2E);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}
.assistant-plan-card.recommended {
  border-color: var(--accent-gold, #C9A063);
  box-shadow: 0 4px 14px rgba(201,160,99,0.18);
}
.assistant-plan-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.plan-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 10px;
}
.plan-badge.plan-contado     { background: #DCFCE7; color: #166534; }
.plan-badge.plan-tradicional { background: #C9A063; color: #1B3A2E; }
.plan-badge.plan-cero        { background: #DBEAFE; color: #1E40AF; }
.plan-headline {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-primary, #1B3A2E);
  font-family: var(--font-serif, 'Playfair Display', serif);
  line-height: 1.1;
}
.plan-sub {
  font-size: 12px;
  color: #64748B;
  margin: 4px 0 12px;
}
.plan-ahorro {
  background: #F0EDE5;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #1F2937;
  margin-bottom: 12px;
  line-height: 1.5;
}
.plan-detalles {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: 12px;
  color: #475569;
  flex: 1;
}
.plan-detalles li {
  padding: 3px 0;
}
.plan-btn-elegir {
  width: 100%;
  margin-top: auto;
}
.plan-enganche-slider {
  margin: 10px 0 12px;
  font-size: 12px;
}
.plan-enganche-slider input {
  width: 100%;
  accent-color: var(--accent-gold, #C9A063);
}

.assistant-plusvalia-card {
  background: linear-gradient(135deg, #ECFDF5, #F0FDF4);
  border-left: 4px solid #16A34A;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

/* Paso 5: resumen */
.assistant-summary {
  text-align: center;
  margin-bottom: 22px;
}
.assistant-summary-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 6px;
}
.assistant-summary h3 {
  margin: 0;
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 24px;
  color: #102218;
}
.assistant-summary-grid {
  background: #FAFBFC;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.assistant-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.assistant-summary-row:last-child { border-bottom: none; }
.assistant-summary-row.highlight {
  background: rgba(22,163,74,0.06);
  margin: 4px -10px;
  padding: 7px 10px;
  border-radius: 4px;
}
.assistant-summary-row .lbl {
  color: #64748B;
}
.assistant-summary-row .val {
  font-weight: 600;
  color: #102218;
}
.assistant-comision-box {
  background: linear-gradient(135deg, #F0EDE5, #FAF7F2);
  border-left: 4px solid var(--accent-gold, #C9A063);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.assistant-empty {
  text-align: center;
  padding: 36px 24px;
}
.assistant-loading {
  text-align: center;
  padding: 40px;
  color: #64748B;
  font-size: 14px;
}

/* Mobile */
@media (max-width: 720px) {
  .assistant-modal {
    max-height: 100vh;
    border-radius: 0;
  }
  .assistant-modal-overlay {
    padding: 0;
  }
  .assistant-modal-title {
    font-size: 18px;
  }
  .assistant-grid-3 {
    grid-template-columns: 1fr;
  }
  .assistant-plans-grid {
    grid-template-columns: 1fr;
  }
  .assistant-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
