/* Shell común de la interfaz aprobada: navegación superior y cajón autorizado. */
.today .today-areas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.today .today-areas > .today-area{margin:0;padding:20px;background:#fffefa;border:1px solid #d5e1eb;border-top:4px solid #2563a6;border-radius:12px}
.today .today-area:nth-child(2){border-top-color:#52786a}.today-area header{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.today .today-area h2{font-size:1.25rem;margin:0;color:#20374b}.today-area header span{font-size:.8rem;color:#655d68}.today-area__counts{display:flex;flex-wrap:wrap;gap:10px 20px;margin:14px 0}.today-area a{color:#28577f;font-weight:600}.today-area p{margin:12px 0}
@media(max-width:768px){.today .today-areas{grid-template-columns:1fr}.today .today-area{padding:16px}}
/* La cabecera no participa en el scroll; se reserva su altura en el contenido. */
html[data-ui-theme="clinical-shell"] { overscroll-behavior-y:none; }
html[data-ui-theme="clinical-shell"] .app-shell--clinical { --topbar-height:68px; }
html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical .header.topbar {
  position:fixed; inset:0 0 auto; top:0; height:var(--topbar-height);
  min-height:var(--topbar-height); max-height:var(--topbar-height);
  margin:0; box-sizing:border-box; transform:none; transition:none; animation:none;
}
html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical > .app-main {
  padding-top:var(--topbar-height);
}
@media(max-width:768px){
  html[data-ui-theme="clinical-shell"] .app-shell--clinical { --topbar-height:calc(64px + env(safe-area-inset-top)); }
}
html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical > .app-main {
  width:100%!important; min-height:100dvh; height:auto; margin-left:0!important; overflow:visible;
}
html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page){height:auto;min-height:100dvh;overflow-x:hidden;overflow-y:auto}
html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical{height:auto;min-height:100dvh;overflow:visible}
html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-main > main,
html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-main > .main-container {
  overflow:visible;
}
.topbar-title__main{display:inline-flex;align-items:baseline;white-space:nowrap}.topbar-title__main strong{font-size:1rem}.topbar-title__main span{color:#777177;font-weight:400}
.topbar-primary{display:flex;align-items:stretch;align-self:stretch;gap:clamp(14px,2vw,30px);margin-left:auto}
.topbar-primary :is(a,button){display:inline-flex;min-height:0;padding:0;align-items:center;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent!important;color:#28242b!important;box-shadow:none;text-decoration:none;font-size:.82rem;white-space:nowrap}
.topbar-primary>a{gap:8px}
.topbar-primary>a>i{flex:0 0 1em;width:1em;text-align:center;line-height:1}
.topbar-primary :is(a,button):hover,.topbar-primary :is(a,button):focus-visible{border-bottom-color:#315f8c;color:#315f8c!important}
.topbar-primary a[aria-current="page"]{border-bottom-color:#315f8c}.topbar-more span{margin-left:7px}
.task-nav{position:relative;margin:0;border:0;background:transparent;padding:0;align-self:stretch;display:flex}
.task-nav>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;height:100%;min-height:42px;font:500 .82rem Arial,sans-serif;color:#28242b;padding:0 4px;border-bottom:3px solid transparent}
.task-nav>summary::-webkit-details-marker{display:none}.task-nav>summary:after{content:'⌄';font-size:.75rem}.task-nav.is-current>summary{border-bottom-color:#315f8c}
.task-nav__content{position:absolute;right:0;top:100%;width:280px;max-height:calc(100dvh - 90px);overflow:auto;background:#fffefa;border:1px solid #e5dfd8;border-radius:12px;padding:12px;box-shadow:0 12px 30px #1f344720;z-index:120}
.task-nav:not([open])>.task-nav__content{display:none}
.topbar .task-nav__content a,.task-options a{display:grid!important;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:44px;padding:10px 12px!important;border:0!important;border-radius:7px;color:#20374b!important;background:transparent!important;text-decoration:none;font:400 .85rem Arial,sans-serif;white-space:normal}
.task-nav__content a:hover,.task-options a:hover{background:#e8f1f8!important}.task-nav__content a[aria-current="page"]{background:#e8f1f8!important}
.task-nav__content .nav-badge,.task-options .nav-badge{position:static!important;min-width:22px;height:22px;margin:0 0 0 auto!important;padding:0 6px!important;display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 auto;border-radius:999px;background:#c44343!important;color:#fff!important;font-size:.68rem!important;font-weight:800;line-height:1}
.header.topbar .task-nav__content a :is(span,i),.task-options a :is(span,i){color:#20374b!important;opacity:1!important;visibility:visible!important}
.task-nav__content .role-switcher{display:block!important;margin:0 0 12px}.task-nav__content select{width:100%;min-height:40px}
.task-options[hidden]{display:none!important}.task-options{position:fixed;inset:58px 0 70px;z-index:100;overflow:auto;background:#fffefa;padding:20px;overscroll-behavior:contain}.task-options h2{font:600 1rem Arial,sans-serif;color:#315f8c;margin:20px 0 8px}.task-options__close{float:right;min-height:44px}.task-options section{clear:both;border-bottom:1px solid #e5dfd8;padding-bottom:12px}
.mobile-app-nav{display:none}
.app-menu-panel .sidebar-brand{grid-template-columns:1fr!important}.app-menu-panel .brand-title{font-family:Georgia,"Times New Roman",serif;font-size:1.35rem!important}.app-menu-panel .brand-sub{font-size:.72rem!important}.app-menu-panel .sidebar-nav{display:grid!important;gap:18px!important;padding:6px!important;overflow-y:auto!important}.app-menu-section h2{margin:0 0 7px;color:#315f8c!important;font:700 .68rem Arial,sans-serif!important;letter-spacing:.08em;text-transform:uppercase}.app-menu-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.app-menu-panel .app-menu-links .nav-link{min-height:42px;padding:8px!important;border:1px solid #e5dfd8!important;border-radius:7px!important;background:#fff!important;font-size:.76rem!important}.app-menu-panel .app-menu-links .nav-link i{color:#315f8c!important}.app-menu-panel .nav-group{display:contents}.app-menu-panel .nav-group-toggle,.app-menu-panel .nav-group-menu:empty{display:none!important}
.app-menu-panel .sidebar-close{display:grid!important;place-items:center;background:#eaf2f8!important;color:#1f466b!important;border:1px solid #c7d8e8!important}
@media (min-width:769px){
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical>.sidebar{left:auto!important;right:18px!important;top:70px!important;bottom:18px!important;width:min(360px,34vw)!important;height:auto!important;transform:translateX(calc(100% + 40px))!important;transition:transform .2s ease;border-radius:12px}
 html[data-ui-theme="clinical-shell"] body.sidebar-open:not(.login-page):not(.public-message-page) .app-shell--clinical>.sidebar{transform:translateX(0)!important}
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical>.sidebar{border:1px solid #ded8d2!important;background:#fffefa!important;box-shadow:0 18px 55px rgba(40,25,35,.2)!important;color:#1f3447!important}
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .sidebar :is(.sidebar-brand,.sidebar-user){background:#eaf2f8!important;color:#1f3447!important;border-color:#ded8d2!important}
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .sidebar :is(.brand-title,.brand-sub,.sidebar-user__label,.sidebar-user__name,.sidebar-profile-label,.sidebar-nav .nav-link,.sidebar-foot){color:#1f3447!important}
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .sidebar .nav-link:hover{background:#eaf2f8!important}
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical .header.topbar{min-height:68px;flex-basis:68px;padding:0 30px;gap:18px}
 .header.topbar>.menu-toggle{display:none!important}
 html[data-ui-theme="clinical-shell"] body.sidebar-open .sidebar-overlay{display:block;position:fixed;inset:0;z-index:95;background:rgba(16,24,32,.22)}
 html[data-ui-theme="clinical-shell"] body.sidebar-open:not(.login-page):not(.public-message-page){overflow:hidden}
}
@media (max-width:1050px) and (min-width:769px){.topbar-primary{gap:12px}.topbar-meta .topbar-date,.topbar-meta .topbar-username{display:none!important}}
@media (max-width:768px){
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page){padding-bottom:calc(70px + env(safe-area-inset-bottom))}
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical .header.topbar{
  height:var(--topbar-height);min-height:var(--topbar-height);max-height:var(--topbar-height);
  padding:env(safe-area-inset-top) 16px 0!important;
 }
 html[data-ui-theme="clinical-shell"] .header.topbar .topbar-inner{display:flex!important;width:100%;height:64px;min-width:0;align-items:center!important;justify-content:space-between!important;gap:12px;flex-wrap:nowrap!important}
 html[data-ui-theme="clinical-shell"] .header.topbar .topbar-title{display:flex!important;flex:1 1 auto!important;min-width:0;align-items:baseline!important;justify-content:flex-start!important}
 html[data-ui-theme="clinical-shell"] .header.topbar .topbar-title__eyebrow,
 html[data-ui-theme="clinical-shell"] .header.topbar .topbar-title__sub{display:none!important}
 html[data-ui-theme="clinical-shell"] .header.topbar .topbar-meta{display:flex!important;flex:0 0 auto!important;width:auto!important;height:auto!important;margin:0!important;align-items:center!important}
 html[data-ui-theme="clinical-shell"] .task-nav--account{position:static;display:block;align-self:auto}
 html[data-ui-theme="clinical-shell"] .task-nav--account>summary{display:grid;width:42px;height:42px;min-height:42px;padding:0!important;place-items:center;border:1px solid #c7d8e8!important;border-radius:50%;background:#eaf2f8!important;color:#1f466b!important}
 html[data-ui-theme="clinical-shell"] .task-nav--account>summary:after{display:none}
 html[data-ui-theme="clinical-shell"] .task-nav--account>summary i{font-size:1rem}
 html[data-ui-theme="clinical-shell"] .task-nav--account .account-summary__label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 html[data-ui-theme="clinical-shell"] .task-nav--account>.task-nav__content{position:fixed;top:calc(var(--topbar-height) + 8px);left:12px;right:12px;width:auto;max-height:calc(100dvh - var(--topbar-height) - 92px);box-sizing:border-box;overflow:auto}
 .topbar-primary{display:none}.mobile-app-nav{position:fixed;z-index:90;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);padding:7px 8px calc(6px + env(safe-area-inset-bottom));border-top:1px solid #d8d3cd;background:#fffefa;box-shadow:0 -3px 14px rgba(40,30,35,.08)}
 .mobile-app-nav :is(a,button){display:flex;min-width:0;min-height:48px;padding:3px;align-items:center;justify-content:center;flex-direction:column;gap:5px;border:0;background:transparent!important;color:#39343b!important;box-shadow:none;font-size:.65rem;text-decoration:none}
 .mobile-app-nav i{font-size:1rem}.mobile-app-nav .is-active{color:#315f8c!important}
 html[data-ui-theme="clinical-shell"] body:not(.login-page):not(.public-message-page) .app-shell--clinical>.sidebar{z-index:110}
 .app-menu-links{grid-template-columns:1fr}.app-menu-panel .sidebar-nav{padding-bottom:22px!important}
}

/* En el menú móvil, icono, texto y avisos mantienen columnas estables. */
@media (max-width:768px){
 .task-options{top:64px;padding:16px 16px 20px;box-sizing:border-box}
 .task-options section{margin:0 0 12px;padding:0 0 12px;border-bottom:1px solid #dce5ec}
 .task-options section h2{margin:0 0 4px;padding:0 10px;color:#496b81;font:700 .72rem Arial,sans-serif;letter-spacing:.02em}
 html[data-ui-theme="clinical-shell"] body .task-options a{grid-template-columns:20px minmax(0,1fr) auto!important;gap:10px!important;min-height:44px!important;padding:8px 10px!important;font:500 .84rem/1.25 Arial,sans-serif!important;text-align:left}
 .task-options a>i{width:20px;text-align:center;color:#315f8c!important}
 .task-options a>span:not(.nav-badge){min-width:0;text-align:left;overflow-wrap:break-word}
 .task-options a[aria-current="page"]{background:transparent!important;color:#17486d!important;font-weight:700!important}
 .task-options a[aria-current="page"]>span:not(.nav-badge){width:max-content;max-width:100%;padding-bottom:2px;border-bottom:2px solid #315f8c}
 .task-options .nav-badge{justify-self:end;margin-left:0!important}
 html[data-ui-theme="clinical-shell"] body .task-options__close{display:inline-flex;min-height:44px!important;padding:0 14px!important;align-items:center;justify-content:center;border:1px solid #c7d8e8!important;border-radius:8px;background:#eaf3f9!important;color:#17486d!important;font-weight:700}
}

/* Keep the desktop navigation clear of the brand in narrow windows. */
@media (min-width: 769px) and (max-width: 900px) {
  html[data-ui-theme="clinical-shell"] .header.topbar .topbar-inner {
    gap: 8px !important;
  }

  html[data-ui-theme="clinical-shell"] .header.topbar .topbar-title {
    flex: 0 0 auto !important;
    min-width: max-content !important;
  }

  html[data-ui-theme="clinical-shell"] .header.topbar .topbar-title__main span {
    display: none !important;
  }

  html[data-ui-theme="clinical-shell"] .header.topbar .topbar-primary {
    gap: 6px;
  }

  html[data-ui-theme="clinical-shell"] .header.topbar .task-nav > summary {
    gap: 4px;
    padding-inline: 2px;
    font-size: .78rem;
  }
}
