/* ═══════════════════════════════════════════════════════════════════
   MENTOOR — Sistema de diseño · 4 temas · Mobile-first
   styles.css
═══════════════════════════════════════════════════════════════════ */

/* ── 1. VARIABLES DE TEMA ──────────────────────────────────────── */

:root,
:root[data-theme="dark-amber"] {
  --bg:              #0B0B0F;
  --surface:         #16161C;
  --surface-2:       #1F1F27;
  --surface-3:       #2A2A35;
  --text:            #FFFFFF;
  --text-muted:      #8A8A93;
  --border:          #2A2A33;
  --accent:          #F59E0B;
  --accent-gradient: linear-gradient(135deg, #FBBF24, #F59E0B, #D97706);
  --accent-soft:     rgba(245,158,11,0.15);
  --accent-glow:     0 12px 40px -8px rgba(245,158,11,0.35);
  --on-accent:       #1A1208;
  --scheme:          dark;
}

:root[data-theme="dark-mint"] {
  --bg:              #0A1410;
  --surface:         #122019;
  --surface-2:       #182A22;
  --surface-3:       #20382C;
  --text:            #FFFFFF;
  --text-muted:      #8AA398;
  --border:          #1F3329;
  --accent:          #2EE5A5;
  --accent-gradient: linear-gradient(135deg, #5EEBB8 0%, #2EE5A5 55%, #14B881 100%);
  --accent-soft:     rgba(46,229,165,0.15);
  --accent-glow:     0 12px 40px -8px rgba(46,229,165,0.30);
  --on-accent:       #062017;
  --scheme:          dark;
}

:root[data-theme="light-indigo"] {
  --bg:              #F4F5F9;
  --surface:         #FFFFFF;
  --surface-2:       #ECEDF3;
  --surface-3:       #E4E6F0;
  --text:            #0F1020;
  --text-muted:      #6B6B7A;
  --border:          #E2E3EB;
  --accent:          #6366F1;
  --accent-gradient: linear-gradient(135deg, #818CF8 0%, #6366F1 55%, #4F46E5 100%);
  --accent-soft:     rgba(99,102,241,0.12);
  --accent-glow:     0 12px 40px -8px rgba(99,102,241,0.30);
  --on-accent:       #FFFFFF;
  --scheme:          light;
}

:root[data-theme="light-coral"] {
  --bg:              #FBF5F2;
  --surface:         #FFFFFF;
  --surface-2:       #F5EAE5;
  --surface-3:       #F0E2DB;
  --text:            #1A0F0C;
  --text-muted:      #7A6660;
  --border:          #EBDDD6;
  --accent:          #E5524B;
  --accent-gradient: linear-gradient(135deg, #F47A6F 0%, #E5524B 55%, #C73E3A 100%);
  --accent-soft:     rgba(229,82,75,0.12);
  --accent-glow:     0 12px 40px -8px rgba(229,82,75,0.30);
  --on-accent:       #FFFFFF;
  --scheme:          light;
}

/* ── 2. BASE ───────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

/* Deshabilitar transición en la carga inicial */
.no-transition, .no-transition * {
  transition: none !important;
}

html { color-scheme: var(--scheme, dark); overscroll-behavior: none; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overscroll-behavior: none;   /* evita el "rebote" elástico de iOS al scrollear */
  overflow-x: hidden;          /* evita el bamboleo horizontal */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── 3. THEMING SOBRE TAILWIND (desktop) ───────────────────────── */

#app-principal {
  background: var(--bg);
  color: var(--text);
}

#sidebar {
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
  transition: transform 0.3s ease-in-out;
}

.sidebar-logo-bg   { background: linear-gradient(135deg, #FACC15, #F97316); }
.sidebar-active    { background: var(--accent-soft) !important; color: var(--accent) !important; }
.sidebar-link      { color: var(--text-muted) !important; }
.sidebar-link:hover{ color: var(--text) !important; background: var(--surface-2) !important; }

.desktop-header-bar {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border) !important;
}

.desktop-search-input {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.desktop-search-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
}

.m-stat-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}

.desktop-accent { color: var(--accent) !important; }
.desktop-muted  { color: var(--text-muted) !important; }
.desktop-text   { color: var(--text) !important; }

/* Widget sidebar */
.sidebar-widget {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

#overlay-sidebar { transition: opacity 0.3s ease-in-out; }

/* ── 4. AUTH OVERLAY ───────────────────────────────────────────── */

#auth-overlay {
  position: fixed;
  inset: 0;
  background: #0B0B0F;
  z-index: 9999;
  overflow-y: auto;
}

.pantalla-auth {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.pantalla-auth.oculta { display: none !important; }

.auth-input {
  width: 100%;
  background: #1A1A24;
  border: 1px solid #222230;
  border-radius: 14px;
  padding: 14px 16px;
  color: #F4F4F5;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  box-sizing: border-box;
  font-family: inherit;
}
.auth-input::placeholder { color: #71717A; }
.auth-input:focus {
  border-color: #FFB01F;
  box-shadow: 0 0 0 3px rgba(255,176,31,0.12);
}
.auth-input:disabled { opacity: 0.5; }

.input-wrapper { position: relative; }
.input-wrapper .auth-input { padding-right: 48px; }

.btn-ojo {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #71717A;
  padding: 4px;
  line-height: 0;
  transition: color 0.2s;
  font-family: inherit;
}
.btn-ojo:hover { color: #F4F4F5; }

.btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #71717A;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s;
  font-family: inherit;
}
.btn-volver:hover { color: #F4F4F5; }

.btn-primary {
  width: 100%;
  background: var(--accent-gradient, linear-gradient(135deg, #FBBF24, #F59E0B, #D97706));
  color: var(--on-accent, #1A1208);
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 14px;
  padding: 15px 24px;
  cursor: pointer;
  box-shadow: var(--accent-glow, 0 12px 40px -8px rgba(245,158,11,0.35));
  font-family: inherit;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: var(--accent-gradient, linear-gradient(135deg, #FBBF24, #F59E0B, #D97706)) !important;
  opacity: 0.55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.btn-google {
  width: 100%;
  background: #14141A;
  color: #F4F4F5;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid #222230;
  border-radius: 14px;
  padding: 14px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}
.btn-google:hover { background: #1E1E2A; border-color: #33334A; }

.auth-link {
  color: #FFB01F;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
  font-size: inherit;
  padding: 0;
  font-family: inherit;
  transition: opacity 0.2s;
}
.auth-link:hover { opacity: 0.8; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #71717A;
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #222230;
}

.auth-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.auth-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  border: 2px solid #222230;
  background: #1A1A24;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  margin-top: 1px;
  transition: background 0.2s, border-color 0.2s;
}
.auth-checkbox:checked { background: #FFB01F; border-color: #FFB01F; }
.auth-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: 2px solid #0B0B0F;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.auth-label {
  display: block;
  color: #A1A1AA;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}

.aviso-exito {
  display: none;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 14px;
  padding: 16px;
  color: #6EE7B7;
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
  animation: fadeUp 0.4s ease;
}
.aviso-exito.visible { display: block; }

.logo-splash {
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, #FACC15, #F97316);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 900;
  color: #0B0B0F;
  line-height: 1;
  box-shadow: 0 8px 32px rgba(249,115,22,0.40);
}

.arco-progreso {
  transform: rotate(-90deg);
  transform-origin: 50px 50px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Auth desktop */
@media (min-width: 768px) {
  #auth-overlay {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 24px 64px;
    background:
      radial-gradient(ellipse 60% 50% at 50% 0%, rgba(251,191,36,0.055) 0%, transparent 70%),
      #0B0B0F;
  }
  .pantalla-auth {
    max-width: 450px;
    width: 100%;
    min-height: auto;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.07);
    background: #14141A;
    box-shadow: 0 0 0 1px rgba(255,176,31,0.06), 0 32px 72px rgba(0,0,0,0.65);
    overflow: hidden;
  }
  #pantalla-inicio { min-height: 580px; }
  .auth-input { font-size: 14px; padding: 13px 16px; }
  .input-wrapper .auth-input { padding-right: 46px; }
  .btn-primary { border-radius: 14px; padding: 14px 24px; font-size: 14px; }
  .btn-google  { border-radius: 14px; padding: 13px 24px; font-size: 14px; }
}

/* ── 5. MOBILE/DESKTOP VISIBILIDAD ────────────────────────────── */

@media (max-width: 767px) {
  /* Ocultar sidebar y header desktop */
  #sidebar          { display: none !important; }
  #overlay-sidebar  { display: none !important; }
  .desktop-header   { display: none !important; }
  .desktop-main     { display: none !important; }
  /* Mostrar mobile */
  .mobile-header    { display: block; }
  .mobile-main      { display: block; }
  /* Espacio para tab bar */
  .mobile-main      { padding-bottom: 76px; }
}

@media (min-width: 768px) {
  .mobile-header    { display: none !important; }
  .mobile-main      { display: none !important; }
  #bottom-tab-bar   { display: none !important; }
  .desktop-header   { display: flex !important; }
  .desktop-main     { display: block !important; }
}

/* ── 6. MOBILE HEADER ─────────────────────────────────────────── */

.mobile-header {
  /* Reserva el espacio de la barra de estado/notch del iPhone (app instalada en
     pantalla completa). Sin notch, env(...) = 0 y queda en 16px. */
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 0;
  background: var(--bg);
}

.mobile-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.mobile-brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--on-accent);
  box-shadow: var(--accent-glow);
  flex-shrink: 0;
}

.mobile-brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

.mobile-brand-text p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
}

.mobile-greeting {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.2;
}

.mobile-greeting-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* ── 7. BOTTOM TAB BAR ────────────────────────────────────────── */

#bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-top: 0;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 4px 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  font-family: inherit;
  transition: color 200ms ease;
  position: relative;
}

.tab-item.activo { color: var(--accent); }

.tab-dot {
  position: absolute;
  top: 6px;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 200ms ease;
}

.tab-item.activo .tab-dot { opacity: 1; }

/* ── 8. MOBILE CARDS ──────────────────────────────────────────── */

.mobile-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 16px 80px;
  background: var(--bg);
}

/* Card base */
.m-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

/* ─ Countdown ─ */
.m-countdown { padding: 20px 20px 18px; }

.m-countdown-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.m-countdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.m-countdown-grid {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.m-countdown-unit {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.m-countdown-num {
  font-size: 34px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.m-countdown-sep {
  font-size: 28px;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  padding: 0 2px;
  align-self: flex-start;
  padding-top: 3px;
}

.m-countdown-lbl {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* ─ Card Destacado ─ */
.m-destacado {
  background: var(--accent-gradient);
  box-shadow: var(--accent-glow);
  border: none;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.m-destacado-circles {
  position: absolute;
  top: -50px;
  right: -50px;
  pointer-events: none;
}

.m-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
}

.m-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--on-accent);
  opacity: 0.75;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.m-destacado-titulo {
  font-size: 27px;
  font-weight: 900;
  color: var(--on-accent);
  line-height: 1.1;
  margin: 0 0 8px;
}

.m-destacado-sub {
  font-size: 13px;
  color: var(--on-accent);
  opacity: 0.72;
  line-height: 1.55;
  margin: 0 0 22px;
}

.m-destacado-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.22);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 11px 22px;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.1s;
}
.m-destacado-btn:hover { background: rgba(0,0,0,0.32); }
.m-destacado-btn:active { transform: scale(0.97); }

/* ─ Card Mi Progreso ─ */
.m-progreso { padding: 20px; }

.m-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.m-card-titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.m-ver-todo {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 3px;
}

.m-progreso-stats {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  margin-bottom: 18px;
}

.m-stat { padding: 0 16px; }
.m-stat:first-child { padding-left: 0; }
.m-stat:last-child  { padding-right: 0; }

.m-stat-divider { background: var(--border); }

.m-stat-num {
  font-size: 38px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -1.5px;
}

.m-stat-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.m-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.3;
}

.m-grafico-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.m-grafico-titulo {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.m-grafico-valor {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

/* ─ Card Carreras ─ */
.m-carreras-header { padding: 18px 20px 10px; }

.m-carreras-scroll {
  display: flex;
  gap: 12px;
  padding: 0 20px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.m-carreras-scroll::-webkit-scrollbar { display: none; }

.m-carrera-chip {
  flex-shrink: 0;
  width: 170px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.m-carrera-chip:hover { border-color: var(--accent); transform: translateY(-2px); }

.chip-sigla {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.chip-nombre {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.chip-corte {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── 9. MODAL SELECTOR DE TEMA ────────────────────────────────── */

#theme-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#theme-modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.theme-sheet {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 16px 20px max(32px, env(safe-area-inset-bottom, 32px));
  border: 1px solid var(--border);
  border-bottom: none;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

#theme-modal-overlay.visible .theme-sheet {
  transform: translateY(0);
}

@media (min-width: 768px) {
  #theme-modal-overlay { align-items: center; }
  .theme-sheet {
    border-radius: 24px;
    border-bottom: 1px solid var(--border);
    transform: scale(0.92) translateY(16px);
    max-width: 480px;
  }
  #theme-modal-overlay.visible .theme-sheet {
    transform: scale(1) translateY(0);
  }
}

.theme-drag-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.theme-card-sel {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
}
.theme-card-sel:hover { transform: scale(1.02); }
.theme-card-sel.activo { border-color: var(--accent); }

.theme-swatch {
  height: 44px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.theme-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}
.theme-card-sel.activo .theme-check { display: flex; }

.theme-name-sel {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.theme-mode-sel {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

/* ── 10. DESKTOP DASHBOARD ────────────────────────────────────── */

/* Top bar */
.d-topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 28px;
  width: 100%;
}

.d-topbar-date {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
  text-transform: lowercase;
}

.d-topbar-titulo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

.d-topbar-search {
  flex: 1;
  max-width: 900px;
  margin: 0 16px;
  position: relative;
}

.d-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.d-search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 16px 9px 38px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.d-search-input::placeholder { color: var(--text-muted); }
.d-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.d-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.d-bell-btn {
  position: relative;
  width: 38px;
  height: 38px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}
.d-bell-btn:hover { color: var(--text); background: var(--surface); }

.d-bell-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.d-user-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 4px 14px 4px 4px;
}

.d-user-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--on-accent);
}

.d-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
  margin: 0;
}

.d-user-curso {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1;
}

/* Main content area */
.d-main-content {
  flex: 1;
  padding: 20px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─ Hero card ─ */
.d-hero {
  background: var(--accent-gradient);
  box-shadow: var(--accent-glow);
  border-radius: 20px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  gap: 48px;
  position: relative;
  overflow: hidden;
}

.d-hero-left { flex: 1; min-width: 0; position: relative; z-index: 1; }

.d-hero-right {
  flex-shrink: 0;
  width: 190px;
  position: relative;
  z-index: 1;
}

.d-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--on-accent);
  opacity: 0.85;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 4px 12px;
}

.d-hero-headline {
  font-size: 52px;
  font-weight: 900;
  color: var(--on-accent);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 0 0 14px;
}

.d-hero-sub {
  font-size: 14px;
  color: var(--on-accent);
  opacity: 0.75;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 0 26px;
}

.d-hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.d-hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.95);
  color: #1A1208;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 50px;
  padding: 11px 22px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.d-hero-btn-primary:hover  { background: #fff; }
.d-hero-btn-primary:active { transform: scale(0.97); }

.d-hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  padding: 11px 22px;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.1s;
}
.d-hero-btn-secondary:hover  { background: rgba(255,255,255,0.2); }
.d-hero-btn-secondary:active { transform: scale(0.97); }

.d-hero-mini-card {
  background: rgba(0,0,0,0.18);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.14);
  text-align: center;
}

.d-hero-mini-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--on-accent);
  opacity: 0.6;
  margin: 0 0 8px;
}

.d-hero-mini-date {
  font-size: 42px;
  font-weight: 900;
  color: var(--on-accent);
  line-height: 1;
  letter-spacing: -2px;
  margin: 0 0 6px;
}

.d-hero-mini-name {
  font-size: 12px;
  color: var(--on-accent);
  opacity: 0.72;
  margin: 0;
  line-height: 1.3;
}

/* ─ Stats row ─ */
.d-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.d-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
}

.d-stat-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 10px;
}

.d-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.d-stat-num {
  font-size: 34px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
  margin: 0 0 5px;
}

.d-stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* ─ Bottom grid ─ */
.d-grid-bottom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  align-items: start;
}

/* ─ Chart card ─ */
.d-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px 18px;
}

.d-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.d-card-titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
}

.d-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.d-nuevo-calc {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.d-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.d-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

.d-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.d-legend-dash {
  width: 18px;
  height: 0;
  border-top: 2px dashed;
  border-color: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
}

/* ─ Right column ─ */
.d-right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.d-last-calc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
}

.d-calc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.d-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.d-calc-carrera {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.1;
}

.d-calc-uni {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.d-calc-badge {
  font-size: 12px;
  font-weight: 700;
  color: #F87171;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 50px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.d-calc-num-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.d-calc-num {
  font-size: 56px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -3px;
}

.d-calc-corte {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.d-plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
}

.d-plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-plan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  padding: 9px 12px;
  background: var(--surface-2);
  border-radius: 10px;
}

.d-plan-item.done { color: var(--text-muted); }
.d-plan-item.done span:last-child { text-decoration: line-through; }

.d-plan-check {
  width: 17px;
  height: 17px;
  min-width: 17px;
  background: #10B981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: white;
  flex-shrink: 0;
}

/* ── 11. MI PROGRESO — desktop ────────────────────────────────── */

@keyframes mp-fadeUp  { from { opacity:0; transform:translateY(12px) } to { opacity:1; transform:translateY(0) } }
@keyframes mp-fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes mp-scaleUp { from { opacity:0; transform:scale(0.95) } to { opacity:1; transform:scale(1) } }
@keyframes mp-barGrow { from { width:0 } to { width:var(--w) } }
@keyframes mp-popIn   { from { opacity:0; transform:scale(0.5) } to { opacity:1; transform:scale(1) } }
@keyframes mp-spin    { to { transform:rotate(360deg) } }

/* Card contenedor (reemplaza .d-chart-card) */
.mp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: mp-fadeUp .35s both;
}

/* Header de sección */
.mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.mp-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.mp-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Toggle Gráfico / Tabla */
.mp-view-toggle {
  display: flex;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--border);
}
.mp-view-btn {
  padding: 5px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.mp-view-btn.active {
  background: var(--accent);
  color: var(--on-accent);
}
.mp-view-btn:active { transform: scale(0.96); }

/* Chips + controles en la misma fila */
.mp-chips-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.mp-chips-inner {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

/* Chips de prueba */
.mp-chips {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.mp-chip {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .18s;
  font-family: inherit;
}
.mp-chip:hover { opacity: .85; }
.mp-chip.active { background: color-mix(in srgb, var(--mp-color) 14%, transparent); border-color: var(--mp-color); color: var(--mp-color); }
.mp-chip:active { transform: scale(0.96); }

/* Layout interno: chart 65% + panel 35% */
.mp-body {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 20px;
  align-items: start;
}

/* Área del gráfico */
.mp-chart-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mp-chart-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.mp-chart-wrap {
  position: relative;
  width: 100%;
}

.mp-chart-svg { display: block; width: 100%; overflow: visible; }

/* Tooltip del gráfico */
.mp-tooltip {
  position: absolute;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 20;
  min-width: 130px;
  transform: translate(-50%, -110%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.mp-tooltip.visible { opacity: 1; }
.mp-tooltip-nombre { font-size: 11px; font-weight: 700; color: var(--text); margin: 0 0 2px; }
.mp-tooltip-fecha  { font-size: 10px; color: var(--text-muted); margin: 0 0 6px; }
.mp-tooltip-pts    { font-size: 20px; font-weight: 900; line-height: 1; margin: 0 0 6px; }
.mp-tooltip-row    { display: flex; gap: 10px; }
.mp-tooltip-stat   { display: flex; flex-direction: column; align-items: center; }
.mp-tooltip-stat-num  { font-size: 13px; font-weight: 700; }
.mp-tooltip-stat-lbl  { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* Tabla de historial (debajo del gráfico) — oculta por defecto, JS la muestra */
.mp-table-wrap {
  display: none;
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.mp-table-header-row {
  display: grid;
  grid-template-columns: 1fr 64px 44px 44px 44px 32px;
  padding: 0 6px 6px;
  gap: 4px;
}

.mp-th {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
}
.mp-th:not(:first-child) { text-align: center; }

.mp-table-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-table-row {
  display: grid;
  grid-template-columns: 1fr 64px 44px 44px 44px 32px;
  align-items: center;
  padding: 9px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  gap: 4px;
  transition: transform .12s, box-shadow .12s;
  cursor: default;
}
.mp-table-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -4px var(--accent-soft);
}

.mp-td { font-size: 12px; color: var(--text); }
.mp-td:not(:first-child) { text-align: center; }
.mp-td-nombre { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.2; }
.mp-td-fecha  { font-size: 10px; color: var(--text-muted); }

.mp-row-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  margin: auto;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.mp-row-edit-btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.mp-row-del-btn:hover {
  background: color-mix(in srgb, #FF6464 14%, var(--surface));
  color: #FF6464;
  border-color: color-mix(in srgb, #FF6464 45%, transparent);
}
.mp-td-nombre { cursor: pointer; }
.mp-td-nombre:hover { color: var(--accent); }
.calc-back-top {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  font-family: inherit; padding: 0; margin-bottom: 12px;
  transition: color .15s;
}
.calc-back-top:hover { color: var(--accent); }

/* Delta pill (reutiliza patrón .d-calc-badge) */
.mp-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50px;
  padding: 2px 6px;
  white-space: nowrap;
}
.mp-delta.pos { color: #4ade80; background: rgba(74,222,128,.10); border: 1px solid rgba(74,222,128,.18); }
.mp-delta.neg { color: #FF6464; background: rgba(255,100,100,.10); border: 1px solid rgba(255,100,100,.18); }
.mp-delta.neu { color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); }

/* Triple bar */
.mp-triple-bar-track {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  height: 7px;
  gap: 1.5px;
}
.mp-triple-seg {
  height: 100%;
  border-radius: 3px;
  animation: mp-barGrow .45s cubic-bezier(.16,1,.3,1) both;
}

/* Distribución debajo de la tabla */
.mp-dist-section {
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.mp-dist-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.mp-dist-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-top: 10px;
}
.mp-dist-legend strong { color: var(--text); }
.mp-dist-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Panel derecho: métricas apiladas */
.mp-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 44px;
}

.mp-metrics-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-metric {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color .15s;
}
.mp-metric:hover { border-color: var(--accent); }

.mp-metric-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.mp-metric-num {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  margin-bottom: 3px;
}

.mp-metric-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Metric META */
.mp-metric-meta {
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  transition: border-color .15s, background .2s;
}
.mp-metric-meta:hover { border-color: var(--accent); }
.mp-metric-meta.empty {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.mp-metric-meta:not(.empty) {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.mp-meta-left { flex: 1; min-width: 0; }
.mp-meta-pts  { font-size: 28px; font-weight: 900; color: var(--accent); line-height: 1; }
.mp-meta-detail { font-size: 10px; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-meta-cta  { font-size: 11px; font-weight: 700; color: var(--accent); flex-shrink: 0; }

/* Panel resumen estadístico */
.mp-resumen {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 15px;
}

.mp-resumen-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.mp-resumen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mp-resumen-item { }
.mp-resumen-num { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1; }
.mp-resumen-lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* Empty state */
.mp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 8px;
  text-align: center;
}
.mp-empty-icon { font-size: 28px; opacity: .4; }
.mp-empty-text { font-size: 13px; color: var(--text-muted); }

/* Botón nuevo ensayo */
.mp-btn-nuevo {
  font-size: 12px;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.mp-btn-nuevo:hover  { opacity: .88; }
.mp-btn-nuevo:active { transform: scale(0.96); }

/* ── MODALES MI PROGRESO ─────────────────────────────────────── */

.mp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(7px);
  z-index: 9000;
  display: flex;
  align-items: flex-end;   /* bottom-sheet en mobile */
  justify-content: center;
  animation: mp-fadeIn .2s both;
}

.mp-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;  /* bottom-sheet en mobile */
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: mp-slideUp .35s cubic-bezier(.16,1,.3,1) both;
  box-shadow: 0 -8px 40px rgba(0,0,0,.45);
}

/* Handle bar — solo visible en mobile */
.mp-modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

@keyframes mp-slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Desktop: modal centrado */
@media (min-width: 768px) {
  .mp-modal-overlay {
    align-items: center;
    padding: 20px;
  }
  .mp-modal {
    max-width: 520px;
    border-radius: 20px;
    animation: mp-scaleUp .25s cubic-bezier(.16,1,.3,1) both;
    box-shadow: 0 24px 64px rgba(0,0,0,.55);
  }
  .mp-modal-handle { display: none; }
}

.mp-modal-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mp-modal-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 3px;
}

.mp-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.mp-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.mp-modal-close:hover { color: var(--text); background: var(--surface); }

.mp-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 20px;
}

.mp-modal-footer {
  padding: 12px 22px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Barra de progreso del wizard */
.mp-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}
.mp-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .35s cubic-bezier(.16,1,.3,1);
}

/* Toggle modo meta (Auto / Manual) */
.mp-mode-toggle {
  display: flex;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  margin-top: 12px;
}
.mp-mode-btn {
  flex: 1;
  padding: 7px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
}
.mp-mode-btn.active {
  background: var(--accent);
  color: var(--on-accent);
}

/* Input styles dentro de modales */
.mp-input {
  display: block;
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.mp-input::placeholder { color: var(--text-muted); }
.mp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mp-input-num {
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  padding: 16px 14px;
}

.mp-input-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Lista de carreras / universidades */
.mp-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mp-list-item {
  padding: 10px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color .15s, background .15s;
  animation: mp-fadeUp .2s both;
}
.mp-list-item:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface-2)); }

/* Dropdown autocomplete dentro del modal */
.mp-autocomplete-wrap { position: relative; }
.mp-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  animation: mp-scaleUp .15s both;
}
.mp-dropdown-item {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.mp-dropdown-item:last-child { border-bottom: none; }
.mp-dropdown-item:hover { background: var(--surface-2); }

/* Chips de universidades en grid */
.mp-uni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.mp-uni-chip {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  animation: mp-fadeUp .2s both;
}
.mp-uni-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px -4px var(--accent-soft);
}

/* Confirmación de meta */
.mp-meta-confirm {
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
  animation: mp-scaleUp .3s both;
}
.mp-meta-confirm-pts {
  font-size: 52px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin: 8px 0 6px;
}

/* Botón guardar meta */
.mp-btn-guardar {
  width: 100%;
  padding: 13px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s, transform .1s;
}
.mp-btn-guardar:hover  { opacity: .9; }
.mp-btn-guardar:active { transform: scale(0.98); }
.mp-btn-guardar:disabled { opacity: .35; cursor: default; transform: none; }

/* Botón continuar del wizard */
.mp-btn-continuar {
  width: 100%;
  padding: 13px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s, background .2s, transform .1s;
}
.mp-btn-continuar:active { transform: scale(0.98); }

/* Botón atrás del wizard */
.mp-btn-atras {
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, border-color .15s;
}
.mp-btn-atras:hover { color: var(--text); border-color: var(--text-muted); }

/* Prueba row en wizard */
.mp-prueba-row {
  padding: 13px 16px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
  transition: all .18s;
}
.mp-prueba-row:hover { border-color: var(--border); background: var(--surface); }
.mp-prueba-row.selected { background: color-mix(in srgb, var(--mp-color) 10%, var(--surface-2)); border-color: var(--mp-color); }

/* Grid de preguntas (correctas / incorrectas / omitidas) */
.mp-preguntas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mp-pregunta-cell {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

/* Saving state */
.mp-saving {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 0;
  animation: mp-fadeIn .3s both;
}
.mp-saving-spinner {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  display: flex; align-items: center; justify-content: center;
}

/* Puntaje slider */
.mp-pts-display {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mp-pts-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  width: 100%;
  font-family: inherit;
  outline: none;
}

/* Tag M2 requerido */
.mp-tag-m2 {
  font-size: 9px;
  font-weight: 800;
  color: #facc15;
  background: rgba(250,204,21,0.12);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .05em;
  flex-shrink: 0;
}

/* Nota info dentro de modal */
.mp-note {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
}
.mp-note.warn { background: rgba(250,204,21,.08); border: 1px solid rgba(250,204,21,.2); color: #facc15; }
.mp-note.info { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }

/* ── MOBILE MI PROGRESO ─────────────────────────────────────────── */

#mp-m-chips::-webkit-scrollbar { display:none; }

/* Chip mobile */
.mp-m-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
  flex-shrink: 0;
}
.mp-m-chip.active {
  border-color: var(--mp-m-color);
  background: color-mix(in srgb, var(--mp-m-color) 14%, transparent);
  color: var(--mp-m-color);
}
.mp-m-chip:active { transform: scale(0.95); }

/* Etiqueta evolución */
.mp-m-chart-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Tabla mobile */
.mp-m-table-hdr {
  display: grid;
  grid-template-columns: 1fr 52px 34px 34px 34px 28px;
  padding: 0 4px 6px;
  gap: 2px;
}
.mp-m-th {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  text-align: center;
}
.mp-m-th:first-child { text-align: left; }

.mp-m-row {
  display: grid;
  grid-template-columns: 1fr 52px 34px 34px 34px 28px;
  align-items: center;
  padding: 9px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  gap: 2px;
  margin-bottom: 5px;
}

/* Distribución — bottom */
.mp-m-dist {
  margin-top: 12px;
  padding: 11px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.mp-m-dist-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.mp-m-bar-track {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  height: 8px;
  gap: 1.5px;
  margin-bottom: 7px;
}
.mp-m-bar-seg {
  height: 100%;
  border-radius: 3px;
}
.mp-m-bar-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.mp-m-bar-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.mp-m-bar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── RESPONSIVE — tablet (768–1279px) ──────────────────────────── */

@media (max-width: 1279px) {
  .mp-body {
    grid-template-columns: 1fr;
  }
  .mp-panel {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  .mp-metrics-row {
    flex: 1;
    min-width: 200px;
  }
  .mp-resumen {
    flex: 1;
    min-width: 200px;
  }
  .mp-table-header-row,
  .mp-table-row {
    grid-template-columns: 1fr 60px 40px 40px 40px 32px;
  }
}

@media (max-width: 900px) {
  .mp-table-header-row,
  .mp-table-row {
    grid-template-columns: 1fr 56px 36px 36px 36px 32px;
  }
}


/* ════════════════════════════════════════════════════════════════
   CALCULADORA PAES
════════════════════════════════════════════════════════════════ */

.calc-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.calc-section-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.calc-section-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  margin: 0 0 6px;
}
.calc-section-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}
.calc-historial-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .18s;
}
.calc-historial-btn:hover { background: var(--surface); }

.calc-steps {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.calc-step { display: flex; align-items: center; gap: 10px; flex: 1; }
.calc-step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; flex-shrink: 0;
  transition: all .3s;
}
.calc-step-num.activo  { background: var(--accent); color: var(--on-accent); box-shadow: var(--accent-glow); }
.calc-step-num.inactivo { background: var(--surface); border: 2px solid var(--border); color: var(--text-muted); }
.calc-step-num.completo { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); border: 2px solid var(--accent); color: var(--accent); }
.calc-step-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); line-height: 1; }
.calc-step-label.activo { color: var(--accent); }
.calc-step-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.2; margin-top: 2px; }
.calc-step-name.inactivo { color: var(--text-muted); }
.calc-step-sep { flex: 1; height: 2px; background: var(--border); margin: 0 12px; border-radius: 999px; max-width: 80px; }

.calc-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.calc-left  { display: flex; flex-direction: column; gap: 16px; }
.calc-right { display: flex; flex-direction: column; gap: 16px; }

.calc-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.calc-card-title { font-size: 16px; font-weight: 800; color: var(--text); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.calc-card-sub   { font-size: 13px; color: var(--text-muted); margin: 0 0 18px; }

.calc-colegio-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.calc-colegio-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .18s;
}
.calc-colegio-btn:hover  { border-color: var(--accent); color: var(--text); }
.calc-colegio-btn.activo { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); box-shadow: 0 0 0 1px var(--accent); }
.calc-colegio-info { margin-top: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--text-muted); display: flex; align-items: flex-start; gap: 8px; }

.calc-nem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-nem-cell { background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 16px; transition: border-color .18s; }
.calc-nem-cell:focus-within { border-color: var(--accent); }
.calc-nem-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.calc-nem-input { width: 100%; background: transparent; border: none; outline: none; font-size: 28px; font-weight: 900; color: var(--text-muted); font-family: inherit; padding: 0; }
.calc-nem-input:focus { color: var(--text); }

.calc-paes-rows { display: flex; flex-direction: column; gap: 10px; }
.calc-paes-row  { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-paes-label-wrap { flex: 1; }
.calc-paes-name { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; }
.calc-paes-req-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.calc-paes-tipo { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.calc-paes-input-wrap { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 14px; min-width: 120px; transition: border-color .18s; }
.calc-paes-input-wrap:focus-within { border-color: var(--accent); }
.calc-paes-input { width: 80px; background: transparent; border: none; outline: none; font-size: 20px; font-weight: 900; color: var(--text-muted); font-family: inherit; text-align: right; padding: 0; }
.calc-paes-input:focus { color: var(--text); }
.calc-paes-pts { font-size: 12px; color: var(--text-muted); font-weight: 600; }

.calc-sig-btn { width: 100%; padding: 16px; border-radius: 14px; border: none; background: var(--accent-gradient); color: var(--on-accent); font-size: 16px; font-weight: 800; font-family: inherit; cursor: pointer; transition: opacity .18s, transform .15s; box-shadow: var(--accent-glow); }
.calc-sig-btn:hover  { opacity: .9; }
.calc-sig-btn:active { transform: scale(0.98); }

.calc-vivo { background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 18px; padding: 20px; }
.calc-vivo-header { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px; }
.calc-vivo-bars { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.calc-vivo-bar-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.calc-vivo-bar-track { height: 6px; border-radius: 999px; background: var(--border); margin-bottom: 5px; overflow: hidden; }
.calc-vivo-bar-fill  { height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s ease; }
.calc-vivo-bar-val   { display: flex; flex-direction: column; gap: 1px; }
.calc-vivo-num       { font-size: 2.2rem; font-weight: 900; color: var(--text-muted); line-height: 1; }
.calc-vivo-num.filled { color: var(--accent); }
.calc-vivo-sub       { font-size: 10px; color: var(--text-muted); text-transform: lowercase; }
.calc-vivo-note { font-size: 12px; color: var(--text-muted); line-height: 1.5; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }

.calc-sim { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; padding: 20px; }
.calc-sim-title { font-size: 11px; font-weight: 800; color: var(--text); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.calc-sim-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.calc-sim-row:last-child { border-bottom: none; }
.calc-sim-key { color: var(--text-muted); font-weight: 500; }
.calc-sim-key.bold { color: var(--text); font-weight: 700; }
.calc-sim-val { color: var(--text); font-weight: 700; }
.calc-sim-val.muted { color: var(--text-muted); }
.calc-tip { background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); border-radius: 12px; padding: 12px 14px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.calc-tip strong { color: var(--accent); }

/* Mobile */
#calc-mobile { padding-bottom: 140px; }
.calc-mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.calc-mobile-title  { font-size: 22px; font-weight: 900; color: var(--text); }
.calc-mobile-steps  { display: flex; align-items: center; padding: 0 18px 16px; gap: 0; }
.calc-mobile-step-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; flex-shrink: 0; }
.calc-mobile-step-sep { flex: 1; height: 2px; background: var(--border); }
.calc-mobile-step-sep.activo { background: var(--accent); opacity: 0.5; }
.calc-m-card { margin: 0 14px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.calc-m-card-title { font-size: 15px; font-weight: 800; color: var(--text); margin: 0 0 3px; display: flex; align-items: center; gap: 7px; }
.calc-m-card-sub   { font-size: 12px; color: var(--text-muted); margin: 0 0 14px; }
.calc-m-colegio-btns { display: flex; gap: 8px; }
.calc-m-colegio-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px 8px; border-radius: 11px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .18s; }
.calc-m-colegio-btn.activo { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); }
.calc-m-colegio-info { margin-top: 10px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calc-m-nem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.calc-m-nem-cell { background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.calc-m-nem-cell:focus-within { border-color: var(--accent); }
.calc-m-nem-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.calc-m-nem-input { width: 100%; background: transparent; border: none; outline: none; font-size: 24px; font-weight: 900; color: var(--text-muted); font-family: inherit; padding: 0; }
.calc-m-nem-input:focus { color: var(--text); }
.calc-m-paes-rows { display: flex; flex-direction: column; gap: 10px; }
.calc-m-paes-row  { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calc-m-paes-label-wrap { flex: 1; }
.calc-m-paes-name { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 5px; }
.calc-m-paes-tipo { font-size: 11px; color: var(--text-muted); }
.calc-m-paes-input-wrap { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 8px 10px; min-width: 100px; }
.calc-m-paes-input-wrap:focus-within { border-color: var(--accent); }
.calc-m-paes-input { width: 60px; background: transparent; border: none; outline: none; font-size: 17px; font-weight: 900; color: var(--text-muted); font-family: inherit; text-align: right; padding: 0; }
.calc-m-paes-input:focus { color: var(--text); }
.calc-m-paes-pts { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.calc-m-sig-btn { display: block; width: calc(100% - 28px); margin: 0 14px 12px; padding: 18px; border-radius: 18px; border: none; background: var(--accent-gradient); color: var(--on-accent); font-size: 16px; font-weight: 800; font-family: inherit; cursor: pointer; box-shadow: var(--accent-glow); }


/* ── Barra Cálculo en Vivo — Móvil ────────────────────────── */
.calc-m-vivo {
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 18px;
  padding: 14px 20px;
  margin: 0 14px 12px;
  gap: 0;
}
.calc-m-vivo-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.calc-m-vivo .calc-vivo-num { font-size: 24px; }

.calc-m-vivo-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}
.calc-m-vivo-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Calc mobile: solo visible en móvil */
@media (min-width: 768px) {
  #calc-mobile { display: none !important; }
}

/* ── Selector de curso ───────────────────────────────────────── */
.calc-curso-row    { margin-bottom: 14px; }
.calc-curso-label  { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.calc-curso-btns   { display: flex; gap: 6px; flex-wrap: wrap; }
.calc-curso-btn    { padding: 5px 11px; border-radius: 99px; border: 1.5px solid var(--border); background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; transition: all .15s; }
.calc-curso-btn:hover { border-color: var(--accent); color: var(--accent); }
.calc-curso-btn.activo { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ── Inputs NEM: blanco al escribir, bloqueados ──────────────── */
.calc-nem-input:not(:placeholder-shown)   { color: var(--text); }
.calc-m-nem-input:not(:placeholder-shown) { color: var(--text); }

.calc-nem-cell.locked   { opacity: 0.55; pointer-events: none; }
.calc-m-nem-cell.locked { opacity: 0.55; pointer-events: none; }
.calc-nem-cell.locked .calc-nem-label,
.calc-m-nem-cell.locked .calc-m-nem-label { display: flex; align-items: center; gap: 4px; }
.calc-nem-cell.locked .calc-nem-label::after,
.calc-m-nem-cell.locked .calc-m-nem-label::after { content: '🔒'; font-size: 9px; }

.calc-m-paes-input:not(:placeholder-shown) { color: var(--text); }

.calc-m-sig-btn:disabled, .calc-sig-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ══ PASO 2 ═══════════════════════════════════════════════════ */

/* Step indicator: completo (checkmark) */
.calc-step-num.completo {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

/* ── Área grid ───────────────────────────────────────────────── */
.calc-area-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.calc-area-grid-mob {
  grid-template-columns: repeat(2, 1fr);
}
.calc-area-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 6px 12px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  transition: border-color .15s, background .15s, box-shadow .15s;
  font-family: inherit;
}
.calc-area-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.calc-area-card.activo {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.calc-area-emoji  { font-size: 22px; line-height: 1; }
.calc-area-label  { font-size: 10px; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 1.2; }
.calc-area-card.activo .calc-area-label { color: var(--accent); }
.calc-area-count  { position: absolute; top: 5px; right: 7px; font-size: 9px; color: var(--text-muted); background: var(--surface); border-radius: 99px; padding: 1px 5px; }

/* ── Ciudad/región chips ─────────────────────────────────────── */
.calc-ciudad-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 4px;
  scrollbar-width: none;
}
.calc-ciudad-chips::-webkit-scrollbar { display: none; }
.calc-ciudad-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.calc-ciudad-chip:hover  { border-color: var(--accent); color: var(--text); }
.calc-ciudad-chip.activo { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ── Dropdowns Paso 2 (Área de estudio / Carrera) ────────────── */
.calc-dropdown-group { margin-bottom: 12px; }
.calc-dropdown-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.calc-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, color .15s;
}
.calc-dropdown-btn:hover { border-color: var(--accent); }
.calc-dropdown-btn.activo { border-color: var(--accent); color: var(--accent); }
.calc-dropdown-chevron { flex-shrink: 0; transition: transform .22s ease; }
.calc-dropdown-btn.open .calc-dropdown-chevron  { transform: rotate(180deg); }
.calc-combo.open       .calc-dropdown-chevron   { transform: rotate(180deg); }
.calc-dropdown-panel {
  margin-top: 8px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-2);
}

/* ── Combo carrera (input integrado en el header) ────────────── */
.calc-combo {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color .15s;
}
.calc-combo.open   { border-color: var(--accent); }
.calc-combo.activo { border-color: var(--accent); }
.calc-combo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}
.calc-combo-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}
.calc-combo-text.filled { color: var(--accent); }
.calc-combo-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  padding: 0;
  cursor: text;
  min-width: 0;
}
.calc-combo-search::placeholder { color: var(--text-muted); font-weight: 400; }
.calc-combo-list {
  border-top: 1.5px solid var(--border);
  padding: 8px;
  max-height: 260px;
  overflow-y: auto;
}

/* ── Carrera search + list ───────────────────────────────────── */
.calc-carrera-search-wrap { margin-top: 14px; margin-bottom: 10px; position: relative; }
.calc-carrera-search-wrap::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.45;
  pointer-events: none;
}
.calc-carrera-search {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px 10px 38px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.calc-carrera-search:focus { border-color: var(--accent); }
.calc-carrera-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.calc-carrera-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.calc-carrera-item:hover  { border-color: var(--accent); background: var(--accent-soft); }
.calc-carrera-item.activo { border-color: var(--accent); background: var(--accent-soft); }
.calc-carrera-nombre      { font-size: 14px; font-weight: 600; color: var(--text); }
.calc-carrera-item.activo .calc-carrera-nombre { color: var(--accent); }
.calc-carrera-meta        { font-size: 11px; color: var(--text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.calc-carrera-empty       { text-align: center; color: var(--text-muted); font-size: 13px; padding: 24px; }
.carrera-area-badge       { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 10px; font-size: 10px; font-weight: 500; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); white-space: nowrap; }

/* ── Paso 2: botones de navegación (desktop) ─────────────────── */
.calc-p2-nav { display: flex; gap: 10px; margin-top: 4px; }
.calc-p2-nav .calc-sig-btn { flex: 1; }
.calc-ant-btn {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.calc-ant-btn:hover { border-color: var(--accent); color: var(--text); }

/* ── Paso 2: botones de navegación (mobile) ─────────────────── */
.calc-m-p2-nav { display: flex; gap: 10px; padding: 8px 14px 16px; }
.calc-m-p2-nav .calc-m-sig-btn { flex: 1; width: auto; margin: 0; }
.calc-m-ant-btn {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.calc-m-ant-btn:hover { border-color: var(--accent); color: var(--text); }

/* ── Vocacional link ─────────────────────────────────────────── */
.calc-vocacional {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 14px 0 10px;
}
.calc-vocacional-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.calc-vocacional-link:hover { text-decoration: underline; }

/* ══ EXPLORADOR DE CARRERAS ══════════════════════════════════ */

@media (min-width: 768px) { #explorador-mob { display: none !important; } }

#explorador-mob {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 80px;
}

.exp-page-header { padding: 16px 16px 0; }
.exp-page-title  { font-size: 20px; font-weight: 800; color: var(--text); margin: 0 0 4px; }
.exp-page-sub    { font-size: 13px; color: var(--text-muted); margin: 0; }

.exp-mob-seg {
  display: flex;
  margin: 12px 16px 0;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.exp-mob-tab {
  flex: 1;
  padding: 7px 0;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.exp-mob-tab.activo {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.exp-filtros        { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 0; }
@media (max-width: 767px) {
  .exp-filtros .exp-group { width: 100%; }
}
.exp-group          { display: flex; flex-direction: column; }
.exp-group-label    {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 6px;
}

/* ── Área dropdown ───────────────────────────────────────────── */
.exp-area-wrap { position: relative; }

.exp-area-btn {
  width: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  height: 52px; padding: 0 16px;
  background: var(--surface-2, #1e2433);
  border: 1.5px solid var(--border, #2d3748);
  border-radius: 14px;
  color: var(--text, #e2e8f0);
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: border-color .15s, border-radius .15s;
}
.exp-area-btn:hover                { border-color: var(--accent); }
.exp-area-btn.open                 { border-color: var(--accent); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.exp-area-btn.open .exp-chevron   { transform: rotate(180deg); }
.exp-area-btn.activo               { border-color: var(--accent); color: var(--accent); text-transform: uppercase; }

.exp-area-panel {
  background: var(--surface-2, #1e2433);
  border: 1.5px solid var(--accent, #f5a623);
  border-top: none;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  overflow: hidden;
  animation: exp-slide-down .2s ease-out both;
}
.exp-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px; padding: 12px;
}
.exp-area-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 8px;
  background: var(--surface-3, #242b3d);
  border: 1.5px solid var(--border, #2d3748);
  border-radius: 12px; cursor: pointer;
  font-family: inherit; color: var(--text, #e2e8f0);
  transition: border-color .15s, background .15s, color .15s;
}
.exp-area-card:hover   { border-color: var(--accent); }
.exp-area-card.activo  { border-color: var(--accent); background: rgba(245,166,35,.08); color: var(--accent); }
.exp-area-emoji        { font-size: 20px; line-height: 1; }
.exp-area-label-text   { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; text-transform: uppercase; }
.exp-area-count        { font-size: 10px; font-weight: 700; background: var(--accent, #f5a623); color: #000; border-radius: 999px; padding: 1px 6px; line-height: 1.4; }

/* ── Combobox ────────────────────────────────────────────────── */
.exp-combo {
  position: relative;
  background: var(--surface-2, #1e2433);
  border: 1.5px solid var(--border, #2d3748);
  border-radius: 14px;
  transition: border-color .15s, border-radius .15s;
}
.exp-combo:hover  { border-color: var(--accent); }
.exp-combo.open   { border-color: var(--accent); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.exp-combo.activo { border-color: var(--accent); }

.exp-combo-row   { display: flex; align-items: center; padding: 0 4px 0 16px; height: 52px; gap: 4px; }
.exp-combo-input {
  flex: 1; min-width: 0; background: transparent;
  border: none; outline: none;
  color: var(--text, #e2e8f0);
  font-family: inherit; font-size: 15px; font-weight: 600; cursor: text;
}
.exp-combo-input::placeholder { color: var(--text-muted, #94a3b8); font-weight: 400; }
.exp-combo-input.filled       { color: var(--accent, #f5a623); text-transform: uppercase; }

.exp-combo-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: transparent; border: none; border-radius: 10px;
  cursor: pointer; color: var(--text-muted, #94a3b8);
  transition: color .15s, background .12s; flex-shrink: 0;
}
.exp-combo-arrow:hover { color: var(--accent); background: rgba(245,166,35,.08); }

.exp-chevron         { width: 16px; height: 16px; flex-shrink: 0; transition: transform .22s ease; }
.exp-chevron.rotated { transform: rotate(180deg); }

/* ── Listbox ─────────────────────────────────────────────────── */
.exp-listbox {
  position: absolute;
  top: calc(100% + 1px); left: -1.5px; right: -1.5px;
  background: var(--surface-2, #1e2433);
  border: 1.5px solid var(--accent, #f5a623);
  border-top: none;
  border-bottom-left-radius: 14px; border-bottom-right-radius: 14px;
  max-height: 300px; overflow-y: auto;
  z-index: 200; padding: 4px;
  list-style: none; margin: 0;
  animation: exp-slide-down .2s ease-out both;
  scrollbar-width: thin; scrollbar-color: var(--border, #2d3748) transparent;
}
.exp-listbox::-webkit-scrollbar       { width: 4px; }
.exp-listbox::-webkit-scrollbar-track { background: transparent; }
.exp-listbox::-webkit-scrollbar-thumb { background: var(--border, #2d3748); border-radius: 4px; }

.exp-listbox-option {
  display: flex; align-items: center;
  padding: 9px 12px;
  cursor: pointer; list-style: none;
  transition: background .1s;
}
.exp-listbox-option:hover  { background: var(--surface-3, #242b3d); }
.exp-listbox-option.activo { background: rgba(245,166,35,.06); }
.exp-option-nombre {
  font-size: 13px; font-weight: 600;
  color: var(--text); text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.exp-section-header {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px 4px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted, #94a3b8);
  list-style: none; user-select: none;
}
.exp-section-icon { width: 12px; height: 12px; flex-shrink: 0; opacity: .7; }

.exp-option {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 8px 9px 12px;
  border-radius: 10px; cursor: pointer;
  transition: background .1s; list-style: none;
}
.exp-option:hover                  { background: var(--surface-3, #242b3d); }
.exp-option[aria-selected="true"]  { background: rgba(245,166,35,.06); }
.exp-option.highlighted            { background: rgba(245,166,35,.13); }
.exp-option.fuzzy                  { opacity: .7; }
.exp-option.fuzzy.highlighted      { opacity: 1; }

.exp-option-icon { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-muted, #94a3b8); }
.exp-option-name {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--text, #e2e8f0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.exp-option.highlighted .exp-option-name { color: var(--accent, #f5a623); }

.exp-match                         { font-weight: 800; color: var(--accent, #f5a623); font-style: normal; }
.exp-option.highlighted .exp-match { color: #fff; }

.exp-fav-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  background: transparent; border: none; border-radius: 8px;
  cursor: pointer; color: var(--text-muted, #94a3b8);
  transition: color .15s, background .12s; padding: 0;
}
.exp-fav-btn:hover  { color: var(--accent); background: rgba(245,166,35,.1); }
.exp-fav-btn.active { color: var(--accent); }
.exp-fav-btn svg    { width: 14px; height: 14px; }

.exp-empty         { padding: 14px 12px; font-size: 13px; color: var(--text-muted, #94a3b8); text-align: center; line-height: 1.5; list-style: none; }
.exp-empty strong  { color: var(--text, #e2e8f0); font-weight: 700; }

.exp-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Resultados ──────────────────────────────────────────────── */
.exp-resultados { margin-top: 16px; }

.exp-results-header {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.exp-results-title  { font-size: 18px; font-weight: 800; color: var(--text); margin: 0; }
.exp-results-count  { font-size: 13px; color: var(--text-muted); font-weight: 600; }

.exp-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.exp-uni-card {
  background: var(--surface-2, #1e2433);
  border: 1.5px solid var(--border, #2d3748);
  border-radius: 16px;
  padding: 16px;
  transition: border-color .15s;
}
.exp-uni-card:hover { border-color: var(--accent); }

.exp-uni-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 10px;
}
.exp-uni-info    { flex: 1; min-width: 0; }
.exp-uni-sigla   { font-size: 12px; font-weight: 800; color: var(--accent); margin: 0 0 2px; }
.exp-uni-nombre  { font-size: 13px; font-weight: 700; color: var(--text); margin: 0 0 2px; line-height: 1.3; }
.exp-uni-sede    { font-size: 11px; color: var(--text-muted); margin: 0; }

.exp-uni-corte       { text-align: right; flex-shrink: 0; }
.exp-uni-corte-label { display: block; font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.exp-uni-corte-val   { font-size: 22px; font-weight: 900; color: var(--accent); }

.exp-ponds      { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.exp-pond-pill  {
  display: flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 99px;
  background: var(--surface-3, #242b3d);
  font-size: 11px; color: var(--text-muted);
}
.exp-pond-pill strong { color: var(--text); font-weight: 700; }


.exp-uni-vac { font-size: 11px; color: var(--text-muted); margin: 4px 0 0; }

/* ── Animaciones ─────────────────────────────────────────────── */
@keyframes exp-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .exp-chevron, .exp-area-btn, .exp-combo, .exp-area-card,
  .exp-combo-arrow, .exp-listbox, .exp-area-panel {
    transition: none; animation: none;
  }
}

.exp-vacs     { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.exp-vac-pill { display: flex; align-items: center; gap: 2px; padding: 3px 8px; border-radius: 99px; background: var(--surface-3, #242b3d); border: 1px solid var(--border, #2d3748); font-size: 11px; color: var(--text-muted); }
.exp-vac-pill strong { color: var(--text); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   EXPLORADOR DE UNIVERSIDADES
═══════════════════════════════════════════════════════════════ */

.univ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.univ-card {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
  width: 100%;
  font-family: inherit;
}
.univ-card:hover  { border-color: var(--accent); transform: translateY(-1px); }
.univ-card:active { transform: translateY(0); }

.univ-card-top    { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.univ-card-sigla  { font-size: 13px; font-weight: 900; color: var(--accent); letter-spacing: .5px; }
.univ-card-nombre { font-size: 13px; font-weight: 600; color: var(--text); margin: 0; line-height: 1.35; }

.univ-badge        { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--text-muted); }
.univ-badge-green  { background: rgba(34,197,94,.12);  color: #22c55e; }
.univ-badge-purple { background: rgba(139,92,246,.12); color: #8b5cf6; }

.univ-filtros {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px 16px 4px;
}
@media (max-width: 767px) {
  .univ-filtros .exp-group { width: 100%; }
}

.univ-search-box {
  position: relative;
  width: 100%;
}

.univ-search-input {
  width: 100%;
  height: 52px;
  padding: 0 14px 0 38px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.univ-search-input:hover { border-color: var(--accent); }
.univ-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(251,191,36,.12);
}
.univ-search-input::placeholder { color: var(--text-muted); }

.univ-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.univ-filtro-tipo {
  padding: 5px 14px; border-radius: 99px;
  border: 1.5px solid var(--border);
  background: none; color: var(--text-muted);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.univ-filtro-tipo:hover  { border-color: var(--accent); color: var(--text); }
.univ-filtro-tipo.activo { border-color: var(--accent); color: var(--accent); background: rgba(251,191,36,.08); }

.univ-dd {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 300;
  background: var(--surface-2);
  border: 1.5px solid var(--accent);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  max-height: 340px; overflow-y: auto;
  list-style: none; margin: 0; padding: 4px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.univ-dd-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  cursor: pointer; transition: background .12s;
}
.univ-dd-item:hover    { background: rgba(255,255,255,.06); }
.univ-dd-nombre        { font-size: 13px; color: var(--text); line-height: 1.3; text-transform: uppercase; }
.univ-dd-sigla         { font-size: 12px; font-weight: 800; color: var(--accent); flex-shrink: 0; }
.univ-dd-empty         { padding: 14px 16px; font-size: 13px; color: var(--text-muted); list-style: none; }

.univ-search-input:focus { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.univ-region-select {
  width: 100%;
  height: 52px;
  padding: 0 14px 0 38px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.univ-region-select:focus  { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(251,191,36,.12); }
.univ-region-select option { background: var(--surface-2); color: var(--text); }

.exp-region-group {
  margin: 12px 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.exp-region-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.exp-region-chip {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.exp-region-chip:hover  { border-color: var(--accent); color: var(--text); }
.exp-region-chip.activo { border-color: var(--accent); color: var(--accent); background: rgba(245,166,35,.08); }

.exp-region-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 4px;
}

.univ-empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.univ-empty-state p { margin: 0; line-height: 1.5; }

/* Ficha detalle */
.univ-det-wrap     { padding-bottom: 40px; padding-top: 16px; }
.univ-det-header   { padding: 0 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.univ-det-volver   { display: inline-flex; align-items: center; gap: 6px; background: none; border: none;
                     color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer;
                     font-family: inherit; padding: 0 0 12px; }
.univ-det-volver:hover { color: var(--text); }

.univ-det-title-row  { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; }
.univ-det-info       { flex: 1; min-width: 0; }

.univ-det-logo-wrap {
  flex-shrink: 0;
  width: 80px; height: 80px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 1024px) {
  .univ-det-header     { background: var(--surface-2); border: 1.5px solid var(--border);
                         border-radius: 20px; padding: 28px 32px; margin-bottom: 28px; }
  .univ-det-volver     { padding: 0 0 20px; }
  .univ-det-logo-wrap  { width: 140px; height: 140px; border-radius: 20px; }
  .univ-det-title-row  { align-items: center; gap: 64px; margin-top: 0; }
  .univ-det-nombre     { font-size: 28px; margin-bottom: 0; }
  .univ-det-region     { font-size: 14px; margin-top: 0; }
}

.univ-det-logo {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}
.univ-det-logo-fallback {
  display: none;
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900;
  color: var(--accent);
  letter-spacing: .5px;
  background: var(--surface-2);
  text-align: center;
  padding: 4px;
  line-height: 1.2;
}

.univ-det-nombre   { font-size: 20px; font-weight: 800; color: var(--text); margin: 0 0 4px; line-height: 1.2; }
.univ-det-region   { font-size: 13px; color: var(--text-muted); margin: 0; }

.univ-det-section       { margin-bottom: 24px; }
.univ-det-section-title { font-size: 13px; font-weight: 700; color: var(--text-muted);
                          text-transform: uppercase; letter-spacing: 1px; margin: 0 0 10px; }

.univ-sedes-scroll {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
  perspective: 600px;
}
.univ-sedes-scroll::-webkit-scrollbar { display: none; }

.univ-sede-card {
  flex-shrink: 0;
  position: relative;
  min-width: 110px; max-width: 160px;
  height: 68px;
  transform-style: preserve-3d;
  transition: transform 0.4s;
}
.univ-sede-flippable { cursor: pointer; }
.univ-sede-card.flipped { transform: rotateY(180deg); }

.univ-sede-front,
.univ-sede-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
}
.univ-sede-back {
  transform: rotateY(180deg);
  border-color: var(--accent);
}
.univ-sede-card.sede-activa .univ-sede-front { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.univ-sede-card.sede-activa .univ-sede-back  { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.univ-sede-pin-row { display: flex; align-items: center; gap: 5px; }
.univ-sede-pin    { color: var(--accent); flex-shrink: 0; }
.univ-sede-nombre { font-size: 11px; font-weight: 700; color: var(--text); line-height: 1.2; }
.univ-sede-ciudad { font-size: 10px; font-weight: 600; color: var(--accent); }
.univ-sede-dir    { font-size: 10px; color: var(--text-muted); line-height: 1.4; }

.univ-tabs    { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.univ-tab     { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
                padding: 8px 6px; background: none; border: none; border-bottom: 2px solid transparent;
                font-size: 11px; font-weight: 700; color: var(--text-muted); cursor: pointer;
                font-family: inherit; margin-bottom: -1px; transition: color .15s, border-color .15s;
                white-space: nowrap; }
.univ-tab:hover  { color: var(--text); }
.univ-tab.activo { color: var(--accent); border-bottom-color: var(--accent); }
.univ-tab-count  { display: inline-flex; align-items: center; justify-content: center;
                   min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
                   background: var(--surface-3); font-size: 10px; font-weight: 700;
                   color: var(--text-muted); margin-left: 5px; }
.univ-tab.activo .univ-tab-count { color: var(--accent); }
.univ-tab:hover .univ-tab-count  { color: var(--text); }

.univ-det-area       { margin-bottom: 20px; }
.univ-det-area-title { font-size: 12px; font-weight: 700; text-transform: uppercase;
                       letter-spacing: .8px; color: var(--text-muted); margin: 0 0 8px; }

.univ-carrera-lista { display: flex; flex-direction: column; gap: 6px; }
.univ-carrera-row   {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  cursor: pointer; transition: border-color .12s;
}
.univ-carrera-row:hover { border-color: var(--accent); }

.univ-carrera-info   { flex: 1; min-width: 0; }
.univ-carrera-nombre { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; display: block; }
.univ-carrera-corte  { text-align: right; flex-shrink: 0; }
.univ-corte-val      { display: block; font-size: 18px; font-weight: 900; color: var(--accent); }
.univ-corte-lbl      { display: block; font-size: 9px; color: var(--text-muted); text-transform: uppercase; }

.univ-badge-sm        { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 99px;
                        background: var(--surface-3); font-size: 10px; color: var(--text-muted); }
.univ-badge-sm-accent { background: rgba(251,191,36,.12); color: var(--accent); }

.univ-servicio-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--text);
}

/* ════════════════════════════════════════════════════════════════
   CALCULADORA PASO 3 — Resultados
════════════════════════════════════════════════════════════════ */

/* Botón de universidad en el selector */
.calc-p3-uni-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.calc-p3-uni-btn:hover {
  border-color: rgba(251, 191, 36, 0.5);
}
.calc-p3-uni-btn.sel {
  border-color: var(--accent);
  background: rgba(251, 191, 36, 0.07);
}
.calc-p3-uni-info { flex: 1; min-width: 0; }
.calc-p3-uni-nombre {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calc-p3-uni-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Botón de carrera alternativa */
.calc-p3-alt-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}
.calc-p3-alt-btn:hover {
  border-color: var(--accent);
}

/* Sliders del simulador */
.calc-sim-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Simulador "Camino a tu meta" (Mi Progreso) ──────────────── */
.mp-sim-meta-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--accent);
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.06);
}
.mp-sim-meta-titulo {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.mp-sim-resumen {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px 0 8px;
}
.mp-sim-barra-wrap {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  background: var(--surface-2);
  overflow: hidden;
}
.mp-sim-barra {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), #fbbf24);
  transition: width 0.25s ease;
}
.mp-sim-fila {
  margin-bottom: 16px;
}
.mp-sim-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Botón guardar */
.calc-guardar-btn {
  background: rgba(251, 191, 36, 0.12) !important;
  color: var(--accent) !important;
  border: 1px solid var(--accent) !important;
}
.calc-guardar-btn:hover {
  background: rgba(251, 191, 36, 0.22) !important;
}

/* ── TEST VOCACIONAL ─────────────────────────────────────────── */
.calc-test-opcion {
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.calc-test-opcion:hover {
  border-color: var(--accent);
  background: rgba(251, 191, 36, 0.06);
}
.calc-test-top-badge {
  font-size: 10px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.calc-test-carrera-chip {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-size: 11px;
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   PASO 2 — SELECTOR DE REGIÓN
═══════════════════════════════════════════════════════════════ */
.calc-region-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  text-align: left;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.12s;
}
.calc-region-item:hover  { background: rgba(255,255,255,0.06); }
.calc-region-item.activo { color: var(--accent); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════
   PASO 3 — LISTA DE UNIVERSIDADES
═══════════════════════════════════════════════════════════════ */
.calc-p3-uni-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 8px;
}
.calc-p3-uni-item:last-child { margin-bottom: 0; }
.calc-p3-uni-item:hover {
  border-color: var(--accent);
  background: rgba(251, 191, 36, 0.04);
}
.calc-p3-uni-item.sel {
  border-color: var(--accent);
  background: rgba(251, 191, 36, 0.08);
}
.calc-p3-uni-item-info { flex: 1; min-width: 0; }
.calc-p3-uni-item-nombre {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calc-p3-uni-item-sede {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.calc-p3-uni-item-uninombre {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calc-p3-uni-item-right {
  flex-shrink: 0;
  text-align: right;
  min-width: 60px;
}

/* ── Desktop card — layout expandido ───────────────────────── */
.calc-p3-uni-item--desk {
  padding: 16px 22px;
  align-items: center;
}
.calc-p3-uni-item--desk .calc-p3-uni-item-info {
  min-width: 180px;
  max-width: 260px;
}
.calc-p3-uni-item--desk .calc-p3-uni-item-nombre {
  white-space: nowrap;
}
.calc-p3-uni-item--desk .calc-p3-uni-item-sede {
  white-space: normal;
}
.calc-p3-uni-item--desk .calc-p3-uni-item-nombre {
  font-size: 18px;
}
.calc-p3-uni-item--desk .calc-p3-uni-item-uninombre {
  font-size: 15px;
  margin-top: 4px;
  white-space: normal;
}
.calc-p3-uni-item--desk .calc-p3-uni-item-sede {
  font-size: 15px;
  margin-top: 4px;
}
.calc-p3-uni-item--desk .calc-p3-uni-item-right {
  min-width: 130px;
}

/* ── Barra visual desktop ───────────────────────────────────── */
.calc-p3-uni-bar-wrap {
  flex: 1;
  padding: 0 28px;
}
.calc-p3-uni-bar-track {
  position: relative;
  height: 6px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: visible;
}
.calc-p3-uni-bar-fill {
  height: 100%;
  border-radius: 4px 0 0 4px;
  transition: width 0.35s ease;
}
.calc-p3-uni-bar-corte {
  position: absolute;
  top: -5px;
  width: 2px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 1px;
  transform: translateX(-50%);
}
.calc-p3-uni-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   PANTALLA DE RESULTADOS
═══════════════════════════════════════════════════════════════ */
.calc-res-score-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.calc-res-score-num {
  font-size: 42px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.calc-res-corte-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1;
}
.calc-res-score-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* Accordion "Cómo se calcula" */
.calc-res-accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.calc-res-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 16px;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background 0.15s;
}
.calc-res-accordion-btn:hover { background: rgba(255,255,255,0.04); }
.calc-res-accordion-chevron { font-size: 11px; color: var(--text-muted); }
.calc-res-accordion-body {
  display: none;
  padding: 14px 16px 8px;
  border-top: 1px solid var(--border);
}

/* Grid 2×2 de acciones */
.calc-res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.calc-res-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.calc-res-action:hover {
  border-color: var(--accent);
  background: rgba(251, 191, 36, 0.06);
}
.calc-res-action-icon { font-size: 22px; }
.calc-res-action-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.calc-res-action-sub {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════
   RESULTADOS DESKTOP — layout 2 columnas
═══════════════════════════════════════════════════════════════ */
.calc-res-desk-wrap { padding: 0 0 32px; }

.calc-res-desk-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.calc-res-desk-back-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.calc-res-desk-back-btn:hover { color: var(--text); border-color: var(--accent); }
.calc-res-desk-breadcrumb {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.calc-res-desk-title-row {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calc-res-desk-uni { color: var(--text-muted); font-weight: 500; }

.calc-res-desk-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}
.calc-res-desk-left { display: flex; flex-direction: column; }
.calc-res-desk-score-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.calc-res-desk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  align-self: flex-start;
}
.calc-res-desk-badge.ok {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
}
.calc-res-desk-badge.no {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.25);
}
.calc-res-desk-score-big {
  font-size: 64px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 24px;
}

.calc-res-desk-bar {
  position: relative;
  height: 10px;
  background: rgba(255,255,255,0.07);
  border-radius: 5px;
  margin: 0 0 44px;
}
.calc-res-desk-bar-fill {
  height: 100%;
  background: var(--accent);
  opacity: 0.45;
  border-radius: 5px;
}
.calc-res-desk-bar-corte {
  position: absolute;
  top: -14px;
  bottom: -14px;
  transform: translateX(-50%);
}
.calc-res-desk-bar-corte-line {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  background: #ef4444;
  border-radius: 1px;
}
.calc-res-desk-bar-corte-lbl {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #ef4444;
  white-space: nowrap;
  font-weight: 600;
}
.calc-res-desk-bar-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}
.calc-res-desk-bar-dot-inner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}
.calc-res-desk-bar-dot-lbl {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--accent);
  white-space: nowrap;
  font-weight: 600;
}

.calc-res-desk-stats {
  display: flex;
  gap: 28px;
  margin-bottom: 16px;
}
.calc-res-desk-stat-val { font-size: 24px; font-weight: 800; line-height: 1; }
.calc-res-desk-stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.calc-res-desk-delta { font-size: 14px; font-weight: 700; margin-top: 4px; }

.calc-res-desk-desglose-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.calc-res-desk-desglose-total {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.calc-res-desk-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.calc-res-desk-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.calc-res-desk-action-btn:hover {
  border-color: var(--accent);
  background: rgba(251,191,36,0.04);
}
.calc-res-desk-action-icon { font-size: 24px; }
.calc-res-desk-action-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.calc-res-desk-action-sub { font-size: 11px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   SUB-PANTALLA: COMPARAR
═══════════════════════════════════════════════════════════════ */
.calc-cmp-item {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.calc-cmp-item.sel {
  border-color: var(--accent);
  background: rgba(251, 191, 36, 0.06);
}

/* ═══════════════════════════════════════════════════════════════
   SUB-PANTALLA: SIMULADOR
═══════════════════════════════════════════════════════════════ */
.calc-sim-resumen {
  text-align: center;
  padding: 18px 16px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

