/* =====================================================================
   LOGIN — sin librerias externas (carga al instante, aun con mala señal)
   ===================================================================== */
:root { --rosa: #ec4899; --fucsia: #c026d3; --tinta: #1f2430; --gris: #6b7280; --linea: #e6e0e6; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--tinta); background: #fbf8fa; -webkit-font-smoothing: antialiased; }
.display { font-family: "Playfair Display", Georgia, "Times New Roman", serif; }
button, input { font: inherit; color: inherit; }

.pagina { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

/* ---------- Lado de la marca ---------- */
.lado { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px; background: #3b0a2a; }
.lado img.fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lado::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(160deg, rgba(131, 24, 67, .78) 0%, rgba(157, 23, 77, .42) 45%, rgba(20, 4, 14, .8) 100%); }
.lado > * { position: relative; z-index: 2; }
.lado-marca { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.05rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.sello { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lado h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.08; max-width: 14ch; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.lado p.sub { margin-top: 12px; max-width: 34ch; font-size: 1rem; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.lado small { font-size: .78rem; color: rgba(255, 255, 255, .7); }

/* ---------- Formulario ---------- */
.formulario { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.caja { width: 100%; max-width: 380px; animation: entra .45s ease-out both; }
@keyframes entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.sello.con-logo { background: #fff; border-color: #fff; padding: 3px; }
.sello img { width: 100%; height: 100%; object-fit: contain; }
.icono.con-logo { width: auto; height: 76px; max-width: 200px; background: none; box-shadow: none; border-radius: 0; justify-content: flex-start; margin-bottom: 18px; }
.icono.con-logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.icono { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--rosa), var(--fucsia)); box-shadow: 0 12px 24px -10px rgba(236, 72, 153, .8); margin-bottom: 22px; }
.caja h1 { font-size: 2rem; line-height: 1.1; }
.caja .bajada { margin: 8px 0 26px; color: var(--gris); font-size: .95rem; }

.error { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; font-size: .9rem; }
.error svg { flex: none; margin-top: 1px; }

.campo { margin-bottom: 16px; }
.campo label { display: block; margin-bottom: 6px; font-size: .82rem; font-weight: 600; color: #374151; }
.entrada { position: relative; }
.entrada > svg.izq { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.entrada input { width: 100%; padding: 13px 44px 13px 44px; font-size: 16px; background: #fff; border: 1px solid var(--linea); border-radius: 14px; outline: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s; }
.entrada input:hover { border-color: #d5cdd5; }
.entrada input:focus { border-color: #f472b6; box-shadow: 0 0 0 4px rgba(236, 72, 153, .16); }
.ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; border-radius: 10px; color: #9ca3af; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ojo:hover { color: #4b5262; background: #f5f0f5; }
.aviso-mayus { display: none; margin-top: 6px; font-size: .78rem; color: #b45309; }
.aviso-mayus.on { display: block; }

.boton { position: relative; width: 100%; margin-top: 8px; padding: 14px 16px; border: 0; border-radius: 14px; color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; background: linear-gradient(135deg, var(--rosa), var(--fucsia)); box-shadow: 0 14px 26px -12px rgba(236, 72, 153, .9); transition: transform .12s, box-shadow .12s, filter .12s; }
.boton:hover { filter: brightness(1.05); transform: translateY(-1px); }
.boton:active { transform: translateY(0); }
.boton:disabled { opacity: .8; cursor: progress; transform: none; }
.boton .giro { display: none; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: gira .7s linear infinite; }
.boton.cargando .giro { display: inline-block; }
@keyframes gira { to { transform: rotate(360deg); } }

.seguro { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; font-size: .78rem; color: #9ca3af; }
.pie { margin-top: 30px; text-align: center; font-size: .75rem; color: #a8a2a8; }

/* ---------- Movil: la foto pasa a ser una franja arriba ---------- */
@media (max-width: 860px) {
  .pagina { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lado { padding: 22px 22px 26px; min-height: 190px; }
  .lado h2 { font-size: 1.7rem; max-width: none; }
  .lado p.sub, .lado small { display: none; }
  .formulario { align-items: flex-start; padding: 0 18px 32px; }
  .caja { margin-top: -22px; background: #fff; padding: 26px 22px 22px; border-radius: 22px; box-shadow: 0 20px 44px -22px rgba(31, 36, 48, .4); position: relative; z-index: 3; }
  .icono { display: none; }
  .caja h1 { font-size: 1.6rem; }
  .pie { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .caja, .boton .giro { animation: none; } }
