/* Admisiones components: behavior, responsive layout and visual refinements. */
[hidden] { display: none !important; }
body { font-size: 1rem; }
button, input, select, textarea { font-family: var(--tiwaz-fuente-texto); }
button, .tiwaz-btn, .tiwaz-sidebar-item, .tiwaz-usuario-menu-item,
.tiwaz-login-form button { font-size: var(--ui-action-text); font-weight: 560; }
.tiwaz-btn { white-space: normal; text-align: center; }
.tiwaz-btn-icono { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; }
.tiwaz-accion-texto { width: auto; min-width: 44px; flex-basis: auto; padding-inline: 8px; gap: 6px; font: 560 .8rem/1.25 var(--tiwaz-fuente-texto); }
.tiwaz-salto { min-height: 44px; display: inline-flex; align-items: center; font: 560 .8rem/1.25 var(--tiwaz-fuente-texto); }
.tiwaz-sidebar { padding-inline: 9px; }
.tiwaz-sidebar-item { min-width: 44px; }
button:disabled { cursor: wait; opacity: .65; }
button:active:not(:disabled), .tiwaz-btn:active { transform: translateY(1px); }
.tiwaz-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; padding: 12px 24px; }
.tiwaz-identidad { display: flex; align-items: center; gap: 16px; min-width: 0; }
body[data-theme="dark"] { color-scheme: dark; }
.tiwaz-firma { display: block; flex: 0 0 140px; }
.tiwaz-firma img { display: block; width: 140px; height: auto; }
/* Controlled contrast for the canonical gray static signature on dark surfaces. */
body[data-theme="dark"] .tiwaz-firma img[src*="DdA_6F6F73.svg"] { filter: brightness(2); }
.tiwaz-brand { gap: 8px; min-height: 44px; flex: 0 0 auto; }
.tiwaz-brand strong { text-transform: none; letter-spacing: -.03em; font-size: 1.15rem; }
.tiwaz-brand small { font-size: .68rem; }
.tiwaz-brand .rune-emblem { --rune-size: 44px; --orbit-period: 24s; flex-shrink: 0; }
.tiwaz-usuario { justify-self: end; min-width: 0; gap: 4px; }
.tiwaz-usuario-datos { max-width: 180px; overflow-wrap: anywhere; }
.tiwaz-usuario-menu { min-width: 230px; max-width: calc(100vw - 24px); }
.tiwaz-usuario-menu-item { width: 100%; border: 0; background: transparent; color: var(--tiwaz-texto); text-align: left; cursor: pointer; }
.tiwaz-usuario-menu-item--peligro { color: var(--tiwaz-peligro-texto); border-top: 1px solid var(--tiwaz-panel-borde); }
.tiwaz-topbar-centro { min-width: 0; }
.tiwaz-main { min-width: 0; }
.tiwaz-flash { background: var(--tiwaz-panel); font-size: .9rem; overflow-wrap: anywhere; }
.tiwaz-flash-error { border-left: 3px solid var(--tiwaz-error); }
.tiwaz-flash-ok { border-left: 3px solid var(--tiwaz-ok); }
.tiwaz-login-error { background: var(--tiwaz-panel); border-left: 3px solid var(--tiwaz-error); font-size: .9rem; }
.tiwaz-flash a { text-decoration: underline; }
.tiwaz-editor { max-width: 980px; margin: 0 auto 24px; }
.tiwaz-editor .tiwaz-modal-cuerpo { padding: clamp(16px, 3vw, 32px); }
.tiwaz-editor .tiwaz-flash { display: block; }
.tiwaz-editor .tiwaz-flash label { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding-block: 10px; }
.tiwaz-editor .tiwaz-flash input { flex: none; margin-top: 4px; }
.tiwaz-campo > span, .tiwaz-campo-grupo legend { font-size: .875rem; }
.tiwaz-campo input, .tiwaz-campo select, .tiwaz-campo textarea { min-height: 44px; font-size: 1rem; }
.tiwaz-campo input[type="color"] { width: 56px; height: 44px; }
.tiwaz-campo input[readonly] { opacity: 1; }
.tiwaz-checklist-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
.tiwaz-checklist-item input[type="checkbox"] { width: 24px; height: 24px; min-height: 24px; margin: 10px; accent-color: var(--tiwaz-acento); }
.tiwaz-checklist-item input[type="text"] { min-width: 0; width: 100%; min-height: 44px; font-size: 1rem; }
.tiwaz-opcion { min-height: 44px; overflow-wrap: anywhere; }
.tiwaz-opciones { min-width: 0; }
.tiwaz-opcion input[type="checkbox"] { flex: 0 0 18px; }
.tiwaz-rol-card { min-width: 0; overflow-wrap: anywhere; }
.tiwaz-rol-card h3 { font-size: 1.15rem; }
.tiwaz-rol-card header { align-items: flex-start; flex-wrap: wrap; }
.tiwaz-rol-card .tiwaz-opcion { font-size: .875rem; }
.tiwaz-historial-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; font-weight: 560; }
.tiwaz-campo { min-width: 0; }
.tiwaz-campo textarea { resize: vertical; }
.tiwaz-error-campo { display: block; color: var(--tiwaz-error); font-size: .875rem; padding-top: 6px; }
[aria-invalid="true"] { border-color: var(--tiwaz-error) !important; }
.tiwaz-modal-fondo { justify-content: flex-end; padding: 16px; overflow: hidden; }
.tiwaz-modal-detalle { display: flex; flex-direction: column; max-width: 720px; height: calc(100dvh - 32px); }
.tiwaz-modal-detalle .tiwaz-modal-cuerpo { overflow-y: auto; min-height: 0; }
.tiwaz-modal-head { flex-shrink: 0; }
.tiwaz-editor .tiwaz-modal-head { background: var(--tiwaz-panel); }
.tiwaz-editor .tiwaz-modal-head h2 { color: var(--tiwaz-texto); }
.tiwaz-comentario-campo { display: grid; gap: 8px; flex: 1; min-width: 0; font-size: .875rem; }
.tiwaz-comentario-campo textarea { width: 100%; font-size: 1rem; }
.tiwaz-checklist-completar { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.no-js .tiwaz-checklist-completar, .no-js [data-tiwaz-checklist-quitar], .no-js #tiwazChecklistAgregar { display: none; }
.no-js .tiwaz-checklist-item { display: block; }
.tiwaz-modal-head h2 { min-width: 0; overflow-wrap: anywhere; }
.tiwaz-modal-pie { flex-wrap: wrap; }
.tiwaz-modal-detalle .tiwaz-modal-pie { flex-shrink: 0; }
.tiwaz-dialog { color: var(--tiwaz-texto); background: var(--tiwaz-panel); width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--tiwaz-panel-borde); border-radius: 20px; box-shadow: var(--tiwaz-sombra-modal); }
.tiwaz-dialog::backdrop { background: var(--tiwaz-overlay); }
.tiwaz-perfil { margin: 0; display: grid; gap: 8px; }
.tiwaz-perfil dt { color: var(--tiwaz-texto-suave); font-size: .85rem; }
.tiwaz-perfil dd { margin: 0 0 12px; overflow-wrap: anywhere; }
.tiwaz-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 44px; border: none; color: var(--tiwaz-texto); background: transparent; text-align: left; cursor: pointer; }
.tiwaz-switch-pista { width: 40px; height: 24px; border-radius: 14px; background: var(--tiwaz-texto-suave); padding: 4px; flex: none; }
.tiwaz-switch-pista::before { content: ''; display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--tiwaz-panel); transition: transform 160ms; }
.tiwaz-switch[aria-checked="true"] .tiwaz-switch-pista { background: var(--tiwaz-acento); }
.tiwaz-switch[aria-checked="true"] .tiwaz-switch-pista::before { transform: translateX(16px); background: var(--ink-900); }
.tiwaz-tooltip { position: fixed; z-index: 250; max-width: 230px; padding: 8px 12px; border-radius: 8px; color: var(--tiwaz-texto); background: var(--tiwaz-panel); border: 1px solid var(--tiwaz-panel-borde); box-shadow: var(--tiwaz-sombra-modal); font: 400 .8rem var(--tiwaz-fuente-texto); pointer-events: auto; }
.tiwaz-filtros-envoltura--flotante { padding: 16px; }
.tiwaz-filtros-envoltura--flotante .tiwaz-filtros-panel { max-height: calc(100dvh - 32px); overflow-y: auto; }
.tiwaz-filtros-panel-head { position: sticky; top: 0; z-index: 1; }
.tiwaz-tabla-scroll { max-width: 100%; }
.tiwaz-tabla th { font-size: .8rem; position: relative; }
.tiwaz-tabla td { font-size: .8rem; }
.tiwaz-titulo-link { display: inline-flex; align-items: center; min-height: 44px; max-width: 38ch; overflow-wrap: anywhere; }
.tiwaz-tablero { max-width: 100%; overscroll-behavior-x: contain; }
.tiwaz-tarjeta-titulo { min-height: 44px; display: flex; align-items: center; overflow-wrap: anywhere; }
.tiwaz-tarjeta-estado { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.tiwaz-tarjeta-estado label { font-size: .8rem; width: 100%; }
.tiwaz-tarjeta-estado select { min-height: 44px; min-width: 0; max-width: 100%; flex: 1; background: var(--tiwaz-fondo-suave); color: var(--tiwaz-texto); border: 1px solid var(--tiwaz-panel-borde); border-radius: 12px; padding: 8px; }
.tiwaz-login-body { display: flex; flex-direction: column; min-height: 100dvh; padding: 0; }
.tiwaz-login-page { flex: 1; width: min(1200px, calc(100% - 48px)); margin: 32px auto; min-height: 0; gap: clamp(24px, 4vw, 56px); align-items: center; }
.tiwaz-login-story { min-width: 0; padding: clamp(24px, 4vw, 48px); gap: 28px; border: 1px solid var(--tiwaz-panel-borde); border-radius: 20px; background: linear-gradient(145deg, var(--tiwaz-fondo-suave), var(--tiwaz-panel)); }
.tiwaz-login-story::before, .tiwaz-login-story::after { content: none; }
.tiwaz-login-card { min-width: 0; padding: clamp(24px, 3vw, 32px) 0; }
.tiwaz-login-form button { min-height: 48px; white-space: normal; }
.tiwaz-login-copy h1 { max-width: 17ch; }
.tiwaz-login-copy > p:not(.tiwaz-login-eyebrow), .tiwaz-login-head p:not(.tiwaz-login-kicker) { font-size: 1rem; line-height: 1.6; }
.tiwaz-login-copy .tiwaz-login-eyebrow { color: var(--tiwaz-acento-texto); font-size: .75rem; line-height: 1.6; }
.tiwaz-login-pillars { display: grid; gap: 16px; margin: 0; padding-top: 24px; border-top: 1px solid var(--tiwaz-panel-borde); }
.tiwaz-login-pillars > div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 16px; }
.tiwaz-login-pillars dt { font-size: .875rem; font-weight: 560; }
.tiwaz-login-pillars dd { margin: 0; font-size: .875rem; color: var(--tiwaz-texto-suave); }
.tiwaz-login-head { min-width: 0; }
.tiwaz-login-head h2 { font-size: 1.35rem; }
.tiwaz-login-note { align-items: flex-start; font-size: .875rem; line-height: 1.6; }
.ua-footer-full { margin-top: 0; padding: 24px 0 18px; }
.ua-footer-full { box-shadow: none; border-top: 1px solid var(--tiwaz-panel-borde); }
.ua-footer-inner { gap: 16px 40px; }
.ua-footer-brand { grid-template-columns: 140px minmax(0, 1fr); }
.ua-footer-logo { width: 140px; height: 56px; box-shadow: none; border: 0; border-radius: 4px; }
.ua-footer-logo img { width: 116px; height: auto; }
.ua-footer-institution h2, .ua-footer-column h2 { font-family: var(--tiwaz-fuente-titulos); font-size: .95rem; }
.ua-footer-legal { grid-column: 1 / -1; max-width: 110ch; margin-top: 0 !important; font-size: .75rem !important; line-height: 1.6; }
.ua-footer-bottom { font-size: .75rem; margin-top: 16px; padding-top: 12px; }
.ua-footer-links { display: flex; flex-wrap: wrap; column-gap: 24px; }
.ua-footer-links a { min-height: 44px; }
.ua-footer-links li a { border-bottom: 0; }
.tiwaz-problem { width: min(640px, calc(100% - 32px)); margin: 64px auto; padding: 32px; }
body[data-motion="paused"] *, body[data-motion="paused"] *::before, body[data-motion="paused"] *::after { transition-duration: 0s !important; }
body[data-motion="paused"] .tiwaz-modal, body[data-motion="paused"] .tiwaz-filtros-panel { animation: none !important; }
body[data-motion="paused"] .tiwaz-login-story::before, body[data-motion="paused"] .tiwaz-login-story::after { animation-play-state: paused; }
.no-js [data-tiwaz-dialog], .no-js #tiwazThemeToggle, .no-js #tiwazMovimientoToggle { display: none; }
.no-js .tiwaz-usuario-menu { position: static; }
.no-js #tiwazSesionBoton, .no-js .tiwaz-sidebar-cabecera, .no-js .tiwaz-sidebar-rama-boton { display: none; }
.no-js #tiwazFiltrosCerrar, .no-js #tiwazFiltrosBoton { display: none; }
.no-js .tiwaz-sidebar-submenu[hidden] { display: block !important; }
.no-js body[data-sidebar="contraida"] .tiwaz-sidebar-item span { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
@media (min-width: 1001px) {
    .no-js body[data-sidebar="contraida"] .tiwaz-sidebar { width: 220px; }
    .no-js body[data-sidebar="contraida"] .tiwaz-sidebar-item span { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
}
@media (max-width: 1000px) {
    .tiwaz-login-story { display: block; }
    .tiwaz-login-page { max-width: 700px; }
    .tiwaz-login-pillars { display: none; }
    .tiwaz-login-copy h1 { max-width: 24ch; }
    .tiwaz-topbar { grid-template-columns: 1fr auto; }
    .tiwaz-topbar-centro { display: none; }
    .tiwaz-brand small { display: none; }
    .tiwaz-usuario-datos { display: none; }
}
@media (max-width: 640px) {
    .tiwaz-topbar { grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; position: static; }
    .tiwaz-identidad { justify-content: space-between; gap: 12px; }
    .tiwaz-usuario { justify-self: stretch; justify-content: flex-end; }
    .tiwaz-sidebar-abrir { margin-right: auto; }
    .tiwaz-usuario-menu { right: -88px; }
    .tiwaz-login-page { width: calc(100% - 24px); margin: 20px auto; gap: 16px; }
    .tiwaz-login-story, .tiwaz-login-card { padding: 24px 20px; }
    .tiwaz-login-copy h1 { font-size: 1.8rem; }
    .tiwaz-login-head { gap: 12px; }
    .tiwaz-login-lock { display: none; }
    .tiwaz-stats { flex-wrap: wrap; }
    .tiwaz-toolbar { align-items: stretch; }
    .tiwaz-campos-fila { flex-direction: column; }
    .tiwaz-campos-fila .tiwaz-campo { min-width: 0; width: 100%; }
    .tiwaz-checklist-item input[type="text"] { grid-column: 1 / -1; grid-row: 1; }
    .tiwaz-checklist-completar { grid-column: 1; grid-row: 2; }
    .tiwaz-checklist-item [data-tiwaz-checklist-quitar] { grid-column: 3; grid-row: 2; }
    .tiwaz-modal-fondo { padding: 0; }
    .tiwaz-modal-detalle { height: 100dvh; max-width: none; border-radius: 18px 0 0 18px; }
    .tiwaz-modal-head { padding: 16px; }
    .tiwaz-modal-cuerpo { padding: 16px; }
    .tiwaz-filtros-envoltura--flotante { padding: 8px; }
    .tiwaz-filtros-envoltura--flotante .tiwaz-filtros-panel { max-height: calc(100dvh - 16px); }
    .tiwaz-filtro-chip { white-space: normal; overflow-wrap: anywhere; }
    .ua-footer-inner { padding: 0 16px; }
    .ua-footer-brand { grid-template-columns: 128px minmax(0, 1fr); gap: 12px; }
    .ua-footer-logo { width: 128px; }
    .ua-footer-links { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-theme="dark"] .tiwaz-firma img { filter: brightness(2); }
    .rune-emblem .orbit-rotor { animation: none; }
    *, *::before, *::after { scroll-behavior: auto !important; }
}
@media print {
    .tiwaz-editor .tiwaz-modal-head a, .tiwaz-editor button, .tiwaz-modal-pie, .tiwaz-usuario-menu { display: none !important; }
    .tiwaz-editor, .tiwaz-login-page { width: 100%; max-width: none; margin: 0; }
    .tiwaz-login-body { background: white; color: #0f0f0f; }
    .tiwaz-login-card { display: none; }
}

/* Catalog colors remain accents; text contrast does not depend on editable colors. */
.tiwaz-badge, .tiwaz-chip, .tiwaz-form-estado select,
body[data-theme="light"] .tiwaz-badge, body[data-theme="light"] .tiwaz-chip, body[data-theme="light"] .tiwaz-form-estado select { color: var(--tiwaz-texto); }
.tiwaz-chip { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.tiwaz-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
