/* ================================
   RESET BÁSICO
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* ================================
   TEMA GLOBAL GOOURNET (igual panel)
================================ */
body {
  min-height: 100vh;
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(140% 180% at 0% 0%, #000a15 0, #000f1a 55%, #000 100%);
  color: #f9fafb;
}

/* Variables del tema rojo Goournet */
:root {
  --sa-color-accent: #f66161;          /* rojo suave */
  --sa-color-accent-strong: #e9253b;   /* rojo intenso */
  --sa-color-accent-deep: #7f1d1d;     /* vino oscuro */
  --sa-color-border-soft: rgba(222, 222, 222, 0.28);
  --sa-color-border-strong: rgba(248, 113, 113, 0.45);
  --sa-color-surface-dark: #000c14;    /* fondo principal cards/modales */
  --sa-color-surface-soft: #00101b;    /* variación suave */
}

/* ================================
   WRAPPER
================================ */
.login-wrapper {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Brillos suaves tipo panel */
.login-wrapper::before,
.login-wrapper::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.8;
  pointer-events: none;
}

.login-wrapper::before {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 30% 30%, var(--sa-color-accent) 0, transparent 60%);
  top: -80px;
  left: -80px;
}

.login-wrapper::after {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 70% 70%, var(--sa-color-accent-strong) 0, transparent 55%);
  bottom: -120px;
  right: -60px;
}

/* Glow decorativo adicional (si usas el div .login-glow en el HTML) */
.login-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(246, 97, 97, 0.4),
    transparent 70%
  );
  filter: blur(40px);
  opacity: 0.8;
  transform: translate(40%, -30%);
  pointer-events: none;
}

/* ================================
   CARD
================================ */
.login-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 24px 22px 20px;
  border-radius: 26px;
  background: var(--sa-color-surface-dark);
  border: 1px solid var(--sa-color-border-strong);
  box-shadow:
    0 20px 55px rgba(10, 4, 8, 0.95),
    0 0 0 1px rgba(10, 4, 8, 0.9);
  backdrop-filter: blur(20px);
  z-index: 1;
}

@media (min-width: 640px) {
  .login-card {
    padding: 28px 28px 24px;
    border-radius: 28px;
  }
}

/* ================================
   HEADER
================================ */
.login-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 0% 0%,
    var(--sa-color-accent),
    var(--sa-color-accent-strong)
  );
  color: #020617;
  font-weight: 600;
  font-size: 20px;
  box-shadow: 0 10px 30px rgba(248, 113, 113, 0.55);
}

.login-header h1 {
  margin: 0;
  font-size: 19px;          /* alineado con títulos del panel */
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff !important;  /* forzamos blanco para Panel Goournet */
}

.subtitle {
  margin: 3px 0 0;
  font-size: 13px;
  color: #9ca3af;
}

/* ================================
   FORM
================================ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group label {
  display: block;
  font-size: 12px;          /* mismo tamaño que labels del panel */
  margin-bottom: 6px;
  color: #e5e7eb;
}

/* Contenedor del input – ahora BLANCO como en el login de restaurantes */
.field-shell {
  position: relative;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: #f9fafb; /* blanco */
  border: 1px solid rgba(148, 163, 184, 0.7);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.12s ease;
}

/* Efecto focus: borde rojo + leve glow */
.field-shell:focus-within {
  border-color: var(--sa-color-accent-strong);
  box-shadow: 0 0 0 1px var(--sa-color-border-strong);
  background: #ffffff;
  transform: translateY(-1px);
}

/* INPUTS – texto oscuro para que el campo blanco se lea perfecto */
.field-shell input {
  border: 0;
  outline: 0;
  background: transparent !important; /* el color viene del contenedor blanco */
  color: #020617 !important;
  font-size: 14px;
  padding: 3px 2px;
  flex: 1;
  caret-color: #020617;
}

/* Más especificidad para ganarle al theme de WP */
.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"],
.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus,
.login-card input[type="text"]:focus {
  background-color: transparent !important; /* usamos el blanco del .field-shell */
  color: #020617 !important;
  -webkit-text-fill-color: #020617 !important; /* Safari / autofill */
}

/* Fondo del autofill (Safari / Chrome) adaptado a blanco */
.login-card input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #f9fafb inset;
  -webkit-text-fill-color: #020617 !important;
}

.field-shell input::placeholder {
  color: #6b7280 !important;
}

/* Password con botón (contenido también sobre el campo blanco) */
.password-shell {
  padding-right: 38px;
}

/* Toggle mostrar/ocultar password */
.toggle-password {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 0;
  outline: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  opacity: 0.75;
  transition:
    opacity 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.toggle-password::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 2px solid #9ca3af;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
}

.toggle-password.is-visible::before {
  border-color: #f97373;
  border-right-color: transparent;
  border-bottom-color: transparent;
}

.toggle-password:hover {
  opacity: 1;
}

.toggle-password:active {
  transform: translateY(-50%) scale(0.93);
}

/* Mensajes */
.login-message {
  min-height: 18px;
  font-size: 12px;
  margin-top: 2px;
}

.login-message--error {
  color: #fecaca;
}

.login-message--success {
  color: #bbf7d0;
}

/* ================================
   BOTÓN
================================ */
.login-btn {
  margin-top: 4px;
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;  /* como .sa-primary-btn */
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: linear-gradient(
    90deg,
    var(--sa-color-accent),
    var(--sa-color-accent-strong)
  );
  color: #020617;
  box-shadow: 0 12px 30px rgba(248, 113, 113, 0.4);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease,
    opacity 0.16s ease;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(248, 113, 113, 0.5);
  filter: brightness(1.03);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(248, 113, 113, 0.35);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: default;
  box-shadow: none;
}

/* Spinner del botón */
.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.16);
  border-top-color: #111827;
  border-left-color: #111827;
  display: none;
  animation: spin 0.7s linear infinite;
}

.login-btn.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================
   FOOTER
================================ */
.login-footer {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(32, 10, 14, 0.96);
  font-size: 11px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-footer-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sa-color-surface-dark);
  border: 1px solid var(--sa-color-border-soft);
}

/* ================================
   RESPONSIVE: TELÉFONOS / TABLETS
   (max-width: 899px)
================================ */
@media (max-width: 899px) {
  .login-wrapper {
    padding: 20px 16px;
    align-items: flex-start;
  }

  .login-card {
    margin-top: 40px;
    max-width: 420px;
    padding: 22px 18px 18px;
    border-radius: 24px;
  }

  .login-header {
    gap: 10px;
    margin-bottom: 18px;
  }

  .logo-circle {
    width: 34px;
    height: 34px;
    font-size: 18px;
    border-radius: 999px;
  }

  .login-header h1 {
    font-size: 18px;
  }

  .subtitle {
    font-size: 12px;
  }

  .login-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 10px;
  }
}

/* ================================
   EXTRA: TELÉFONOS PEQUEÑOS (max-width: 480px)
================================ */
@media (max-width: 480px) {
  .login-wrapper {
    padding: 16px 12px;
    align-items: flex-start;
  }

  .login-card {
    margin-top: 32px;
    max-width: 100%;
    padding: 18px 16px 16px;
    border-radius: 22px;
  }

  .login-header {
    gap: 8px;
    margin-bottom: 16px;
  }

  .logo-circle {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .login-header h1 {
    font-size: 17px;
  }

  .subtitle {
    font-size: 12px;
  }

  .field-shell {
    padding: 8px 11px;
  }

  .login-btn {
    font-size: 13px;
    padding: 10px 12px;
  }

  .login-footer {
    font-size: 10px;
    gap: 4px;
  }
}
