*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--color-background); color: var(--color-text); font: 16px/1.5 "Segoe UI", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.18; }
h1, h2 { letter-spacing: -.025em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.7rem); }
h2 { font-size: clamp(1.22rem, 2vw, 1.55rem); }
[hidden], .oculto { display: none !important; }
:focus-visible { outline: 3px solid #2A2F6B; outline-offset: 3px; }
:target, :focus { scroll-margin-top: 90px; }
.saltar-contenido { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 16px; background: #fff; color: var(--color-text); border: 2px solid var(--color-primary); border-radius: 8px; transform: translateY(-150%); }
.saltar-contenido:focus { transform: translateY(0); }
.contenedor { max-width: 1240px; margin: auto; padding: clamp(22px, 3vw, 44px); }
.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: var(--color-primary-dark); color: #f4f6ff; padding: 28px 15px; }
.marca { display: flex; align-items: center; gap: 12px; margin: 0 6px 28px; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.15); font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; }
.marca::before { content: "L"; flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #e9edfa; color: #252e5a; font-size: 1.25rem; font-weight: 800; }
.navegacion { display: grid; gap: 3px; }
.navegacion a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 13px; border-radius: 9px; color: #e2e7fa; text-decoration: none; font-size: .92rem; font-weight: 600; transition: background .16s ease, color .16s ease; }
.navegacion a:hover { background: rgba(255, 255, 255, .10); }
.navegacion a.activo { color: #fff; background: #394574; font-weight: 700; }
.navegacion a:focus-visible { outline-color: #a9baf7; }
.navegacion svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contenido-app { min-width: 0; }
.cabecera { min-height: 68px; background: var(--color-card); display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px clamp(22px, 3vw, 44px); border-bottom: 1px solid var(--color-border); }
.marca-movil { display: none; }
.usuario-actual { display: grid; text-align: right; line-height: 1.25; }
.usuario-actual strong { font-size: .9rem; }
.usuario-actual span { color: var(--color-muted); font-size: .75rem; letter-spacing: .05em; }
#menu-toggle,.navegacion-inferior,.menu-mas { display: none; }
#mensajes:not(:empty) { margin-bottom: 20px; }
.mensaje { padding: 12px 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; }
.mensaje-info { color: #344277; background: #eef2ff; border-color: #cbd6fa; }
.mensaje-success { color: #17513a; background: #e9f6ef; border-color: #b6dec8; }
.mensaje-error { color: #802333; background: #fff0f2; border-color: #efc4ca; }
.mensaje-warning { color: #684318; background: #fff6e7; border-color: #efd4a7; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
