/* ==========================================================================
   Tema claro de LaAntiClase: blanco, gris muy suave y negro solo en detalles
   (botones, item activo). Reemplaza los fondos oscuros del alumno, exalumno,
   inicio del profesor y maestro, entrada y herramientas para que se lea bien.
   Carga al final, despues de sistema.css. El logo (blanco) se vuelve negro.
   ========================================================================== */

/* ---------- Encabezado del alumno (celular) ---------- */
.app-header {
  background: #ffffff !important; color: #111; border-bottom: 1px solid #e6e6e6 !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .05) !important;
}
.app-header .title { color: #111 !important; }
.app-header .subtitle { color: #6f6f6f !important; }
.app-header .avatar { background: #111 !important; color: #fff !important; border: 0 !important; }
.app-header .header-campana, .app-header .lac-ayuda-movil {
  background: #f0f0f0 !important; border: 1px solid #e0e0e0 !important; color: #111 !important;
}
.app-header .header-campana i, .app-header .lac-ayuda-movil i { color: #111; }
.app-header .header-campana .nav-contador { border-color: #fff !important; }

/* Panel de avance e indicadores del inicio */
.alu-hud-avance { background: #f5f5f5 !important; border-color: #e6e6e6 !important; }
.alu-hud-avance-cabeza span { color: #6f6f6f !important; }
.alu-hud-avance-cabeza b { color: #111 !important; }
.alu-hud-tramos i { background: #dcdcdc !important; }
.alu-hud-tramos i.lleno { background: #111 !important; box-shadow: none !important; }
.alu-hud-cifras button { background: #fff !important; border: 1px solid #e6e6e6 !important; color: #111 !important; }
.alu-hud-cifras span { color: #6f6f6f !important; }
.alu-hud-cifras b.rojo { color: #9c4f3f !important; }
.alu-hud-cifras button.con { background: #111 !important; border-color: #111 !important; color: #fff !important; }
.alu-hud-cifras button.con span { color: rgba(255, 255, 255, .7) !important; }

/* ---------- Barra de abajo del alumno ---------- */
.bottom-nav {
  background: #ffffff !important; border-top: 1px solid #e6e6e6 !important;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
}
.nav-item { color: #6f6f6f !important; }
.nav-item.active, .nav-item-centro { color: #111 !important; }
.nav-item.active i { background: #efefef !important; color: #111 !important; }
.nav-item-centro i {
  background: #111 !important; color: #fff !important; border-color: #fff !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25) !important;
}
.nav-item-centro.active i { background: #111 !important; color: #fff !important; }
.alu-mas-punto { border-color: #fff !important; }

/* Hoja "Ver mas" */
.alu-mas { background: rgba(0, 0, 0, .35); }
.alu-mas-panel { background: #fff !important; color: #111 !important; box-shadow: 0 -8px 30px rgba(0, 0, 0, .15); }
.alu-mas-asa { background: #d0d0d0 !important; }
.alu-mas-panel > button, .alu-mas-panel > a { color: #111 !important; }
.alu-mas-panel > * i { color: #111 !important; }
.alu-mas-panel > button.active { background: #efefef !important; color: #111 !important; }
.alu-mas-panel > *:active { background: #f5f5f5 !important; }
.alu-mas-panel > a { color: #5a5a5a !important; border-top-color: #e6e6e6 !important; }

/* ---------- Foro y consultas ---------- */
#screen-consultas .foro-chat-cabeza { background: #f0f0f0 !important; color: #111 !important; border-bottom: 1px solid #e0e0e0; }
#screen-consultas .foro-chat-cabeza * { color: #111; }
#screen-consultas .foro-chat-sub { color: #6f6f6f !important; }
#screen-consultas .foro-chat-accion { background: #e0e0e0 !important; }
#screen-consultas .foro-avatar { background: #111 !important; color: #fff !important; }
#screen-consultas .foro-tema.sin-leer { border-color: #111 !important; }
#screen-consultas .foro-tema.sin-leer::after { background: #111 !important; }
#screen-consultas .consulta-escribir, #screen-consultas .foro-chat-escribir { background: #f5f5f5 !important; }

/* ---------- Perfil ---------- */
.profile-header { background: #fff !important; border-bottom: 1px solid #e6e6e6; }
.profile-avatar { background: #111 !important; color: #fff !important; border: 0 !important; box-shadow: none !important; }
.profile-name { color: #111 !important; }
.profile-id { color: #6f6f6f !important; }

/* ---------- Barra lateral del alumno (computador) ---------- */
.cli-sidebar { background: #ffffff !important; border-right: 1px solid #e6e6e6; }
.cli-sidebar .cli-top, .cli-bottom { border-color: #e6e6e6 !important; }
.cli-sidebar .cli-logo, .cli-sidebar .cli-avance-fila strong { color: #111 !important; }
.cli-sidebar .cli-logo-sub, .cli-sidebar .cli-avance-fila, .cli-user-role { color: #6f6f6f !important; }
.cli-sidebar .cli-avance .progress { background: #e6e6e6 !important; }
.cli-sidebar .cli-avance .progress > span { background: #111 !important; }
.cli-sidebar .cli-curso-chip { background: #f0f0f0 !important; color: #111 !important; border-color: #e0e0e0 !important; }
.cli-nav-item { color: #5a5a5a !important; }
.cli-nav-item:hover { background: #f5f5f5 !important; color: #111 !important; }
.cli-nav-item.active { background: #111 !important; color: #fff !important; }
.cli-viendo { background: #f0f0f0 !important; color: #111 !important; }
.cli-viendo:hover { background: #e6e6e6 !important; color: #111 !important; }
.cli-user:hover, .cli-user.active { background: #f5f5f5 !important; }
.cli-user-name { color: #111 !important; }
.cli-avatar { background: #111 !important; color: #fff !important; }
.cli-logout { color: #5a5a5a !important; }
.cli-logout:hover { background: #f0f0f0 !important; color: #111 !important; }

/* ---------- "Entra a una actividad" ---------- */
.entrar-act { background: #fff !important; color: #111 !important; border: 1px solid #e6e6e6; box-shadow: var(--sombra-1) !important; }
.entrar-act-icono, .entrar-act-item-icono { background: #f0f0f0 !important; color: #111 !important; border-color: #e0e0e0 !important; }
.entrar-act-titulo, .entrar-act-item-texto strong { color: #111 !important; }
.entrar-act-sub, .entrar-act-item-texto small { color: #6f6f6f !important; }
.entrar-act-form input { background: #f5f5f5 !important; border-color: #d0d0d0 !important; color: #111 !important; }
.entrar-act-form input::placeholder { color: #9a9a9a !important; }
.entrar-act-form input:focus { border-color: #111 !important; background: #fff !important; }
.entrar-act-form button, .entrar-act-item-btn { background: #111 !important; color: #fff !important; }
.entrar-act-form button:hover { background: #333 !important; }
.entrar-act-vivo { border-top-color: #e6e6e6 !important; }
.entrar-act-vivo-titulo { color: #111 !important; }
.entrar-act-pulso { background: #111 !important; }
.entrar-act-pulso::after { border-color: #111 !important; }
.entrar-act-item { background: #f5f5f5 !important; border-color: #e6e6e6 !important; color: #111 !important; }
.entrar-act-item:hover { background: #efefef !important; border-color: #111 !important; }
.entrar-act-item-flecha { color: #8a8a8a !important; }

/* ---------- Entrada (login) clara: el logo blanco pasa a negro ---------- */
.login-screen { background: #f5f5f5 !important; }
.login-logo-img, .desk-logo-img { filter: brightness(0); }
.login-name { color: #111 !important; }
.login-sub { color: #6f6f6f !important; }
.login-sheet { background: #fff !important; box-shadow: 0 -6px 24px rgba(0, 0, 0, .06); }
@media (min-width: 900px) {
  .desk-brand { background: #f0f0f0 !important; color: #111 !important; border-right: 1px solid #e0e0e0; }
  .login-sheet { background: #fff !important; box-shadow: none; }
}

/* ---------- Paneles profesor y maestro (celular) ---------- */
.admin-header-movil { background: #fff !important; color: #111 !important; border-bottom: 1px solid #e6e6e6; }
html[data-tema="verde"] .admin-header-movil { background: #fff !important; }
body.admin-body .admin-header-movil { box-shadow: 0 1px 8px rgba(0, 0, 0, .05) !important; }
body.admin-body .ahm-sub { color: #6f6f6f !important; }
body.admin-body .ahm-volver, body.admin-body .tb-cursel-boton { background: #f0f0f0 !important; color: #111 !important; }
body.admin-body .tb-cursel-boton i, .admin-header-movil i { color: #111; }
body.admin-body .tb-cursel-boton.con-filtro { background: #111 !important; color: #fff !important; }
body.admin-body .tb-cursel-boton.con-filtro i { color: #fff !important; }

@media (max-width: 767px) {
  body.admin-body .ini-hero, body.admin-body .ini-hero.ini-hero-maestro {
    background: #fff !important; color: #111 !important; border: 1px solid #e6e6e6; border-top: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06) !important;
  }
  .ini-hero-avatar, .ini-hero-maestro .ini-hero-avatar { background: #111 !important; border-color: #111 !important; color: #fff !important; }
  .ini-hero-saludo span, .ini-hero-fecha, .ini-hero-proxima-texto small, .ini-hero-estado-texto small { color: #6f6f6f !important; }
  .ini-hero-saludo strong, .ini-hero-saludo { color: #111; }
  .ini-hero-campana .campana-boton { background: #f0f0f0 !important; color: #111 !important; }
  .ini-hero-proxima, .ini-hero-estado { background: #f5f5f5 !important; border: 1px solid #e6e6e6 !important; color: #111 !important; backdrop-filter: none; }
  .ini-hero-proxima-icono { background: #111 !important; color: #fff !important; }
  .ini-hero-estado-punto { background: #111 !important; box-shadow: 0 0 0 4px rgba(0, 0, 0, .1) !important; }
  .ini-hero-atajos a { background: #f5f5f5 !important; border: 1px solid #e6e6e6 !important; color: #111 !important; }
  .ini-hero-atajos span, .ini-hero-medidor span { color: #6f6f6f !important; }
  .ini-hero-atajos a.con, .ini-hero-maestro .ini-hero-atajos a.con { background: #111 !important; border-color: #111 !important; color: #fff !important; }
  .ini-hero-atajos a.con span, .ini-hero-maestro .ini-hero-atajos a.con span { color: rgba(255, 255, 255, .7) !important; }
  .ini-hero-medidor i { background: #e0e0e0 !important; }
  .ini-hero-medidor em { background: #111 !important; }
  .ini-hero-medidor.alto em { background: #c0584a !important; }
  .ini-hero-medidor b { color: #111; }
}

/* ---------- Herramientas (calculadoras): fondo claro ---------- */
body.hr-body { background: #f5f5f5 !important; color: #111 !important; }
body.hr-body .sj-tarjeta { color: #111; }
body.hr-body .sj-tarjeta h1 { color: #111; }
body.hr-body .sj-tarjeta p { color: #5a5a5a; }
body.hr-body .sj-tarjeta p b { color: #111; }
body.hr-body .sj-icono { background: #111 !important; color: #fff !important; }
body.hr-body .sj-input { background: #fff; color: #111; border-color: #d0d0d0; }
body.hr-body .sj-boton, body.hr-body .hr-boton { background: #111; color: #fff; }
body.hr-body .sj-boton:hover { background: #333; }
body.hr-body .hr-menu-item, body.hr-body .hr-panel .hr-resultado { background: #fff; box-shadow: var(--sombra-1); }
body.hr-body .hr-menu-item:hover { background: #fafafa; border-color: #111; }
body.hr-body .sj-pie { color: #6f6f6f !important; }
body.hr-body .sj-pie a { color: #111; text-decoration: underline; }

/* ==========================================================================
   Sección Clases (alumno): tamaños parejos y legibles.
   Miniatura 16:9, letras de 11 a 15 px (antes 9 a 13), tarjetas con la
   misma altura mínima y nada que se salga del ancho.
   ========================================================================== */
.clase-lista { gap: 12px; width: 100%; box-sizing: border-box; }
.clase-item {
  align-items: center; gap: 14px; padding: 12px; min-height: 92px; width: 100%; box-sizing: border-box;
  border-radius: var(--radio-tarjeta);
}
.clase-item.actual { border-width: 2px; padding: 11px; }
.clase-item-thumb {
  width: 112px; height: auto; aspect-ratio: 16 / 9; border-radius: 10px;
  background: #f0f0f0; border: 1px solid #e6e6e6; color: #b5b5b5; font-size: 26px;
}
.clase-item-thumb img { display: block; }
.clase-item-body { display: flex; flex-direction: column; gap: 3px; }
.clase-item-top { gap: 6px; }
.clase-item-num { font-size: 11px; }
.clase-item-tag { font-size: 10px; padding: 3px 8px; letter-spacing: .03em; }
.clase-item-titulo {
  font-size: 15px; line-height: 1.3; margin-top: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clase-item-meta { gap: 4px 12px; margin-top: 0; }
.clase-item-meta span { font-size: 12px; }
.clase-item-estado { margin-top: 4px; }
.clase-item-pill { font-size: 11.5px; padding: 3px 10px; }
.clase-item-progreso { gap: 10px; }
.clase-item-progreso .progress { height: 6px; }
.clase-item-progreso-texto { font-size: 12px; }
#screen-clases .section-title.curso-titulo { margin: 18px 0 10px; font-size: var(--fs-sub); }
@media (max-width: 400px) {
  .clase-item { gap: 12px; padding: 10px; }
  .clase-item-thumb { width: 92px; }
  .clase-item-titulo { font-size: 14px; }
}

/* ---------- Visor de clase (alumno): claro como el resto ---------- */
.cv-overlay { background: rgba(0, 0, 0, .35); }
.cv-caja { background: #f2f2f2; color: #111; }
.cv-header { color: #111; background: #fff; border-bottom: 1px solid #e0e0e0; }
.cv-cerrar { background: rgba(0, 0, 0, .08); color: #111; }
.cv-pie { background: #fff; border-top: 1px solid #e0e0e0; color: #111; }
.cv-contador { color: #111; }
.cv-video-btn, .cv-audio-btn { background: rgba(255, 255, 255, .96); color: #111; box-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
.cv-video-btn i { color: #111; }
.cv-video-lightbox { background: rgba(245, 245, 245, .97); }
.cv-video-cerrar { background: rgba(0, 0, 0, .08); color: #111; }
.cv-caja .progress { background: rgba(0, 0, 0, .12); }
.cv-caja .progress > span { background: #111; }
.cv-caja .btn-secundario { background: #fff; color: #111; }

/* ==========================================================================
   Clases del profesor (prof_clases.php): botones, íconos y miniaturas con
   medidas parejas. Escritorio 34 px, celular 40 px, todo del mismo alto.
   ========================================================================== */
.librero-grid[data-vista="grid"] { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.clase-card { border-radius: var(--radio-tarjeta); box-shadow: var(--sombra-1); }
.librero-grid[data-vista="grid"] .clase-card-thumb { height: auto; aspect-ratio: 16 / 9; }
.librero-grid[data-vista="lista"] .clase-card-thumb { width: 132px; height: auto; aspect-ratio: 16 / 9; align-self: center; margin: 8px 0 8px 4px; border-radius: 10px; }
.clase-card-thumb { background: #f0f0f0; color: #b5b5b5; }
.clase-card-body { padding: 14px; gap: 2px; }
.clase-card-numero { font-size: 11px; }
.clase-card-titulo {
  font-size: 15px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clase-card-cursos { margin-top: 8px; }
.clase-card-cursos .badge { font-size: 11px; }
.clase-card-stats { gap: 6px 14px; margin-top: 10px; }
.curso-card-stat { font-size: 12px; }
.clase-card-error { font-size: 12px; }

/* Acciones: todos los controles del mismo alto y alineados en la misma fila */
.clase-card-acciones { gap: 8px; align-items: center; }
.clase-card-acciones .btn { height: 34px; min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.clase-accion-icono { width: 34px; height: 34px; min-height: 34px; border-radius: 10px; }
.clase-accion-icono.con-texto { width: auto; padding: 0 11px; white-space: nowrap; }
.clase-card-iconos { gap: 6px; flex-wrap: wrap; align-items: center; }
.vista-switch button { width: 38px; height: 32px; }

@media (max-width: 767px) {
  .clase-card-acciones .btn, .clase-accion-icono, .clase-accion-icono.con-texto { height: 40px; min-height: 40px; }
  .clase-accion-icono { width: 40px; }
  .clase-accion-icono.con-texto { width: auto; }
  .clase-card-acciones .btn { flex: 1 1 auto; justify-content: center; }
  .clase-card-iconos { margin-left: 0; width: 100%; justify-content: flex-start; }
  .vista-switch button { width: 42px; height: 36px; }
  .librero-grid[data-vista="lista"] .clase-card-thumb { width: 104px; }
}

/* ==========================================================================
   Documentos: alumno (#screen-documentos) y profesor (prof_documentos.php).
   Encabezados de curso y clase claros, filas más amplias, iconos por tipo
   (la presentación en negro, el resto en gris con su etiqueta) y acciones
   del mismo tamaño.
   ========================================================================== */

/* ---------- Alumno ---------- */
#screen-documentos .section-title.curso-titulo {
  margin: 22px 0 6px; padding-bottom: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.01em;
  border-bottom: 1px solid #e6e6e6;
}
#screen-documentos .section-title.curso-titulo:first-of-type { margin-top: 8px; }
#screen-documentos .section-title.sub-grupo {
  display: flex; align-items: baseline; gap: 8px; margin: 16px 0 8px; font-size: 13px; font-weight: 700;
  color: var(--gray-500); text-transform: none; letter-spacing: 0;
}
#screen-documentos .doc-clase-cuenta {
  margin-left: auto; flex-shrink: 0; font-size: 11.5px; font-weight: 600; color: var(--gray-500);
  background: #efefef; padding: 2px 9px; border-radius: 999px;
}
#screen-documentos .doc-list { display: flex; flex-direction: column; gap: 8px; }
#screen-documentos .doc-item {
  gap: 12px; padding: 12px 14px; margin: 0; background: #fff; border: 1px solid #e6e6e6;
  border-radius: var(--radio-tarjeta); box-shadow: var(--sombra-1);
}
#screen-documentos .doc-icon { width: 46px; height: 46px; border-radius: 13px; font-size: 21px; background: #f0f0f0; color: #111; }
#screen-documentos .doc-icon.bg-verde { background: #111; color: #fff; }
#screen-documentos .doc-icon.bg-warn { background: #f7ecd6; color: #8a5a00; }
#screen-documentos .doc-icon.bg-info { background: #e8edf1; color: #3c4d5b; }
#screen-documentos .doc-icon.bg-cafe { background: #efefef; color: #333; }
#screen-documentos .doc-title { font-size: 15px; line-height: 1.3; font-weight: 700; }
#screen-documentos .doc-meta { font-size: 12.5px; margin-top: 3px; color: var(--gray-500); }
#screen-documentos .doc-accion { width: 38px; height: 38px; border-radius: 11px; background: #f0f0f0; color: #111; font-size: 17px; transition: background .15s, color .15s; }
#screen-documentos .doc-accion:hover, #screen-documentos .doc-accion:active { background: #111; color: #fff; opacity: 1; }
@media (max-width: 767px) {
  #screen-documentos .doc-item { padding: 11px 12px; gap: 10px; }
  #screen-documentos .doc-icon { width: 42px; height: 42px; font-size: 19px; }
  #screen-documentos .doc-accion { width: 36px; height: 36px; border-radius: 50%; }
}

/* ---------- Profesor ---------- */
.grupo-material { margin-bottom: 28px; }
.grupo-material-cabecera { gap: 10px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #e6e6e6; }
.grupo-material-titulo { font-size: 14px; font-weight: 800; color: var(--gray-900); text-transform: none; letter-spacing: -.005em; }
.grupo-material-cuenta { font-size: 11.5px; background: #efefef; padding: 2px 9px; }
.material-tabla { border-radius: var(--radio-tarjeta); box-shadow: var(--sombra-1); }
.material-tabla > *:first-child { border-top-left-radius: var(--radio-tarjeta); border-top-right-radius: var(--radio-tarjeta); }
.material-tabla > *:last-child { border-bottom-left-radius: var(--radio-tarjeta); border-bottom-right-radius: var(--radio-tarjeta); }
.material-item { gap: 16px; padding: 14px 16px; }
.material-item:hover { background: #fafafa; }
.material-archivo { width: 46px; height: 46px; border-radius: 13px; background: #f0f0f0; color: #111; font-size: 22px; }
.material-titulo { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.material-meta { gap: 4px 14px; margin-top: 4px; }
.material-meta span { font-size: 12px; }
.material-cursos .badge { font-size: 11px; }
.material-control { gap: 4px; }
.material-control-label { font-size: 11px; }
.material-control .filtro-select { height: 36px; border-radius: 10px; }
.material-acciones .btn { height: 36px; min-height: 36px; border-radius: 10px; }
.material-acciones .btn-icono { width: 36px; min-width: 36px; }
