/* =========================
   Login – CPC-Class
   ========================= */

#app-header { display: none !important; }

:root {
  --login-red:       #952428;
  --login-red-dark:  #7d1e21;
  --login-red-soft:  rgba(149,36,40,0.12);
  --login-text:      #1f2937;
  --login-muted:     #6b7280;
  --login-border:    rgba(0,0,0,0.09);
  --login-ring:      rgba(149,36,40,0.18);
}

html, body {
  min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  min-height: calc(var(--app-vh,1vh)*100);
  background: #f4f6f8;
  color: var(--login-text);
  overscroll-behavior-y: none;
}

/* ── Layout principal ────────────────────────────────────────── */
.login-page {
  min-height: calc(var(--app-vh,1vh)*100);
  display: flex;
  flex-direction: column;
}

/* ── Zona superior roja ──────────────────────────────────────── */
.login-hero {
  background: var(--login-red);
  padding: max(44px, env(safe-area-inset-top,0px)) 20px 72px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Orbes decorativos */
.login-hero::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  top: -120px; right: -80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.login-hero::after {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  bottom: -60px; left: -40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

/* Logo en la esquina */
.login-hero-logo {
  position: absolute;
  top: max(16px, env(safe-area-inset-top,0px));
  right: 20px;
  height: 52px;
  width: auto;
  max-width: 130px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid rgba(255,255,255,0.50);
  padding: 5px 10px;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.login-hero-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.70);
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 1;
}

.login-hero-title {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.login-hero-line {
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  position: relative;
  z-index: 1;
}

/* ── Card de login ───────────────────────────────────────────── */
.login-card-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: -36px;
  position: relative;
  z-index: 2;
  padding: 0 0 max(24px, env(safe-area-inset-bottom,0px));
}

.login-card {
  background: #fff;
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 24px 20px 20px;
}

/* ── Campos ──────────────────────────────────────────────────── */
.login-field-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 5px;
  display: block;
  letter-spacing: 0.1px;
}

.login-field {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--login-border);
  border-radius: 14px;
  background: #f9fafb;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-field:focus-within {
  border-color: var(--login-red);
  box-shadow: 0 0 0 3.5px var(--login-ring);
  background: #fff;
}
.login-field .login-field-ic {
  padding: 0 12px 0 14px;
  color: var(--login-red);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.login-field .form-control {
  flex: 1;
  border: none !important;
  background: transparent;
  box-shadow: none !important;
  height: 48px;
  padding: 0 10px 0 0;
  font-size: 0.92rem;
  color: var(--login-text);
}
.login-field .form-control::placeholder { color: #b0b7c3; font-weight: 400; }
.login-field .form-control:focus        { outline: none; box-shadow: none !important; }

/* Toggle PIN/contraseña dentro del campo */
.login-input-toggle {
  background: transparent;
  border: none;
  color: #9ca3af;
  padding: 0 14px;
  font-size: 0.88rem;
  cursor: pointer;
  height: 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color .15s ease;
}
.login-input-toggle:hover  { color: var(--login-red); }
.login-input-toggle:focus  { outline: none; box-shadow: none; }
.login-input-toggle.is-password { color: var(--login-red); }

/* Ojo — padding reducido para que no ocupe demasiado */
.login-eye-toggle {
  padding: 0 8px 0 4px;
  font-size: 0.92rem;
}

/* Recordarme */
.login-remember .form-check-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #4b5563;
}
.login-remember .form-check-input:checked {
  background-color: var(--login-red);
  border-color: var(--login-red);
}
.login-remember .form-check-input:focus {
  box-shadow: 0 0 0 3px var(--login-ring);
}

/* Botón principal */
.btn-login-primary {
  height: 50px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  background: var(--login-red);
  border: 1px solid var(--login-red-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(149,36,40,0.28);
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-login-primary:hover {
  color: #fff;
  background: var(--login-red-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(149,36,40,0.34);
}
.btn-login-primary:active   { transform: translateY(1px); }
.btn-login-primary:disabled { opacity: .82; cursor: not-allowed; transform: none; }

/* Divisor */
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d1d5db;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 18px 0;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #f3f4f6;
}

/* Botón PIN secundario */
.btn-login-pin {
  height: 46px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--login-red);
  border: 1.5px solid rgba(149,36,40,0.20);
  background: rgba(149,36,40,0.04);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn-login-pin:hover {
  background: rgba(149,36,40,0.08);
  border-color: rgba(149,36,40,0.35);
  color: var(--login-red-dark);
  transform: translateY(-1px);
}
.btn-login-pin:active { transform: translateY(0); }

/* ── Footer ──────────────────────────────────────────────────── */
.login-footer {
  text-align: center;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 0 4px;
  letter-spacing: 0.1px;
}

/* ── Responsive desktop ──────────────────────────────────────── */
@media (min-width: 640px) {
  .login-page {
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px;
    background: #f0f2f5;
  }

  .login-shell {
    width: 100%;
    max-width: 440px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 64px rgba(0,0,0,0.14);
    display: flex;
    flex-direction: column;
  }

  .login-hero {
    border-radius: 0;
    padding: 36px 28px 72px;
  }

  .login-card-wrap {
    margin-top: -40px;
    padding: 0;
  }

  .login-card {
    border-radius: 0;
    box-shadow: none;
    padding: 28px 24px 24px;
  }

  .login-footer {
    background: #fff;
    padding: 12px 0 16px;
    margin-top: 0;
  }
}

/* ── Pantalla muy baja ───────────────────────────────────────── */
@media (max-height: 680px) {
  .login-hero { padding-bottom: 56px; }
  .login-hero-title { font-size: 1.65rem; }
}

/* ══════════════════════════════════════════════════
   Modo Mundial 2026 — Albirroja
   Activado con clase .mundial-mode en .login-page
   ══════════════════════════════════════════════════ */

/* Franja superior albirroja — oculta por defecto */
.mundial-strip {
  display: none;
}

.mundial-mode .mundial-strip {
  display: block;
  height: 28px;
  padding-top: env(safe-area-inset-top, 0px);
  /* Franjas sutiles rojo albirroja / blanco */
  background:
    repeating-linear-gradient(
      90deg,
      #c8102e 0px,
      #c8102e 28px,
      rgba(255,255,255,0.85) 28px,
      rgba(255,255,255,0.85) 56px
    );
  flex-shrink: 0;
}

.mundial-mode .mundial-strip::before,
.mundial-mode .mundial-strip::after { display: none; }

/* Bandera grande centrada */
.mundial-strip__flag {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
  position: relative;
  z-index: 1;
}

/* Hero: vuelve al rojo institucional limpio (sin franjas) */
.mundial-mode .login-hero {
  background: var(--login-red);
}
