/* base.css · lo PÚBLICO del admin: tokens, reset, login y pantalla de espera. La app privada trae su
   propia hoja (privado/estilo.css) y hereda estos tokens. Paleta FaenApp (regla 60/30/10 de la landing). */
:root {
  --fondo: #1D1D1B;          /* 60 % */
  --fondo-2: #161615;
  --sup: #0437B3;            /* 30 % sólido */
  --tinte: #182236;          /* superficies: 18 % de azul sobre el fondo */
  --tinte-2: #1F2B45;
  --carta: #202226;
  --linea: rgba(245, 247, 250, .09);
  --acento: #128BEC;         /* 10 % */
  --acento-claro: #5FB3FF;
  --sobre-acento: #0B1220;
  --texto: #F5F7FA;
  --apagado: #A7B0BE;
  --tenue: #6F7A8A;
  --ok: #3DCB7F;
  --mal: #F0605D;
  --ambar: #F5B942;
  /* Canales RGB de los colores que se usan con transparencia (rgba(var(--ok-rgb), .16)) y lo que cambia con el tema. */
  --texto-rgb: 245, 247, 250;
  --acento-rgb: 18, 139, 236;
  --ok-rgb: 61, 203, 127;
  --mal-rgb: 240, 96, 93;
  --ambar-rgb: 245, 185, 66;
  --mal-texto: #FFB3B1;                 /* rojo para TEXTO sobre el fondo */
  --velo: rgba(8, 9, 10, .72);          /* fondo detrás de cartas, fichas y confirmaciones */
  --brillo: rgba(4, 55, 179, .42);      /* resplandor azul del login y la Reunión */
  --brillo-suave: rgba(4, 55, 179, .22); /* el del mapa */
  --radio: 18px;
  --radio-chico: 12px;
  --sombra: 0 18px 50px rgba(0, 0, 0, .45);
  --fuente: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --datos: 'Chakra Petch', 'Montserrat', monospace;
  --suave: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
/* ── Modo claro: se elige con el botón de la barra (privado/app.js), queda en localStorage admin.tema y lo aplica
   index.html antes de pintar. Misiones y Pantallas (mismo origen) leen esa misma llave. Mismo acento, superficies claras. ── */
:root[data-tema="claro"] {
  --fondo: #EEF1F5;
  --fondo-2: #E3E8EF;
  --tinte: #DFEAFA;
  --tinte-2: #CBDDF6;
  --carta: #FFFFFF;
  --linea: rgba(16, 24, 40, .1);
  --acento-claro: #0A66C2;
  --texto: #10151D;
  --apagado: #4E5968;
  --tenue: #6B7585;
  --ok: #1C9C5B;
  --mal: #D8403C;
  --ambar: #B8780A;
  --texto-rgb: 16, 21, 29;
  --ok-rgb: 28, 156, 91;
  --mal-rgb: 216, 64, 60;
  --ambar-rgb: 184, 120, 10;
  --mal-texto: #B4261F;
  --velo: rgba(16, 24, 40, .48);
  --brillo: rgba(18, 139, 236, .16);
  --brillo-suave: rgba(18, 139, 236, .1);
  --sombra: 0 18px 50px rgba(16, 24, 40, .14);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font-family: var(--fuente); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--acento-claro); }
[hidden] { display: none !important; }
.ms { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; vertical-align: middle; }
.ms.lleno { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* ── Botón "de la casa": acento, texto oscuro, flecha en círculo, brillo que barre, latido al hover, flota idle ── */
.boton { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px 0 22px; border-radius: 14px; background: var(--acento); color: var(--sobre-acento); font-weight: 800; font-size: 15px; letter-spacing: .01em; box-shadow: 0 10px 26px rgba(18, 139, 236, .35); transition: transform .25s var(--suave), box-shadow .25s var(--suave); animation: flotar 4.2s ease-in-out infinite; }
.boton:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 34px rgba(18, 139, 236, .45); animation: latido 1.1s ease-in-out infinite; }
.boton:active { transform: translateY(0) scale(.99); }
.boton:disabled { opacity: .55; cursor: wait; animation: none; }
.boton-txt { position: relative; z-index: 1; }
.boton-flecha { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: rgba(11, 18, 32, .18); display: grid; place-items: center; }
.boton-flecha .ms { font-size: 18px; }
.boton-brillo { position: absolute; top: -40%; bottom: -40%; left: -30%; width: 22%; background: linear-gradient(100deg, transparent 0, rgba(255, 255, 255, .55) 50%, transparent 100%); transform: skewX(-18deg) translateX(-120%); animation: barrido 4.6s ease-in-out infinite; pointer-events: none; }
.boton-google { background: var(--carta); color: var(--texto); box-shadow: inset 0 0 0 1px var(--linea); animation: none; }
.boton-google:hover { box-shadow: inset 0 0 0 1px var(--acento); animation: none; transform: translateY(-1px); }
@keyframes barrido { 0%, 55% { transform: skewX(-18deg) translateX(-140%); } 85%, 100% { transform: skewX(-18deg) translateX(620%); } }
@keyframes flotar { 50% { transform: translateY(-3px); } }
@keyframes latido { 50% { transform: translateY(-2px) scale(1.04); } }

/* ── Login ── */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow: auto; }
.login-fondo { position: absolute; inset: 0; background: radial-gradient(900px 500px at 70% -10%, var(--brillo), transparent 60%), radial-gradient(600px 400px at 10% 110%, rgba(var(--acento-rgb), .25), transparent 60%), linear-gradient(transparent 0 31px, var(--linea) 31px 32px) 0 0 / 100% 32px, linear-gradient(90deg, transparent 0 31px, var(--linea) 31px 32px) 0 0 / 32px 100%; opacity: .9; }
.login-carta { position: relative; width: min(100%, 420px); display: grid; gap: 12px; padding: 30px 28px 24px; border-radius: 24px; background: var(--carta); box-shadow: var(--sombra), inset 0 0 0 1px var(--linea); animation: entrar-carta .7s var(--suave) backwards; }
.login-logo { width: 64px; height: 64px; border-radius: 18px; }
.login-marca { font-family: var(--datos); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--acento-claro); }
.login-marca span { color: var(--apagado); }
.login-titulo { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.login-sub { margin: 0 0 6px; color: var(--apagado); font-size: 14px; }
.campo { display: grid; gap: 6px; }
.campo > span { font-family: var(--datos); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--apagado); }
.campo input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; background: var(--fondo-2); border: 1px solid var(--linea); outline: 0; }
.campo input:focus { border-color: var(--acento); box-shadow: 0 0 0 3px rgba(18, 139, 236, .25); }
.divisor { display: flex; align-items: center; gap: 12px; color: var(--tenue); font-size: 12px; }
.divisor::before, .divisor::after { content: ''; flex: 1; height: 1px; background: var(--linea); }
.login-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(240, 96, 93, .14); color: var(--mal-texto); font-size: 13px; font-weight: 600; }
.login-pie { margin: 4px 0 0; color: var(--tenue); font-size: 12px; text-align: center; }
@keyframes entrar-carta { from { opacity: 0; transform: translateY(26px) scale(.96); } }

/* ── Espera ── */
.espera { position: fixed; inset: 0; display: grid; place-items: center; background: var(--fondo); z-index: 5; transition: opacity .35s ease; }
.espera.fuera { opacity: 0; pointer-events: none; }
.espera-cuadro { display: grid; justify-items: center; gap: 14px; }
.espera-cuadro img { border-radius: 14px; }
.espera-txt { font-family: var(--datos); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--apagado); }
.espera-barra { width: 180px; height: 3px; border-radius: 3px; background: var(--linea); overflow: hidden; }
.espera-barra span { display: block; height: 100%; width: 40%; background: var(--acento); border-radius: 3px; animation: espera-ir 1.1s ease-in-out infinite; }
@keyframes espera-ir { 0% { transform: translateX(-100%); } 100% { transform: translateX(450%); } }

@media (prefers-reduced-motion: reduce) { .boton, .boton-brillo, .espera-barra span { animation: none !important; } }

/* Aviso de versión nueva (11/11/2026): barra arriba al centro, por encima de todo (también de la mesa). */
.aviso-version { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; z-index: 200; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--carta); color: var(--texto); box-shadow: var(--sombra), inset 0 0 0 1.5px var(--acento); font-size: 13.5px; font-weight: 600; transform: translateX(-50%); animation: aviso-version-baja .4s cubic-bezier(.2, .8, .2, 1) both; max-width: calc(100vw - 24px); }
.aviso-version .ms { color: var(--acento); font-size: 20px; }
.aviso-version button { border: 0; border-radius: 999px; padding: 7px 14px; background: var(--acento); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
@keyframes aviso-version-baja { from { opacity: 0; transform: translate(-50%, -16px); } }
