/* Pantalla de entrada con el formulario propio (25-11-2026; templates/cuenta_blio/entrar_formulario.html).
   Misma composición que la de Contablio y las pantallas de Blio ID (panel de marca con malla animada + tarjeta con
   profundidad), con la marca de Stablio (TOKENS_FAMILIA_BLIO v2 §2, en tokens.css: --marca y --marca-hover, claro y
   oscuro). Inter autoalojada (static/fonts, OFL). Movimiento: solo transform y opacidad; nada se mueve con
   prefers-reduced-motion. Sin style= ni estilos en línea (la CSP de esta pantalla no los admite). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.8e433c0592f7.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.ad4eb06671be.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Los colores de la interfaz salen de tokens.css (se carga antes; regla de Stablio: nada de hex fuera de tokens).
   Solo el panel de marca (decorativo, siempre oscuro) lleva sus tonos aquí, en rgb(). */
:root {
  --fuente: var(--blio-fuente);
  --marca-tinta: var(--sobre-color);
  --error-barra: var(--error-borde);
  --anillo: rgba(28, 90, 60, .22);
  --sombra-tarjeta: 0 1px 2px rgba(18, 24, 38, .04), 0 8px 24px -6px rgba(18, 24, 38, .10),
    0 32px 64px -24px rgba(18, 24, 38, .22);
  --curva-entrar: cubic-bezier(0.23, 1, 0.32, 1);
  --escena-texto: rgb(230, 242, 236); --escena-fondo: rgb(10, 32, 22); --blanco: rgb(255, 255, 255);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --anillo: rgba(156, 212, 186, .28);
    --sombra-tarjeta: 0 12px 32px -8px rgba(0, 0, 0, .5), 0 40px 80px -24px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --anillo: rgba(156, 212, 186, .28);
  --sombra-tarjeta: 0 12px 32px -8px rgba(0, 0, 0, .5), 0 40px 80px -24px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { font-size: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--fondo); color: var(--texto); font: 400 15px/1.5 var(--fuente); }
a { color: var(--marca); text-underline-offset: 3px; }
a:hover { color: var(--marca-hover); }
:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; border-radius: 4px; }

.lienzo { display: grid; min-height: 100vh; min-height: 100dvh; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .lienzo { grid-template-columns: minmax(420px, 46%) minmax(0, 1fr); } }

.escena { position: relative; overflow: hidden; isolation: isolate; color: var(--escena-texto); background: var(--escena-fondo); }
.malla, .malla::before, .malla::after { position: absolute; pointer-events: none; }
.malla { inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 12% 8%, rgba(28, 110, 72, .90) 0%, transparent 70%),
    radial-gradient(50% 45% at 92% 88%, rgba(196, 160, 82, .26) 0%, transparent 70%),
    radial-gradient(45% 40% at 85% 12%, rgba(80, 170, 130, .32) 0%, transparent 70%),
    linear-gradient(160deg, rgb(18, 58, 39) 0%, var(--escena-fondo) 60%, rgb(5, 18, 12) 100%); }
.malla::before, .malla::after { content: ""; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.malla::before { left: -15%; top: 38%; background: radial-gradient(closest-side, rgba(46, 140, 96, .95), transparent); animation: deriva-a 22s ease-in-out infinite alternate; }
.malla::after { right: -20%; top: -10%; background: radial-gradient(closest-side, rgba(130, 210, 170, .6), transparent); animation: deriva-b 26s ease-in-out infinite alternate; }
.escena::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgb(0, 0, 0) 0%, transparent 85%); mask-image: linear-gradient(180deg, rgb(0, 0, 0) 0%, transparent 85%); }
@keyframes deriva-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(18%, -12%, 0) scale(1.15); } }
@keyframes deriva-b { from { transform: translate3d(0, 0, 0) scale(1.05); } to { transform: translate3d(-14%, 16%, 0) scale(.95); } }

.escena-contenido { position: relative; display: flex; flex-direction: column; gap: 28px; height: 100%; padding: 40px clamp(32px, 5vw, 64px); }
.logo-app { display: inline-flex; align-items: center; gap: 12px; color: var(--blanco); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.logo-app img { display: block; width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
.lema { margin: auto 0 0; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.12; font-weight: 700; letter-spacing: -.025em;
  text-wrap: balance; max-width: 15ch; color: var(--blanco); }
.lema span { background: linear-gradient(90deg, rgb(181, 223, 203), rgb(230, 210, 154)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 959.98px) {
  .escena { min-height: 176px; }
  .escena-contenido { padding: 22px 16px 72px; }
  .lema { display: none; }
  .logo-app { font-size: 22px; }
  .logo-app img { width: 30px; height: 30px; }
  .principal { margin-top: -56px; }
}

.principal { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px 16px 32px; }
@media (min-width: 960px) { .principal { padding: 48px 32px; background: radial-gradient(80% 60% at 50% 0%, rgba(28, 90, 60, .06), transparent 70%); } }

.tarjeta { width: 100%; max-width: 440px; background: var(--superficie); border: 1px solid var(--borde); border-radius: 18px;
  box-shadow: var(--sombra-tarjeta); padding: 32px; }
@media (max-width: 480px) { .tarjeta { padding: 24px 20px; border-radius: 16px; } }
@media (prefers-reduced-motion: no-preference) {
  .tarjeta { animation: aparecer 520ms var(--curva-entrar) both; }
  .tarjeta.con-error { animation: aparecer 520ms var(--curva-entrar) both, sacudir 380ms cubic-bezier(.36, .07, .19, .97) 120ms both; }
}
@media (prefers-reduced-motion: reduce) {
  .malla::before, .malla::after { animation: none; }
  .tarjeta { animation: aparecer-quieto 150ms ease-out both; }
}
@keyframes aparecer { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes aparecer-quieto { from { opacity: 0; } to { opacity: 1; } }
@keyframes sacudir { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

h1 { margin: 0 0 20px; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
form { margin: 0; }
label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 500; }
input[type=email], input[type=password], input[type=text] { display: block; width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--borde-fuerte); border-radius: 10px; background: var(--superficie); color: var(--texto); font: inherit; font-size: 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease; }
@media (hover: hover) { input:hover:not(:focus) { border-color: color-mix(in srgb, var(--borde-fuerte) 60%, var(--texto-suave)); } }
input:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 4px var(--anillo); }
input[aria-invalid=true] { border-color: var(--error-barra); }
.campo-clave { position: relative; }
.campo-clave input { padding-right: 48px; }
.ver-clave { position: absolute; top: 2px; right: 2px; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--texto-suave); display: grid; place-items: center; cursor: pointer; box-shadow: none;
  transition: color 150ms ease, background-color 150ms ease; }
.ver-clave:hover { color: var(--texto); background: var(--superficie-2); }
.ver-clave:active { transform: none; }
.ver-clave svg { width: 18px; height: 18px; }
.ver-clave .ojo-tapado { display: none; }
.ver-clave[aria-pressed=true] .ojo-abierto { display: none; }
.ver-clave[aria-pressed=true] .ojo-tapado { display: block; }

button, .boton { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 44px; margin-top: 20px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; background: var(--marca);
  color: var(--marca-tinta); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent; box-shadow: 0 1px 2px rgba(18, 24, 38, .12), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: transform 160ms var(--curva-entrar), background-color 150ms ease, color 150ms ease; }
button:hover, .boton:hover { background: var(--marca-hover); color: var(--marca-tinta); }
button:active, .boton:active { transform: scale(.98); }
.boton.secundario { background: var(--superficie); color: var(--texto); border-color: var(--borde-fuerte); box-shadow: none; margin-top: 8px; }
.boton.secundario:hover { background: var(--superficie-2); color: var(--texto); }
button .giro { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: girar 700ms linear infinite; }
button[aria-busy=true] .giro { display: inline-block; }
button[aria-busy=true] { pointer-events: none; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button:active, .boton:active { transform: none; } button .giro { animation-duration: 1.6s; } }

.error-caja { margin: 0 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--error-fondo); border-left: 3px solid var(--error-barra);
  color: var(--error); font-size: 14px; text-wrap: pretty; }
.separador { display: flex; align-items: center; gap: 12px; margin: 18px 0 2px; color: var(--texto-suave); font-size: 12px; }
.separador::before, .separador::after { content: ""; height: 1px; flex: 1; background: var(--borde); }
.pie { margin: 18px 0 0; color: var(--texto-suave); font-size: 14px; text-align: center; text-wrap: balance; }
.pie a { font-weight: 500; text-decoration: none; }
.pie a:hover { text-decoration: underline; }
.pie-pagina { color: var(--texto-suave); font-size: 12px; text-align: center; margin: 0; }
