/* Movimiento breve en superficies, sin animar dimensiones ni cada renglón.
   Nunca se retrasa una respuesta ni se oculta un control para simular fluidez. */
@media(prefers-reduced-motion:no-preference){
 html{scroll-behavior:smooth}
 #page>.pagehead,#page>.panel,#dashboard,.m-page340{animation:workspace-enter .22s ease-out both}
 dialog[open]{animation:dialog-enter .18s ease-out both}
 .app-sidebar,button,input,select,textarea{transition:background-color .16s,color .16s,border-color .16s,box-shadow .16s,transform .16s}
 @keyframes workspace-enter{from{opacity:.65;transform:translateY(5px)}to{opacity:1;transform:none}}
 @keyframes dialog-enter{from{opacity:.6;transform:translateY(5px)}to{opacity:1;transform:none}}
}
.grid-tools{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:16px 0}
.grid-tools label{display:grid;gap:7px;flex:1;min-width:180px;max-width:480px}
.grid-tools input{width:100%;min-width:0}
.grid-tools button{flex-shrink:0}
.grid-count{font-size:12px;color:var(--ui-muted);margin:10px 3px 20px}
.grid-sort{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;white-space:normal}
#dashboard-reset{min-height:40px}
/* Escudo y formulario forman un único bloque a la izquierda. El fondo conserva
   el estilo institucional; no se usan textos publicitarios ni imágenes remotas. */
html:has(body.is-access){scrollbar-gutter:auto}
body.is-access{overflow-x:hidden;min-height:100dvh}
body.is-access #access{display:flex!important;flex-direction:column;align-items:flex-start;justify-content:center;gap:24px;width:100%;max-width:none;margin:0!important;border:0;border-radius:0!important;box-shadow:none;padding:50px clamp(24px,7vw,120px)!important;overflow:hidden;min-height:100dvh;box-sizing:border-box}
body.is-access #access .intro{display:grid;grid-template-columns:62px minmax(0,1fr);grid-template-rows:auto auto;column-gap:18px;align-items:center;max-width:440px;width:100%;height:auto;min-height:0;background:transparent;flex-shrink:0;margin:0!important;text-align:left!important;overflow:visible}
body.is-access #access .intro:before,body.is-access #access .intro:after{display:none}
body.is-access #access .access-emblem31{grid-column:1;grid-row:1/3;width:62px;height:76px;margin:0}
body.is-access #access .intro h1{grid-column:2;grid-row:1;font-size:32px;margin:0!important;line-height:1.25;align-self:end}
body.is-access #access .intro .access-subtitle31{grid-column:2;grid-row:2;align-self:start;font-size:16px;margin:4px 0 0!important;line-height:1.4;color:#d2e3f6!important}
body.is-access #access>.panel{width:min(100%,440px);max-width:440px;margin:0!important;padding:30px!important;box-sizing:border-box;flex-shrink:0}
body.is-access #access .access-foot31{justify-content:flex-end}
body.is-access #access .access-foot31>span:first-child{display:none}
body.is-access #access-error:empty{display:none}
:root:not([data-theme=dark]) #access :is(label,.login-hint31){color:#526278!important}
@media(max-width:600px){
 body.is-access #access{padding:72px 20px 28px!important;gap:20px}
 body.is-access #access>.panel{padding:24px!important}
 body.is-access #access .intro{grid-template-columns:48px minmax(0,1fr);column-gap:14px}
 body.is-access #access .access-emblem31{width:48px;height:59px}
 body.is-access #access .intro h1{font-size:27px}
 body.is-access #access .intro .access-subtitle31{font-size:14px}
 .grid-tools{align-items:stretch}.grid-tools label{max-width:none}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}#page>*,dialog[open],.app-sidebar,button,input,select,textarea{animation:none!important;transition:none!important}}
/* UI3: columnas estables aunque la búsqueda cambie los textos visibles.
   En pantallas estrechas se conserva la grilla y se desplaza horizontalmente. */
#people-table-ui2 table,#vehicles-table-ui2 table{table-layout:fixed;width:100%;box-sizing:border-box}
#people-table-ui2 table{min-width:1280px}#vehicles-table-ui2 table{min-width:1100px}
#people-table-ui2 th:nth-child(1){width:80px}#people-table-ui2 th:nth-child(2){width:240px}#people-table-ui2 th:nth-child(3){width:180px}#people-table-ui2 th:nth-child(4){width:240px}#people-table-ui2 th:nth-child(5){width:180px}#people-table-ui2 th:nth-child(6){width:100px}#people-table-ui2 th:nth-child(7){width:260px}
#vehicles-table-ui2 th:nth-child(1){width:120px}#vehicles-table-ui2 th:nth-child(2){width:260px}#vehicles-table-ui2 th:nth-child(3){width:180px}#vehicles-table-ui2 th:nth-child(4){width:180px}#vehicles-table-ui2 th:nth-child(5){width:100px}#vehicles-table-ui2 th:nth-child(6){width:260px}
#people-table-ui2 td,#vehicles-table-ui2 td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}#people-table-ui2 td .actions,#vehicles-table-ui2 td .actions{min-width:0;flex-wrap:wrap}
/* Acceso centrado: un único bloque, controles agrupados y etiquetas accesibles. */
body.is-access #access{align-items:center!important;justify-content:center!important;gap:24px!important;padding:76px 20px 30px!important;min-height:100dvh!important;overflow:hidden!important}
body.is-access #access .intro{display:flex!important;flex-direction:column!important;gap:16px!important;text-align:center!important;max-width:440px!important;min-height:0!important;padding:0!important}
body.is-access #access .access-emblem31{width:84px!important;height:102px!important;margin:0!important;filter:drop-shadow(0 8px 22px #00152c40)}
body.is-access #access .intro h1{font-size:clamp(26px,4vw,34px)!important;font-weight:350!important;letter-spacing:-.035em!important;line-height:1.25!important;color:#f3f7ff!important;margin:0!important}
body.is-access #access>.panel{width:min(100%,360px)!important;max-width:360px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;backdrop-filter:none!important}
body.is-access #login-form{margin:0!important;padding:0!important}body.is-access #login-form>label{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.is-access #login-form .login-input31{margin:0!important;min-height:50px!important;border-radius:0!important;border:1px solid #b7c8de!important;background:#f6f9fff5!important;box-shadow:none!important}
body.is-access #login-form .login-input31:has(#login-user31){border-radius:12px 12px 0 0!important;border-bottom:0!important}
body.is-access #login-form .login-input31:has(#login-password31){border-radius:0 0 12px 12px!important}
body.is-access #login-form .login-input31:focus-within{outline:3px solid #90bcff!important;outline-offset:3px;z-index:1}
body.is-access #login-form .login-input31 input{min-height:50px!important;color:#243146!important;font-size:14px!important}
body.is-access #login-form .login-input31 input::placeholder{color:#526278!important;opacity:1}
body.is-access #login-form .login-input31 svg{color:#526278!important}body.is-access #login-form .password-toggle31{color:#526278!important;min-width:44px!important;min-height:44px!important}
body.is-access #login-submit31{margin-top:18px!important;width:100%;min-height:46px!important;border:1px solid #8bb7ff!important;background:#285fbd!important;box-shadow:0 6px 18px #001a3d30!important}
body.is-access #access #forgot-password-r6{display:block;width:100%;margin-top:16px!important;color:#e1ecff!important;font-size:13px!important;text-decoration:none}
body.is-access #access #forgot-password-r6:hover{text-decoration:underline}
body.is-access #access .access-foot31{justify-content:center!important;border:0!important;margin-top:20px!important;padding:0!important;color:#d2e3f6!important}
body.is-access #access-error:not(:empty){background:#fff0ed!important;color:#84251c!important;border-radius:10px;padding:12px;line-height:1.6}
body.is-access #access>.panel:has(#setup-form:not([hidden])){padding:24px!important;background:var(--ui-panel)!important;color:var(--ui-ink)!important;border-radius:16px!important;max-width:440px!important;width:min(100%,440px)!important}
:root[data-theme=dark] body.is-access #login-form .login-input31{background:#1c2c43f5!important;border-color:#7f97b7!important}
:root[data-theme=dark] body.is-access #login-form .login-input31 input{color:#eef4ff!important}
:root[data-theme=dark] body.is-access #login-form .login-input31 input::placeholder,:root[data-theme=dark] body.is-access #login-form .login-input31 svg{color:#bdcce1!important}
/* Métricas: el icono y el acento refuerzan la etiqueta, sin sustituirla. */
.dashboard .dash-card,.dashboard .dash-item-card{--metric-accent:#1761c4;--metric-tint:#eaf2ff;border-top:3px solid var(--metric-accent)!important;background:linear-gradient(135deg,var(--ui-panel) 45%,var(--metric-tint))!important}
.dashboard .dash-card.orange,.dashboard .dash-item-card.tone-2{--metric-accent:#aa450d;--metric-tint:#fff0e4}
.dashboard .dash-card.blue,.dashboard .dash-item-card.tone-3{--metric-accent:#1761c4;--metric-tint:#eaf2ff}
.dashboard .dash-card.purple,.dashboard .dash-item-card.tone-1{--metric-accent:#6942b8;--metric-tint:#f1ebfc}
.dashboard .dash-card.teal,.dashboard .dash-item-card.tone-0{--metric-accent:#08756c;--metric-tint:#e3f4ef}
.dashboard .dash-card.rose,.dashboard .dash-item-card.tone-4{--metric-accent:#b02c64;--metric-tint:#fcebf2}
.dashboard .dash-card.amber,.dashboard .dash-item-card.tone-5{--metric-accent:#876000;--metric-tint:#fff5d9}
.dashboard .dash-card .dash-card-icon,.dashboard .dash-item-card .item-icon{display:grid;place-items:center;box-sizing:border-box;width:44px;height:44px;padding:9px;color:var(--metric-accent)!important;background:var(--metric-tint)!important;border:1px solid color-mix(in srgb,var(--metric-accent) 20%,transparent);border-radius:13px;transition:transform .25s ease}
.dashboard .dash-card .dash-card-icon svg,.dashboard .dash-item-card .item-icon svg{width:26px;height:26px;color:var(--metric-accent)!important}
.dashboard .dash-card .dash-card-label{padding-right:52px;line-height:1.6;min-height:42px}.dashboard .dash-card .dash-card-icon{top:20px;right:18px;bottom:auto}
.dashboard .dash-card:after{background:var(--metric-tint);opacity:.5}.dashboard .dash-item-card{padding:18px!important;gap:12px;min-height:155px}.dashboard .dash-item-card strong{padding-top:4px}
@media(hover:hover){.dashboard :is(.dash-card,.dash-item-card):hover :is(.dash-card-icon,.item-icon){transform:translateY(-2px) rotate(-5deg) scale(1.06)}}
.dashboard :is(.dash-card,.dash-item-card):focus-visible{outline:3px solid var(--ui-blue);outline-offset:3px}
:root[data-theme=dark] .dashboard :is(.dash-card,.dash-item-card){--metric-accent:#8dbbff;--metric-tint:#283c58}
:root[data-theme=dark] .dashboard .dash-card.orange,:root[data-theme=dark] .dashboard .dash-item-card.tone-2{--metric-accent:#ffc08b;--metric-tint:#453426}
:root[data-theme=dark] .dashboard .dash-card.purple,:root[data-theme=dark] .dashboard .dash-item-card.tone-1{--metric-accent:#d2b6ff;--metric-tint:#3b2f52}
:root[data-theme=dark] .dashboard .dash-card.teal,:root[data-theme=dark] .dashboard .dash-item-card.tone-0{--metric-accent:#8bdecf;--metric-tint:#243e3d}
:root[data-theme=dark] .dashboard .dash-card.rose,:root[data-theme=dark] .dashboard .dash-item-card.tone-4{--metric-accent:#ffaaca;--metric-tint:#492e40}
:root[data-theme=dark] .dashboard .dash-card.amber,:root[data-theme=dark] .dashboard .dash-item-card.tone-5{--metric-accent:#f5d67e;--metric-tint:#423c28}
@media(min-width:1280px){.dashboard .dash-cards{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:480px){body.is-access #access{padding:68px 20px 24px!important;gap:20px!important}body.is-access #access .access-emblem31{width:66px!important;height:80px!important}.dashboard .dash-cards{grid-template-columns:1fr}.dashboard .dash-card{min-height:170px}}
@media(prefers-reduced-motion:reduce){.dashboard :is(.dash-card,.dash-item-card) :is(.dash-card-icon,.item-icon){transition:none!important;transform:none!important}}

body.is-access #access .intro h1{align-self:center!important;text-align:center!important;width:100%}body.is-access #access .intro{align-items:center!important}body.is-access #access{background-color:#102c50!important}
