/* Estilos de Acceso (login, alta y panel de administración). Fichero aparte: la CSP no admite estilos en línea.
 *
 * Tipografía de marca: Saira itálica, alojada en este mismo servicio (public/fuentes/). Nada de fuentes remotas:
 * la CSP es default-src 'self'.
 * Licencia de la fuente: SIL Open Font License 1.1 — Saira, de Omnibus-Type (https://github.com/Omnibus-Type/Saira).
 * Es una fuente variable de pesos, subconjunto latino. Se puede usar y redistribuir con esta nota.
 *
 * Tema: los colores son pares light-dark(claro, oscuro). Por defecto manda el sistema (prefers-color-scheme); si la
 * persona elige tema, comun.js pone data-tema="claro|oscuro" en <html> y lo recuerda en localStorage («acceso.tema»).
 */
@font-face {
  font-family: "Saira";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fuentes/saira-italica-latin.woff2") format("woff2");
}

/* ===== Tokens: los del Status Monitor + dos de marca de la web de Icaria ===== */
:root {
  color-scheme: light dark;
  --bg: light-dark(#eef1f5, #0e131a);
  --surface: light-dark(#fff, #161c25);
  --surface-2: light-dark(#f5f8fc, #1d2531);
  --border: light-dark(#dde3ea, #263040);
  --border-strong: light-dark(#c3ccd8, #35435a);
  --text: light-dark(#1c232c, #e7ecf3);
  --text-soft: light-dark(#566275, #a3afc0);
  --accent: light-dark(#2f6fed, #5b8def);
  --accent-ink: light-dark(#fff, #0b1018);
  --accent-bg: light-dark(#e6eefe, #1a2a4a);
  --shadow: light-dark(rgba(20, 30, 50, .10), rgba(0, 0, 0, .40));
  --shadow-lg: light-dark(rgba(20, 30, 50, .28), rgba(0, 0, 0, .65));
  --scrim: light-dark(rgba(14, 19, 26, .55), rgba(0, 0, 0, .65));
  --ok: light-dark(#22a06b, #2bbd80);
  --ok-fg: light-dark(#166534, #7ee2b0);
  --ok-bg: light-dark(#dcf5e5, #12352a);
  --warn: light-dark(#e0a00c, #e0aa28);
  --warn-fg: light-dark(#8a4b05, #f3cf7a);
  --warn-bg: light-dark(#fdf0cf, #3a2e10);
  --bad: light-dark(#df4657, #f05767);
  --bad-fg: light-dark(#a11a2c, #ff9aa5);
  --bad-bg: light-dark(#fde4e7, #3d1a20);
  --info: light-dark(#2f9bd8, #38a1db);
  --info-fg: light-dark(#075985, #8fd0f5);
  --info-bg: light-dark(#def1fc, #11304a);
  --neutral: light-dark(#94a3b8, #7a8799);
  --neutral-fg: light-dark(#475569, #c3cbd6);
  --neutral-bg: light-dark(#eaeef3, #252e3b);
  --dep-media-fg: light-dark(#6d28d9, #c4b5fd);
  --dep-media-bg: light-dark(#f0e9fd, #2b2147);
  --dep-cont-fg: light-dark(#0f766e, #5eead4);
  --dep-cont-bg: light-dark(#dff4f1, #123532);
  --dep-arte-fg: light-dark(#be185d, #f9a8d4);
  --dep-arte-bg: light-dark(#fde8f1, #3f1a2e);
  --dep-prog-fg: light-dark(#1d4ed8, #93b4fd);
  --dep-prog-bg: light-dark(#e4ecfe, #1a2a4f);
  --dep-cli-fg: light-dark(#92400e, #fcd34d);
  --dep-cli-bg: light-dark(#fdecd6, #3a2a10);
  --r-sm: 8px; --r-md: 10px; --r-lg: 12px;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 28px;
  /* marca Icaria */
  --navy: #000038;
  --brand: light-dark(#1301e3, #1301e3);
  --brand-texto: light-dark(#1301e3, #8f8cff);
  --org-bg: light-dark(#000038, #23238f);
  --org-fg: light-dark(#fff, #dcdcff);
}
:root[data-tema="claro"] { color-scheme: light; }
:root[data-tema="oscuro"] { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; font-size: var(--fs-sm); color: var(--text); background: var(--bg); }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: Consolas, "Courier New", monospace; }
.soft { color: var(--text-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Texto solo para lectores de pantalla */
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Rasgo de la web de Icaria: titular en Saira itálica, mayúsculas, tracking cerrado */
.wordmark { font-family: "Saira", sans-serif; font-style: italic; font-weight: 300; text-transform: uppercase; letter-spacing: -.04em; line-height: .95; }

/* ===== Componentes ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); padding: 8px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn.prim { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.prim:hover { filter: brightness(1.07); }
.btn.prim:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.peligro { color: var(--bad-fg); border-color: var(--bad); }
.btn.prim.peligro { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.mini { padding: 4px 8px; font-size: var(--fs-xs); }
.btn.bloque { width: 100%; padding: 10px 12px; font-size: var(--fs-md); }
.btn.llena { flex: 1; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; text-align: left; align-self: flex-start; }
.chip { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; background: var(--neutral-bg); color: var(--neutral-fg); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip.warn { background: var(--warn-bg); color: var(--warn-fg); }
.chip.bad { background: var(--bad-bg); color: var(--bad-fg); }
.chip.info { background: var(--info-bg); color: var(--info-fg); }
.chip.accent { background: var(--accent-bg); color: var(--accent); }
.chip.desc { text-decoration: line-through; }
.chip.media { background: var(--dep-media-bg); color: var(--dep-media-fg); }
.chip.cont { background: var(--dep-cont-bg); color: var(--dep-cont-fg); }
.chip.arte { background: var(--dep-arte-bg); color: var(--dep-arte-fg); }
.chip.prog { background: var(--dep-prog-bg); color: var(--dep-prog-fg); }
.chip.cli { background: var(--dep-cli-bg); color: var(--dep-cli-fg); }
.chip.org { background: var(--org-bg); color: var(--org-fg); }
.chip.mini { font-size: 10px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .campo > .lbl { font-size: var(--fs-xs); color: var(--text-soft); font-weight: 600; }
.campo input:not([type="checkbox"]), .campo select, .buscar input, select.combo { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; font-size: var(--fs-sm); }
.campo input:focus, .campo select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.campo .ayuda { font-size: var(--fs-xs); color: var(--text-soft); }
.campo .err, .err { font-size: var(--fs-xs); color: var(--bad-fg); font-weight: 600; }
.campo .ok-texto, .ok-texto { font-size: var(--fs-xs); color: var(--ok-fg); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; align-self: flex-start; }
.seg button { border: 0; background: var(--surface); padding: 7px 12px; font-weight: 600; cursor: pointer; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:focus-visible { outline-offset: -2px; }
.aviso { border-radius: var(--r-sm); padding: 10px 12px; font-size: var(--fs-sm); display: flex; gap: 8px; align-items: flex-start; }
.aviso.warn { background: var(--warn-bg); color: var(--warn-fg); }
.aviso.info { background: var(--info-bg); color: var(--info-fg); }
.aviso.bad { background: var(--bad-bg); color: var(--bad-fg); }
.aviso.ok { background: var(--ok-bg); color: var(--ok-fg); }
.fila { display: flex; gap: 8px; }

/* ===== Login y alta: tarjeta partida, marca a la izquierda ===== */
.pantalla-acceso { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.tarjeta-acceso { width: min(900px, 100%); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 24px 64px var(--shadow); overflow: hidden; }
.tarjeta-acceso.simple { width: min(480px, 100%); grid-template-columns: minmax(0, 1fr); }
.marca { position: relative; overflow: hidden; color: #fff; padding: 32px 32px 28px; display: flex; flex-direction: column; gap: 20px;
  background: linear-gradient(160deg, var(--navy) 0%, #00004d 55%, #0a06a8 100%); min-height: 520px; }
/* halos difusos, como el Spotlight de la web */
.marca::before, .marca::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.marca::before { width: 340px; height: 340px; right: -120px; top: -110px; background: rgba(60, 60, 255, .55); }
.marca::after { width: 300px; height: 300px; left: -140px; bottom: -140px; background: rgba(19, 1, 227, .65); }
.marca > * { position: relative; z-index: 1; }
.marca img.logo { width: 132px; height: auto; }
.marca .titulo { font-size: 56px; margin-top: auto; }
.marca .sub { font-family: "Saira", sans-serif; font-style: italic; font-weight: 300; text-transform: uppercase; letter-spacing: .02em; font-size: 13px; color: #bec1dd; line-height: 1.5; }
.destino { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--r-sm); padding: 10px 12px; backdrop-filter: blur(4px); }
.destino .ico { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.destino small { display: block; color: #bec1dd; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.destino strong { font-size: 15px; overflow-wrap: anywhere; }
.pasos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pasos li { display: flex; gap: 12px; align-items: center; color: #8d90b8; font-weight: 600; }
.pasos li .n { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 12px; flex: none; }
.pasos li.hecho { color: #bec1dd; }
.pasos li.hecho .n { background: rgba(255, 255, 255, .14); border-color: transparent; }
.pasos li.actual { color: #fff; }
.pasos li.actual .n { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(19, 1, 227, .35); }
.formulario { padding: 32px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.formulario h1 { margin: 0; font-size: var(--fs-xl); }
.formulario .intro { margin: -8px 0 0; color: var(--text-soft); line-height: 1.5; }
.formulario-paso { display: flex; flex-direction: column; gap: 18px; }
.formulario-paso.compacto { gap: 16px; }
.pie-acceso { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-soft); }
.ctrls { display: inline-flex; gap: 8px; align-items: center; }
.ctrls .seg { font-size: 12px; align-self: center; }
.progreso { display: none; height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progreso > i { display: block; height: 100%; background: var(--accent); transition: width .25s; width: 33.33%; }
.progreso[data-p="2"] > i { width: 66.66%; }
.progreso[data-p="3"] > i, .progreso[data-p="4"] > i { width: 100%; }
/* código de 6 dígitos en casillas */
.otp { display: flex; gap: 8px; }
.otp input { flex: 1 1 0; min-width: 0; max-width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 600; font-family: Consolas, monospace; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 0; }
.otp input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.otp.fallo input { border-color: var(--bad); }
.otp .sep { align-self: center; color: var(--text-soft); }
.qr-caja { display: flex; gap: 18px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; }
.qr-caja .qr { width: 168px; height: 168px; background: #fff; border-radius: var(--r-sm); padding: 8px; flex: none; }
.qr-caja .qr svg { width: 100%; height: 100%; display: block; }
.qr-datos { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qr-datos .etq { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.qr-datos .etq.sep-arriba { margin-top: 6px; }
.qr-datos b { overflow-wrap: anywhere; }
.secreto { font-family: Consolas, monospace; font-size: 15px; letter-spacing: .06em; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-sm); padding: 8px 10px; word-break: break-all; }
.codigos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; margin: 0; list-style: none; counter-reset: c; }
.codigos li { font-family: Consolas, monospace; font-size: 14px; counter-increment: c; overflow-wrap: anywhere; }
.codigos li::before { content: counter(c) "."; color: var(--text-soft); display: inline-block; width: 24px; font-size: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); cursor: pointer; }
.check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.listo { text-align: center; padding: 24px 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.listo .ok-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 30px; }
.listo .intro { margin: 0; }

/* ===== Panel /admin ===== */
/* Rejilla del panel: menú lateral (rail) a la izquierda y el contenido a la derecha. Mismo patrón que Passdroid Web. */
#panel { --rail-w: 232px; --tabbar-h: 60px; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .18s ease; }
#panel.rail-plegado { --rail-w: 64px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rail-marca { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* el logo blanco de la web usado como máscara, como hace el Status Monitor con su logo: toma el color del tema */
.logo-mask { width: 84px; height: 18px; flex: none; background-color: var(--text); -webkit-mask: url("logo-icaria.png") left center / contain no-repeat; mask: url("logo-icaria.png") left center / contain no-repeat; }
.rail-marca .sepv { width: 1px; height: 22px; background: var(--border-strong); flex: none; }
.rail-marca .wordmark { font-size: 24px; color: var(--brand-texto); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.ext { background: #475569; }
.checking-sel { display: flex; align-items: center; gap: 8px; }
.checking-sel select { flex: 1; min-width: 0; }

.rail { grid-column: 1; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px 12px; overflow-x: hidden; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); }
.rail-head { display: flex; align-items: center; min-height: 40px; margin-bottom: 12px; padding: 0 6px 16px; border-bottom: 1px solid var(--border); }
.rail-tesela { display: none; width: 40px; height: 40px; place-items: center; font-size: 24px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--accent-bg); color: var(--brand-texto); }
.nav { display: grid; gap: 2px; }
.nav-label { margin: 14px 12px 6px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-soft); font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; width: 100%; transition: background .12s, color .12s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-bg); color: var(--accent); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: -12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.nav-count { margin-left: auto; color: var(--text-soft); font-size: 11px; font-weight: 700; }
.nav-count:empty { display: none; }
.rail-spacer { flex: 1; min-height: 12px; }
.rail-foot { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.rail-yo { display: flex; align-items: center; gap: 10px; padding: 6px; min-width: 0; width: 100%; background: none; border: 0; border-radius: 10px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rail-yo:hover { background: var(--hover, rgba(127,127,127,.12)); }
.rail-yo:focus-visible { outline: 2px solid var(--accent, #3b82f6); outline-offset: 2px; }
.rail-yo .avatar { width: 32px; height: 32px; }
.rail-yo-txt { display: grid; min-width: 0; }
.rail-yo-txt b, .rail-yo-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-yo-txt small { color: var(--text-soft); font-size: 11.5px; }
.rail-ctrls .ctrls { width: 100%; justify-content: space-between; }
#boton-salir { gap: 8px; }
.ico-desplegar { display: none; }

/* Plegado: columna de iconos. Los textos pasan a title y aria-label (lo hace admin.js). */
.rail-plegado .rail { padding: 16px 10px 12px; }
.rail-plegado .rail-head { justify-content: center; padding: 0 0 16px; }
.rail-plegado .rail-marca { display: none; }
.rail-plegado .rail-tesela { display: grid; }
.rail-plegado .nav-text, .rail-plegado .nav-count, .rail-plegado .rail-yo-txt, .rail-plegado .rail-ctrls .seg { display: none; }
.rail-plegado .nav-item { justify-content: center; padding: 0; }
.rail-plegado .nav-item[aria-current="page"]::before { left: -10px; }
.rail-plegado .nav-label { height: 1px; margin: 12px 6px; padding: 0; overflow: hidden; background: var(--border); font-size: 0; letter-spacing: 0; }
.rail-plegado .rail-yo { justify-content: center; padding: 0; }
.rail-plegado .rail-ctrls .ctrls { justify-content: center; }
.rail-plegado #boton-salir { padding: 10px 0; }
.rail-plegado .ico-plegar { display: none; }
.rail-plegado .ico-desplegar { display: block; }

/* Móvil: la barra superior y la de pestañas solo existen en pantallas estrechas */
#mtop, .tabbar { display: none; }
.avatar-btn { display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 50%; padding: 3px; cursor: pointer; }
.avatar-btn[aria-expanded="true"] { border-color: var(--accent); }
.menu-wrap { position: relative; }
.menu .menu-ctrls { padding: 6px 10px; }
.menu .menu-ctrls .ctrls { width: 100%; justify-content: space-between; }
.menu .menu-ctrls .seg button { width: auto; display: block; padding: 7px 12px; border-radius: 0; font-weight: 600; }
.menu .menu-ctrls .icon-btn { width: 36px; padding: 0; justify-content: center; }
#main { grid-column: 2; min-width: 0; width: 100%; padding: 16px 20px 32px; max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.seccion { display: flex; flex-direction: column; gap: 16px; }
.cab-seccion { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.cab-seccion h2 { margin: 0; font-size: var(--fs-xl); }
.cab-seccion p { margin: 4px 0 0; color: var(--text-soft); }
.cab-seccion .acciones { margin-left: auto; display: flex; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: 0 1px 2px var(--shadow); display: flex; gap: 12px; align-items: center; cursor: pointer; text-align: left; }
.kpi:hover { border-color: var(--border-strong); }
.kpi[aria-pressed="true"] { border-color: var(--accent); }
.kpi .ic { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; font-weight: 700; flex: none; }
.kpi .ic.ok { background: var(--ok-bg); color: var(--ok); }
.kpi .ic.warn { background: var(--warn-bg); color: var(--warn-fg); }
.kpi .ic.acc { background: var(--accent-bg); color: var(--accent); }
.kpi .ic.navy { background: var(--navy); color: #fff; }
.kpi .n { display: block; font-size: var(--fs-2xl); font-weight: 700; line-height: 1.15; }
.kpi .l { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--text-soft); }
.filtros { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px 12px; }
.buscar { position: relative; flex: 1 1 240px; max-width: 360px; }
.buscar input { width: 100%; padding-left: 32px; }
.buscar::before { content: "⌕"; position: absolute; left: 10px; top: 50%; transform: translateY(-52%); color: var(--text-soft); font-size: 16px; pointer-events: none; }
select.combo { max-width: 220px; }
select.combo.activo { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.toggle { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 5px 10px; cursor: pointer; font-weight: 600; color: var(--text-soft); user-select: none; }
.toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.filtros .total { margin-left: auto; color: var(--text-soft); font-size: var(--fs-xs); }
.tabla-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 1px 2px var(--shadow); overflow: auto; }
table.tabla { width: 100%; border-collapse: separate; border-spacing: 0; }
.tabla th { position: sticky; top: 0; background: var(--surface-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .3px; color: var(--text-soft); text-align: left; font-weight: 700; padding: 10px; box-shadow: 0 1px 0 var(--border); white-space: nowrap; }
.tabla td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover td { background: var(--surface-2); }
.tabla tr.baja td { color: var(--text-soft); }
.tabla tr.baja .persona b { text-decoration: line-through; }
.tabla td.vacio { text-align: center; color: var(--text-soft); white-space: normal; padding: 24px 10px; }
.tabla td.der { text-align: right; }
.persona { display: flex; gap: 10px; align-items: center; }
.persona .avatar { width: 30px; height: 30px; }
.persona b { display: block; font-weight: 600; }
.persona b .suave { font-weight: 400; color: var(--text-soft); }
.persona small { color: var(--text-soft); font-family: Consolas, monospace; font-size: 12px; }
.apps { display: flex; gap: 4px; flex-wrap: wrap; }
.menu-fila { text-align: right; }
.menu { position: fixed; min-width: 220px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm); box-shadow: 0 8px 24px var(--shadow-lg); padding: 4px; z-index: 30; text-align: left; }
.menu.bajo-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 200px; }
.menu button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-weight: 500; text-align: left; }
.menu button:hover:not(:disabled):not([aria-disabled]) { background: var(--surface-2); }
.menu button:disabled, .menu button[aria-disabled="true"] { color: var(--text-soft); opacity: .7; cursor: not-allowed; }
.menu button.peligro { color: var(--bad-fg); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.menu small { color: var(--text-soft); font-weight: 400; }
.herr { display: flex; flex-direction: column; gap: 8px; }
.herr-fila { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; }
.herr-fila.off { opacity: .55; }
.herr-fila input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.herr-fila .nom { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.herr-fila .nom small { display: block; font-weight: 400; color: var(--text-soft); }
.herr-fila .nom small.mono { font-size: var(--fs-xs); }
.alc-lista { display: flex; flex-direction: column; gap: 6px; }
.alc-casilla { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.alc-casilla input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.alc-casilla small { color: var(--text-soft); }
.herr-fila select { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; }
.enlace-caja { display: flex; gap: 8px; }
.enlace-caja input { flex: 1; min-width: 0; font-family: Consolas, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; }
/* ajustes del usuario: modal centrado de dos columnas (Persona · Acceso); cabecera y pie fijos, cuerpo con scroll */
dialog.ajustes { width: min(880px, calc(100% - 32px)); max-height: 90dvh; flex-direction: column; overflow: hidden; }
dialog.ajustes[open] { display: flex; }
dialog.ajustes form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ajustes header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.ajustes header h3 { margin: 0; font-size: var(--fs-lg); }
.ajustes header .icon-btn { margin-left: auto; }
.aj-cuerpo { padding: 20px; overflow: auto; flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
/* Contenido de una sola columna en el modal (p. ej. el enlace de alta recién creado). */
.aj-unico { padding: 20px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.aj-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.aj-sec { margin: 0; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.aj-chips { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.aj-bovedas { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: 10px; }
.aj-bovedas[hidden] { display: none; }
.aj-bovedas legend { padding: 0 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-soft); }
.aj-bovedas.off { opacity: .55; background: var(--surface-2); }
.aj-bovedas p { margin: 0; }
.aj-bovedas .seg[hidden], .aj-bovedas .alc-lista[hidden], .aj-bovedas p[hidden] { display: none; }
.aj-error { margin: 0; padding: 10px 20px; background: var(--bad-bg); }
.ajustes footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }
.campo input[aria-invalid="true"], .campo select[aria-invalid="true"] { border-color: var(--bad); }
/* diálogos */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(420px, calc(100% - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px var(--shadow-lg); }
dialog::backdrop { background: var(--scrim); }
dialog .d-cuerpo { padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 14px; }
dialog h3 { margin: 0; font-size: var(--fs-lg); }
dialog p { margin: 0; color: var(--text-soft); line-height: 1.5; }
dialog .d-pie { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px 18px; }
/* El aviso es un popover: va en la capa superior y se ve también sobre los diálogos y el panel lateral */
.toast { position: fixed; inset: auto auto 24px 50%; margin: 0; border: 0; overflow: visible; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; transition: opacity .2s, transform .2s; z-index: 60; pointer-events: none; max-width: calc(100% - 32px); }
.toast.ver { opacity: 1; transform: translateX(-50%); }
.toast:not(:popover-open) { display: none; }
.toast.error { background: var(--bad); color: #fff; }

/* ===== Mi cuenta (/cuenta) ===== */
.svg-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
#c-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 8px 20px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px var(--shadow); }
.topbar-der { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.yo-chip { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.yo-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.cuenta { max-width: 1040px; margin: 0 auto; padding: 24px 20px 96px; display: flex; flex-direction: column; gap: 28px; }
.cuenta .cab-seccion h1 { margin: 0; font-size: var(--fs-2xl); overflow-wrap: anywhere; }
.c-seccion { display: flex; flex-direction: column; gap: 12px; }
.c-seccion > h2 { margin: 0; font-size: var(--fs-lg); }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.app-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: 0 1px 2px var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.app-card:hover { border-color: var(--border-strong); }
.app-card .cab { display: flex; gap: 12px; align-items: center; min-width: 0; }
.app-card .cab b { display: block; font-size: var(--fs-lg); }
.app-card .cab .chip { margin-top: 2px; }
.app-card p { margin: 0; color: var(--text-soft); line-height: 1.5; flex: 1; }
.app-card p.sin-inicio { flex: none; font-size: var(--fs-xs); }
.app-card a.btn { text-decoration: none; }
.app-ico { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-bg); color: var(--accent); flex: none; }
.app-card.admin .app-ico { background: var(--org-bg); color: var(--org-fg); }
.app-vacio { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface); padding: 20px; }
.app-vacio .app-ico { background: var(--neutral-bg); color: var(--neutral-fg); }
.app-vacio p { margin: 2px 0 0; color: var(--text-soft); line-height: 1.5; }
.datos-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.c-lateral { display: flex; flex-direction: column; gap: 16px; }
.tarjeta-c { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 1px 2px var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tarjeta-c h3 { margin: 0; font-size: var(--fs-md); }
.tarjeta-c .nota { margin: -8px 0 0; color: var(--text-soft); }
.tarjeta-c .campo input { width: 100%; }
.tarjeta-c .campo input[aria-invalid="true"] { border-color: var(--bad); }
.c-acciones { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.c-acciones .msg { font-size: var(--fs-xs); font-weight: 600; }
.c-acciones .msg.ok { color: var(--ok-fg); }
.c-acciones .msg.bad { color: var(--bad-fg); }
dl.ro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; margin: 0; align-items: center; }
dl.ro dt { font-size: var(--fs-xs); color: var(--text-soft); font-weight: 600; }
dl.ro dd { margin: 0; overflow-wrap: anywhere; }
.cuotas { display: flex; gap: 3px; }
.cuotas i { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.cuotas i.on { background: var(--ok); }
.cuotas.pocos i.on { background: var(--warn); }
.rec-n { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.1; }
.rec-n small { font-size: var(--fs-sm); font-weight: 600; color: var(--text-soft); margin-left: .25em; }
.rec-lbl { font-size: var(--fs-xs); font-weight: 600; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .tarjeta-acceso { grid-template-columns: 1fr; }
  .marca { min-height: 0; padding: 20px; gap: 12px; }
  .marca .titulo { font-size: 36px; margin-top: 0; }
  .marca .sub, .marca .pasos { display: none; }
  .progreso { display: block; }
  .formulario { padding: 22px 18px; }
  .pantalla-acceso { padding: 0; place-items: stretch; }
  .tarjeta-acceso { border-radius: 0; border: 0; min-height: 100vh; }
  .tarjeta-acceso.simple { align-self: center; min-height: 0; }
  #panel { display: block; }
  .rail { display: none; }
  #mtop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px var(--shadow); }
  .tabbar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 25; display: flex; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--border); }
  .tabbar-item { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; border: 0; background: transparent; color: var(--text-soft); font-size: 10.5px; font-weight: 600; cursor: pointer; }
  .tabbar-item > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar-item .ico { width: 20px; height: 20px; }
  .tabbar-item[aria-current="page"] { color: var(--accent); }
  .tabbar-item[aria-current="page"]::before { content: ""; position: absolute; top: -9px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tabbar-item:focus-visible { outline-offset: -2px; }
  #main { padding: 12px 12px calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); }
  .cab-seccion .acciones { margin-left: 0; width: 100%; }
  .cab-seccion .acciones .btn { flex: 1; }
  .col-opc { display: none; }
  .otp input { height: 48px; }
  .qr-caja { flex-direction: column; align-items: stretch; }
  .qr-caja .qr { align-self: center; }
  .codigos { grid-template-columns: 1fr 1fr; }
  #c-top { padding: 8px 12px; gap: 10px; }
  .yo-chip > span:last-child { display: none; }
  .cuenta { padding: 16px 12px 40px; gap: 22px; }
  .cuenta .cab-seccion h1 { font-size: var(--fs-xl); }
  .apps-grid, .datos-grid { grid-template-columns: 1fr; }
  .aj-cuerpo { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
  dialog.ajustes { width: calc(100% - 16px); }
  .tarjeta-c { padding: 16px; }
  .c-acciones .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
a.link { text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* ===== Modal «Alta desde checking» (mismo marco que «Ajustes del usuario», más ancho) ===== */
dialog.ajustes.alta { width: min(1100px, calc(100% - 32px)); }
.alta-pasos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 20px; list-style: none; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.alta-pasos li { display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-weight: 600; }
.alta-pasos li + li::before { content: ""; width: 32px; height: 1px; margin-right: 4px; background: var(--border-strong); }
.alta-pasos .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--border-strong); background: var(--surface); }
.alta-pasos li.actual { color: var(--text); }
.alta-pasos li.actual .n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-bg); }
.alta-pasos li.hecho .n { background: var(--ok-bg); border-color: transparent; color: var(--ok-fg); }
.alta-cuerpo { padding: 20px; overflow: auto; flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); gap: 24px; align-items: start; }
.alta-cuerpo.una { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.alta-izq { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.alta-herr { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.alta-herr .buscar { flex: 1 1 200px; max-width: none; }
.alta-herr .total { margin-left: auto; color: var(--text-soft); font-size: var(--fs-xs); font-weight: 600; }
.alta-todas { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; cursor: pointer; white-space: nowrap; }
.alta-todas input, .alta-sel { width: 16px; height: 16px; accent-color: var(--accent); }
.alta-lista { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.alta-cab, .alta-main { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; }
.alta-cab { background: var(--surface-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .3px; color: var(--text-soft); font-weight: 700; box-shadow: 0 1px 0 var(--border); }
.alta-fila { border-bottom: 1px solid var(--border); }
.alta-fila:last-child { border-bottom: 0; }
.alta-fila.sel { background: color-mix(in srgb, var(--accent-bg) 55%, transparent); }
.alta-fila.inactiva .persona b { color: var(--text-soft); }
.alta-main .persona { min-width: 0; }
.alta-main .persona > span:last-child { min-width: 0; }
.alta-main .persona .js-chips:not(:empty) { display: block; margin-top: 3px; }
.alta-main .persona b, .alta-main .persona small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alta-main .campo { min-width: 0; gap: 4px; }
.alta-main input[type="text"] { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 9px; font-size: var(--fs-sm); }
.alta-main input[type="text"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.alta-main input[aria-invalid="true"] { border-color: var(--bad); }
.perm-ui { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.alta-comunes .perm-ui { grid-template-columns: 1fr; }
.alta-comunes { display: flex; flex-direction: column; gap: 16px; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; background: var(--surface); }
.alta-comunes .aj-sec { display: flex; align-items: center; gap: 8px; }
.alta-comunes .aj-sec .chip { margin-left: auto; text-transform: none; letter-spacing: 0; }
.alta-comunes #com-depto { width: 100%; }
.alta-comunes .seg { flex-wrap: wrap; }
.ajustes footer .alta-nota { margin-right: auto; color: var(--text-soft); font-size: var(--fs-xs); font-weight: 600; text-align: left; }
.ajustes footer .alta-nota.err { color: var(--bad-fg); }
.alta-col-titulo { margin: 0; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); padding-bottom: 6px; border-bottom: 1px solid var(--border); }

/* paso 2 */
.res-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.res-card:hover { border-color: var(--border-strong); }
.res-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.res-card .avatar { width: 34px; height: 34px; margin-top: 2px; }
.res-card .res-datos { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.res-card b { font-weight: 600; }
.res-card .res-mail { font-family: Consolas, monospace; font-size: 12px; color: var(--text-soft); overflow-wrap: anywhere; }
.res-comun { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.res-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.res-lista { display: flex; flex-direction: column; gap: 8px; }
.aviso ul { margin: 6px 0 0; padding-left: 18px; font-family: Consolas, monospace; font-size: 12px; }
.aviso > span:last-child { min-width: 0; }
.mail-marco { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); min-width: 0; }
.mail-cab { margin: 0; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; font-size: var(--fs-xs); }
.mail-cab dt { color: var(--text-soft); font-weight: 600; }
.mail-cab dd { margin: 0; overflow-wrap: anywhere; }
/* El correo es siempre claro, como llegará a cualquier bandeja: no sigue el tema del panel */
.mail { background: #eef0f6; padding: 16px; color: #1c232c; font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.mail-tarjeta { background: #fff; max-width: 540px; margin: 0 auto; border-radius: 10px; overflow: hidden; font-size: 14px; line-height: 1.55; }
.mail-banda { background: #000038; padding: 14px 22px; color: #fff; font-size: 16px; font-weight: 700; }
.mail-cuerpo { padding: 20px 22px 22px; }
.mail-cuerpo p { margin: 0 0 12px; color: #1c232c; line-height: 1.55; }
.mail-cuerpo h5 { margin: 18px 0 6px; font-size: 14px; }
.mail-cuerpo ul, .mail-cuerpo ol { margin: 0 0 12px; padding-left: 20px; }
.mail-cuerpo li { margin-bottom: 4px; }
.mail-btn { display: inline-block; background: #1301e3; color: #fff !important; padding: 11px 22px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.mail-enlace { font-family: Consolas, monospace; font-size: 12px; color: #566275; overflow-wrap: anywhere; }
.mail-cuerpo a { color: #1301e3; }
.mail-aviso { margin-top: 16px; padding: 10px 12px; background: #f5f8fc; border-radius: 8px; font-size: 13px; color: #566275; }
.mail-pie { font-size: 12px; color: #566275; margin-top: 16px; }

/* paso 3 */
.fin-fila { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.fin-fila .persona { min-width: 0; }
.fin-fila .persona small { display: block; overflow-wrap: anywhere; }
.fin-pasos { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fin-pasos > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fin-ok { color: var(--ok-fg); font-weight: 600; }
.fin-mal { color: var(--bad-fg); font-weight: 600; }
.fin-cad { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.fin-lista { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 900px) {
  .alta-cuerpo { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
  .alta-cab { display: none; }
  .alta-main { grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "chk pers" ". usr"; row-gap: 8px; }
  .alta-main > .alta-sel { grid-area: chk; }
  .alta-main > .persona { grid-area: pers; }
  .alta-main > .alta-usr { grid-area: usr; }
  .perm-ui { grid-template-columns: 1fr; }
  .fin-fila { grid-template-columns: 1fr; gap: 10px; }
  .alta-pasos { padding: 10px 14px; }
  .alta-pasos li:not(.actual) span:not(.n) { display: none; }
  .alta-pasos li + li::before { width: 14px; }
  .mail { padding: 8px; }
  .ajustes footer { flex-wrap: wrap; }
  .ajustes footer .alta-nota { flex: 1 1 100%; }
}

/* ===== Estado con caducidad (Usuarios e Invitaciones) ===== */
.cad-fecha { display: block; font-size: var(--fs-xs); color: var(--text-soft); margin-top: 2px; }
tr.nueva td { animation: nueva 2.4s ease-out 1; }
@keyframes nueva { from { background: var(--ok-bg); } to { background: transparent; } }
#p1-vacio { padding: 20px; text-align: center; margin: 0; }
