/* ==========================================================================
   Portal de módulos (/inicio) — "constelación"
   Cielo técnico: la plataforma I+D es el núcleo; cada módulo es una estrella en órbita unida al núcleo
   por un arco curvo y a sus vecinas por su propia órbita. Usa los tokens de app.css (--bg, --surface, --line, --accent, …); el único
   color propio es el acento de cada módulo (--a, viene de /api/modulos).
   Solo se animan transform y opacity (más el trazo SVG de las líneas). Mobile-first en espíritu:
   en pantallas chicas o bajas la constelación pasa a lista vertical (ver bloque "modo lista").
   ========================================================================== */

:root {
  --ease: cubic-bezier(.23, 1, .32, 1);           /* ease-out fuerte: respuesta inmediata, aterriza suave */
  --t-rapida: 180ms;
  --t-media: 260ms;
}

html { -webkit-font-smoothing: antialiased; }
body { position: relative; background: var(--bg); }

/* ---------- fondo: noche profunda (oscuro) / plano técnico (claro) ---------- */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 54%, color-mix(in srgb, var(--info) 8%, var(--surface)) 0, var(--bg) 58%, var(--bg-2) 100%);
}
:root[data-theme="light"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--line-2) 16%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--line-2) 16%, transparent) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 54%, #000 20%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 75% at 50% 54%, #000 20%, transparent 78%);
}
.campo { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; display: block; }

.salto { position: absolute; left: 8px; top: -64px; z-index: 20; padding: 12px 16px; border-radius: var(--r-1); background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-weight: 700; }
.salto:focus { top: 8px; }

.portal { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- cabecera ---------- */
.cab {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "marca saludo sistema tema";
  align-items: center; gap: 8px 28px;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--bg-2) 62%, transparent);
}
.marca { grid-area: marca; display: flex; align-items: center; gap: 10px; min-width: 0; }
.marca .sello { width: 34px; height: 34px; flex: none; color: var(--accent-text); }
.marca b { font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: .03em; }
.marca .sub { padding-left: 10px; border-left: 1px solid var(--line-2); color: var(--muted); font-size: 15px; line-height: 1.1; }

.saludo { grid-area: saludo; display: grid; gap: 1px; min-width: 0; }
.linea2 { display: flex; align-items: center; flex-wrap: wrap; gap: 0 18px; min-width: 0; }
.hola { font-size: 20px; font-weight: 700; line-height: 1.15; min-height: 1.15em; }
.fecha { color: var(--muted); font-size: 15px; line-height: 1.2; min-height: 1.2em; }
.ses { display: flex; align-items: center; gap: 4px 12px; min-width: 0; font-size: 15px; line-height: 1.2; }
.ses[hidden] { display: none; }
.quien { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rol { flex: none; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.salir { flex: none; min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: var(--r-1); }
.salir:hover { color: var(--text); }
.salir:disabled { opacity: .6; cursor: default; }

.sistema { grid-area: sistema; display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; justify-content: flex-end; }
.reloj { font-size: 20px; font-weight: 500; letter-spacing: .02em; min-width: 5ch; text-align: right; }
.srv { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.ver { color: var(--faint); font-size: 13px; }
.tema { grid-area: tema; }
.punto { position: relative; width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--faint); }
.punto[data-s="on"] { background: var(--ok); }
.punto[data-s="off"] { background: var(--bad); }
.punto::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); opacity: 0; }

/* ---------- zona del cielo ---------- */
.cielo { flex: 1; display: flex; flex-direction: column; min-height: 0; outline: none; }
.denegado { display: flex; align-items: center; gap: 10px; margin: 12px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); padding: 4px 4px 4px 14px; border-radius: 8px;
            background: color-mix(in srgb, var(--warn) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 60%, var(--line)); color: var(--text); position: relative; z-index: 6; }
.denegado[hidden] { display: none; }
.denegado > svg { flex: none; color: var(--warn); }
.denegado p { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.3; padding: 6px 0; }
.intro { padding: 18px max(20px, env(safe-area-inset-left)) 0; max-width: 560px; }
.intro h1 { font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: .005em; }
.intro p { margin-top: 6px; color: var(--muted); font-size: 15px; max-width: 46ch; text-wrap: pretty; }
.solo-movil { display: none; }

.escena { --core: 112px; position: relative; flex: 1; min-height: 460px; overflow: hidden; }

/* ---------- órbitas y trazas (todo curvo: elipses, arcos de elipse y brazos Bézier) ---------- */
.trazas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* Una sola trayectoria por órbita: orb (base), tray (tramo iluminado) y glow (cometa) son la misma elipse; tray y glow solo recortan con dasharray, mismo grosor y sin hit-testing */
#orbitas ellipse { fill: none; pointer-events: none; }
#orbitas .orb { stroke-width: 1; opacity: .55; }   /* trazo con degradado #gOrb: tenue detrás, firme delante */
#orbitas .tray { stroke: var(--a, var(--accent-text)); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 0 1; opacity: 0; transition: opacity var(--t-media) var(--ease); }
#orbitas .tray.on { opacity: .95; }
#orbitas .glow { stroke: var(--accent-text); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: .03 .97; opacity: .35; }
.lin { transition: opacity var(--t-media) var(--ease); }
.lin path { fill: none; }
.lin .base { stroke: var(--line-2); stroke-width: 1; opacity: .5; stroke-dasharray: 1 2; }
.lin .luz { stroke: var(--a, var(--accent)); stroke-width: 1.25; stroke-linecap: round; pointer-events: none; stroke-dasharray: 1 2; stroke-dashoffset: 1; transition: stroke-dashoffset 420ms var(--ease); }
.lin.on .luz { stroke-dashoffset: 0; }
.escena[data-act] .lin:not(.on) { opacity: .45; }

/* v1.4.75: póster de carga estático (sin animación). Se desvanece cuando inicio.js pone html.listo; si el script falla,
   se oculta solo a los 15 s para no tapar la página. */
.carga { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; color: var(--muted); pointer-events: none;
         transition: opacity .45s var(--ease), visibility 0s linear .45s; animation: carga-fuera .4s linear 15s forwards; }
.carga svg { width: 100%; height: 100%; }
html.listo .carga { opacity: 0; visibility: hidden; }
@keyframes carga-fuera { to { opacity: 0; visibility: hidden; } }
.escena[data-act] #orbitas .glow { opacity: 0; transition: opacity var(--t-media) var(--ease); }

/* ---------- núcleo: la plataforma ---------- */
.nucleo { position: absolute; left: 50%; top: var(--cy, 50%); width: var(--core); height: var(--core); transform: translate(-50%, -50%); z-index: 2; display: grid; place-items: center; pointer-events: none; }
.nucleo::before { content: ""; position: absolute; inset: -80%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent) 0, transparent 62%); opacity: .55; }
.anillo { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px dashed var(--line-2); }
.anillo.a { width: calc(var(--core) * 1.36); height: calc(var(--core) * 1.36); margin: calc(var(--core) * -.68) 0 0 calc(var(--core) * -.68); opacity: .6; }
.anillo.b { width: calc(var(--core) * 1.62); height: calc(var(--core) * 1.62); margin: calc(var(--core) * -.81) 0 0 calc(var(--core) * -.81); border-style: dotted; opacity: .4; }
.disco { position: relative; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: var(--accent-text);
         background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 9%, transparent); }
.disco svg { width: 62%; height: 62%; overflow: visible; }
.disco text { font-family: var(--font-ui); font-weight: 700; font-size: 12.5px; letter-spacing: .03em; }

/* ---------- estrellas (módulos) ---------- */
.astros { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; z-index: 3; pointer-events: none; }
.mod { --d: 26px; position: absolute; left: 0; top: 0; width: 0; height: 0; }
.mod:not([data-estado="disponible"]) { --d: 16px; }
.est { position: absolute; left: 0; top: 0; width: 44px; height: 44px; transform: translate(-50%, -50%); display: grid; place-items: center;
       padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; text-align: center; cursor: pointer; outline: none; pointer-events: auto; touch-action: manipulation; }
.est::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; }   /* área de hover: solo este pseudo-elemento transparente (las órbitas no reciben puntero) */
.est[aria-disabled="true"] { cursor: not-allowed; }
.astro { position: relative; width: var(--d); height: var(--d); border-radius: 50%; display: grid; place-items: center;
         background: radial-gradient(circle at 36% 32%, #fff 0, color-mix(in srgb, var(--a) 60%, #fff) 26%, var(--a) 62%);
         border: 2px solid color-mix(in srgb, var(--a) 55%, var(--text));
         box-shadow: 0 0 0 5px color-mix(in srgb, var(--a) 14%, transparent);
         transition: transform var(--t-media) var(--ease); }
.astro::before, .astro::after { content: ""; position: absolute; left: 50%; top: 50%; width: calc(var(--d) * 3.4); height: 1px; pointer-events: none; opacity: .6;
                                 background: linear-gradient(90deg, transparent, var(--a) 50%, transparent); transform: translate(-50%, -50%); transition: opacity var(--t-media) var(--ease); }
.astro::after { width: calc(var(--d) * 1.9); transform: translate(-50%, -50%) rotate(90deg); }   /* el rayo vertical es corto: no pisa la etiqueta */
.halo { position: absolute; inset: -130%; border-radius: 50%; pointer-events: none; opacity: .55;
        background: radial-gradient(circle, color-mix(in srgb, var(--a) 55%, transparent) 0, transparent 62%); transition: opacity var(--t-media) var(--ease), transform var(--t-media) var(--ease); }
.onda { position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--a); opacity: 0; pointer-events: none; }
.ico { display: none; }
.cand { position: absolute; right: -9px; bottom: -9px; width: 17px; height: 17px; padding: 2px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line-2);
        fill: none; stroke: var(--bad); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* apagadas: próximamente / mantenimiento */
.mod:not([data-estado="disponible"]) .astro { background: color-mix(in srgb, var(--a) 42%, var(--bg)); border-color: color-mix(in srgb, var(--a) 35%, var(--line-2)); box-shadow: none; }
.mod:not([data-estado="disponible"]) .astro::before, .mod:not([data-estado="disponible"]) .astro::after { opacity: .22; }
.mod:not([data-estado="disponible"]) .halo { opacity: .16; }
.mod[data-estado="mantenimiento"] .astro { border-style: dashed; }

/* etiqueta bajo la estrella (el texto no se atenúa: se mantiene el contraste) */
.rot { position: absolute; left: 50%; top: calc(50% + var(--d) / 2 + 15px); transform: translateX(-50%); width: max-content; max-width: 148px;
       display: flex; flex-direction: column; align-items: center; gap: 1px; pointer-events: auto; text-shadow: 0 0 7px var(--bg), 0 0 2px var(--bg); }
.nom { font-size: 17px; font-weight: 700; line-height: 1.1; letter-spacing: .01em; }
.mod[data-estado="disponible"] .nom { font-size: 20px; }
.mod:not([data-estado="disponible"]) .nom { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--muted); }
.tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.mod[data-estado="disponible"] .tag { color: var(--ok); }
.mod[data-estado="mantenimiento"] .tag { color: var(--warn); }
.mod[data-permiso="no"] .tag { color: var(--bad); }
.mod[data-permiso="no"] .astro { filter: saturate(.45); }
.go { display: none; }
.desc { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* estado activo (cursor, foco de teclado o toque): crece, brilla y se detiene su órbita (desde JS) */
.est[data-on] .astro { transform: scale(1.4); }
/* v1.4.38: profundidad. --p (0.72-1) la pone colocar(): detrás del núcleo la estrella es más chica y tenue */
.mod .astro { scale: var(--p, 1); }
.mod { opacity: calc(.45 + .55 * (var(--p, 1) - .72) / .28); }
.mod[data-tapada] .rot { opacity: .2; transition: opacity var(--t-media) var(--ease); }
.mod:has(.est[data-on]) { opacity: 1; }
.est[data-on] .astro::before, .est[data-on] .astro::after { opacity: 1; }
.est[data-on] .halo { opacity: 1; transform: scale(1.25); }
.est[data-on] .nom { color: var(--text); }
.est:focus-visible .astro { outline: 2px solid var(--accent-text); outline-offset: 7px; }
.est:focus-visible .nom { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.est[data-cargando] .astro { opacity: .7; }
/* v1.4.59: planetas, no esferas. Mismo color de acento (--a) con superficie, lado nocturno y atmósfera.
   Tres tipos alternados: gigante con bandas y anillo (3n+1), rocoso con continentes y cráteres (3n+2) y bandas con tormenta (3n). */
.mod .astro {
  --oscuro: color-mix(in srgb, var(--a) 55%, #000);
  --claro: color-mix(in srgb, var(--a) 55%, #fff);
  border: 0;
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,.5) 0, rgba(255,255,255,0) 26%),
    var(--sup, none),
    radial-gradient(circle at 36% 32%, var(--claro) 0, var(--a) 48%, var(--oscuro) 100%);
  box-shadow:
    inset calc(var(--d) * -.2) calc(var(--d) * -.1) calc(var(--d) * .28) rgba(0,0,0,.6),
    inset 1px 1px 2px rgba(255,255,255,.35),
    0 0 0 1.5px color-mix(in srgb, var(--a) 30%, transparent),
    0 0 calc(var(--d) * .45) color-mix(in srgb, var(--a) 40%, transparent);
}
/* gigante gaseoso: bandas inclinadas como el anillo */
.mod:nth-child(3n+1) .astro {
  --sup: linear-gradient(-16deg,
    transparent 0 14%, color-mix(in srgb, var(--oscuro) 55%, transparent) 14% 20%, transparent 20% 31%,
    color-mix(in srgb, var(--claro) 45%, transparent) 31% 37%, color-mix(in srgb, var(--oscuro) 40%, transparent) 37% 45%,
    transparent 45% 56%, color-mix(in srgb, var(--oscuro) 50%, transparent) 56% 61%, color-mix(in srgb, var(--claro) 40%, transparent) 61% 70%,
    transparent 70% 79%, color-mix(in srgb, var(--oscuro) 45%, transparent) 79% 85%, transparent 85%);
}
/* rocoso: continentes irregulares y cráteres */
.mod:nth-child(3n+2) .astro {
  --sup:
    radial-gradient(circle at 66% 64%, color-mix(in srgb, var(--oscuro) 70%, transparent) 0 7%, transparent 9%),
    radial-gradient(circle at 30% 70%, color-mix(in srgb, var(--oscuro) 55%, transparent) 0 5%, transparent 7%),
    radial-gradient(ellipse 30% 20% at 42% 44%, color-mix(in srgb, var(--oscuro) 45%, transparent) 0 60%, transparent 100%),
    radial-gradient(ellipse 24% 32% at 70% 34%, color-mix(in srgb, var(--claro) 35%, transparent) 0 55%, transparent 100%),
    radial-gradient(ellipse 34% 16% at 34% 82%, color-mix(in srgb, var(--oscuro) 40%, transparent) 0 55%, transparent 100%);
}
/* bandas finas con una gran tormenta ovalada */
.mod:nth-child(3n) .astro {
  --sup:
    radial-gradient(ellipse 17% 10% at 62% 60%, color-mix(in srgb, var(--claro) 80%, transparent) 0 35%, color-mix(in srgb, var(--oscuro) 75%, transparent) 55%, transparent 100%),
    repeating-linear-gradient(4deg, transparent 0 9%, color-mix(in srgb, var(--oscuro) 32%, transparent) 9% 13%, transparent 13% 18%, color-mix(in srgb, var(--claro) 28%, transparent) 18% 21%);
}
/* anillo: la mitad trasera solo asoma fuera del disco; la delantera cruza por encima */
.mod .astro::before, .mod .astro::after { width: auto; height: auto; background: none; opacity: 0; transform: none; }
.mod:nth-child(3n+1) .astro::before, .mod:nth-child(3n+1) .astro::after {
  left: 50%; top: 50%; width: calc(var(--d) * 2); height: calc(var(--d) * .56); border-radius: 50%; opacity: .9;
  border: calc(var(--d) * .07) solid color-mix(in srgb, var(--claro) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--oscuro) 45%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--oscuro) 35%, transparent);
  transform: translate(-50%, -50%) rotate(-16deg);
}
.mod:nth-child(3n+1) .astro::before {
  -webkit-mask: radial-gradient(circle calc(var(--d) * .5) at 50% 50%, transparent 98%, #000 100%);
          mask: radial-gradient(circle calc(var(--d) * .5) at 50% 50%, transparent 98%, #000 100%);
}
.mod:nth-child(3n+1) .astro::after { clip-path: inset(50% 0 0 0); }
.est[data-on] .astro::before, .est[data-on] .astro::after { opacity: 0; }
.mod:nth-child(3n+1) .est[data-on] .astro::before, .mod:nth-child(3n+1) .est[data-on] .astro::after { opacity: 1; }
.mod:not([data-estado="disponible"]) .astro { background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,.25) 0, rgba(255,255,255,0) 26%), var(--sup, none),
    radial-gradient(circle at 36% 32%, var(--claro) 0, var(--a) 48%, var(--oscuro) 100%);
  filter: saturate(.45) brightness(.72); box-shadow: inset calc(var(--d) * -.2) calc(var(--d) * -.1) calc(var(--d) * .28) rgba(0,0,0,.6); }
.mod:nth-child(3n+1):not([data-estado="disponible"]) .astro::before, .mod:nth-child(3n+1):not([data-estado="disponible"]) .astro::after { opacity: .45; }
.mod[data-estado="mantenimiento"] .astro { outline: 1.5px dashed color-mix(in srgb, var(--a) 45%, var(--line-2)); outline-offset: 3px; }
/* v1.4.75: planeta 3D (planetas.js, WebGL). El canvas es 1,2 veces el disco para dejar ver la atmósfera; el halo queda debajo.
   El anillo de los gigantes: la mitad trasera va bajo el canvas (::before) y la delantera (::after) encima. */
.pl-cv { position: absolute; left: 50%; top: 50%; width: calc(var(--d) * 1.2); height: calc(var(--d) * 1.2); transform: translate(-50%, -50%); pointer-events: none; }
.mod:nth-child(3n+1) .astro::after { z-index: 2; }

/* ---------- ficha de detalle ---------- */
.ficha { position: absolute; left: 0; top: 0; z-index: 5; width: min(304px, calc(100% - 16px)); visibility: hidden; pointer-events: none; transition: visibility 0s linear var(--t-rapida); }
.ficha[data-abierta="true"] { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.fcard { opacity: 0; transform: translateY(6px); padding: 14px 16px 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2); border-top: 3px solid var(--a, var(--accent)); box-shadow: var(--shadow);
         transition: opacity var(--t-rapida) var(--ease), transform var(--t-rapida) var(--ease); }
.ficha[data-abierta="true"] .fcard { opacity: 1; transform: none; }
.fcab { display: flex; align-items: center; gap: 10px; }
.fico { flex: none; color: color-mix(in srgb, var(--a, var(--accent)) 55%, var(--text)); }
.fcab h2 { font-size: 22px; line-height: 1.1; font-weight: 700; }
.fest { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.fpunto { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.ficha[data-e="disponible"] .fest { color: var(--ok); }
.ficha[data-e="mantenimiento"] .fest { color: var(--warn); }
.ficha[data-e="sin"] .fest, .ficha[data-e="sin"] .faviso { color: var(--bad); }
.fdesc { margin-top: 6px; color: var(--muted); font-size: 16px; line-height: 1.35; text-wrap: pretty; }
.faviso { margin-top: 8px; color: var(--warn); font-size: 15px; font-weight: 600; }
.fentrar { width: 100%; margin-top: 14px; }

/* ---------- mensajes: cargando / error / vacío / aviso de acción ---------- */
.msg { position: absolute; left: 50%; top: calc(var(--cy, 50%) + var(--core) * .9); transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 12px; width: max-content; max-width: min(90%, 420px); text-align: center; color: var(--muted); font-size: 16px; }
.msg p:empty { display: none; }
.msg[data-k="error"] p { color: var(--bad); font-weight: 600; }
.aviso { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; max-width: min(92%, 460px); padding: 9px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 15px; font-weight: 600; text-align: center; }
.aviso:empty { display: none; }

/* sin JavaScript */
.plano { position: relative; z-index: 4; margin: 24px auto 0; padding: 0 20px; max-width: 520px; list-style: none; }
.plano li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.plano-n { position: relative; z-index: 4; max-width: 520px; margin: 12px auto 0; padding: 0 20px; color: var(--muted); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes enciende { from { opacity: 0; } }
@keyframes nace { from { transform: scale(.35); } }
@keyframes entra { from { opacity: 0; transform: scale(.9); } }
@keyframes traza { from { stroke-dashoffset: 1; } }
@keyframes recorre { to { stroke-dashoffset: -1; } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes respira { from { opacity: .35; } to { opacity: .65; } }
@keyframes onda { 0% { opacity: .65; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(3); } }
@keyframes latido { 0% { opacity: .5; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(2.8); } }
@keyframes aparece { from { opacity: 0; transform: translate(-50%, 6px); } }
@keyframes pulso-halo { from { opacity: .45; transform: scale(.94); } to { opacity: .85; transform: scale(1.06); } }

/* ---------- movimiento (solo si el sistema lo permite) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* secuencia de entrada, una sola vez: núcleo, órbitas, estrellas que se encienden una a una, trazas que se dibujan */
  .nucleo .disco { animation: entra 420ms var(--ease) backwards; }
  #orbitas ellipse { animation: fade-in 600ms ease-out 180ms backwards; }
  #orbitas .glow { animation: fade-in 600ms ease-out 180ms backwards, recorre 70s linear infinite; animation-delay: 180ms, calc(var(--n, 0) * -23s); }
  .mod { animation: enciende 420ms var(--ease) backwards; animation-delay: calc(480ms + var(--i, 0) * 150ms); }
  .mod .astro { animation: nace 420ms var(--ease) backwards; animation-delay: calc(480ms + var(--i, 0) * 150ms); }
  .lin .base { animation: traza 900ms var(--ease) backwards; animation-delay: calc(700ms + var(--k, 0) * 150ms); }
  /* vida suave: anillos lentos (60–120 s), respiración del núcleo, pulso de la estrella principal */
  .anillo.a { animation: gira 90s linear infinite; }
  .anillo.b { animation: gira 120s linear infinite reverse; }
  .nucleo::before { animation: respira 6s ease-in-out infinite alternate; }
  .mod[data-estado="disponible"] .halo { animation: pulso-halo 3.4s ease-in-out infinite alternate; }
  .mod[data-estado="disponible"] .onda { animation: onda 3.6s var(--ease) 1.8s infinite; }
  .est[data-on] .halo { animation: none; }
  .est[data-on] .onda { animation: none; opacity: 0; }
  .punto[data-s="on"]::after { animation: latido 2.4s ease-out infinite; }
  .aviso:not(:empty) { animation: aparece var(--t-media) var(--ease); }
  .tema:hover svg { transform: rotate(40deg); }
  .tema svg { transition: transform 400ms var(--ease); }
  .est:active .astro { transform: scale(1.22); }
}

/* Movimiento reducido: sin órbitas ni parallax (lo decide el JS); solo fundidos de opacidad cortos */
@media (prefers-reduced-motion: reduce) {
  .mod { animation: fade-in 150ms ease-out backwards; }
  .nucleo .disco, #orbitas ellipse { animation: fade-in 150ms ease-out backwards; }
  #orbitas .glow { display: none; }
  #orbitas .tray { transition: none; }
  .astro, .halo { transition: opacity 150ms ease-out; }
  .est[data-on] .astro { transform: none; outline: 2px solid var(--a); outline-offset: 4px; }
  .est[data-on] .halo { transform: none; }
  .lin .luz { stroke-dashoffset: 0; opacity: 0; transition: opacity 150ms ease-out; }
  .lin.on .luz { opacity: 1; }
  .fcard { transform: none; transition: opacity 150ms ease-out; }
  .onda { display: none; }
}

/* ---------- escritorio estrecho / tableta (641–1100 px): núcleo y etiquetas más compactos para que quepan las 7 estrellas ---------- */
@media (min-width: 641px) and (max-width: 1100px) {
  .escena { --core: 96px; }
  .est { width: 40px; height: 40px; }
  .rot { max-width: 118px; }
  .nom { font-size: 15px; }
  .mod[data-estado="disponible"] .nom { font-size: 17px; }
  .tag { font-size: 12px; }
  .cab { gap: 8px 16px; }
  .ver { display: none; }
  .ses { font-size: 14px; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .reloj { display: none; }
  #srvTxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- móvil (≤640 px): cabecera compacta. Marca I+D y tema siempre visibles; sesión en una línea truncada; sin reloj ni versión ---------- */
@media (max-width: 640px) {
  .cab { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "marca srv tema" "saludo saludo saludo"; gap: 0 10px;
         padding: max(8px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left)); }
  .marca { gap: 8px; }
  .marca .sello { width: 30px; height: 30px; }
  .marca b { font-size: 24px; }
  .marca .sub { font-size: 14px; padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .sistema { display: contents; }
  .reloj, .ver { display: none; }
  .srv { grid-area: srv; }
  #srvTxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* solo el punto; el texto queda para lectores de pantalla */
  .saludo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; }
  .hola { font-size: 17px; white-space: nowrap; }
  .linea2 { display: contents; }
  .fecha { flex: 1 1 0; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ses { flex: 1 0 100%; min-width: 0; font-size: 14px; gap: 8px; }
  .quien { flex: 1 1 auto; gap: 6px; }
  .rol { font-size: 12px; }
  .salir { min-height: 44px; padding: 0 6px; margin-right: -6px; }
  .intro { padding-top: 12px; padding-right: max(16px, env(safe-area-inset-right)); padding-left: max(16px, env(safe-area-inset-left)); }
  .denegado { margin-top: 10px; }
  .denegado p { font-size: 15px; }
}

/* ---------- modo lista: móvil (≤640 px) o pantallas bajas. Sin órbitas; estrellas grandes (≥48 px de toque); nada infinito animado (batería) ---------- */
@media (max-width: 640px), (max-height: 540px) {
  .solo-pc { display: none; }
  .solo-movil { display: inline; }
  .intro { padding-top: 14px; }
  .intro h1 { font-size: 24px; }
  .anillo, .nucleo::before, .halo, .onda, .punto::after { animation: none !important; }
  .onda { display: none; }

  .escena { display: flex; flex-direction: column; align-items: center; min-height: 0; overflow: visible;
            padding: 4px max(14px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .trazas, .ficha { display: none; }
  .nucleo { --core: 68px; position: relative; left: auto; top: auto; transform: none; flex: none; margin: 10px 0 22px; }
  .astros { position: relative; inset: auto; width: 100%; max-width: 540px; display: flex; flex-direction: column; gap: 10px; }
  .mod { position: relative; width: auto; height: auto; }
  .mod + .mod::before { content: ""; position: absolute; left: 34px; top: -10px; width: 1px; height: 10px; background: var(--line-2); }
  .est { position: relative; left: auto; top: auto; transform: none; width: 100%; height: auto; min-height: 76px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 14px;
         align-items: center; justify-items: start; text-align: left; padding: 10px 14px 10px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
  .est::before { display: none; }
  .est[data-on] { border-color: color-mix(in srgb, var(--a) 70%, var(--line-2)); background: var(--surface); }
  .est:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
  .est:focus-visible .astro { outline: 0; }
  .est[data-on] .astro, .est:active .astro { transform: none; }
  .est:active { background: var(--surface); }
  .mod { --d: 52px; }
  .mod:not([data-estado="disponible"]) { --d: 52px; }
  .astro { grid-row: 1 / span 2; background: color-mix(in srgb, var(--a) 20%, var(--surface)); border: 2px solid color-mix(in srgb, var(--a) 60%, var(--text)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 12%, transparent); }
  .mod:not([data-estado="disponible"]) .astro { background: color-mix(in srgb, var(--a) 12%, var(--surface)); border-color: color-mix(in srgb, var(--a) 40%, var(--line-2)); box-shadow: none; }
  .astro::before, .astro::after { display: none; }
  .halo { inset: -40%; }
  .ico { display: block; width: 24px; height: 24px; color: color-mix(in srgb, var(--a) 55%, var(--text)); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .cand { right: -6px; bottom: -6px; width: 20px; height: 20px; padding: 3px; }
  .rot { position: static; transform: none; width: auto; max-width: none; align-items: flex-start; grid-column: 2; grid-row: 1; text-shadow: none; gap: 2px; min-width: 0; }
  .nom, .mod[data-estado="disponible"] .nom { font-size: 19px; overflow-wrap: anywhere; }
  .tag { font-size: 13px; }
  .desc { position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; grid-column: 2; grid-row: 2; color: var(--muted); font-size: 15px; line-height: 1.3; text-wrap: pretty; }
  .go { display: inline-flex; grid-column: 3; grid-row: 1 / span 2; align-self: center; justify-self: end; color: var(--accent-text); font-weight: 700; font-size: 16px; }
  .mod:not([data-estado="disponible"]) .go { display: none; }
  .mod[data-permiso="no"] .astro { filter: none; }
  .mod[data-permiso="no"] .est { border-style: dashed; }
  .msg { position: static; transform: none; margin-top: 0; }
  .aviso { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) and (max-width: 359px) { .go { display: none !important; } .est { grid-template-columns: 52px minmax(0, 1fr); } }

/* =====================================================================================================
   Centro de control (v1.4.12): el núcleo es el botón de los administradores y despliega "Cuentas y módulos"
   ===================================================================================================== */
.nucbtn { position: absolute; inset: 0; z-index: 3; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.nucbtn[hidden] { display: none; }
.nucbtn::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--accent-text) 55%, transparent); transition: border-color var(--t-rapida) var(--ease), transform var(--t-rapida) var(--ease); }
.nucbtn:hover::before { border-color: var(--accent-text); transform: scale(1.05); }
.nucbtn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 14px; }
.nucbtn[aria-expanded="true"]::before { border-color: var(--accent-text); }
.nucleo[data-admin] .disco { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 18px color-mix(in srgb, var(--accent) 22%, transparent); }
.nucbtn .adm { position: absolute; left: 50%; top: calc(100% + var(--core) * .31 + 6px); transform: translateX(-50%); white-space: nowrap; padding: 3px 11px; border-radius: 999px;
               background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent-text) 50%, var(--line-2)); color: var(--accent-text); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
.escena[data-cc] :is(.trazas, .astros) { opacity: .28; transition: opacity var(--t-media) var(--ease); }
.escena[data-cc] .nucleo { opacity: .5; transition: opacity var(--t-media) var(--ease); }
/* constelación en pausa mientras el panel está abierto: !important solo aquí, porque las animaciones ya vienen fijadas con selectores más específicos */
.escena[data-cc] *, .escena[data-cc] *::before, .escena[data-cc] *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: no-preference) {
  .nucleo[data-admin] .nucbtn::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid var(--accent-text); opacity: 0; animation: cc-pulso 3.2s var(--ease) 2.4s infinite; }
}
@keyframes cc-pulso { 0% { opacity: .5; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.28); } }

.cc { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 7, 16, .6); opacity: 0; transition: opacity 250ms var(--ease); }
:root[data-theme="light"] .cc { background: rgba(13, 22, 48, .38); }
.cc[hidden] { display: none; }
.cc[data-abierto="true"] { opacity: 1; }
.cc-panel { --ox: 50%; --oy: 50%; position: relative; display: flex; flex-direction: column; width: min(960px, 100%); max-height: 80vh; max-height: 80dvh; background: var(--surface); color: var(--text);
            border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); outline: none;
            transform-origin: var(--ox) var(--oy); transform: scale(.3); opacity: 0; transition: transform 250ms var(--ease), opacity 250ms var(--ease), width 250ms var(--ease); }
.cc[data-abierto="true"] .cc-panel { transform: none; opacity: 1; }
/* vista «acceso»: el mismo contenedor, más compacto, con el formulario; la vista «cuentas» oculta el formulario y viceversa */
.cc[data-vista="acceso"] .cc-panel { width: min(420px, 100%); }
.cc[data-vista="acceso"] :is(.cc-barra, .cc-conf, .cc-inv, .cc-enl, .cc-mods, .cc-cuerpo, .cc-aviso, .cc-menu) { display: none; }
.cc[data-vista="cuentas"] .cc-acc { display: none; }
.cc-acc { display: flex; flex-direction: column; gap: 14px; padding: 8px 20px 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.cc-acc .input { width: 100%; min-height: 48px; font-size: 16px; }
.cc-sesnota { padding: 9px 12px; border-radius: 8px; font-size: 14.5px; line-height: 1.35; color: var(--text); background: color-mix(in srgb, var(--warn) 12%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); overflow-wrap: anywhere; }
.cc-sesnota[hidden], .cc-err[hidden], .cc-acc [hidden] { display: none; }
.cc-clave { position: relative; display: block; }
.cc-clave .input { padding-right: 84px; }
.cc-clave .btn { position: absolute; right: 4px; top: 2px; bottom: 2px; min-height: 0; min-width: 56px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--accent-text); font-size: 15px; font-weight: 600; }
.cc-clave .btn:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cc-clave .btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.cc-err { padding: 9px 12px; border-radius: 8px; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--bad) 50%, var(--line)); }
.cc-err a { display: inline-block; margin-top: 4px; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.cc-acc .btn-primary { min-height: 48px; font-size: 16px; font-weight: 700; }
.cc-acc .btn-primary:disabled { opacity: .7; cursor: progress; }

.cc-cab { display: flex; align-items: flex-start; gap: 12px; padding: 14px 10px 8px 20px; }
.cc-tit { flex: 1; min-width: 0; }
.cc-tit h2 { font-size: 22px; line-height: 1.15; font-weight: 700; }
.cc-tit p { margin-top: 2px; color: var(--muted); font-size: 14px; }
.cc-barra { display: flex; align-items: center; gap: 14px; padding: 6px 20px 12px; }
.cc-busca { position: relative; flex: 1; max-width: 360px; display: block; }
.cc-busca svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.cc-busca .input { width: 100%; min-height: 44px; padding-left: 38px; }
.cc-cuenta { margin-left: auto; color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; }
.cc-invbtn { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 44px; padding: 0 16px 0 12px; font-weight: 700; }
.cc-invbtn:disabled { opacity: .6; cursor: not-allowed; }

/* invitar por correo: formulario compacto y tarjeta con el enlace, dentro del mismo panel */
.cc-inv, .cc-enl { margin: 0 20px 12px; padding: 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); }
.cc-inv { flex: none; display: flex; flex-direction: column; gap: 12px; max-height: min(62vh, 480px); max-height: min(62dvh, 480px); overflow-y: auto; overscroll-behavior: contain; }
.cc-inv[hidden], .cc-enl[hidden], .cc-inv [hidden] { display: none; }
.cc-inv h3 { font-size: 16px; font-weight: 700; line-height: 1.2; }
.cc-inv-fila { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; }
.cc-inv .input { width: 100%; min-height: 44px; font-size: 16px; }
.cc-inv-mods { margin: 0; padding: 0; border: 0; min-width: 0; }
.cc-inv-mods legend { padding: 0; margin-bottom: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.cc-inv-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-im { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.1; cursor: pointer; }
.cc-im input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent-text); cursor: inherit; }
.cc-im .cc-ico { width: 20px; height: 20px; flex: none; color: color-mix(in srgb, var(--a, var(--accent)) 60%, var(--text)); }
.cc-im:has(:checked) { border-color: color-mix(in srgb, var(--a, var(--accent)) 70%, var(--line-2)); background: color-mix(in srgb, var(--a, var(--accent)) 16%, var(--surface)); }
.cc-im:has(:disabled) { opacity: .75; cursor: not-allowed; }
.cc-im:has(:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.cc-im[data-pron] { border-style: dashed; }
.cc-inv-smtp { padding: 9px 12px; border-radius: 8px; font-size: 14.5px; line-height: 1.35; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); }
.cc-inv-acc { display: flex; flex-wrap: wrap; gap: 10px; }
.cc-inv-acc .btn { min-height: 44px; font-weight: 700; }
.cc-inv-acc .btn:disabled { opacity: .7; cursor: progress; }
.cc-enl { flex: none; display: flex; flex-direction: column; gap: 8px; border-color: color-mix(in srgb, var(--info) 55%, var(--line-2)); }
.cc-enl p { margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
.cc-enl-t { font-size: 15px; font-weight: 700; }
.cc-enl-m { font-size: 14.5px; color: var(--muted); }
.cc-enl-fila { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-enl-fila .input { flex: 1 1 280px; min-width: 0; min-height: 44px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.cc-enl-fila .btn { min-height: 44px; }
.cc-pacc { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 3px; }
.cc-lnk { min-height: 28px; padding: 0 2px; border: 0; background: transparent; color: var(--accent-text); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cc-lnk-bad { color: var(--bad); }
.cc-lnk:disabled { opacity: .6; cursor: progress; text-decoration: none; }
.cc-lnk:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 3px; }
.cc-conf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 20px 10px; padding: 8px 8px 8px 14px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 12%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); }
.cc-conf[hidden] { display: none; }
.cc-conf p { flex: 1 1 260px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.cc-conf .btn { min-height: 44px; }
.cc-mods { display: none; }

.cc-cuerpo { position: relative; flex: 1; min-height: 120px; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.cc-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.cc-cuerpo:not([data-e="ok"]) .cc-scroll { display: none; }
.cc-estado { display: none; flex-direction: column; align-items: center; gap: 14px; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 16px; }
.cc-cuerpo:not([data-e="ok"]) .cc-estado { display: flex; }
.cc-cuerpo[data-e="error"] .cc-estado p { color: var(--bad); font-weight: 600; }
.cc-sk { display: none; width: min(100%, 560px); flex-direction: column; gap: 10px; }
.cc-cuerpo[data-e="carga"] .cc-sk { display: flex; }
.cc-sk i { display: block; height: 34px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 30%, var(--line) 50%, var(--surface-2) 70%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .cc-sk i { animation: shimmer 1.4s linear infinite; } }

.cc-tabla { width: 100%; min-width: 900px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.cc-tabla .cc-h-rol { width: 148px; }
.cc-tabla .cc-h-t { width: 58px; }
.cc-tabla th, .cc-tabla td { padding: 0 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cc-tabla thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); padding-top: 8px; padding-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; vertical-align: bottom; }
.cc-tabla .cc-h-cta, .cc-tabla .cc-cta { position: sticky; left: 0; z-index: 1; padding-left: 20px; width: 204px; background: var(--surface); }
.cc-tabla thead .cc-h-cta { z-index: 3; background: var(--surface-2); }
.cc-tabla .cc-h-c, .cc-tabla .cc-c { text-align: center; }
.cc-tabla tbody tr:hover :is(td, th) { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.cc-cta { font-weight: 400; padding-top: 8px; padding-bottom: 8px; }
.cc-cta .cc-mail { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cc-chip { display: inline-block; margin: 3px 6px 0 0; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.cc-chip[data-k="info"] { color: var(--info); }
.cc-chip[data-k="warn"] { color: var(--warn); }
.cc-nota { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.cc-rol { min-height: 44px; width: 100%; padding: 0 2px 0 8px; font-size: 14.5px; }
.cc-cl { display: grid; place-items: center; min-width: 44px; min-height: 52px; cursor: pointer; }
.cc-cl:has(:disabled) { cursor: not-allowed; }
.cc-tabla input[type="checkbox"], .cc-pill input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent-text); cursor: inherit; }
.cc-tabla input[type="checkbox"]:disabled { opacity: .7; }
.cc-tabla input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.cc-mh { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; width: 100%; min-width: 0; min-height: 44px; padding: 4px 2px 5px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.15; letter-spacing: 0; text-align: center; cursor: pointer; }
.cc-mh:hover, .cc-mh[aria-expanded="true"] { background: color-mix(in srgb, var(--a) 14%, var(--surface)); border-color: color-mix(in srgb, var(--a) 45%, var(--line)); }
.cc-mh .cc-ico { width: 22px; height: 22px; flex: none; padding: 3px; box-sizing: content-box; border-radius: 50%; background: color-mix(in srgb, var(--a) 22%, var(--surface)); color: color-mix(in srgb, var(--a) 55%, var(--text)); border: 1px solid color-mix(in srgb, var(--a) 55%, var(--line-2)); }
.cc-mn { overflow-wrap: normal; hyphens: none; }
.cc-mh small { font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 6px; border-radius: 999px; border: 1px dashed var(--line-2); line-height: 1.5; }
.cc-mh[data-pron] .cc-ico { border-style: dashed; background: transparent; }

.cc-menu { position: fixed; z-index: 70; min-width: 168px; display: flex; flex-direction: column; padding: 4px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow), 0 10px 30px -10px rgba(0, 0, 0, .6); }
.cc-menu[hidden] { display: none; }
.cc-menu button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 5px; background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.cc-menu button:hover, .cc-menu button:focus-visible { background: var(--surface-2); }
.cc-menu button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.cc-menu button[data-ac="quitar"] { color: var(--bad); }

.cc-aviso { min-height: 0; padding: 0 20px; font-size: 15px; font-weight: 600; }
.cc-aviso:not(:empty) { padding: 9px 20px; border-top: 1px solid var(--line); }
.cc-aviso[data-k="ok"] { color: var(--ok); }
.cc-aviso[data-k="bad"] { color: var(--bad); }

.cc-tarjetas { display: none; list-style: none; margin: 0; padding: 0; }
.cc-pill { position: relative; display: inline-flex; cursor: pointer; }
.cc-pill input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 1; cursor: inherit; }


/* móvil: hoja inferior a pantalla completa; la matriz pasa a tarjetas por cuenta */
@media (max-width: 640px) {
  .cc { padding: 0; align-items: stretch; background: var(--surface); }
  .cc-panel { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; box-shadow: none; transform: translateY(6%); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .cc-cab { padding: 10px 6px 4px 16px; }
  .cc-tit h2 { font-size: 21px; }
  .cc-barra { padding: 4px 16px 10px; flex-wrap: wrap; gap: 6px 12px; }
  .cc-busca { max-width: none; flex: 1 1 100%; }
  .cc-conf { margin: 0 12px 10px; }
  .cc-invbtn { flex: 1 1 auto; justify-content: center; }
  .cc-cuenta { flex: none; }
  .cc-inv, .cc-enl { margin: 0 12px 10px; padding: 12px; max-height: 58dvh; }
  .cc-enl { max-height: none; }
  .cc-inv-fila { grid-template-columns: minmax(0, 1fr); }
  .cc-im { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .cc-im span { min-width: 0; overflow-wrap: anywhere; }
  .cc-inv-acc .btn, .cc-enl-fila .btn { flex: 1 1 140px; }
  .cc-enl-fila .input { flex-basis: 100%; }
  .cc-pacc { gap: 0 6px; margin: 4px 0 0 -8px; }
  .cc-lnk { min-height: 44px; padding: 0 8px; font-size: 15px; }
  /* una sola fila deslizable con su etiqueta: antes ocupaba ~1/3 de la pantalla antes de la primera cuenta */
  .cc-mods { display: flex; flex-wrap: nowrap; gap: 6px; padding: 0 12px 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .cc-mods::-webkit-scrollbar { display: none; }
  .cc-mods::before { content: "Dar o quitar a todos:"; flex: none; align-self: center; font-size: 13px; font-weight: 600; color: var(--muted); }
  .cc-mods .cc-mh { flex: none; min-height: 44px; }
  .cc-mods .cc-mh { flex-direction: row; width: auto; min-width: 0; padding: 4px 10px 4px 6px; border-color: var(--line); gap: 6px; font-size: 13px; }
  .cc-mods .cc-mh small { display: none; }
  .cc-tabla { display: none; }
  .cc-tarjetas { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 18px; }
  .cc-card { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
  .cc-chead { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
  .cc-chead .cc-mail { flex: 1 1 100%; font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
  .cc-card .cc-nota { margin-top: 4px; }
  .cc-crow { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
  .cc-rl { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
  .cc-rl .cc-rol { flex: 1; min-width: 0; color: var(--text); }
  .cc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
  .cc-pb { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.1; }
  .cc-pb::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--line-2); background: transparent center / 12px no-repeat; }
  .cc-pb .cc-ico { width: 20px; height: 20px; flex: none; order: 2; color: color-mix(in srgb, var(--a, var(--accent)) 60%, var(--text)); }
  .cc-pill input:checked + .cc-pb { border-color: color-mix(in srgb, var(--a, var(--accent)) 70%, var(--line-2)); background: color-mix(in srgb, var(--a, var(--accent)) 18%, var(--surface)); }
  .cc-pill input:checked + .cc-pb::before { border-color: var(--accent-text); background-color: var(--accent-text); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.3 2.4 2.4 4.6-5'/%3E%3C/svg%3E"); }
  .cc-pill input:focus-visible + .cc-pb { outline: 2px solid var(--accent-text); outline-offset: 2px; }
  .cc-pill input:disabled + .cc-pb { opacity: .7; }
  .cc-pill[data-pron] .cc-pb { border-style: dashed; }
  .cc[data-vista="acceso"] { align-items: flex-end; background: rgba(4, 7, 16, .6); }
  :root[data-theme="light"] .cc[data-vista="acceso"] { background: rgba(13, 22, 48, .38); }
  .cc[data-vista="acceso"] .cc-panel { width: 100%; height: auto; max-height: 92dvh; overflow-y: auto; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -16px 40px -16px rgba(0, 0, 0, .6); padding-top: 0; transform: translateY(40%); }
  .cc[data-vista="acceso"][data-abierto="true"] .cc-panel { transform: none; }
  .cc-acc { padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
  .cc-aviso { padding: 0 16px; }
  .cc-aviso:not(:empty) { padding: 9px 16px; }
  .nucleo { margin-bottom: 52px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) { .cc[data-abierto="true"] .cc-panel { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cc, .cc-panel, .nucbtn::before { transition: none; }
  .cc-panel { transform: none; }
}
:root[data-theme="light"] .cc-panel { box-shadow: 0 24px 60px -24px rgba(13, 22, 48, .55); }
@media (max-width: 640px), (max-height: 540px) { .nucleo { margin-bottom: 52px; } }

/* v1.4.51 · Lunas: satélites de un módulo (Pruebas automáticas en Escáner TQT). Órbita elíptica de 48×16 px con dos vaivenes
   senoidales desfasados un cuarto (X en .luna-sis, Y en .luna); de 0 a 50 % pasa por delante (abajo) y de 50 a 100 % por detrás. */
.mod .est { z-index: 1; }
.lunas { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.lunas::before { content: ""; position: absolute; left: -48px; top: -16px; width: 96px; height: 32px; border-radius: 50%;
                 border: 1px solid color-mix(in srgb, var(--a) 60%, var(--line-2));
                 -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.18), #000 70%); mask-image: linear-gradient(to bottom, rgba(0,0,0,.18), #000 70%); }
.lunas::after { content: ""; position: absolute; left: -48px; top: -16px; width: 96px; height: 32px; border-radius: 50%; pointer-events: none;
                box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--a) 70%, transparent); opacity: .7; }
.luna-sis { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2; transform: translateX(42px); }
.luna { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; transform: translateY(8px); pointer-events: auto; color: inherit; text-decoration: none; outline: none; }
.luna::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }   /* área de hover cómoda (28 px) */
a.luna { cursor: pointer; }
/* esfera: luz arriba-izquierda, terminador a la derecha, tres cráteres y halo del color del planeta */
.luna-esf { position: absolute; inset: 0; border-radius: 50%; transition: transform var(--t-rapida) var(--ease), box-shadow var(--t-rapida) var(--ease);
            background: radial-gradient(circle at 64% 60%, rgba(40,34,26,.30) 0 11%, transparent 13%),
                        radial-gradient(circle at 36% 68%, rgba(40,34,26,.22) 0 8%, transparent 10%),
                        radial-gradient(circle at 56% 30%, rgba(40,34,26,.18) 0 6%, transparent 8%),
                        radial-gradient(circle at 34% 28%, #FFFDF6 0, #E2DCCD 34%, #A39B8B 66%, #57514A 92%);
            box-shadow: inset -3px -2px 4px rgba(0,0,0,.45), inset 1px 1px 1px rgba(255,255,255,.55),
                        0 0 0 1px color-mix(in srgb, var(--a) 40%, transparent), 0 0 12px 1px color-mix(in srgb, var(--a) 45%, transparent); }
/* etiqueta: ficha sólida unida a la luna por un trazo corto */
.luna-nom { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
            font-size: 11px; font-weight: 600; letter-spacing: .02em; line-height: 1; color: var(--muted);
            padding: 4px 8px 4px 6px; border-radius: 999px; background: var(--surface, var(--bg));
            border: 1px solid color-mix(in srgb, var(--a) 35%, var(--line));
            box-shadow: 0 1px 2px rgba(0,0,0,.12); opacity: 0; pointer-events: none; translate: -4px 0;
            transition: opacity var(--t-rapida) var(--ease), translate var(--t-rapida) var(--ease); }
/* el nombre solo aparece encima de la luna */
.luna:hover .luna-nom, .luna:focus-visible .luna-nom { opacity: 1; translate: 0 0; pointer-events: auto; color: var(--text); border-color: var(--a); }
a.luna:focus-visible .luna-nom { box-shadow: 0 0 0 2px color-mix(in srgb, var(--a) 40%, transparent); }
.luna-nom::before { content: ""; position: absolute; right: 100%; top: 50%; width: 7px; height: 1px; background: color-mix(in srgb, var(--a) 55%, var(--line)); }
.luna-ico { width: 11px; height: 11px; flex: none; color: var(--a); }
.luna:hover .luna-esf, .luna:focus-visible .luna-esf, .est[data-on] ~ .lunas .luna-esf {
  box-shadow: inset -3px -2px 4px rgba(0,0,0,.45), inset 1px 1px 1px rgba(255,255,255,.55),
              0 0 0 1px var(--a), 0 0 16px 3px color-mix(in srgb, var(--a) 60%, transparent); }
@keyframes luna-x { from { transform: translateX(48px); } to { transform: translateX(-48px); } }
@keyframes luna-y { from { transform: translateY(-16px); } to { transform: translateY(16px); } }
@keyframes luna-capa { 0%, 49% { z-index: 2; opacity: 1; } 51%, 99% { z-index: 0; opacity: .45; } 100% { z-index: 2; opacity: 1; } }
/* profundidad: más grande al pasar por delante (25 %) y más chica por detrás (75 %) */
@keyframes luna-prof { 0% { transform: scale(.92); } 25% { transform: scale(1.12); } 50% { transform: scale(.92); } 75% { transform: scale(.74); } 100% { transform: scale(.92); } }
@media (prefers-reduced-motion: no-preference) {
  .luna-sis { animation: luna-x 7s cubic-bezier(.37, 0, .63, 1) infinite alternate, luna-capa 14s linear infinite;
              animation-delay: calc(var(--j, 0) * -14s); }
  .luna { animation: luna-y 7s cubic-bezier(.37, 0, .63, 1) infinite alternate; animation-delay: calc(var(--j, 0) * -14s - 3.5s); }
  .luna-esf { animation: luna-prof 14s linear infinite; animation-delay: calc(var(--j, 0) * -14s); }
  .mod:has(.est[data-on]) .luna, .mod:has(.est[data-on]) .luna-sis,
  .luna-sis:has(.luna:hover), .luna-sis:has(.luna:hover) .luna, .luna-sis:has(.luna:focus-visible), .luna-sis:has(.luna:focus-visible) .luna,
  .mod:has(.est[data-on]) .luna-esf, .luna:hover .luna-esf, .luna:focus-visible .luna-esf { animation-play-state: paused; }
}
@media (max-width: 640px), (max-height: 540px) {
  .lunas { position: relative; width: auto; height: auto; display: flex; gap: 8px; padding: 6px 0 0 62px; }
  .lunas::before { content: none; }
  .luna-sis, .luna { position: relative; left: auto; top: auto; width: auto; height: auto; animation: none !important; opacity: 1; transform: none; }
  .luna { display: inline-flex; align-items: center; gap: 6px; }
  .luna-esf { position: relative; width: 14px; height: 14px; animation: none !important; }
  .luna-nom::before { content: none; }
  .luna::after { content: none; }
  .luna-nom { position: static; transform: none; opacity: 1; translate: none; pointer-events: auto; }   /* sin cursor en móvil: siempre visible */
}

/* v1.4.63: easter egg — 5 estrellas que destellan en orden (ciclo de 10 s, suave) y crédito al tocarlas en ese orden */
.egg-capa { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.egg-est { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0; border: 0; background: none; cursor: default;
           pointer-events: auto; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.egg-est::before { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%;
                   background: var(--text); opacity: .55; box-shadow: 0 0 3px color-mix(in srgb, var(--text) 60%, transparent);
                   animation: egg-destello 10s ease-in-out infinite; animation-delay: calc(var(--n) * 1.4s + 2s); }
@media (max-width: 640px) { .egg-est { width: 22px; height: 22px; margin: -11px 0 0 -11px; } }   /* móvil: área de toque dentro del margen */
.egg-est.egg-ok::before { background: var(--accent); opacity: .9; box-shadow: 0 0 6px var(--accent); animation: none; }
@keyframes egg-destello { 0%, 9%, 100% { transform: scale(1); opacity: .55; } 4% { transform: scale(2.1); opacity: 1; box-shadow: 0 0 8px var(--text); } }
@media (prefers-reduced-motion: reduce) { @keyframes egg-destello { 0%, 9%, 100% { opacity: .55; } 4% { opacity: 1; } } }
.egg-fondo { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
             background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); animation: egg-in .25s ease-out; }
.egg-pop { position: relative; width: min(340px, 100%); padding: 28px 24px 20px; border-radius: 16px; text-align: center;
           background: var(--bg-2, var(--bg)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line, transparent));
           box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), 0 18px 50px rgba(0,0,0,.45); color: var(--text); }
.egg-brillo { display: block; font-size: 28px; line-height: 1; color: var(--accent); margin-bottom: 10px; }
.egg-t { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--muted, var(--text)); }
.egg-t b { display: block; font-size: 22px; color: var(--text); letter-spacing: .01em; }
.egg-link { display: inline-block; font-weight: 700; color: var(--accent-text, var(--accent)); text-underline-offset: 3px; }
.egg-x { display: block; margin: 18px auto 0; padding: 8px 18px; border-radius: 8px; border: 1px solid var(--line-2, var(--line)); background: none;
         color: var(--text); font: inherit; cursor: pointer; }
.egg-x:focus-visible, .egg-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@keyframes egg-in { from { opacity: 0; } }

/* v1.4.75: planeta 3D listo (planetas.js le pone .gl): sin el fondo, borde ni sombra del planeta CSS, también en los
   apagados y en el modo lista (va al final para ganarles). En el modo lista el planeta reemplaza al icono. */
.mod .astro.gl { background: none; border: 0; box-shadow: none; }
@media (max-width: 640px), (max-height: 540px) {
  .mod .astro.gl .ico { display: none; }
  .pl-cv { width: calc(var(--d) * 1.1); height: calc(var(--d) * 1.1); }
}

/* ---------- v1.4.88: secciones de datos del Centro de administración (migradas desde /admin) ---------- */
.cc-tabs { display: flex; flex: none; gap: 4px; padding: 8px 16px; min-height: 56px; box-sizing: border-box; align-items: center; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.cc-tabs [role=tab] { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.cc-tabs [role=tab]:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cc-tabs [role=tab][aria-selected="true"] { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.cc-tabs [role=tab]:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.cc[data-vista="acceso"] .cc-tabs, .cc[data-vista="acceso"] .cc-adm { display: none; }
.cc[data-sec]:not([data-sec="cuentas"]) :is(.cc-barra, .cc-conf, .cc-inv, .cc-enl, .cc-mods, .cc-cuerpo, .cc-aviso, .cc-menu) { display: none; }
.cc-adm { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 20px 20px; }
.cc-adm[hidden], .cc-adm [hidden] { display: none; }
.cc-gate { display: flex; flex-direction: column; gap: 14px; max-width: 460px; padding-top: 16px; }
.cc-gate .input { width: 100%; min-height: 48px; font-size: 16px; }
.cc-gate .btn-primary { min-height: 48px; font-weight: 700; }
.adm-body { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.adm-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.adm-lote { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.adm-lote .input { width: auto; min-width: 150px; min-height: 40px; }
.adm-ses { margin-left: auto; font-family: var(--font-mono, monospace); font-size: 12px; color: var(--muted); white-space: nowrap; }
.adm-ses[data-k="warn"] { color: var(--warn); font-weight: 600; }
.adm-msg:empty { min-height: 0; height: 0; margin: -6px 0; }
.adm-msg { min-height: 1.3em; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.adm-msg[data-k="ok"] { color: var(--ok); } .adm-msg[data-k="bad"] { color: var(--bad); }
.adm-sec { display: flex; flex-direction: column; gap: 14px; }
.adm-tit { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.adm-fila-sb { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.adm-fila-sb .adm-tit { margin: 0; }
.adm-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-filtros .input { width: auto; min-height: 40px; font-size: 15px; }
.adm-filtros select.input { flex: 0 0 220px; max-width: 100%; }
.adm-filtros input[type=search] { flex: 1 1 190px; min-width: 0; }
.adm-f .input { width: auto; padding: 0 8px; font-size: 14px; }
.adm-f { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.adm-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); }
.adm-sel .grow { flex: 1; }
.adm-vacio { padding: 18px 4px; text-align: center; }
.adm-num { font-size: 16px; font-weight: 600; }
.adm-chk { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.adm-chk input, .col-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.col-check { width: 44px; }
.adm-mas { display: flex; justify-content: center; }
.adm-dlg { padding: 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.adm-dlg h3 { margin: 0; font-size: 17px; }
.adm-dlg-acc { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-hint:empty { min-height: 0; height: 0; margin: -5px 0; }
.adm-hint { min-height: 1.2em; font-size: 14px; color: var(--bad); font-weight: 600; }
.adm-hint[data-k="ok"] { color: var(--ok); }
.adm-correos { max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; }
.adm-form { display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
.adm-form h3 { margin: 0; font-size: 17px; }
.adm-peligro { border: 1px solid color-mix(in srgb, var(--bad) 55%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--bad) 6%, var(--surface)); }
.adm-peligro .dz { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px; flex-wrap: wrap; }
.adm-peligro .dz + .dz { border-top: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); }
.adm-peligro b { display: block; font-size: 16px; }
.adm-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-solid-danger { background: var(--bad); border-color: var(--bad); color: var(--bg); }
.mv-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.mv-cat { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.mv-cat b { font-family: var(--font-mono, monospace); color: var(--muted); font-weight: 600; }
.mv-cat[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 600; }
.mv-cat:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
td.mv-fecha { white-space: nowrap; }
td.mv-det { min-width: 190px; }
td.mv-fecha { min-width: 76px; }
td.mv-det .mono { display: block; overflow-wrap: anywhere; }
td.mv-det span.d { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.mv-resumen-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mv-resumen-lista li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mv-resumen-lista .when { font-size: 13px; color: var(--muted); min-width: 100px; }
.cc-adm .tablewrap { overflow-x: auto; }
.adm-filtros select.input#moMod { flex: 1 1 200px; width: 100%; min-width: 0; }
.adm-filtros .adm-f:has(#moMod) { flex: 0 1 300px; min-width: 0; }
#adm-modulos td, #adm-modulos th { overflow-wrap: anywhere; }
#adm-modulos td.mono { font-family: var(--font-mono, monospace); font-size: 13px; }
#adm-modulos .adm-sel .btn:focus-visible, #adm-modulos .col-check input:focus-visible, #adm-modulos .mv-cat:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
#adm-modulos tr[data-sel="1"] td { background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
@media (max-width: 640px) {
  .adm-filtros .adm-f:has(#moMod) { flex: 1 1 100%; }
  #adm-modulos .adm-sel .grow { flex: 1 1 100%; }
  .cc-tabs { padding: 0 12px 8px; }
  .cc-adm { padding: 4px 14px 16px; }
  .adm-ses { margin-left: 0; }
  .adm-f, .adm-f .input { width: 100%; }
  .adm-filtros select.input, .adm-filtros input[type=search] { flex: 1 1 100%; width: 100%; }
  .adm-bar .btn, .adm-filtros .btn, .adm-sel .btn { min-height: 40px; }
  .adm-lote { width: 100%; } .adm-lote .input { flex: 1; }
}
