/* Barra superior del Concurso Docente (adaptada del prototipo Concursa): logo UNEMI, título del sistema,
   accesibilidad, notificaciones y menú de usuario. Las opciones de accesibilidad se aplican desde accesibilidad.js. */
.main-header.pt-tb {
    display: flex; align-items: center; flex-wrap: nowrap; gap: .75rem; min-height: 4rem; padding: .55rem 1rem;
    border: 0 !important; background: #002E45 !important; box-shadow: 0 2px 8px rgba(0, 26, 40, .3); color: #fff;
}
body.layout-navbar-fixed .wrapper .content-wrapper { margin-top: var(--pt-top, 4.5rem) !important; }
/* Sin franjas blancas: el fondo de la página es el mismo del contenido y el aire superior va dentro del contenido */
body.layout-navbar-fixed { background-color: #f4f6f9; }
body.layout-navbar-fixed .content-wrapper > .content { padding-top: 1.25rem; }
.pt-tb #contenedorLogo { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.pt-tb .pt-menu-btn { min-width: 2.75rem; min-height: 2.75rem; border-radius: .5rem; }
.pt-tb .tb-brand { display: flex; align-items: center; gap: .8rem; min-width: 0; min-height: 2.75rem; color: #fff; text-decoration: none; }
.pt-tb .tb-brand:hover .pt-marca-nombre { text-decoration: underline; }
.pt-tb .tb-brand:focus-visible { outline: 3px solid #FF6900; outline-offset: 2px; border-radius: .375rem; }
.pt-tb .tb-unemi { display: block; flex: none; width: auto; height: 2.15rem; }
.pt-tb .tb-sep { flex: none; width: 1px; height: 2rem; background: rgba(255, 255, 255, .3); }
.pt-marca-sistema { display: inline-flex; align-items: center; gap: .8rem; min-width: 0; font-family: Poppins, Arial, sans-serif; font-size: 1rem; font-weight: 600; color: #fff; }
.pt-marca-insignia { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.3rem; height: 2.3rem; border-radius: .7rem; background: #FC7E00; color: #001A28; }
.pt-marca-insignia .pt-ic { display: block; width: 1.25rem; height: 1.25rem; }
.pt-marca-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Botones de la derecha */
.pt-tb .tb-right { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.pt-tb .tb-rel { position: relative; }
.pt-tb .tb-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-width: 2.75rem; min-height: 2.75rem; padding: .4rem .7rem; border: 1px solid rgba(255, 255, 255, .4); border-radius: .5rem;
    background: transparent; color: #fff; font-size: .88rem; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none;
}
.pt-tb .tb-btn.plain { border-color: transparent; }
.pt-tb .tb-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.pt-tb .tb-btn:focus-visible { outline: 3px solid #FF6900; outline-offset: 1px; }
.pt-tb .tb-btn[aria-expanded="true"] { background: #fff; color: #002E45; }
.pt-tb .tb-btn .pt-ic { width: 1.25rem; height: 1.25rem; }
.pt-tb .tb-btn::after { display: none; }
.pt-tb .count {
    position: absolute; top: .15rem; right: .15rem; display: grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .2rem;
    border-radius: 999px; background: #FF6900; color: #002E45; font-size: .75rem; font-weight: 700;
}
.pt-tb .who { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; font-weight: 600; text-align: right; }
.pt-tb .tb-campana .dropdown-menu { min-width: 18rem; max-width: min(23rem, calc(100vw - 2rem)); margin-top: .5rem; padding: .4rem; border: 1px solid #D5DCE0; border-radius: .75rem; box-shadow: 0 14px 40px rgba(0, 0, 0, .18); }
.pt-tb .tb-campana .dropdown-item { display: flex; gap: .55rem; align-items: center; min-height: 2.75rem; padding: .4rem .6rem; border-radius: .5rem; color: #1C3247; white-space: normal; }
.pt-tb .tb-campana .dropdown-item:hover { background: #F5F7FA; }
.pt-tb .tb-campana .tb-vacio { padding: .6rem; color: #46555C; font-size: .9rem; }

/* Avatar (foto o iniciales) */
.pt-avatar { position: relative; display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; overflow: hidden; border-radius: 50%; background: #FF6900; color: #002E45; font-size: .9rem; font-weight: 700; }
.pt-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Ventanas emergentes de la barra (accesibilidad y usuario) */
.pt-pop {
    position: absolute; z-index: 1050; right: 0; top: calc(100% + .5rem); width: min(23rem, calc(100vw - 2rem)); padding: 1rem;
    border: 1px solid #D5DCE0; border-radius: .75rem; background: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .18); color: #222223; text-align: left;
}
.pt-pop[hidden] { display: none; }
.pt-pop h2 { margin: 0 0 .75rem; font-size: 1rem; font-weight: 700; color: #222223; }
.pt-pop .lbl { display: block; margin: 0 0 .4rem; padding: 0; font-size: .85rem; font-weight: 600; color: #335F7F; }
.pt-pop fieldset { margin: 0 0 .8rem; padding: 0; border: 0; }
.pt-pop .seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.pt-pop .seg button { min-height: 2.75rem; border: 1.5px solid #D5DCE0; border-radius: .5rem; background: #F5F7FA; color: #222223; font-weight: 700; cursor: pointer; }
.pt-pop .seg button[aria-pressed="true"] { border-color: #002E45; background: #002E45; color: #fff; }
.pt-pop .seg button:focus-visible, .pt-pop .tog input:focus-visible, .pt-pop .link:focus-visible { outline: 3px solid #FF6900; outline-offset: 1px; }
.pt-pop .tog { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0; padding: .55rem 0; border-top: 1px solid #D5DCE0; font-size: .92rem; font-weight: 500; cursor: pointer; }
.pt-pop .tog input { flex: none; width: 1.3rem; height: 1.3rem; accent-color: #002E45; cursor: pointer; }
.pt-pop .tog input:disabled { cursor: not-allowed; }
.pt-pop .link { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: .3rem; padding: 0; border: 0; background: none; color: #264763; font-size: .85rem; font-weight: 600; cursor: pointer; }
.pt-pop .link:hover { text-decoration: underline; }
.pt-pop .hint { margin: .3rem 0 0; font-size: .78rem; color: #627378; }

/* Menú de usuario: reemplaza el aspecto del antiguo panel de perfil (misma clase y funcionamiento) */
.panelProfile.pt-pop { position: fixed !important; top: calc(var(--pt-top, 4rem) + .5rem); right: 1rem; width: min(18.5rem, calc(100vw - 2rem)); padding: 0; border-radius: .75rem; animation: none; }
.panelProfile .um-h { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid #D5DCE0; }
.panelProfile .um-h .pt-avatar { width: 2.8rem; height: 2.8rem; font-size: 1rem; }
.panelProfile .um-t { display: grid; min-width: 0; }
.panelProfile .um-t b { overflow-wrap: anywhere; font-size: .95rem; line-height: 1.25; color: #002E45; }
.panelProfile .um-t small { overflow-wrap: anywhere; font-size: .82rem; color: #46555C; }
.panelProfile .menu-list { display: grid; gap: .2rem; padding: .4rem; }
.panelProfile .menu-list a { display: flex; gap: .6rem; align-items: center; min-height: 2.75rem; padding: .4rem .6rem; border-radius: .5rem; color: #222223; font-size: .92rem; text-decoration: none; }
.panelProfile .menu-list a:hover { background: #F5F7FA; color: #002E45; }
.panelProfile .menu-list a:focus-visible { outline: 3px solid #FF6900; outline-offset: -3px; }
.panelProfile .menu-list .pt-ic { width: 1.15rem; height: 1.15rem; color: #335F7F; }
.panelProfile .um-hr { margin: .3rem 0; border: 0; border-top: 1px solid #D5DCE0; }

/* Lectura en voz alta */
.pt-voz { position: fixed; z-index: 1060; left: 1rem; bottom: calc(3rem + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: .15rem; padding: .3rem; border-radius: 999px; background: #002E45; color: #fff; box-shadow: 0 8px 24px rgba(0, 26, 40, .28); }
.pt-voz button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .7rem; border: 0; border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.pt-voz button:hover { background: rgba(255, 255, 255, .12); }
.pt-voz button:focus-visible { outline: 3px solid #FF6900; outline-offset: 1px; }
.pt-voz .voz-play { padding: 0 1rem 0 .55rem; background: #FF6900; color: #001A28; }
.pt-voz .voz-play:hover { background: #FF8A2B; }
.pt-voz .pt-ic { width: 1.15rem; height: 1.15rem; }
.pt-voz .voz-play .pt-ic { fill: currentColor; stroke: none; }
.pt-voz-actual { outline: 3px solid #FF6900 !important; outline-offset: 3px; border-radius: 4px; background: rgba(255, 105, 0, .08); }

/* Opciones de accesibilidad aplicadas a toda la página */
html.ul a, html.ul .link { text-decoration: underline !important; }
html.sp body { letter-spacing: .06em; word-spacing: .16em; line-height: 1.9; }
html.hc body, html.hc .content-wrapper, html.hc .card, html.hc .pt-side, html.hc .modal-content, html.hc .dropdown-menu, html.hc .pt-pop { background: #fff !important; color: #000 !important; }
html.hc .card, html.hc .pt-pop, html.hc .modal-content, html.hc .dropdown-menu, html.hc .table td, html.hc .table th, html.hc .form-control, html.hc .pt-side { border-color: #000 !important; box-shadow: none !important; }
html.hc .text-muted, html.hc small, html.hc .hint, html.hc .pt-pop .lbl { color: #1A1A1A !important; }
html.hc a:not(.btn):not(.tb-brand):not(.tb-btn) { color: #001A28 !important; }
html.hc .main-header.pt-tb, html.hc .btn-primary { background: #001A28 !important; border-color: #001A28 !important; box-shadow: none; }
html.hc .badge, html.hc .estado { border: 1px solid #000 !important; background: #fff !important; color: #000 !important; }
html.hc .pt-voz { border: 2px solid #fff; background: #000; }

@media (max-width: 991.98px) {
    .main-header.pt-tb .pt-marca-nombre, .pt-tb .tb-sep { display: none; }
    .pt-tb .tb-unemi { height: 1.8rem; }
    .pt-tb .tb-brand { gap: .55rem; }
    .pt-tb .who { display: none; }
}
@media (max-width: 575.98px) {
    .main-header.pt-tb { gap: .25rem; padding-inline: .5rem; }
    .pt-tb .lbl-t { display: none; }
    .pt-tb .tb-right { gap: 0; }
    .pt-tb .tb-btn { padding-inline: .35rem; }
    .pt-tb .tb-unemi { height: 1.4rem; }
    .pt-tb .tb-brand { gap: .4rem; }
    .pt-tb #contenedorLogo, .pt-tb .tb-brand { flex: 1 1 auto; overflow: hidden; }
    .pt-marca-insignia { width: 2rem; height: 2rem; }
    .pt-marca-nombre { display: none; }
    .pt-tb .tb-right { flex: none; }
    .pt-tb .tb-rel { position: static; }
    .pt-tb .pt-pop:not(.panelProfile) { position: fixed; left: .75rem; right: .75rem; top: calc(var(--pt-top, 4rem) + .5rem); width: auto; max-height: calc(100vh - var(--pt-top, 4rem) - 1rem); overflow-y: auto; }
    .panelProfile.pt-pop { right: .75rem; }
    .pt-voz { left: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }
    .pt-voz .voz-txt { display: none; }
    .pt-voz .voz-play { padding: 0 .55rem; }
}
@media (prefers-reduced-motion: reduce) { .pt-tb *, .pt-pop, .pt-voz * { transition: none !important; animation: none !important; } }

/* Ruta de navegación (prototipo Concursa): Inicio › Grupo › Página */
.pt-migas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; margin: 0 0 .35rem; padding-top: .6rem; }
.pt-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-width: 0; font-size: .85rem; color: #627378; }
.pt-crumb a { display: inline-flex; align-items: center; min-height: 2.75rem; color: #264763; text-decoration: underline; text-underline-offset: 2px; }
.pt-crumb a:hover { color: #002E45; }
.pt-crumb a:focus-visible, .pt-atras:focus-visible { outline: 3px solid rgba(255, 105, 0, .55); outline-offset: 2px; border-radius: .25rem; }
.pt-crumb [aria-current="page"] { color: #46555C; }
.pt-crumb__sep { color: #9AA8AF; }
.pt-atras { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.75rem; font-family: 'Poppins', Arial, Helvetica, sans-serif; font-size: .85rem; font-weight: 600; color: #264763; text-decoration: none; }
.pt-atras:hover { color: #002E45; text-decoration: underline; text-underline-offset: 3px; }
.pt-atras .pt-ic { width: 1.25rem; height: 1.25rem; }
@media (max-width: 575.98px) { .pt-crumb > :not(:nth-last-child(-n+3)) { display: none; } }
/* Nombre y perfil activo en el botón de usuario (prototipo) */
.pt-tb .who b { display: block; font-size: .85rem; font-weight: 700; line-height: 1.2; }
.pt-tb .who small { display: block; font-size: .78rem; font-weight: 500; line-height: 1.2; color: #C5D8E6; }
/* Logo UNEMI completo (con «Universidad Estatal de Milagro» debajo), como el prototipo */
.pt-tb .tb-unemi { height: 2.6rem; }
@media (max-width: 991.98px) { .pt-tb .tb-unemi { height: 2.2rem; } }
@media (max-width: 575.98px) { .pt-tb .tb-unemi { height: 1.9rem; } }
/* Panel de accesibilidad: medidas exactas del prototipo (Poppins 16 px, opciones sin negrita, «Restablecer valores» de 16 px) */
.pt-pop#ptA11yPop { font-family: 'Poppins', Arial, Helvetica, sans-serif; font-size: 1rem; line-height: 1.55; }
.pt-pop#ptA11yPop h2, .pt-pop#ptA11yPop legend, .pt-pop#ptA11yPop .seg, .pt-pop#ptA11yPop .seg button, .pt-pop#ptA11yPop .tog, .pt-pop#ptA11yPop .link, .pt-pop#ptA11yPop .hint { font-family: inherit; }
.pt-pop#ptA11yPop h2 { line-height: 1.25; }
.pt-pop#ptA11yPop legend { line-height: 1.55; }
.pt-pop#ptA11yPop .seg button { line-height: 1.55; }
.pt-pop#ptA11yPop .tog { font-weight: 400; line-height: 1.55; }
.pt-pop#ptA11yPop .tog input { color: #222223; }
.pt-pop#ptA11yPop .link { display: inline-flex; align-items: center; gap: .3rem; min-height: 1.5rem; margin: .6rem 0 0; font-size: 1rem; line-height: 1.55; }
.pt-pop#ptA11yPop .hint { margin: .6rem 0 0; font-size: .82rem; line-height: 1.55; }
