/* ladocencIA — Pulido visual 2026 (se carga al final: corrige desbordes y moderniza botones viejos).
   Regla: solo afina lo que se veía antiguo o se salía de su cuadro; no cambia colores de marca. */

/* ---------- Barra superior: nada se sale de la pantalla en laptops (≈ 960-1280 px) ---------- */
.app-topbar { min-width: 0; }
.app-topbar > :first-child { min-width: 0; overflow: hidden; }
.app-topbar #app-view-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar .topbar-actions { min-width: 0; flex-wrap: nowrap; }
.app-topbar .topbar-actions > * { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 1320px) {
  .app-topbar .platform-level-badge, .app-topbar .platform-plan { display: none !important; }
}
@media (max-width: 1120px) {
  .app-topbar .ld-top-buscar { display: none !important; }      /* el buscador ya está en el menú lateral */
  .app-topbar .teacher-profile small, .app-topbar .teacher-profile .role { display: none; }
  .app-topbar .topbar-secondary { padding-inline: 10px; }
  .app-topbar .topbar-kicker { display: none; }
}
@media (max-width: 1000px) {
  .app-topbar .topbar-primary { padding: 9px 11px; }
  .app-topbar .cr-pill { padding-inline: 9px; }
}

/* ---------- Menú lateral: «Buscar herramienta» y etiquetas largas caben en su botón ---------- */
.ld-nav-buscar { overflow: hidden; min-width: 0; }
.ld-nav-buscar kbd { display: none; }
aside button[data-action] { min-width: 0; }
aside button[data-action] > span:not([data-ld-icon]) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Botones secundarios: tipografía de la app, peso y estados modernos ---------- */
.pro-action, .pro-pill {
  font: inherit; font-size: .84rem; font-weight: 700; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(28, 43, 75, .16); background: #fff; color: #1c2b4b;
  box-shadow: 0 1px 2px rgba(15, 24, 48, .06);
  cursor: pointer; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.pro-action:hover, .pro-pill:hover { background: #f6f8fc; border-color: rgba(28, 43, 75, .3); box-shadow: 0 4px 12px rgba(15, 24, 48, .08); transform: translateY(-1px); }
.pro-action:active, .pro-pill:active { transform: none; }
.pro-action:focus-visible, .pro-pill:focus-visible, .btn-principal:focus-visible, .iv-go:focus-visible { outline: 3px solid rgba(242, 159, 43, .55); outline-offset: 2px; }
.pro-action:disabled, .pro-pill:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-principal { transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-principal:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(28, 43, 75, .24); }

/* ---------- Campos de formulario: textos largos no se salen del cuadro ---------- */
.pro-form-grid label, .pro-form-grid select, .pro-form-grid input, .pro-form-grid textarea { min-width: 0; max-width: 100%; }
.pro-form-grid select { text-overflow: ellipsis; }
.pro-card, .pro-list > * { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Menú de perfil: los botones van uno debajo de otro (nowrap heredado los ponía en fila) ---------- */
.teacher-profile-menu { white-space: normal; }
.teacher-profile-menu button { display: block; }

/* «Buscar herramienta»: el texto cabe sin cortarse (el anónimo del flex pasa a ocupar el espacio con puntos suspensivos) */
.ld-nav-buscar { gap: 6px; padding-inline: 9px; font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Mapa curricular: el título de los ejes no se encima con las opciones ---------- */
.nem-mapa-centro .nem-ejes legend { float: left; width: 100%; }
.nem-mapa-centro .nem-ejes legend + * { clear: both; }
.nem-mapa select, .nem-ramas select, .nem-extra-top select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.nem-mapa-centro input { text-overflow: ellipsis; }

/* Cualquier lista desplegable se queda dentro de su cuadro, sin importar qué tan largo sea su texto */
select { max-width: 100%; text-overflow: ellipsis; }
