/* AEFIP — login común, alternativa "tarjeta de vidrio" (referencia: login blanco con
   botón degradé celeste → azul). Independiente: no usa sindicales.css ni main.js.
   Fuentes: Outfit (títulos y botón) + Figtree (texto), Google Fonts.
   Paleta: #071b9d (azul), #4dc8f4 (celeste), blanco. Logo: 70 años (1956-2026). */

:root {
  --g-azul: #071b9d;
  --g-azul-medio: #1a6fe0;
  --g-celeste: #4dc8f4;
  --g-celeste-texto: #1a8fd8;   /* celeste más profundo para texto: contraste sobre blanco */
  --g-fuente-titulo: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --g-fuente-texto: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --g-texto: #0c1836;
  --g-suave: #5a6685;
  --g-borde: #d6dbe6;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.login-glass {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  font-family: var(--g-fuente-texto);
  color: var(--g-texto);
  background:
    radial-gradient(60% 45% at 50% -5%, rgba(77, 200, 244, .16), rgba(77, 200, 244, 0) 70%),
    radial-gradient(50% 40% at 100% 100%, rgba(7, 27, 157, .07), rgba(7, 27, 157, 0) 70%),
    #fff;
}

/* ---- Tarjeta ---- */
.g-tarjeta {
  width: 100%;
  max-width: 420px;
  padding: 36px 36px 30px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, .95);
  background: linear-gradient(150deg, #ffffff 0%, #f4f5f8 100%);
  box-shadow:
    0 34px 64px -26px rgba(7, 27, 157, .32),
    0 8px 20px -10px rgba(7, 27, 157, .14),
    inset 0 2px 6px #fff,
    inset 0 -14px 30px rgba(7, 27, 157, .035);
  text-align: center;
}

.g-logo { display: block; width: min(270px, 84%); height: auto; margin: 0 auto 22px; }

.g-titulo {
  font-family: var(--g-fuente-titulo);
  margin: 0 0 22px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--g-celeste-texto), var(--g-azul));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--g-azul); /* respaldo */
}
.g-copy { margin: 0 auto 24px; max-width: 30ch; font-size: .86rem; line-height: 1.45; color: var(--g-suave); text-wrap: balance; }

/* ---- Campos: píldoras ---- */
.g-form { display: grid; gap: 14px; text-align: left; }

.g-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.g-caja { position: relative; }
.g-caja input {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 46px;
  border: 1px solid var(--g-borde);
  border-radius: 999px;
  background: linear-gradient(180deg, #f1f2f6 0%, #fafbfd 100%);
  box-shadow: inset 0 2px 4px rgba(12, 24, 54, .06);
  color: var(--g-texto);
  font: 500 .97rem var(--g-fuente-texto);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.g-caja input::placeholder { color: #8a93aa; font-weight: 400; }
.g-caja input:focus {
  outline: none;
  border-color: var(--g-celeste-texto);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(77, 200, 244, .35), inset 0 1px 2px rgba(12, 24, 54, .04);
}
.g-caja input[aria-invalid="true"] { border-color: #9a1b1b; }

.g-ico { position: absolute; left: 17px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); fill: #98a0b5; pointer-events: none; transition: fill .2s; }
.g-caja:focus-within .g-ico { fill: var(--g-azul); }

.g-ojo {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.g-ojo svg { width: 20px; height: 20px; fill: none; stroke: #7d869d; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.g-ojo:hover svg, .g-ojo:focus-visible svg { stroke: var(--g-azul); }
.g-ojo:focus-visible { outline: 3px solid var(--g-celeste); outline-offset: 0; }
.g-ojo .g-ojo-b { opacity: 0; }
.g-ojo[aria-pressed="true"] .g-ojo-b { opacity: 1; }

.g-ayuda { margin: -6px 0 0 18px; font-size: .74rem; color: var(--g-suave); }

/* ---- Botón degradé celeste → azul ---- */
.g-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 54px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--g-celeste) 0%, var(--g-azul-medio) 48%, var(--g-azul) 100%);
  color: #fff;
  font: 700 1.08rem var(--g-fuente-titulo);
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow:
    0 16px 26px -12px rgba(7, 27, 157, .6),
    inset 0 2px 0 rgba(255, 255, 255, .38),
    inset 0 -3px 8px rgba(7, 27, 157, .25);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s;
}
.g-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.g-btn:active { transform: translateY(1px); }
.g-btn:focus-visible { outline: 3px solid var(--g-celeste); outline-offset: 3px; }
.g-btn .g-gira { display: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; }
.g-btn.g-enviando { pointer-events: none; filter: saturate(.85); }
.g-btn.g-enviando .g-gira { display: block; animation: g-gira .8s linear infinite; }
@keyframes g-gira { to { transform: rotate(360deg); } }

/* ---- Enlaces ---- */
.g-links { margin-top: 18px; display: grid; gap: 12px; justify-items: center; font-size: .86rem; color: var(--g-texto); text-align: center; }
.g-links a { color: var(--g-azul); font-weight: 600; text-decoration: none; }
.g-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.g-registro { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.g-links a.g-chip {
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--g-celeste-texto), var(--g-azul));
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  box-shadow: 0 8px 14px -8px rgba(7, 27, 157, .6);
}
.g-links a.g-chip:hover { text-decoration: none; filter: brightness(1.08); }
.g-pie { margin: 18px 0 0; font-size: .74rem; color: var(--g-suave); }

/* ---- Error ---- */
.g-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 14px;
  padding: 9px 13px;
  border: 1px solid rgba(176, 106, 0, .4);
  border-radius: 14px;
  background: #fff6e3;
  color: var(--g-texto);
  font-size: .82rem;
  text-align: left;
}
.g-error svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: #8a5200; }

/* ---- Entrada suave ---- */
@media (prefers-reduced-motion: no-preference) {
  .g-tarjeta { animation: g-entra .6s cubic-bezier(.2, .7, .2, 1) both; }
  .g-error { animation: g-vibra .45s ease; }
}
@keyframes g-entra { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes g-vibra { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

@media (max-width: 440px) {
  .g-tarjeta { padding: 30px 22px 26px; border-radius: 30px; }
  .g-titulo { font-size: 1.8rem; }
}
