/* Webmail APEX · estructura y componentes comunes a las tres propuestas.
   Los colores, tipografías y radios vienen de variables que define el tema
   de cada propuesta (tema.css). Puntos de quiebre: menos de 1100 px el menú
   lateral pasa a cajón; menos de 760 px, una columna con pestañas abajo. */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--tinta); font: 400 14.5px/1.5 var(--fuente); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
kbd { display: inline-block; min-width: 1.5em; padding: .05rem .35rem; border: 1px solid var(--linea); border-bottom-width: 2px; border-radius: 5px; background: var(--sup); font: 500 11px/1.4 var(--fuente-mono); text-align: center; color: var(--suave); }
code { font-family: var(--fuente-mono); }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
[hidden] { display: none !important; }
.suave { color: var(--suave); }
.flex1 { flex: 1; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.i { width: 18px; height: 18px; flex: none; }
.i.mini { width: 14px; height: 14px; }
.i.grande { width: 34px; height: 34px; }

/* ---------------------------------------------------------------- botones */
.b-prim, .b-sec, .b-texto, .b-peligro { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 38px; padding: .45rem .95rem; border: 1px solid transparent; border-radius: var(--radio-chico); font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.b-prim { background: var(--acento); color: var(--acento-tinta); }
.b-prim:hover { background: var(--acento-hover, var(--acento)); }
.b-prim:active, .b-sec:active { transform: translateY(1px); }
.b-sec { background: var(--sup); border-color: var(--linea); }
.b-sec:hover { background: var(--sup2); }
.b-sec.on { background: var(--acento-suave); border-color: var(--acento); color: var(--acento-fuerte, var(--acento)); }
.b-sec.chico { min-height: 30px; padding: .25rem .7rem; font-size: 12.5px; }
.b-texto { background: none; color: var(--acento-fuerte, var(--acento)); padding-inline: .5rem; }
.b-texto.peligro, .peligro { color: var(--peligro); }
.b-peligro { background: var(--peligro); color: #fff; }
.b-peligro:disabled { opacity: .45; cursor: not-allowed; }
.b-ico { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: var(--radio-chico); background: none; color: var(--suave); cursor: pointer; }
.b-ico:hover { background: var(--sup2); color: var(--tinta); }
.b-ico.estrella.on { color: var(--estrella, #E3A008); }
.b-ico.estrella.on .i { fill: currentColor; }
.ancho { width: 100%; }

.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .08rem .5rem; border-radius: 99px; background: var(--sup2); color: var(--suave); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--ok-suave); color: var(--ok); }
.chip.alerta { background: var(--peligro-suave); color: var(--peligro); }
.chip.apagado { opacity: .7; }
.tono-a { --t-bg: var(--ta-bg); --t-fg: var(--ta-fg); }
.tono-b { --t-bg: var(--tb-bg); --t-fg: var(--tb-fg); }
.tono-c { --t-bg: var(--tc-bg); --t-fg: var(--tc-fg); }
.tono-d { --t-bg: var(--td-bg); --t-fg: var(--td-fg); }
.chip[class*="tono-"] { background: var(--t-bg); color: var(--t-fg); }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--t-fg); flex: none; }

.av { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--radio-av, 50%); background: hsl(var(--h) var(--av-s) var(--av-l)); color: hsl(var(--h) var(--av-ts) var(--av-tl)); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.av.grande { width: 64px; height: 64px; font-size: 21px; }

/* ---------------------------------------------------------------- acceso */
.wm-acceso { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 1.2rem; padding: 1.5rem 1rem; background: var(--acceso-bg, var(--bg)); }
.wm-acceso-caja { width: min(400px, 100%); display: flex; flex-direction: column; gap: .8rem; padding: 2rem 1.8rem; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--sup); box-shadow: var(--sombra); }
.wm-acceso-caja h1 { margin: .8rem 0 0; font: var(--peso-titulo, 700) 1.55rem/1.2 var(--fuente-titulo); }
.wm-acceso-caja .suave { margin: 0 0 .4rem; }
.wm-acceso-caja label { display: flex; flex-direction: column; gap: .3rem; font-size: 13px; font-weight: 600; }
.wm-acceso-caja .check { flex-direction: row; align-items: center; font-weight: 400; color: var(--suave); }
.wm-acceso-caja input:not([type=checkbox]), .wm-form input:not([type=checkbox]), .wm-form select, .campo input, .campo-conf input, .wm-paleta-in input { width: 100%; min-height: 42px; padding: .5rem .75rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); background: var(--campo, var(--sup)); outline: none; }
.wm-acceso-caja input:focus, .wm-form input:focus, .wm-form select:focus, .campo-conf input:focus { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-suave); }
.wm-acceso .nota { margin: .2rem 0 0; font-size: 12px; color: var(--suave); text-align: center; }
.wm-acceso-pie { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: 12.5px; color: var(--suave); }
.wm-codigo { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; }
.wm-codigo input { min-height: 52px !important; padding: 0 !important; text-align: center; font: 600 1.35rem var(--fuente-mono) !important; }
.wm-error { margin: 0; padding: .55rem .75rem; border-radius: var(--radio-chico); background: var(--peligro-suave); color: var(--peligro); font-size: 13px; }

.wm-marca { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.wm-marca .logo { height: 26px; width: auto; }
.wm-marca-sello { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radio-chico); background: var(--acento); color: var(--acento-tinta); }
.wm-marca-txt { display: flex; flex-direction: column; line-height: 1.05; }
.wm-marca-txt b { font: var(--peso-titulo, 700) 15px/1.1 var(--fuente-titulo); }
.wm-marca-txt small { font-size: 11px; color: var(--suave); letter-spacing: .04em; }
.wm-marca.grande .wm-marca-sello { width: 44px; height: 44px; }
.wm-marca.grande .wm-marca-txt b { font-size: 18px; }
.wm-marca.con-logo .logo { height: 24px; }
.wm-marca.con-logo .wm-marca-txt { padding-left: .6rem; border-left: 1px solid var(--linea); }
.wm-marca.grande.con-logo .logo { height: 30px; }
.logo-blanco { display: none; }
.wm-volver { font-size: 12.5px; color: var(--suave); text-decoration: none; }
.wm-volver:hover { color: var(--acento-fuerte, var(--acento)); }
.wm-modal-caja footer .wm-volver { flex-basis: 100%; text-align: center; margin-top: .3rem; }
.wm-insignia { display: flex; align-items: center; gap: .6rem; margin: 0 .35rem; padding: .7rem .75rem; border-radius: var(--radio-chico); background: var(--insignia-bg, var(--ok-suave)); color: var(--insignia-tinta, var(--ok)); }
.wm-insignia span { display: flex; flex-direction: column; line-height: 1.25; }
.wm-insignia b { font-size: 13px; }
.wm-insignia small { font-size: 11.5px; opacity: .8; }

/* ---------------------------------------------------------------- estructura */
.wm { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.wm-rail { display: flex; flex-direction: column; gap: .9rem; min-height: 0; padding: 1rem .75rem; overflow-y: auto; background: var(--rail-bg, var(--bg)); color: var(--rail-tinta, var(--tinta)); border-right: 1px solid var(--rail-linea, transparent); }
.wm-rail-cab { display: flex; align-items: center; justify-content: space-between; padding: 0 .35rem; min-height: 38px; }
.wm-redactar { justify-content: flex-start; min-height: 46px; padding-inline: 1.1rem; border-radius: var(--radio-redactar, var(--radio)); box-shadow: var(--sombra-redactar, none); }
.wm-nav { display: flex; flex-direction: column; gap: 2px; }
.wm-nav a { display: flex; align-items: center; gap: .7rem; min-height: 36px; padding: .35rem .75rem; border-radius: var(--radio-nav, 99px); color: var(--rail-suave, var(--suave)); text-decoration: none; font-weight: 500; }
.wm-nav a:hover { background: var(--rail-hover, var(--sup2)); color: var(--rail-tinta, var(--tinta)); }
.wm-nav a.activo { background: var(--rail-activo, var(--acento-suave)); color: var(--rail-activo-tinta, var(--acento-fuerte, var(--acento))); font-weight: 700; }
.wm-nav a span { flex: 1; }
.wm-nav .n { font-size: 12px; font-weight: 700; }
.wm-sub { display: none; flex-direction: column; gap: 2px; margin: .15rem 0 .5rem 1.1rem; padding-left: .5rem; border-left: 1px solid var(--rail-linea, var(--linea)); }
.wm[data-vista="correo"] .wm-sub { display: flex; }
.wm-sub a { min-height: 32px; font-size: 13.5px; }
.wm-nav-titulo { margin: .7rem .75rem .2rem; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rail-suave, var(--suave)); }
.wm-cuota { margin-top: auto; padding: .7rem .75rem 0; font-size: 12px; color: var(--rail-suave, var(--suave)); }
.wm-cuota i, .wm-kpis .barra, .uso i { display: block; height: 5px; margin-top: .35rem; border-radius: 99px; background: linear-gradient(90deg, var(--acento) var(--p), var(--pista, var(--linea)) 0); }

.wm-cuerpo { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; background: var(--cuerpo-bg, var(--bg)); }
.wm-top { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem .7rem .5rem; }
.wm-buscar { flex: 1; display: flex; align-items: center; gap: .55rem; max-width: 720px; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--buscar-linea, transparent); border-radius: var(--radio-buscar, 99px); background: var(--buscar-bg, var(--sup2)); color: var(--suave); }
.wm-buscar:focus-within { background: var(--sup); border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-suave); }
.wm-buscar input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--tinta); }
.wm-yo { margin-left: auto; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.wm-main { min-height: 0; overflow: hidden; outline: none; }
.wm-tabs, .wm-fab, .solo-movil { display: none; }
.wm-velo { display: none; }

/* ---------------------------------------------------------------- correo */
.wm-correo, .wm-contactos { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--hueco, 0); height: 100%; padding: 0 var(--hueco, 0) var(--hueco, 0) 0; }
.wm-lista > * { flex-shrink: 0; }
.wm-lista { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--lista-bg, var(--sup)); border-radius: var(--radio-panel, 0); border-right: 1px solid var(--panel-linea, var(--linea)); }
.wm-lector { min-height: 0; overflow-y: auto; background: var(--lector-bg, var(--sup)); border-radius: var(--radio-panel, 0); }
.wm-lista-cab { display: flex; align-items: baseline; gap: .6rem; padding: 1rem 1.1rem .4rem; }
.wm-lista-cab h1 { margin: 0; font: var(--peso-titulo, 700) 1.2rem/1.2 var(--fuente-titulo); }
.wm-lista-cab .b-sec, .wm-lista-cab .b-prim { align-self: center; min-height: 34px; padding: .3rem .75rem; }
.wm-chips { display: flex; gap: .35rem; padding: .3rem 1.1rem .7rem; overflow-x: auto; scrollbar-width: none; }
.filtro { flex: none; min-height: 30px; padding: .2rem .75rem; border: 1px solid var(--linea); border-radius: 99px; background: none; font-size: 12.5px; font-weight: 600; color: var(--suave); cursor: pointer; }
.filtro[aria-pressed="true"] { background: var(--acento-suave); border-color: transparent; color: var(--acento-fuerte, var(--acento)); }
.wm-hilos { margin: 0; padding: 0 0 1rem; list-style: none; }
.hilo { position: relative; display: flex; gap: .75rem; padding: .75rem 1.1rem; border-bottom: 1px solid var(--linea-suave, var(--linea)); cursor: pointer; transition: background .12s; }
.hilo:hover { background: var(--hover, var(--sup2)); }
.hilo.abierto { background: var(--seleccion, var(--acento-suave)); }
.hilo-txt { flex: 1; min-width: 0; }
.hilo-l1 { display: flex; align-items: baseline; gap: .5rem; }
.hilo-de { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hilo-de small { color: var(--suave); font-weight: 500; font-size: 12px; }
.hilo time { flex: none; font-size: 12px; color: var(--suave); }
.hilo-asunto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hilo-l3 { display: flex; align-items: center; gap: .35rem; min-height: 26px; color: var(--suave); font-size: 13px; }
.hilo-ext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hilo .estrella { width: 28px; height: 28px; margin: -4px -6px -4px 0; }
.hilo.no-leido .hilo-de, .hilo.no-leido .hilo-asunto { font-weight: 700; color: var(--tinta); }
.hilo.no-leido .hilo-l1 time { color: var(--acento-fuerte, var(--acento)); font-weight: 700; }

.wm-vacio { display: grid; place-items: center; gap: .5rem; padding: 3rem 1rem; text-align: center; color: var(--suave); }
.wm-vacio .i { width: 34px; height: 34px; opacity: .6; }
.wm-vacio p { margin: 0; }
.wm-vacio.grande { height: 100%; align-content: center; }

.wm-lector-barra { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .15rem; padding: .45rem .8rem; background: var(--lector-bg, var(--sup)); border-bottom: 1px solid var(--linea-suave, var(--linea)); }
.wm-hilo { padding-bottom: 2rem; }
.wm-hilo-cab { display: flex; align-items: flex-start; gap: 1rem; padding: 1.3rem 1.6rem .6rem; }
.wm-hilo-cab > div { flex: 1; min-width: 0; }
.wm-hilo-cab h2 { margin: 0 0 .45rem; font: var(--peso-titulo, 700) 1.45rem/1.25 var(--fuente-titulo); }
.wm-hilo-etq { display: flex; flex-wrap: wrap; gap: .35rem; }
.wm-msj { margin: .2rem 1.6rem; border-bottom: 1px solid var(--linea-suave, var(--linea)); }
.wm-msj-cab { width: 100%; display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 0; border: 0; background: none; text-align: left; cursor: pointer; }
.wm-msj-quien { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; column-gap: .35rem; }
.wm-msj-quien small { flex-basis: 100%; font-size: 12.5px; }
.wm-msj-ext { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.wm-msj.abierto .wm-msj-ext { display: none; }
.wm-msj:not(.abierto) .wm-msj-quien small { display: none; }
.wm-msj-cab time { font-size: 12.5px; white-space: nowrap; }
.wm-msj-cuerpo { display: none; padding: 0 0 1rem 3rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; font-size: 15px; max-width: 72ch; }
.wm-msj.abierto .wm-msj-cuerpo { display: block; }
.wm-adjuntos { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 0 1rem 3rem; }
.wm-msj:not(.abierto) .wm-adjuntos { display: none; }
.adj { display: inline-flex; align-items: center; gap: .6rem; max-width: 280px; padding: .45rem .7rem .45rem .45rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); background: var(--sup); text-align: left; cursor: pointer; }
.adj:hover { border-color: var(--acento); }
.adj-tipo { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: calc(var(--radio-chico) - 2px); background: var(--acento-suave); color: var(--acento-fuerte, var(--acento)); font: 700 10.5px var(--fuente-mono); }
.adj span { display: flex; flex-direction: column; min-width: 0; }
.adj b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.adj small { color: var(--suave); font-size: 11.5px; }
.wm-responder { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1.2rem 1.6rem 0 4.6rem; }

.wm-invitacion { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1rem; margin: .4rem 1.6rem .8rem; padding: 1rem; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--inv-bg, var(--sup2)); }
.wm-inv-fecha { display: grid; place-items: center; width: 54px; height: 58px; border-radius: var(--radio-chico); background: var(--sup); border: 1px solid var(--linea); line-height: 1; }
.wm-inv-fecha b { font: 700 1.5rem var(--fuente-titulo); }
.wm-inv-fecha small { color: var(--peligro); font-weight: 700; text-transform: uppercase; font-size: 11px; }
.wm-inv-txt { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: .1rem; font-size: 13.5px; }
.wm-inv-botones { display: flex; gap: .4rem; }

/* ---------------------------------------------------------------- redactar */
.wm-redactar-caja { position: fixed; right: 1.4rem; bottom: 0; z-index: 40; display: flex; flex-direction: column; width: min(560px, calc(100vw - 2rem)); max-height: min(640px, calc(100dvh - 5rem)); border: 1px solid var(--linea); border-bottom: 0; border-radius: var(--radio) var(--radio) 0 0; background: var(--sup); box-shadow: var(--sombra-alta); overflow: hidden; animation: subir .22s cubic-bezier(.2, .8, .2, 1); }
.wm-redactar-caja > header { display: flex; align-items: center; gap: .3rem; padding: .45rem .5rem .45rem 1rem; background: var(--redactar-cab, var(--sup2)); }
.wm-redactar-caja.minimizado form { display: none; }
.wm-redactar-caja form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.campo { display: flex; align-items: center; gap: .6rem; margin: 0 1rem; border-bottom: 1px solid var(--linea); color: var(--suave); font-size: 13px; }
.campo input { flex: 1; min-height: 42px !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; color: var(--tinta); }
.wm-redactar-caja textarea { flex: 1; min-height: 200px; margin: 0; padding: .9rem 1rem; border: 0; background: none; outline: none; resize: none; line-height: 1.6; }
.wm-redactar-caja .wm-adjuntos { padding: 0 1rem .5rem; }
.wm-redactar-caja .wm-error { margin: 0 1rem .5rem; }
.wm-redactar-caja footer { display: flex; align-items: center; gap: .3rem; padding: .6rem .8rem; border-top: 1px solid var(--linea-suave, var(--linea)); }
.wm-redactar-caja footer label.b-ico { cursor: pointer; }
@keyframes subir { from { transform: translateY(24px); opacity: 0; } }

/* ---------------------------------------------------------------- ventanas y avisos */
.wm-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: var(--velo, rgba(15, 18, 25, .45)); animation: aparecer .15s; }
.wm-modal-caja { width: min(560px, 100%); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; border-radius: var(--radio); background: var(--sup); box-shadow: var(--sombra-alta); overflow: hidden; }
.wm-modal-caja.chica { width: min(420px, 100%); }
.wm-modal-caja.paleta { width: min(620px, 100%); align-self: start; margin-top: 12vh; }
.wm-modal-caja > header { display: flex; align-items: center; justify-content: space-between; padding: .9rem .8rem .5rem 1.3rem; }
.wm-modal-caja h2 { margin: 0; font: var(--peso-titulo, 700) 1.1rem/1.3 var(--fuente-titulo); }
.wm-modal-cuerpo { padding: .3rem 1.3rem 1.1rem; overflow-y: auto; }
.wm-modal-caja > footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; padding: .8rem 1.3rem 1.1rem; }
@keyframes aparecer { from { opacity: 0; } }
.wm-form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.wm-form label { display: flex; flex-direction: column; gap: .3rem; font-size: 13px; font-weight: 600; }
.wm-form .ancho2 { grid-column: 1 / -1; }
.wm-form .check, .check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.con-sufijo { display: flex; align-items: center; border: 1px solid var(--linea); border-radius: var(--radio-chico); background: var(--campo, var(--sup)); }
.con-sufijo input { border: 0 !important; box-shadow: none !important; background: none !important; }
.con-sufijo em { padding-right: .75rem; font-style: normal; color: var(--suave); white-space: nowrap; }
.wm-clave-temp { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .7rem .8rem; border-radius: var(--radio-chico); background: var(--sup2); }
.wm-clave-temp small { flex-basis: 100%; }
.wm-clave-temp code, .wm-clave code { padding: .2rem .45rem; border-radius: 6px; background: var(--sup); border: 1px solid var(--linea); font-size: 14px; letter-spacing: .04em; }
.wm-clave { margin: .6rem 0 0; font-size: 13px; }
.campo-conf { display: flex; flex-direction: column; gap: .35rem; margin-top: .8rem; font-size: 13px; font-weight: 600; }
.wm-lista-check { display: flex; flex-direction: column; gap: .6rem; }
.wm-cuenta { display: flex; flex-direction: column; align-items: center; gap: .2rem; text-align: center; padding-top: .4rem; }
.wm-cuenta b { margin-top: .5rem; font-size: 1.05rem; }

.wm-avisos { position: fixed; left: 50%; bottom: 1.4rem; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: .5rem; transform: translateX(-50%); pointer-events: none; }
.wm-aviso { display: flex; align-items: center; gap: 1rem; max-width: calc(100vw - 2rem); padding: .7rem .8rem .7rem 1.1rem; border-radius: var(--radio-chico); background: var(--aviso-bg, #1F2430); color: var(--aviso-tinta, #fff); box-shadow: var(--sombra-alta); font-size: 13.5px; pointer-events: auto; animation: subir .2s; }
.wm-aviso button { border: 0; background: none; color: var(--aviso-accion, #8AB4F8); font-weight: 700; cursor: pointer; }
.wm-aviso.fuera { opacity: 0; transition: opacity .25s; }

/* ---------------------------------------------------------------- calendario */
.wm-cal { display: flex; flex-direction: column; height: 100%; padding: 0 var(--hueco, 0) var(--hueco, 0) 0; }
.wm-cal-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .3rem 1rem .8rem; }
.wm-cal-barra h1 { margin: 0 .4rem; font: var(--peso-titulo, 700) 1.2rem/1.2 var(--fuente-titulo); }
.wm-cal-barra h1::first-letter, .wm-agenda h2::first-letter { text-transform: uppercase; }
.segmentado { display: inline-flex; padding: 3px; border-radius: var(--radio-chico); background: var(--sup2); }
.segmentado button { min-height: 32px; padding: .2rem .8rem; border: 0; border-radius: calc(var(--radio-chico) - 3px); background: none; font-size: 13px; font-weight: 600; color: var(--suave); cursor: pointer; }
.segmentado button[aria-pressed="true"] { background: var(--sup); color: var(--tinta); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.wm-cal-cuerpo { flex: 1; min-height: 0; overflow: auto; background: var(--sup); border-radius: var(--radio-panel, 0); border-top: 1px solid var(--panel-linea, var(--linea)); }
.ev { display: block; width: 100%; padding: .1rem .4rem; border: 0; border-radius: 5px; background: var(--t-bg); color: var(--t-fg); font-size: 12px; font-weight: 600; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ev time { font-weight: 500; opacity: .85; }
.ev.pendiente { background: repeating-linear-gradient(135deg, var(--t-bg) 0 6px, var(--sup) 6px 9px); outline: 1px dashed var(--t-fg); outline-offset: -1px; }
.wm-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(104px, 1fr); min-height: 100%; }
.wm-mes-dia-nom { display: flex; align-items: flex-end; min-height: 32px; padding: .3rem .6rem; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); border-bottom: 1px solid var(--linea); }
.wm-mes-celda { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: .35rem .35rem .4rem; border-right: 1px solid var(--linea-suave, var(--linea)); border-bottom: 1px solid var(--linea-suave, var(--linea)); cursor: pointer; }
.wm-mes-celda:hover { background: var(--hover, var(--sup2)); }
.wm-mes-celda.fuera { background: var(--fuera, transparent); }
.wm-mes-celda.fuera .num { opacity: .45; }
.wm-mes-celda .num { align-self: flex-start; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 .3rem; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.wm-mes-celda.hoy .num { background: var(--acento); color: var(--acento-tinta); }
.wm-mes-celda .mas { font-size: 11.5px; color: var(--suave); padding-left: .3rem; }
.wm-mes-celda .puntos { display: none; gap: 3px; padding-left: .3rem; }
.wm-mes-celda .puntos i { width: 6px; height: 6px; border-radius: 50%; background: var(--t-fg); }
.wm-horas { display: flex; flex-direction: column; height: 100%; }
.wm-horas-cab { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(0, 1fr)); border-bottom: 1px solid var(--linea); }
.wm-horas-dia { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem 0; border: 0; background: none; cursor: pointer; color: var(--suave); }
.wm-horas-dia small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.wm-horas-dia b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 17px; color: var(--tinta); }
.wm-horas-dia.hoy small { color: var(--acento-fuerte, var(--acento)); }
.wm-horas-dia.hoy b { background: var(--acento); color: var(--acento-tinta); }
.wm-horas-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
.wm-horas-cab { overflow-y: hidden; scrollbar-gutter: stable; }
.wm-cal[data-modo="semana"] .wm-cal-cuerpo, .wm-cal[data-modo="dia"] .wm-cal-cuerpo { overflow: hidden; }
.wm-horas-grilla { position: relative; display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(0, 1fr)); height: calc(var(--alto) * var(--n)); background: repeating-linear-gradient(180deg, var(--linea-suave, var(--linea)) 0 1px, transparent 1px var(--alto)); }
.wm-horas-eje span { display: block; height: var(--alto); padding: 0 .5rem; font: 500 11px var(--fuente-mono); color: var(--suave); text-align: right; transform: translateY(-.55em); }
.wm-horas-eje span:first-child { visibility: hidden; }
.wm-horas-col { position: relative; border-left: 1px solid var(--linea-suave, var(--linea)); }
.ev.bloque { position: absolute; left: 3px; right: 4px; display: flex; flex-direction: column; padding: .25rem .45rem; white-space: normal; border-left: 3px solid var(--t-fg); line-height: 1.3; }
.ev.bloque b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.ev.bloque small { overflow: hidden; text-overflow: ellipsis; font-weight: 500; font-size: 11.5px; opacity: .85; }
.wm-ahora { position: absolute; left: 0; right: 0; height: 2px; background: var(--peligro); z-index: 3; }
.wm-ahora::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--peligro); }
.wm-agenda { max-width: 760px; padding: .5rem 1.2rem 2rem; }
.wm-agenda h2 { margin: 1.2rem 0 .5rem; font: var(--peso-titulo, 700) .95rem/1.2 var(--fuente-titulo); }
.wm-agenda h2.hoy { color: var(--acento-fuerte, var(--acento)); }
.wm-agenda-ev { width: 100%; display: flex; gap: 1rem; align-items: flex-start; margin-bottom: .45rem; padding: .7rem .9rem; border: 0; border-left: 4px solid var(--t-fg); border-radius: var(--radio-chico); background: var(--t-bg); text-align: left; cursor: pointer; }
.wm-agenda-ev time { display: flex; flex-direction: column; min-width: 48px; font: 600 13px var(--fuente-mono); color: var(--t-fg); }
.wm-agenda-ev time small { font-weight: 500; opacity: .8; }
.wm-agenda-ev span { display: flex; flex-direction: column; }
.wm-agenda-ev .pend { color: var(--peligro); font-weight: 700; }
.wm-ev-det p { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 .7rem; }
.wm-ev-det .i { color: var(--suave); margin-top: 2px; }

/* ---------------------------------------------------------------- contactos */
.wm-personas { margin: 0; padding: 0 0 1rem; list-style: none; }
.wm-personas .letra { padding: .8rem 1.1rem .2rem; font: 700 12px var(--fuente-titulo); color: var(--acento-fuerte, var(--acento)); }
.wm-personas a { display: flex; align-items: center; gap: .75rem; padding: .55rem 1.1rem; text-decoration: none; }
.wm-personas a:hover { background: var(--hover, var(--sup2)); }
.wm-personas a.abierto { background: var(--seleccion, var(--acento-suave)); }
.wm-personas span { display: flex; flex-direction: column; min-width: 0; }
.wm-personas small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-ficha { padding-bottom: 2rem; }
.wm-ficha-cab { display: flex; align-items: center; gap: 1rem; padding: 1.5rem 1.6rem .8rem; }
.wm-ficha-cab h2 { margin: 0; font: var(--peso-titulo, 700) 1.5rem/1.2 var(--fuente-titulo); }
.wm-ficha-cab p { margin: .2rem 0 0; }
.wm-ficha-acciones { display: flex; gap: .5rem; padding: 0 1.6rem 1rem; }
.wm-datos { margin: 0 1.6rem; display: grid; gap: .1rem; }
.wm-datos div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--linea-suave, var(--linea)); }
.wm-datos dt { color: var(--suave); font-size: 13px; }
.wm-datos dd { margin: 0; overflow-wrap: anywhere; }
.wm-ficha h3 { margin: 1.5rem 1.6rem .5rem; font-size: 13px; font-weight: 700; color: var(--suave); }
.wm-mini-hilos { margin: 0 1.6rem; padding: 0; list-style: none; }
.wm-mini-hilos a { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--linea-suave, var(--linea)); text-decoration: none; }
.wm-soltar { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 2rem 1rem; border: 2px dashed var(--linea); border-radius: var(--radio); text-align: center; cursor: pointer; }
.wm-soltar .i { width: 30px; height: 30px; color: var(--acento); }
.wm-soltar.encima { border-color: var(--acento); background: var(--acento-suave); }

/* ---------------------------------------------------------------- administración */
.wm-admin, .wm-seguridad { height: 100%; overflow-y: auto; padding: .4rem 1.4rem 2.5rem .6rem; }
.wm-admin-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.wm-admin h1, .wm-seguridad h1 { margin: 0; font: var(--peso-titulo, 700) 1.45rem/1.2 var(--fuente-titulo); }
.wm-admin-cab p { margin: .25rem 0 0; }
.wm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.kpi { display: flex; flex-direction: column; gap: .15rem; padding: .95rem 1.05rem; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--sup); }
.kpi small { font-size: 12px; font-weight: 600; color: var(--suave); }
.kpi b { font: var(--peso-titulo, 700) 1.6rem/1.15 var(--fuente-titulo); }
.kpi span { font-size: 12.5px; }
.kpi.alerta { border-color: var(--peligro-suave-borde, var(--peligro)); }
.kpi.alerta b { color: var(--peligro); }
.wm-tabla-env { border: 1px solid var(--linea); border-radius: var(--radio); background: var(--sup); overflow: hidden; }
.wm-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wm-tabla th { padding: .7rem .9rem; border-bottom: 1px solid var(--linea); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--suave); text-align: left; }
.wm-tabla td { padding: .65rem .9rem; border-bottom: 1px solid var(--linea-suave, var(--linea)); vertical-align: middle; }
.wm-tabla tr:last-child td { border-bottom: 0; }
.wm-tabla tr.inactiva td { opacity: .6; }
.wm-tabla .acciones { text-align: right; }
.celda-persona { display: flex; align-items: center; gap: .65rem; }
.celda-persona span { display: flex; flex-direction: column; }
.uso { min-width: 140px; }
.uso small { color: var(--suave); font-size: 12px; }
.uso.lleno i { background: linear-gradient(90deg, var(--peligro) var(--p), var(--pista, var(--linea)) 0); }
.wm-sub-titulo { margin: 1.8rem 0 .6rem; font: var(--peso-titulo, 700) 1.05rem/1.2 var(--fuente-titulo); }
.wm-registro { margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.wm-registro li { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--linea-suave, var(--linea)); font-size: 13.5px; }
.wm-registro .av { width: 30px; height: 30px; font-size: 11px; }
.wm-registro span { display: flex; flex-direction: column; }

.wm-seg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.1rem; }
.wm-tarjeta { padding: 1.2rem 1.3rem; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--sup); }
.wm-tarjeta h2 { margin: 0 0 .35rem; font: var(--peso-titulo, 700) 1.05rem/1.25 var(--fuente-titulo); }
.wm-tarjeta.destacada { display: flex; gap: 1rem; align-items: flex-start; background: var(--ok-suave); border-color: transparent; }
.wm-tarjeta.destacada .i { color: var(--ok); }
.wm-filas { margin: .6rem 0 .9rem; padding: 0; list-style: none; }
.wm-filas li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--linea-suave, var(--linea)); }
.wm-filas span { flex: 1; display: flex; flex-direction: column; }
.wm-firma { width: 100%; margin: .5rem 0 .7rem; padding: .7rem; border: 1px solid var(--linea); border-radius: var(--radio-chico); background: var(--campo, var(--sup)); resize: vertical; }
.wm-codigos { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .6rem; }
.wm-codigos code { padding: .45rem; border-radius: 6px; background: var(--sup2); text-align: center; letter-spacing: .06em; }

/* ---------------------------------------------------------------- paleta */
.wm-paleta-in { display: flex; align-items: center; gap: .6rem; color: var(--suave); }
.wm-paleta-in input { border: 0 !important; box-shadow: none !important; font-size: 16px; }
.wm-paleta-lista { margin: .5rem 0 0; padding: 0; list-style: none; max-height: 50vh; overflow-y: auto; }
.wm-paleta-lista li[role=option] { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--radio-chico); cursor: pointer; }
.wm-paleta-lista li[aria-selected="true"] { background: var(--acento-suave); color: var(--acento-fuerte, var(--acento)); }
.wm-paleta-lista li span { display: flex; flex-direction: column; }
.wm-paleta-lista .grupo { padding: .7rem .7rem .25rem; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
.wm-paleta-pie { margin: .8rem 0 0; font-size: 12px; }

/* ---------------------------------------------------------------- tablet: menú en cajón */
@media (max-width: 1099px) {
  .wm { grid-template-columns: minmax(0, 1fr); }
  .wm-rail { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--sombra-alta); background: var(--rail-bg-cajon, var(--rail-bg, var(--sup))); }
  .wm.rail-abierto .wm-rail { transform: none; }
  .wm.rail-abierto .wm-velo { display: block; position: fixed; inset: 0; z-index: 45; background: var(--velo, rgba(15, 18, 25, .45)); }
  .wm-sub { display: flex; }
  .solo-movil { display: inline-grid; }
  .wm-top { padding-left: .6rem; }
  .wm-correo, .wm-contactos, .wm-cal { padding-left: var(--hueco, 0); }
  .wm-admin, .wm-seguridad { padding-left: 1.2rem; }
  .wm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- celular */
@media (max-width: 759px) {
  body { font-size: 15px; }
  .wm { grid-template-rows: minmax(0, 1fr); }
  .wm-cuerpo { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .wm-top { padding: .55rem .6rem; gap: .3rem; }
  .wm-buscar kbd { display: none; }
  .wm-correo, .wm-contactos { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .wm-correo[data-leyendo="1"] .wm-lista, .wm-contactos[data-leyendo="1"] .wm-lista { display: none; }
  .wm-correo[data-leyendo="0"] .wm-lector, .wm-contactos[data-leyendo="0"] .wm-lector { display: none; }
  .wm-lista, .wm-lector { border-radius: 0; border-right: 0; }
  .wm[data-vista="correo"] .wm-fab { display: grid; }
  .wm[data-leyendo="1"] .wm-fab { display: none; }
  .wm-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom)); background: var(--tabs-bg, var(--sup)); border-top: 1px solid var(--linea); }
  .wm-tabs a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem 0; border-radius: var(--radio-chico); font-size: 11px; font-weight: 600; color: var(--suave); text-decoration: none; }
  .wm-tabs a .i { width: 22px; height: 22px; padding: 1px 12px; box-sizing: content-box; border-radius: 99px; }
  .wm-tabs a.activo { color: var(--acento-fuerte, var(--acento)); }
  .wm-tabs a.activo .i { background: var(--acento-suave); }
  .wm-fab { position: fixed; right: 1rem; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 31; place-items: center; width: 58px; height: 58px; border: 0; border-radius: var(--radio-fab, 18px); background: var(--acento); color: var(--acento-tinta); box-shadow: var(--sombra-alta); cursor: pointer; }
  .wm-fab .i { width: 24px; height: 24px; }
  .solo-escritorio { display: none !important; }
  .wm-hilo-cab, .wm-ficha-cab { padding: 1rem 1rem .5rem; }
  .wm-hilo-cab h2 { font-size: 1.25rem; }
  .wm-msj, .wm-invitacion { margin-inline: 1rem; }
  .wm-msj-cuerpo, .wm-adjuntos { padding-left: 0; }
  .wm-responder { padding: 1rem 1rem 0; }
  .wm-responder .b-sec { flex: 1; }
  .wm-ficha-acciones, .wm-datos, .wm-mini-hilos, .wm-ficha h3 { margin-inline: 1rem; padding-inline: 0; }
  .wm-redactar-caja { inset: 0; right: 0; width: 100%; max-height: none; border-radius: 0; border: 0; }
  .wm-modal { place-items: end stretch; padding: 0; }
  .wm-modal-caja, .wm-modal-caja.chica, .wm-modal-caja.paleta { width: 100%; max-height: 92dvh; margin: 0; border-radius: var(--radio) var(--radio) 0 0; align-self: end; }
  .wm-form { grid-template-columns: 1fr; }
  .wm-avisos { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .wm-cal { padding: 0; }
  .wm-cal-barra { padding: .2rem .7rem .6rem; }
  .wm-cal-barra h1 { order: -1; flex-basis: 100%; margin: 0 0 .3rem; font-size: 1.1rem; }
  .wm-cal-barra .segmentado { order: 5; flex-basis: 100%; }
  .wm-cal-barra .segmentado button { flex: 1; }
  .wm-cal-barra .b-prim span { display: none; }
  .wm-mes { grid-auto-rows: minmax(64px, 1fr); }
  .wm-mes-celda .ev, .wm-mes-celda .mas { display: none; }
  .wm-mes-celda .puntos { display: flex; }
  .wm-horas-cab, .wm-horas-grilla { grid-template-columns: 44px repeat(var(--cols), minmax(0, 1fr)); }
  .wm-admin, .wm-seguridad { padding: .3rem 1rem 2rem; }
  .wm-admin-cab .b-prim { width: 100%; }
  .wm-kpis { gap: .6rem; }
  .kpi { padding: .75rem .85rem; }
  .kpi b { font-size: 1.3rem; }
  .wm-tabla-env { border: 0; background: none; }
  .wm-tabla thead { display: none; }
  .wm-tabla, .wm-tabla tbody, .wm-tabla tr, .wm-tabla td { display: block; width: 100%; }
  .wm-tabla tr { position: relative; margin-bottom: .7rem; padding: .8rem .9rem; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--sup); }
  .wm-tabla td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .3rem 0; border: 0; }
  .wm-tabla td[data-t]::before { content: attr(data-t); font-size: 12px; color: var(--suave); }
  .wm-tabla td[data-t="Casilla"]::before { display: none; }
  .wm-tabla td.acciones { position: absolute; top: .75rem; right: .8rem; width: auto; padding: 0; }
  .uso { min-width: 0; width: 55%; }
  .wm-seg-grid { grid-template-columns: 1fr; }
  .wm-lista-cab .b-sec span, .wm-lista-cab .b-prim span { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.wm-insignia { margin-top: auto; }
.wm-insignia + .wm-cuota { margin-top: 0; }
