/* Vasalto · Login 2.0.3 · La foto ocupa la pantalla y el formulario es una tarjeta apoyada sobre ella.
   En móvil, la foto queda arriba y la tarjeta sube como una hoja. */
:root {
  --navy: #0b2f63; --navy-2: #082650; --blue: #2f6bff; --blue-soft: #edf3ff;
  --text: #17233b; --muted: #6e7c94; --border: #d6deea; --danger: #c62f3a; --ok: #15803d;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: #071a3a; }
button, input { font: inherit; }

.login {
  --card: 392px;
  --pad: clamp(24px, 6vw, 112px);
  --zone: calc(var(--card) + var(--pad) + 48px);
  position: relative; min-height: 100%; height: 100%;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 32px var(--pad); overflow: hidden;
}

/* ---------- Escena ---------- */
.scene { position: absolute; inset: 0; overflow: hidden; color: #fff; isolation: isolate;
  background: radial-gradient(90% 120% at 100% 50%, #143f86 0%, #0b2a5c 45%, #071a3a 100%); }
/* La foto llena la zona libre y se funde en azul por la derecha, donde se apoya la tarjeta. */
.photo { position: absolute; top: -2%; bottom: -2%; left: -2%; right: calc(var(--zone) - 160px);
  background-repeat: no-repeat; background-size: cover; background-position: 45% 60%;
  transform-origin: 45% 50%; will-change: transform; transition: filter 1.2s, opacity .6s; opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 260px), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - 260px), transparent); }
.photo.ready { opacity: 1; }
body.motion .photo { animation: vl-kenburns 32s ease-in-out infinite alternate; }
@keyframes vl-kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.035) translate(-.8%, -.5%); } }
.shine { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%); background-size: 250% 100%; }
body.motion .shine { animation: vl-shine 14s ease-in-out infinite; }
@keyframes vl-shine { 0%, 55% { opacity: 0; background-position: 120% 0; } 65% { opacity: .5; } 85%, 100% { opacity: 0; background-position: -30% 0; } }
.tint { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: background 1.2s; }
.stars { position: absolute; inset: 0 0 45% 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.2s;
  background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 46% 22%, #fff, transparent), radial-gradient(1px 1px at 63% 12%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 78% 26%, #fff, transparent), radial-gradient(1px 1px at 6% 34%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 35% 31%, #fff, transparent); }
.scene::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,20,45,.25) 0%, rgba(6,20,45,0) 22%, rgba(6,20,45,0) 45%, rgba(6,22,50,.6) 75%, rgba(4,15,36,.9) 100%); }

/* Momentos del día: filtros suaves sobre la foto y capas de luz encima */
[data-momento="manana"] .photo { filter: brightness(1.04) saturate(1.08) sepia(.14) hue-rotate(-8deg); }
[data-momento="manana"] .tint { background: radial-gradient(120% 80% at 85% 95%, rgba(255,170,90,.45), transparent 60%), linear-gradient(180deg, rgba(255,214,170,.18), transparent 50%); }
[data-momento="dia"] .photo { filter: brightness(1.1) saturate(1.04) hue-rotate(6deg); }
[data-momento="dia"] .tint { background: linear-gradient(180deg, rgba(255,255,255,.14), transparent 45%); }
[data-momento="tarde"] .tint { background: radial-gradient(120% 70% at 30% 100%, rgba(255,150,90,.30), transparent 60%); }
[data-momento="noche"] .photo { filter: brightness(.74) saturate(1.15) hue-rotate(8deg); }
[data-momento="noche"] .tint { background: linear-gradient(180deg, rgba(3,10,30,.38), rgba(3,10,30,.08) 55%, transparent); }
[data-momento="noche"] .stars { opacity: .9; }

.top { position: absolute; z-index: 3; top: 28px; left: clamp(24px, 4vw, 56px); font-size: 12px; letter-spacing: .04em; }
.place { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  background: rgba(6,20,45,.35); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.place svg { width: 14px; height: 14px; }
.clock { font-variant-numeric: tabular-nums; opacity: .85; padding-left: 8px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.3); }
.clock:empty { display: none; }
.hero { position: absolute; z-index: 3; left: clamp(24px, 4vw, 56px); bottom: clamp(28px, 5vh, 52px);
  width: min(620px, calc(100% - var(--zone) - clamp(24px, 4vw, 56px))); }
.kicker { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #cfe0ff; }
.kicker::before { content: ""; width: 22px; height: 2px; background: #7fa6ff; border-radius: 2px; }
.hero h2 { font-size: 40px; line-height: 1.08; font-weight: 700; margin: 10px 0 8px; letter-spacing: -.015em; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.hero p { margin: 0 0 20px; font-size: 16px; color: #e3ecff; max-width: 440px; line-height: 1.45; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 12px; border-radius: 12px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); font-size: 12.5px; line-height: 1.2; }
.fact svg { width: 16px; height: 16px; flex: none; opacity: .9; }
.fact[hidden] { display: none; }

/* ---------- Tarjeta ---------- */
.side { position: relative; z-index: 4; display: flex; flex-direction: column; width: var(--card); max-width: 100%; max-height: 100%;
  border-radius: 18px; overflow: auto; background: #fff;
  box-shadow: 0 24px 64px rgba(4,15,36,.42), 0 4px 14px rgba(4,15,36,.16);
  animation: vl-rise .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes vl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.form-wrap { flex: 1 0 auto; padding: 34px 36px 26px; }
.form { width: 100%; }
/* Cabecera: solo el logo, centrado. El título queda para los lectores de pantalla. */
.form-head { text-align: center; margin: 0 0 26px; }
.logo { display: block; max-width: 200px; max-height: 40px; width: auto; height: auto; margin: 0 auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hello { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; margin: 0 0 16px; background: #f7f9fc; }
.hello[hidden] { display: none; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; text-transform: uppercase; }
.hello b { display: block; font-size: 13px; }
.hello small { color: var(--muted); font-size: 11.5px; }
.hello .link { margin-left: auto; }
.field { margin-bottom: 14px; }
.field[hidden] { display: none; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.input { position: relative; }
.input input { width: 100%; height: 42px; padding: 0 42px 0 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.input input:hover { border-color: #b9c6d8; }
.input input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,107,255,.15); }
.field.err input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(198,47,58,.12); }
.eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.eye:hover { background: #f1f4f9; color: var(--text); }
.eye:focus-visible { outline: 2px solid var(--blue); }
.eye svg { width: 18px; height: 18px; }
.msg { font-size: 12.5px; margin-top: 6px; color: var(--danger); }
.msg[hidden] { display: none; }
.caps { color: #9a5b00; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 2px 0 18px; font-size: 12.5px; }
.row > * { white-space: nowrap; }
.check { display: flex; align-items: center; gap: 7px; cursor: pointer; color: var(--muted); }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }
.link { color: var(--blue); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; font-size: 12.5px; }
.link:hover { text-decoration: underline; }
.link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
.btn { width: 100%; height: 44px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .15s, transform .05s; }
.btn:hover { background: #123d7d; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(47,107,255,.45); outline-offset: 2px; }
.btn[disabled] { cursor: default; }
.spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: vl-spin .8s linear infinite; display: none; }
.btn.loading .spin { display: block; }
.btn.ok { background: var(--ok); }
@keyframes vl-spin { to { transform: rotate(360deg); } }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 10px; margin: 0 0 18px; font-size: 13px; line-height: 1.45; }
.alert[hidden] { display: none; }
.alert.error { background: #fdecee; color: #8f1d27; border: 1px solid #f6c8cd; }
.alert.info { background: var(--blue-soft); color: #1e3a72; border: 1px solid #cfdcfb; margin: 18px 0 0; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.shake { animation: vl-shake .35s; }
@keyframes vl-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.foot { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; line-height: 1.45;
  padding: 12px 24px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid #eef2f7; background: #fafbfd; }

/* ---------- Móvil: foto arriba y tarjeta como hoja ---------- */
@media (max-width: 860px) {
  body { background: #fff; }
  .login { display: block; padding: 0; height: auto; min-height: 100%; overflow: visible; }
  .scene { position: relative; inset: auto; height: 270px; }
  .photo { right: -2%; -webkit-mask-image: none; mask-image: none; background-position: 60% 55%; }
  .top { top: 16px; left: 18px; }
  .hero { left: 18px; right: 18px; bottom: 44px; width: auto; }
  .hero h2 { font-size: 25px; margin: 6px 0 10px; }
  .hero p { display: none; }
  .facts { gap: 6px; }
  .fact { min-height: 0; padding: 5px 9px; font-size: 11.5px; border-radius: 10px; }
  .side { width: auto; max-height: none; overflow: visible; margin-top: -28px; border-radius: 24px 24px 0 0;
    min-height: calc(100vh - 242px); background: #fff; box-shadow: 0 -12px 30px rgba(4,15,36,.28); animation: none; }
  .side::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: #d6deea; margin: 10px auto 0; }
  .form-wrap { padding: 18px 22px 18px; }
  .logo { max-height: 34px; }
  .form-head { margin-bottom: 20px; }
  .foot { padding: 12px 22px 18px; }
}
@media (min-width: 861px) and (max-height: 700px) {
  .form-wrap { padding: 26px 36px 20px; }
  .form-head { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .photo, .shine, .side { animation: none !important; }
  .shake { animation: none; }
}
