/*
  VISITAR SALUD 2.0 - TEMA INSTITUCIONAL GLOBAL (FASE 9)
  Solo presentacion; sin dependencias externas ni JavaScript.
  Version 2026-11-16. Colores institucionales: navy, blue, teal, mint, white.
*/
:root {
  --vs-institucional-navy:#172d49;
  --vs-institucional-navy-strong:#11233a;
  --vs-institucional-blue:#244c78;
  --vs-institucional-teal:#147b85;
  --vs-institucional-mint:#e8f5f4;
  --vs-institucional-bg:#f5f8fb;
  --vs-institucional-line:#dce6ed;
  --vs-institucional-text:#172d49;
  --vs-institucional-muted:#596d80;
  --o:#244c78;
  --o2:#147b85;
  --orange:#244c78;
  --amber:#244c78;
  --ca-orange:#244c78;
}
:where(body.aines-ui,body.aines-login,body:has(.app-shell),body:has(.course-list),body:has(.aam-page)) {
  color:var(--vs-institucional-text);
  -webkit-font-smoothing:antialiased;
}
:where(body.aines-ui,body:has(.app-shell),body:has(.course-list)) :where(input,select,textarea,button) {font-family:inherit}
:where(body.aines-ui,body:has(.app-shell),body:has(.course-list)) :where(input,select,textarea):focus-visible {
 outline:2px solid var(--vs-institucional-teal);outline-offset:2px;
}
:where(body.aines-ui,body:has(.app-shell),body:has(.course-list)) :where(a,button,summary,[role="button"]):focus-visible {
 outline:3px solid var(--vs-institucional-teal)!important;outline-offset:3px;
}
/* Aula Inteligente por modulos, incluido su encabezado que antes era naranja. */
body:has(.top-in):has(.course-list) .top{background:#fff!important;color:#172d49!important;border-bottom:1px solid var(--vs-institucional-line)!important}
body:has(.top-in):has(.course-list) .top h1{color:#172d49!important}
body:has(.top-in):has(.course-list) .logo{background:#244c78!important;color:#fff!important}
body:has(.top-in):has(.course-list) .hero{background:linear-gradient(125deg,#172d49,#244c78 65%,#147b85)!important;color:#fff!important}
body:has(.top-in):has(.course-list) .hero :where(h1,h2,p,small,span){color:#fff!important}
body:has(.top-in):has(.course-list) .btn:not(.light):not(.danger):not(.green):not(.publish-bulk){background:#244c78!important;color:#fff!important;border-color:#244c78!important;text-shadow:none!important}
body:has(.top-in):has(.course-list) .btn.light{background:#fff!important;color:#244c78!important;border:1px solid #bdcfdc!important}
body:has(.top-in):has(.course-list) .btn.green,body:has(.top-in):has(.course-list) .btn.publish-bulk{background:#157453!important;color:#fff!important}
body:has(.top-in):has(.course-list) .btn.danger{background:#b42335!important;color:#fff!important}
body:has(.top-in):has(.course-list) .card,body:has(.top-in):has(.course-list) .stat,body:has(.top-in):has(.course-list) .module{background:#fff!important;box-shadow:0 10px 28px rgba(18,45,72,.055)!important;border-color:#dce6ed!important}
body:has(.top-in):has(.course-list) .module.pinned-module{background:#f0f8fa!important;border:2px solid #147b85!important}
body:has(.top-in):has(.course-list) .module.pinned-module .num{background:#244c78!important;color:#fff!important}
body:has(.top-in):has(.course-list) .module.manual{border-left:4px solid #147b85!important}
body:has(.top-in):has(.course-list) .activity.manual{background:#f3f9fb!important;border-color:#d6e6eb!important}
body:has(.top-in):has(.course-list) .tag.orange{background:#e8f5f4!important;color:#185564!important}
body:has(.top-in):has(.course-list) .tag.pin-tag{background:#e8f5f4!important;color:#185564!important;border-color:#a3d6d5!important}
body:has(.top-in):has(.course-list) .course-link.active{background:#eaf4fb!important;border-color:#7abac5!important;color:#173f69!important}
body:has(.top-in):has(.course-list) :where(.stat span,.course-link small,.module-top p,.activity p){font-size:max(.78rem,12px)!important;line-height:1.5!important}
body:has(.top-in):has(.course-list) :where(.tag,.activity-select-row label){font-size:max(.7rem,11px)!important}
body:has(.top-in):has(.course-list) .course-link b{font-size:13px!important;color:#173f69!important}
/* Panel administrativo: conservar colores de acciones peligrosas y estados aprobados. */
body:has(.app-shell) .sidebar,body:has(.app-shell) .sidebar-brand{background:#172d49!important;color:#eef6fc!important}
body:has(.app-shell) .sidebar :where(a,button){color:#e6f1fb}
body:has(.app-shell) .sidebar :where(a,button):hover,body:has(.app-shell) .sidebar .active{background:#244c78!important;color:#fff!important}
body:has(.app-shell) :where(.card,.metric-card,.stat-card,.panel-card,.dashboard-card){border-color:#dce6ed;box-shadow:0 8px 30px rgba(18,45,72,.07)}
/* Alerts remain semantically distinct: danger red, success green; warnings pale teal. */
:where(.alert-warning,.badge-warning,.bg-warning,.tag.orange,.badge.orange){background:#e8f5f4!important;color:#20566c!important;border-color:#cce6e5!important}
:where(.btn-warning,button.warning,a.warning){background:#244c78!important;color:#fff!important;border-color:#244c78!important}
/* Responsiveness for action bars previously cramped on mobile. */
@media(max-width:760px){
 body:has(.top-in):has(.course-list) .top-in{flex-wrap:wrap;gap:10px}
 body:has(.top-in):has(.course-list) .top-actions{margin-left:0;overflow-x:auto;width:100%;padding-bottom:6px;flex-wrap:nowrap}
 body:has(.top-in):has(.course-list) .top-actions .btn{white-space:nowrap;min-height:38px}
 body:has(.top-in):has(.course-list) .hero h2{font-size:clamp(21px,5vw,30px)}
}
