/* Navegación superior y avisos: estilos aislados del CMS. */
.hse-topbar, .hse-topbar *, .hse-toast, .hse-toast * { box-sizing: border-box; }
.hse-topbar { position: relative; z-index: 10000; margin: 0; width: 100%; max-width: none; border: 0; border-bottom: 3px solid #86cce6; border-radius: 0; background: linear-gradient(110deg,#245774,#326f8e 55%,#23556f); box-shadow: 0 3px 10px #244c6529,inset 0 1px 0 #ffffff20; font-family: Arial,Helvetica,sans-serif; }
.hse-topbar-inner { min-height: 80px; display: flex; align-items: center; gap: 20px; padding: 9px 20px; width: 100%; max-width: 1180px; margin: 0 auto; justify-content: center; }
.hse-topbar + .header { position: relative; }
.hse-brand { display: flex; align-items: center; justify-content: center; flex: 0 0 88px; height: 64px; }
.hse-brand img { display: block; width: 80px; height: 64px; object-fit: contain; filter: drop-shadow(0 2px 2px #173c4c70); }
.hse-topbar svg { width: 23px; height: 23px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hse-account { position: relative; flex: 0 0 230px; min-width: 0; }
.hse-account-toggle { display: flex; align-items: center; gap: 10px; width: 100%; height: 49px; padding: 0 14px 0 78px; border: 1px solid #729caf; border-radius: 30px; background: linear-gradient(#214d66,#1b435b); color: #f3f7fb; font: bold 15px Arial,Helvetica,sans-serif; cursor: pointer; }
.hse-account-toggle > svg { width: 17px; color: #b6eaf7; margin-left: auto; transition: transform .18s; }
.hse-account-toggle[aria-expanded="true"] > svg { transform: rotate(180deg); }
.hse-account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hse-avatar { position: absolute; left: -2px; top: -8px; width: 64px; height: 64px; border: 3px solid #a5e3f5; border-radius: 50%; background: #347b9b url('/img/web/candado.gif') center no-repeat; box-shadow: 0 2px 6px #143b5050,inset 0 0 0 1px #ffffff40; }
.hse-avatar.is-online { background-position: center -10px; }
.hse-avatar.is-online::after { content: ''; position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; background: #43ed28; border: 2px solid #092722; border-radius: 50%; }
.hse-account-menu { position: absolute; top: calc(100% + 18px); left: -5px; width: 255px; padding: 10px; border: 1px solid #6aa2bf; border-radius: 15px; background: linear-gradient(120deg,#24546efc,#193f56fc); box-shadow: 0 10px 22px #1a405240,inset 0 1px 0 #ffffff20; backdrop-filter: blur(14px); }
.hse-account-menu[hidden] { display: none; }
.hse-account-menu .hse-account-link { display: flex; align-items: center; gap: 16px; min-height: 42px; padding: 9px 13px; border: 1px solid transparent; border-radius: 10px; color: #f1f7fa; font-size: 14px; font-weight: 600; text-decoration: none; }
.hse-account-link svg { color: #c7e5f0; }
.hse-account-menu .hse-account-link:hover, .hse-account-menu .hse-account-link:focus-visible { color: #fff; border-color: #86bfd8; background: #3a7594; }
.hse-account-link:hover svg { color: #fff; }
.hse-account-menu .hse-account-link:last-child { margin-top: 6px; border-top: 1px solid #ffffff12; border-radius: 0 0 10px 10px; }
.hse-unread { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 12px; background: #237393; color: white; font-size: 11px; }
.hse-account-link .hse-unread { margin-left: auto; }
.hse-main-nav { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-width: 0; }
.hse-topbar .hse-nav-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 8px 12px; border: 1px solid transparent; border-radius: 25px; color: #f0f7fa; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s,color .15s; }
.hse-topbar .hse-nav-link:hover { background: #ffffff18; color: #fff; }
.hse-topbar .hse-nav-link[aria-current="page"] { color: #fff; background: linear-gradient(#4285a4,#357390); border-color: #97cfe4; box-shadow: inset 0 1px 0 #ffffff25,0 2px 4px #143e5320; }
.hse-nav-link[aria-current="page"] svg { color: #d1f2ff; }
.hse-topbar .hse-nav-panel { color: #f0f7fa; }
.hse-topbar a:focus-visible, .hse-topbar button:focus-visible, .hse-topbar input:focus-visible { outline: 2px solid #44d8ff; outline-offset: 3px; }
.hse-login-form { display: grid; gap: 9px; color: #dfedf5; font: 13px Arial,Helvetica,sans-serif; }
.hse-login-form strong { padding: 6px 0; font-size: 14px; }
.hse-login-form input { width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #6d96ad; border-radius: 7px; color: #fff; background: #15394f; font: inherit; }
.hse-login-form button { min-height: 37px; margin: 4px 0; border: 1px solid #9bd8ee; border-radius: 7px; background: #347d9e; color: #fff; font: bold 14px Arial,sans-serif; cursor: pointer; }
.hse-login-form a { color: #93e2fb; padding: 4px 0; }
.hse-toast { position: fixed; z-index: 11000; top: 110px; right: 22px; display: flex; align-items: center; gap: 12px; width: 360px; max-width: calc(100vw - 32px); padding: 16px; border: 1px solid #e3e8ee; border-radius: 12px; background: #fff; color: #17242e; box-shadow: 0 8px 30px #12334e24,0 2px 6px #12334e12; font: 13px/1.45 Arial,Helvetica,sans-serif; animation: hse-toast-enter .25s ease-out; }
.hse-toast-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 50%; background: #e5f8ee; color: #15965b; font-size: 16px; font-weight: bold; }
.hse-toast--error .hse-toast-icon { background: #ffeded; color: #d93939; }
.hse-toast-copy { flex: 1; min-width: 0; }
.hse-toast-copy strong { display: block; font-size: 13px; }
.hse-toast-copy p { margin: 3px 0 0; color: #65727d; }
.hse-toast-close { align-self: flex-start; padding: 0; width: 23px; height: 23px; border: 0; border-radius: 5px; background: transparent; color: #78848f; font-size: 21px; line-height: 21px; cursor: pointer; }
.hse-toast-close:hover { background: #eef2f5; color: #182734; }
.hse-toast-close:focus-visible { outline: 2px solid #168dc0; outline-offset: 2px; }
.hse-toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity .18s,transform .18s; }
@keyframes hse-toast-enter { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1050px) {
    .hse-topbar-inner { gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
    .hse-account { margin-left: 0; }
    .hse-online { margin-left: auto; }
    .hse-main-nav { flex-basis: 100%; justify-content: center; flex-wrap: wrap; order: 1; }
    .hse-account-menu { left: auto; right: 0; }
    .hse-toast { top: 156px; }
}
@media (max-width: 540px) {
    .hse-topbar { width: 100%; margin: 0; border-radius: 0; }
    .hse-topbar-inner { gap: 8px; padding: 12px 10px; }
    .hse-brand { flex-basis: 65px; height: 52px; }
    .hse-brand img { width: 65px; height: 52px; }
    .hse-account { flex: 1 1 155px; max-width: 230px; }
    .hse-account-toggle { padding-left: 61px; gap: 5px; font-size: 12px; height: 42px; }
    .hse-avatar { width: 49px; height: 49px; top: -4px; }
    .hse-topbar .hse-nav-link { gap: 5px; padding: 7px 8px; font-size: 12px; min-height: 36px; }
    .hse-topbar .hse-nav-link svg { width: 18px; height: 18px; }
    .hse-toast { top: auto; bottom: 20px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .hse-toast { animation: none; }
    .hse-toast.is-leaving, .hse-account-toggle > svg, .hse-topbar .hse-nav-link { transition: none; }
}

.hse-topbar .hse-online { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; padding: 9px 12px; border: 1px solid #ffffff30; border-radius: 20px; background: #183f542e; color: #e5f4fb; text-decoration: none; white-space: nowrap; font: 12px/1.3 Arial,Helvetica,sans-serif; transition: background .15s,border-color .15s; }
.hse-topbar .hse-online:hover { background: #ffffff18; border-color: #a2d4e8; }
.hse-online strong { font-size: 13px; color: #fff; }
.hse-online-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: #8cdeb1; box-shadow: 0 0 0 3px #8cdeb118; }
@media (max-width: 540px) {
    .hse-topbar .hse-online { padding: 7px 9px; gap: 6px; font-size: 11px; }
}

/* El icono circular ocupa todo el avatar de acceso. */
.hse-topbar .hse-avatar:not(.is-online) { border:0; background-color:transparent; background-image:url('/img/theme/hse-guest-lock.png'); background-position:center; background-repeat:no-repeat; background-size:125% 125%; box-shadow:none; }

/* Logo con más presencia y sin sombra difuminada. */
.hse-topbar .hse-brand { flex:0 0 124px; height:90px; }
.hse-topbar .hse-brand img { width:120px; height:90px; object-fit:contain; filter:none; }
@media(max-width:540px) { .hse-topbar .hse-brand { flex-basis:94px; height:68px; } .hse-topbar .hse-brand img { width:90px; height:68px; } }

/* Reducir el espacio sobrante en los costados de la cabecera. */
body.hse-theme .hse-topbar { max-width:1300px; }
@media(min-width:1281px) {
  body.hse-theme .hse-topbar-inner { gap:12px; padding-left:14px; padding-right:14px; }
}
