/* ===================================================
   VARIABLES DE COLOR (LIGHT / DARK)
=================================================== */

:root {
  --bg-body: #f3f4f6;
  --bg-elevated: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-soft: #111827;
  --bg-header: #ffffff;

  --border-subtle: #e5e7eb;
  --border-strong: #1e3a8a;

  --text-main: #111827;
  --text-muted: #6b7280;
  --text-invert: #f9fafb;

  --primary: #2563eb;
  --primary-dark: #1e3a8a;
  --primary-soft: #e0e7ff;

  --chip-success: #059669;
  --chip-danger: #b91c1c;
  --chip-admin: #2563eb;
  --chip-user: #4b5563;

  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 6px 18px rgba(15, 23, 42, 0.10);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --transition-fast: 0.18s ease-out;
}

/* Dark Mode automático */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #020617;
    --bg-elevated: #020617;
    --bg-sidebar: #020617;
    --bg-sidebar-soft: #020617;
    --bg-header: #020617;

    --border-subtle: #1f2937;
    --border-strong: #3b82f6;

    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --text-invert: #f9fafb;

    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-soft: rgba(59, 130, 246, 0.10);

    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.55);
    --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.40);
  }
}

/* ===================================================
   RESET Y BASE
=================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden; /* ✅ evita scroll lateral global */
}

body {
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.08), transparent 55%),
    var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Transiciones suaves globales */
body, button, input, textarea, select {
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.view {
  width: 100%;
  height: 100%;
}

/* Utilidades */
.hidden {
  display: none !important;
}

.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ✅ Evitar que tablas / elementos se salgan del layout */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* ===================================================
   LOGIN (index.html)
=================================================== */

#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}

.login-card {
  width: 380px;
  max-width: 100%;
  padding: 32px 28px 24px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(10px);
}

.login-card h1 {
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 22px;
  color: var(--text-main);
}

/* Campos de formulario */

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.field span {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.field input,
.field textarea,
.field select {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  outline: none;
}

@media (prefers-color-scheme: dark) {
  .field input,
  .field textarea,
  .field select {
    background: #020617;
  }
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-soft);
}

.field textarea {
  resize: vertical;
}

/* Error de login */

.error {
  margin-top: 12px;
  color: var(--chip-danger);
  font-size: 13px;
}

/* Bloque informativo (landing-card) */

#landing-card {
  margin-top: 20px;
  background: var(--bg-elevated);
  padding: 18px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

#landing-card h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

#landing-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
  white-space: pre-wrap;
}

/* Botones de precios */

#btn-price-month,
#btn-price-full {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border-radius: var(--radius-md);
  font-weight: 600;
}

/* ===================================================
   BOTONES (GENERALES)
=================================================== */

.btn {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform-origin: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-invert);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: #4b5563;
  color: #f9fafb;
}

.btn-secondary:hover {
  background: #374151;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(148, 163, 184, 0.12);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

/* ===================================================
   HEADER (ADMIN / STUDENT)
=================================================== */

.header {
  height: 56px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.hamburger-btn {
  background: transparent;
  font-size: 24px;
  border: none;
  cursor: pointer;
  color: var(--text-main);
}

/* ===================================================
   SIDEBAR (ADMIN / STUDENT)
=================================================== */

/* Barra lateral para student (#sidebar) y admin (#admin-sidebar) */
#sidebar,
#admin-sidebar {
  width: 260px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 60%),
    var(--bg-sidebar);
  height: calc(100vh - 56px);
  border-right: 1px solid rgba(148, 163, 184, 0.3);
  position: fixed;
  left: 0;
  top: 56px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 30;
}

.sidebar-logo {
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.sidebar-logo-img {
  width: 76px;
  height: auto;
  margin-bottom: 6px;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.45));
}

.sidebar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-invert);
}

/* Lista de secciones */

.sidebar-sections {
  margin-top: 16px;
  list-style: none;
  overflow-y: auto;
  padding-right: 4px;
}

/* Scrollbar fino */
.sidebar-sections::-webkit-scrollbar {
  width: 6px;
}
.sidebar-sections::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

.sidebar__section-item {
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  color: var(--text-invert);
}

.sidebar__section-item:hover {
  background: rgba(15, 23, 42, 0.85);
  transform: translateY(-1px);
}

.sidebar__section-item--active {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}

.sidebar__section-name {
  font-size: 13px;
  font-weight: 500;
}

.sidebar__section-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  font-size: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 3px;
  color: var(--text-invert);
  opacity: 0.8;
}

.icon-btn:hover {
  opacity: 1;
}

/* Botones de barra lateral */

.sidebar-btn {
  width: 100%;
  margin: 4px 0;
  padding: 10px 11px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-invert);
}

.sidebar-btn.btn-outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

.sidebar-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(129, 140, 248, 0.8);
}

/* Iconos sociales (login + admin + student) */

.sidebar-social {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.social-icon {
  width: 26px;
  cursor: pointer;
  opacity: 0.75;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.45));
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.social-icon:hover {
  opacity: 1;
  transform: translateY(-1px) scale(1.03);
}

/* ===================================================
   CONTENIDO PRINCIPAL (ADMIN / STUDENT)
=================================================== */

/* ✅ Clave para quitar la franja sin provocar overflow:
   - El contenedor ocupa todo el ancho disponible
   - Pero el contenido real (paneles) se centra y se limita con max-width
*/
#content {
  margin-left: 260px;
  padding: 80px 24px 24px;
  max-width: none;              /* ✅ permite usar ancho disponible */
  width: calc(100% - 260px);    /* ✅ evita franja a la derecha */
  overflow-x: hidden;           /* ✅ evita scroll lateral */
}

/* ✅ Limita y centra el contenido real dentro de #content (admin y student) */
.panel {
  display: block;
  width: 100%;
  max-width: 1280px;            /* ✅ equilibrio: sin franja, sin desbordar */
  margin: 0 auto;               /* ✅ centrado real */
}

.panel-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  align-items: center;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* Listado de tarjetas */

.cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===================================================
   CARDS GENERALES
=================================================== */

.card {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  max-width: 100%;
}

.card-item {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  max-width: 100%;
}

.card-item__title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.card-item__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.badge {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-dark);
  border-radius: 50%;
}

/* ===================================================
   TABLAS (usuarios, análisis, resultados)
=================================================== */

table {
  width: 100%;
  max-width: 100%;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border-collapse: collapse;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

thead {
  background: rgba(15, 23, 42, 0.04);
}

@media (prefers-color-scheme: dark) {
  thead {
    background: rgba(15, 23, 42, 0.85);
  }
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
  text-align: left;
  word-break: break-word;
}

th {
  font-weight: 600;
  color: var(--text-muted);
}

tr:last-child td {
  border-bottom: none;
}

/* Chips de estado / rol */

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #f9fafb;
}

.chip--activo { background: var(--chip-success); }
.chip--inactivo { background: var(--chip-danger); }
.chip--admin { background: var(--chip-admin); }
.chip--user { background: var(--chip-user); }

/* ===================================================
   MODAL GENÉRICO (admin)
=================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal {
  background: var(--bg-elevated);
  width: 380px;
  max-width: 95%;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.modal h3 {
  font-size: 18px;
  margin-bottom: 14px;
  color: var(--text-main);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  gap: 10px;
}

/* ===================================================
   STUDENT VIEW — BANNER DE RESULTADOS
=================================================== */

#student-result-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text-invert);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
  display: none;
}

#student-result-banner h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#student-result-banner svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

#student-result-banner .result-values {
  font-size: 14px;
  opacity: 0.95;
  line-height: 1.5;
}

/* ===================================================
   STUDENT — CASOS CLÍNICOS Y PREGUNTAS
=================================================== */

.case-block {
  background: var(--bg-elevated);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.case-block h4 {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 10px;
  font-weight: 600;
}

.case-text {
  font-size: 14px;
  color: var(--text-muted);
  white-space: pre-wrap;
  margin-bottom: 16px;
}

.question-block {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.question-block h5 {
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-main);
}

.question-block p {
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}

.question-options input[type="radio"] {
  margin-top: 2px;
}

/* Justificación al finalizar */

.justification-box {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary-dark);
  padding: 12px 14px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
  font-size: 13px;
  display: none;
}

/* Tablas de resultados premium */

.result-message {
  margin-bottom: 8px;
  font-size: 13px;
  opacity: 0.9;
}

.result-tables {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  overflow: hidden;
}

.result-table th,
.result-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
}

.result-table th {
  text-align: left;
  font-weight: 600;
  opacity: 0.95;
}

.result-table tr:last-child td {
  border-bottom: none;
}

.result-table--compact th,
.result-table--compact td {
  padding: 5px 6px;
}

/* ===================================================
   PROGRESO (STUDENT)
=================================================== */

.progress-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.progress-section-card {
  background: rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 10px 12px;
  font-size: 13px;
}

.progress-section-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-global {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

#student-progress-chart-card {
  height: 320px;
}

/* En móvil, tarjetas de progreso en una columna */
@media (max-width: 700px) {
  .progress-section-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================
   RESPONSIVE LAYOUT
=================================================== */

@media (max-width: 850px) {
  #sidebar,
  #admin-sidebar {
    left: -260px;
    transition: left var(--transition-fast);
  }

  #sidebar.sidebar--open,
  #admin-sidebar.sidebar--open {
    left: 0;
  }

  #content {
    margin-left: 0;
    width: 100%;
    margin-top: 72px;
    padding: 72px 16px 24px;
  }

  .panel {
    max-width: 100%;
    margin: 0;
  }

  .hamburger-btn {
    display: block;
  }
}

/* Footer de edición de examen (botones inferiores) */
.admin-exam-footer {
  justify-content: flex-end;
  margin-top: 16px;
}

/* ============================
   MINI EXÁMENES – VISTA ESTUDIANTE
   ============================ */

#student-mini-exams-view {
  max-width: 520px;
  margin: 0 auto;
}

/* Título y descripción del módulo */
#student-mini-exams-view .panel-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
  margin-bottom: 4px;
}

#student-mini-exams-view .panel-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 18px;
}

/* Tarjeta principal del configurador */
#student-mini-exams-view .mini-exam-card {
  position: relative;
  border-radius: 22px;
  padding: 18px 18px 16px;
  background: radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.18), #ffffff);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

/* halo decorativo en esquina */
#student-mini-exams-view .mini-exam-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0));
  pointer-events: none;
}

/* cabecera dentro de la tarjeta */
#student-mini-exams-view .mini-exam-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

#student-mini-exams-view .mini-exam-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

#student-mini-exams-view .mini-exam-card-description {
  font-size: 0.82rem;
  color: #4b5563;
}

/* chip de “Personalizado” */
#student-mini-exams-view .mini-exam-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 6px;
}

/* icono redondo a la derecha */
#student-mini-exams-view .mini-exam-icon {
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* cuerpo del formulario */
#student-mini-exams-view .mini-exam-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* campos */
#student-mini-exams-view .mini-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

#student-mini-exams-view select,
#student-mini-exams-view input[type="checkbox"] {
  cursor: pointer;
}

/* grid de especialidades como “chips” */
#student-mini-exams-view .mini-specialties-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#student-mini-exams-view .mini-specialty-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.78rem;
  color: #111827;
  transition: all 0.15s ease;
}

#student-mini-exams-view .mini-specialty-chip input[type="checkbox"] {
  accent-color: #2563eb;
}

#student-mini-exams-view .mini-specialty-chip:hover {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

/* modo de selección */
#student-mini-exams-view .mini-mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #374151;
}

/* footer con texto bajo el botón */
#student-mini-exams-view .mini-exam-card-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.6);
  font-size: 0.78rem;
  color: #4b5563;
}

/* botón principal más protagonista dentro de la tarjeta */
#student-mini-exams-view .btn-primary {
  width: 100%;
  justify-content: center;
  font-weight: 600;
}

/* responsive */
@media (max-width: 480px) {
  #student-mini-exams-view {
    max-width: 100%;
  }
}

/* ===== MINI EXÁMENES – UI mejorada ===== */

.mini-num-select {
  width: 100%;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(255, 255, 255, 0.98);
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  outline: none;
  appearance: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.mini-num-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.28),
              0 10px 24px rgba(37, 99, 235, 0.22);
}

/* chips de especialidades */
.mini-specialty-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.mini-specialty-chip {
  position: relative;
  border: 1px solid #4b5563;
  background: #020617;
  color: #9ca3af;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.mini-specialty-chip input[type="checkbox"] {
  display: none;
}

.mini-specialty-chip span {
  white-space: nowrap;
}

/* estado activo de la especialidad */
.mini-specialty-chip--active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  color: #fff;
  transform: translateY(-1px);
}

/* BOTÓN ALEATORIO – ESTADOS VISUALES (checkbox + label) */

.mini-mode-row { margin-top: 6px; }
.mini-random-checkbox { display: none; }

.mini-random-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;

  border: 1px solid #9ca3af;
  background: #e5e7eb;
  color: #111827;

  box-shadow: none;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.1s ease;
}

.mini-mode-row input:not(:checked) + .mini-random-toggle:hover {
  background: #d1d5db;
}

.mini-mode-row input:checked + .mini-random-toggle {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

/* ===== Banner de cookies ===== */

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 560px;
  width: calc(100% - 32px);
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 60;
  font-size: 12px;
}

.cookie-banner__text {
  flex: 1;
  color: var(--text-muted);
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 16px;
  }
}

/* ============================
   MINI EXÁMENES – DARK MODE
   ============================ */

@media (prefers-color-scheme: dark) {
  #student-mini-exams-view .panel-title { color: #f9fafb; }
  #student-mini-exams-view .panel-subtitle { color: #cbd5f5; }

  #student-mini-exams-view .mini-exam-card {
    background: radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.65), #020617);
    border-color: rgba(129, 140, 248, 0.9);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
  }

  #student-mini-exams-view .mini-exam-card-title { color: #f9fafb; }
  #student-mini-exams-view .mini-exam-card-description { color: #e5e7eb; }

  #student-mini-exams-view .mini-exam-pill {
    background: rgba(37, 99, 235, 0.4);
    color: #e0e7ff;
  }

  #student-mini-exams-view .mini-exam-icon { background: rgba(15, 23, 42, 0.9); }
  #student-mini-exams-view .mini-field-label { color: #e5e7eb; }

  .mini-num-select {
    background: #020617;
    border-color: #1f2937;
    color: #f9fafb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9);
  }

  .mini-num-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.7),
                0 16px 32px rgba(15, 23, 42, 0.95);
  }

  #student-mini-exams-view .mini-specialty-chip {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.9);
    color: #e5e7eb;
  }

  #student-mini-exams-view .mini-specialty-chip:hover {
    border-color: #93c5fd;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7);
  }

  .mini-specialty-chip--active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #93c5fd;
    color: #ffffff;
    transform: translateY(-1px);
  }

  #student-mini-exams-view .mini-mode-row { color: #e5e7eb; }

  .mini-random-toggle {
    background: #334155;
    color: #e5e7eb;
    border-color: #64748b;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
  }

  .mini-mode-row input:not(:checked) + .mini-random-toggle:hover {
    background: #475569;
  }

  .mini-mode-row input:checked + .mini-random-toggle {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.6);
  }

  #student-mini-exams-view .mini-exam-card-footer {
    color: #cbd5f5;
    border-top-color: rgba(129, 140, 248, 0.7);
  }
}

/* ================================
   BIBLIOTECA (RESÚMENES/GPC) — UI 2.0
   ================================ */

body.modal-open { overflow: hidden; }

/* ✅ Cuando está en modo cards: no mostrar panel derecho (si existe) */
#student-resources-view[data-ui="cards"] #student-resources-detail { display: none; }

#student-resources-view .resources-controls { gap: 10px; }

#student-resources-view .resources-controls input,
#student-resources-view .resources-controls select {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  transition: box-shadow 160ms ease, border-color 160ms ease;
  max-width: 100%;
}

#student-resources-view .resources-controls input:focus,
#student-resources-view .resources-controls select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}

/* Grid de cards */
#student-resources-view .resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 920px) {
  #student-resources-view .resources-grid { grid-template-columns: 1fr; }
}

.resource-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  max-width: 100%;
}

.resource-card:hover {
  transform: translateY(-2px);
  border-color: #dbeafe;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.resource-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.resource-card__meta { min-width: 0; }

.resource-card__specialty {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  margin-bottom: 8px;
  white-space: nowrap;
}

.resource-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  word-break: break-word;
}

.resource-card__open { flex: 0 0 auto; }

.resource-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.resource-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
}

.resource-badge--muted {
  background: #f8fafc;
  color: #64748b;
}

/* Modal */
.resources-modal.hidden { display: none; }

.resources-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.resources-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.resources-modal__panel {
  position: absolute;
  right: 18px;
  left: 18px;
  top: 70px;
  max-width: 860px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.resources-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.resources-modal__headtext { min-width: 0; }

.resources-modal__badge {
  display: inline-flex;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.10);
  color: #0369a1;
  margin-bottom: 8px;
}

.resources-modal__title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  word-break: break-word;
}

.resources-modal__body {
  padding: 14px;
  max-height: calc(100vh - 160px);
  overflow: auto;
}

.resources-modal__section { margin-bottom: 14px; }

.resources-modal__section-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.resources-modal__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 620px) {
  .resources-modal__buttons { grid-template-columns: 1fr; }
  .resources-modal__panel { top: 56px; }
}

.resource-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.resource-btn:hover {
  transform: translateY(-1px);
  border-color: #dbeafe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

/* ===================================================
   COMPLETADO (LISTA)
=================================================== */

.resource-card--completed {
  border: 2px solid #16a34a !important;
  background: #ecfdf5 !important;
}

.resource-card--completed .resource-card__title {
  color: #065f46 !important;
}

/* ===================================================
   IMPORTANTE: REVERTIR EL CAMBIO QUE TE ROMPIÓ EXÁMENES
   - NO GRID
   - NO SCROLL HORIZONTAL
=================================================== */

/* ✅ Asegura lista vertical como antes */
#student-exams-list.cards-list{
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

/* ✅ Previene que alguna tarjeta fuerce overflow */
#student-exams-list .card-item,
#student-exams-list .card,
#student-exams-list .card-item *{
  max-width: 100%;
}
/* ================================
   BIBLIOTECA — Recursos unificados (botones + externo)
   ================================ */

#student-resources-view .resource-unified-card {
  padding: 0;                  /* header/body separados */
  overflow: hidden;
}

#student-resources-view .resource-unified-card__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#student-resources-view .resource-unified-card__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

#student-resources-view .resource-unified-card__body {
  padding: 14px 16px;
}

#student-resources-view .resource-unified-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#student-resources-view .resource-unified-buttons .btn {
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
  text-decoration: none; /* evita subrayados en <a> */
}

#student-resources-view .resource-unified-buttons .btn:link,
#student-resources-view .resource-unified-buttons .btn:visited {
  text-decoration: none;
}

/* ---- Botón PDF (preview) ---- */
#student-resources-view .btn-preview {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.05);
}

#student-resources-view .btn-preview:hover {
  background: rgba(37, 99, 235, 0.10);
}

/* Estado seleccionado del PDF */
#student-resources-view .btn-preview[aria-pressed="true"] {
  border-color: rgba(37, 99, 235, 0.90);
  background: rgba(37, 99, 235, 0.16);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

/* ---- Botón externo (resumen/GPC/otros) ---- */
#student-resources-view .btn-external {
  border-color: rgba(5, 150, 105, 0.55);
  background: rgba(5, 150, 105, 0.08);
  color: #065f46;
  text-decoration: none;
}

#student-resources-view .btn-external:hover {
  border-color: rgba(5, 150, 105, 0.80);
  background: rgba(5, 150, 105, 0.12);
}

#student-resources-view .btn-external__icon {
  font-weight: 800;
  font-size: 12px;
  opacity: 0.8;
}

#student-resources-view .btn-external:hover .btn-external__icon {
  opacity: 1;
}

/* Mobile: que los botones se apilen bonitos */
@media (max-width: 620px) {
  #student-resources-view .resource-unified-buttons .btn {
    width: 100%;
    justify-content: space-between;
  }
}

/* Dark mode: asegurar contraste en externos + selección */
@media (prefers-color-scheme: dark) {
  #student-resources-view .btn-preview {
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(59, 130, 246, 0.10);
  }

  #student-resources-view .btn-preview:hover {
    background: rgba(59, 130, 246, 0.16);
  }

  #student-resources-view .btn-preview[aria-pressed="true"] {
    border-color: rgba(59, 130, 246, 0.95);
    background: rgba(59, 130, 246, 0.22);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
  }

  #student-resources-view .btn-external {
    border-color: rgba(16, 185, 129, 0.60);
    background: rgba(16, 185, 129, 0.14);
    color: #d1fae5;
  }

  #student-resources-view .btn-external:hover {
    border-color: rgba(16, 185, 129, 0.85);
    background: rgba(16, 185, 129, 0.18);
  }
}
/* ===== FIX: Mostrar TODAS las secciones del sidebar ===== */
#student-sidebar-sections.sidebar-sections {
  display: block;            /* por si alguna regla lo colapsa */
  max-height: 320px;         /* evita que solo se vea 1 */
  overflow-y: auto;          /* scroll si son muchas */
  margin: 8px 0 12px;
  padding: 0;
}

#student-sidebar-sections.sidebar-sections li,
#student-sidebar-sections .sidebar__section-item {
  display: flex;             /* asegura que no se oculten */
  width: 100%;
}

#student-sidebar-sections .sidebar__section-item--active {
  display: flex;             /* por si tu CSS solo muestra el activo */
}

/* ===================================================
   FIN
=================================================== */

/* =========================================
   LANDING MOCKUP (index.html) — FINAL OVERRIDE
   No afecta student/admin porque solo usa clases lp-*
========================================= */

#login-view.view{
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 34px 18px;
}

/* Contenedor principal (tarjeta grande) */
.lp-shell{
  width: min(1080px, 94vw);
  background: var(--bg-elevated);
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: var(--shadow-soft);
  display:grid;
  grid-template-columns: 1fr 1px 1fr;
  overflow:hidden;
}

/* Divisor vertical */
.lp-divider{
  background: rgba(148,163,184,0.35);
}

/* Panels */
.lp-left, .lp-right{
  padding: 34px 36px;
}

.lp-brand{
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  color: #1e3a8a; /* azul como mockup */
  margin-bottom: 10px;
}

.lp-sub{
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 420px;
}

/* Botones login */
.lp-actions{
  display:flex;
  gap: 12px;
  margin-top: 8px;
}

.lp-forgot{
  margin-top: 16px;
  font-size: 13px;
  color: #1d4ed8;
  text-decoration: underline;
  cursor: default; /* no link real */
  width: fit-content;
  opacity: 0.95;
}

/* DERECHA */
.lp-title{
  font-size: 20px;
  font-weight: 800;
  color: #1e3a8a; /* azul */
  margin-bottom: 8px;
}

.lp-title-line{
  height: 2px;
  width: 100%;
  background: rgba(37,99,235,0.55);
  margin-bottom: 18px;
}

/* 3 features centradas */
.lp-features{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 22px;
  align-items:start;
  margin-bottom: 18px;
}

.lp-feature{
  text-align:center;
}

.lp-icon{
  width: 78px;
  height: 78px;
  margin: 0 auto 10px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.lp-svg{
  width: 78px;
  height: 78px;
  stroke: #2563eb;
  stroke-width: 1.6;
  fill: none;            /* CLAVE: evita “bloques negros” */
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-ftitle{
  font-weight: 800;
  color: #0f172a;
  font-size: 14px;
  margin-bottom: 6px;
}

.lp-fdesc{
  font-size: 13px;
  color: #475569;
  line-height: 1.35;
}

/* landing text (admin/JS) */
.lp-landing-text{
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 8px 0 14px;
  white-space: pre-wrap;
}

/* Caja planes */
.lp-plans-box{
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(241,245,249,0.65);
  border-radius: 12px;
  padding: 16px 16px;
}

.lp-plans-copy{
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 12px;
}

.lp-plans-actions{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lp-btn-plan{
  width: 100%;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
}

.lp-btn-dark{
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

/* Redes centradas */
.lp-social{
  display:flex;
  justify-content:center;
  gap: 14px;
  margin-top: 16px;
}

.lp-social-icon{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(15,23,42,0.12);
  cursor:pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.lp-social-icon:hover{
  transform: translateY(-1px);
  opacity: 0.95;
}

/* RESPONSIVE */
@media (max-width: 980px){
  .lp-shell{
    grid-template-columns: 1fr;
  }
  .lp-divider{ display:none; }
  .lp-left, .lp-right{
    padding: 26px 20px;
  }
  .lp-features{
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .lp-plans-actions{
    grid-template-columns: 1fr;
  }
}
/* =========================================
   FIX: Centrar TODO el panel izquierdo (login)
   - Título, texto, inputs, botones y link
   ========================================= */

.lp-left{
  display: flex;
  flex-direction: column;
  align-items: center;     /* centra todo horizontal */
  text-align: center;      /* centra textos */
}

/* Limita el ancho real del formulario para que quede “pro” y centrado */
.lp-left .field,
.lp-left .lp-actions{
  width: 100%;
  max-width: 520px;        /* ajusta aquí si lo quieres más ancho/angosto */
}

/* Labels alineados bonito (centrados) */
.lp-left .field span{
  text-align: center;        /* opcional: label alineado a la izquierda se ve más pro */
  width: 100%;
}

/* Inputs ocupan el ancho del bloque centrado */
.lp-left .field input{
  width: 100%;
}

/* Botones centrados y proporcionales */
.lp-actions{
  justify-content: center;
}

/* El link “¿Olvidaste…?” centrado */
.lp-forgot{
  width: 100%;
  max-width: 520px;
  text-align: center;
}

/* Si quieres el título más “centrado visualmente” */
.lp-brand{
  width: 100%;
  max-width: 520px;
}
.lp-sub{
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
/* Labels centrados en el login (panel izquierdo) */
.lp-left .field span{
  width: 100%;
  text-align: center;
}
/* ================================
   FIX MOBILE: que NO se corte el inicio
   (evita centrado vertical cuando el contenido es más alto que la pantalla)
================================ */

@media (max-width: 980px){
  #login-view.view{
    align-items: flex-start !important;  /* antes estaba center */
    justify-content: flex-start !important;
    padding-top: calc(16px + env(safe-area-inset-top)) !important;
    padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
  }

  .lp-shell{
    margin-top: 0 !important;
  }
}
/* Asegura scroll normal del body en móvil */
@media (max-width: 980px){
  html, body{
    height: auto !important;
  }
  body{
    overflow-y: auto !important;
  }
}

/* ===== MOVED FROM student.html (HOTFIX UI) ===== */
/* ===============================
       BIBLIOTECA (Resúmenes / GPC)
       - Barra de progreso centrada
       - Layout estable en móvil
       =============================== */
    #student-resources-view .resources-header{
      display:flex;
      flex-direction:column;
      gap:12px;
      align-items:flex-start;
    }
    #student-resources-view .resources-progress-card{
      width:min(560px, 100%);
      margin:0 auto;
      padding:12px 14px;
    }
    #student-resources-view .resources-progress-title{
      font-weight:600;
      font-size:14px;
      text-align:center;
    }
    #student-resources-view .resources-progress-text{
      font-weight:600;
      font-size:14px;
      text-align:center;
      opacity:0.9;
    }
    #student-resources-view .resources-progress-bar-wrap{
      width:100%;
      height:10px;
      border-radius:999px;
      overflow:hidden;
      background:rgba(148,163,184,0.35);
    }
    #student-resources-view .resources-progress-bar{
      height:100%;
      width:0%;
      border-radius:999px;
      background:#1d4ed8;
      transition:width 220ms ease;
    }
    #student-resources-view .resources-count-hidden{
      display:none !important;
    }
    @media (max-width: 520px){
      #student-resources-view .resources-progress-card{
        padding:12px 12px;
      }
      #student-resources-filters-card .field{
        min-width: 0 !important;
        width: 100%;
      }
    }

    /* ===============================
       MINI-EXÁMENES
       - Chips de especialidad con estado visible
       - Toggle de selección aleatoria con estado visible
       - Select de número de preguntas estable en móvil
       =============================== */
    .mini-num-select{
      width:100%;
      max-width:100%;
      box-sizing:border-box;
    }
    @media (max-width: 520px){
      .mini-exam-card-body{
        grid-template-columns: 1fr !important;
      }
    }

    .mini-specialty-chip{
      position:relative;
      display:flex;
      align-items:center;
      justify-content:center;
      gap:8px;
      padding:10px 14px;
      border-radius:999px;
      border:1px solid rgba(148,163,184,0.75);
      background:rgba(148,163,184,0.14);
      color:inherit;
      font-weight:600;
      cursor:pointer;
      user-select:none;
      transition:background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 80ms ease;
    }
    .mini-specialty-chip:hover{
      transform: translateY(-1px);
    }
    .mini-specialty-chip--active{
      background:#1d4ed8 !important;
      border-color:#1d4ed8 !important;
      color:#fff !important;
      box-shadow:0 0 0 3px rgba(29,78,216,0.25);
    }
    .mini-specialty-chip input{
      position:absolute;
      inset:0;
      opacity:0;
      pointer-events:none;
    }

    .mini-random-toggle{
      width:100%;
      display:flex;
      align-items:center;
      justify-content:center;
      padding:12px 14px;
      border-radius:999px;
      border:1px solid rgba(148,163,184,0.75);
      background:rgba(148,163,184,0.18);
      color:inherit;
      font-weight:700;
      cursor:pointer;
      user-select:none;
      transition:background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 80ms ease;
    }
    .mini-random-toggle:hover{
      transform: translateY(-1px);
    }
    .mini-random-toggle[aria-pressed="true"]{
      background:#1d4ed8 !important;
      border-color:#1d4ed8 !important;
      color:#fff !important;
      box-shadow:0 0 0 3px rgba(29,78,216,0.25);
    }


/* ===== Cookies: reprompt + preferencias ===== */
.cookie-preferences{
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10050;
  border: 1px solid rgba(0,0,0,.10);
  background: #ffffff;
  color: #111827;
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  font-weight: 600;
  cursor: pointer;
}
.cookie-preferences.hidden{ display:none; }

.cookie-reprompt{
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.cookie-reprompt.hidden{ display:none; }

.cookie-reprompt__card{
  width: min(560px, 100%);
  background: var(--bg-elevated, #ffffff);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.cookie-reprompt__title{
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}
.cookie-reprompt__text{
  font-size: 13px;
  line-height: 1.45;
  color: #374151;
  margin-bottom: 12px;
}
.cookie-reprompt__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

