/* ══════════════════════════════════════════════════════════════
   Estilos compartidos — Login · Registro · Mi cuenta
   Antojito's Cakes
   ══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
  --rosa:      #E91E8C;
  --rosa-dark: #C0166F;
  --dark:      #3A1A2E;
  --cream:     #FFF8F4;
  --champagne: #C9A961;
  --gris:      #8A7A85;
  --gris-claro:#B0A0AA;
  --error:     #C0392B;
  --error-bg:  #FDECEA;
  --ok:        #0F766E;
  --ok-bg:     #E4F2EF;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  display: flex;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; }

:focus-visible { outline: 2px solid var(--rosa); outline-offset: 3px; border-radius: 6px; }
*:focus:not(:focus-visible) { outline: none; }

/* ── Layout de dos columnas ─────────────────────────────────── */
.login-wrap { display: flex; width: 100%; min-height: 100vh; }

/* ── Panel de marca (izquierda) ─────────────────────────────── */
.panel-brand {
  position: relative; width: 48%; background: var(--dark);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 3rem 3.5rem; overflow: hidden;
}
.panel-brand::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(201,169,97,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(233,30,140,0.12) 0%, transparent 55%);
}
.brand-top { position: relative; z-index: 1; }
.brand-logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 2rem; }
.brand-name {
  font-family: 'Angel Club', 'Dancing Script', cursive;
  font-size: clamp(2.2rem, 3.5vw, 3.2rem); color: var(--champagne);
  line-height: 1; letter-spacing: 0.02em; margin-bottom: 0.5rem;
}
.brand-tagline {
  font-family: 'Bodoni Moda', serif; font-style: italic; font-size: 1rem;
  color: rgba(255,248,244,0.55); letter-spacing: 0.04em;
}
.brand-hero {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; justify-content: center; padding: 3rem 0;
}
.brand-headline {
  font-family: 'Bodoni Moda', serif; font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 600; color: var(--cream); line-height: 1.15;
  margin-bottom: 1.5rem; letter-spacing: -0.01em;
}
.brand-headline em { font-style: italic; color: var(--champagne); }
.brand-desc { font-size: 0.9rem; color: rgba(255,248,244,0.6); line-height: 1.7; max-width: 340px; }
.brand-perks { list-style: none; margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.brand-perks li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: rgba(255,248,244,0.75); }
.perk-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--champagne); flex-shrink: 0; }
.brand-footer { position: relative; z-index: 1; }
.brand-footer-text {
  font-size: 0.72rem; color: rgba(255,248,244,0.3);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ── Panel del formulario (derecha) ─────────────────────────── */
.panel-form {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 3rem 2rem; background: var(--cream); position: relative;
}
.form-card { width: 100%; max-width: 420px; }
.form-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--rosa); font-weight: 500; margin-bottom: 0.75rem;
}
.form-title {
  font-family: 'Bodoni Moda', serif; font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600; color: var(--dark); line-height: 1.1;
  margin-bottom: 0.5rem; letter-spacing: -0.01em;
}
.form-title em { font-style: italic; color: var(--rosa); }
.form-subtitle { font-size: 0.875rem; color: var(--gris); margin-bottom: 2.5rem; line-height: 1.5; }
.form-subtitle a { color: var(--rosa); font-weight: 500; }

/* ── Acceso con Google ──────────────────────────────────────── */
.social-row { display: grid; gap: 0.6rem; margin-bottom: 1.75rem; }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.9rem 0.5rem; border-radius: 12px;
  border: 1.5px solid rgba(58,26,46,0.12); background: #fff;
  font-size: 0.88rem; font-weight: 500; color: var(--dark);
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
}
.btn-social:hover:not(:disabled) {
  border-color: rgba(58,26,46,0.25);
  box-shadow: 0 2px 12px rgba(58,26,46,0.08);
  transform: translateY(-1px);
}
.btn-social:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-social svg { flex-shrink: 0; }

/* ── Separador ──────────────────────────────────────────────── */
.divider { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.divider-line { flex: 1; height: 1px; background: rgba(58,26,46,0.1); }
.divider-text { font-size: 0.75rem; color: var(--gris-claro); white-space: nowrap; }

/* ── Campos ─────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.field { position: relative; }
.field label {
  display: block; font-size: 0.75rem; font-weight: 500;
  color: #7A6A75; margin-bottom: 0.4rem; letter-spacing: 0.04em;
}
.field input {
  width: 100%; height: 52px; padding: 0 1rem; border-radius: 12px;
  border: 1.5px solid rgba(58,26,46,0.14); background: #fff;
  font-size: 0.9rem; font-family: 'Poppins', sans-serif; color: var(--dark);
  transition: border-color 0.18s, box-shadow 0.18s; appearance: none;
}
.field input::placeholder { color: #C5B8C0; }
.field input:hover { border-color: rgba(58,26,46,0.22); }
.field input:focus { border-color: var(--rosa); box-shadow: 0 0 0 3px rgba(233,30,140,0.1); outline: none; }
.field.error input { border-color: var(--error); }
.field.error input:focus { box-shadow: 0 0 0 3px rgba(192,57,43,0.12); }
.field-msg { font-size: 0.74rem; color: var(--error); margin-top: 0.35rem; display: none; }
.field.error .field-msg { display: block; }
.field-hint { font-size: 0.72rem; color: var(--gris-claro); margin-top: 0.35rem; }

.field-pw { position: relative; }
.field-pw input { padding-right: 3rem; }
.toggle-pw {
  position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%);
  padding: 0.25rem; color: var(--gris-claro);
  display: flex; align-items: center; justify-content: center; transition: color 0.15s;
}
.toggle-pw:hover { color: var(--dark); }

/* ── Medidor de contraseña ──────────────────────────────────── */
.pw-meter { display: flex; gap: 4px; margin-top: 0.5rem; }
.pw-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(58,26,46,0.12); transition: background 0.25s; }
.pw-bar.on-1 { background: #E05252; }
.pw-bar.on-2 { background: #E0A052; }
.pw-bar.on-3 { background: #C9A961; }
.pw-bar.on-4 { background: var(--ok); }
.pw-label { font-size: 0.72rem; margin-top: 0.3rem; color: var(--gris-claro); min-height: 1em; }

/* ── Opciones ───────────────────────────────────────────────── */
.options-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; margin-top: 0.25rem; gap: 1rem;
}
.checkbox-label {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
  font-size: 0.82rem; color: #7A6A75; user-select: none;
}
.checkbox-label input[type="checkbox"] { display: none; }
.custom-check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid rgba(58,26,46,0.2); background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: border-color 0.15s, background 0.15s;
}
.checkbox-label input:checked + .custom-check { background: var(--rosa); border-color: var(--rosa); }
.checkbox-label input:checked + .custom-check::after {
  content: ''; display: block; width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.checkbox-label.align-start { align-items: flex-start; }
.checkbox-label.align-start .custom-check { margin-top: 2px; }
.forgot-link { font-size: 0.82rem; color: var(--rosa); font-weight: 500; transition: opacity 0.15s; white-space: nowrap; }
.forgot-link:hover { opacity: 0.75; }

/* ── Botón principal ────────────────────────────────────────── */
.btn-cta {
  width: 100%; height: 54px; border-radius: 14px;
  background: var(--rosa); color: #fff;
  font-family: 'Poppins', sans-serif; font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.04em; transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  margin-bottom: 1.5rem; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
}
.btn-cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(233,30,140,0.35); }
.btn-cta:active:not(:disabled) { transform: translateY(0); }
.btn-cta:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-cta.cargando .btn-txt { opacity: 0.75; }

.spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  animation: girar 0.7s linear infinite; display: none; flex-shrink: 0;
}
.btn-cta.cargando .spinner { display: block; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ── Avisos ─────────────────────────────────────────────────── */
.alerta {
  display: none; align-items: flex-start; gap: 0.6rem;
  padding: 0.8rem 1rem; border-radius: 11px; font-size: 0.82rem;
  line-height: 1.5; margin-bottom: 1.25rem; font-weight: 500;
}
.alerta.visible { display: flex; }
.alerta.error { background: var(--error-bg); color: var(--error); }
.alerta.ok    { background: var(--ok-bg);    color: var(--ok); }
.alerta .ico { flex-shrink: 0; font-size: 1rem; line-height: 1.3; }

/* ── Enlaces inferiores ─────────────────────────────────────── */
.register-row { text-align: center; font-size: 0.83rem; color: #9A8A95; }
.register-row a { color: var(--rosa); font-weight: 600; transition: opacity 0.15s; }
.register-row a:hover { opacity: 0.75; }

.back-link {
  position: absolute; top: 1.5rem; left: 1.75rem;
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--gris-claro); font-weight: 500; transition: color 0.15s;
}
.back-link:hover { color: var(--dark); }
.back-link svg { width: 16px; height: 16px; }

/* ── Aviso de configuración pendiente ───────────────────────── */
.aviso-config {
  display: none; background: #FFF4E5; border-left: 3px solid var(--champagne);
  border-radius: 8px; padding: 0.85rem 1rem; margin-bottom: 1.5rem;
  font-size: 0.78rem; color: #7A5B08; line-height: 1.6;
}
.aviso-config.visible { display: block; }
.aviso-config code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 4px; font-size: 0.95em; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .panel-brand { display: none; }
  .panel-form { padding: 5rem 1.5rem 3rem; }
}
@media (max-width: 480px) {
  .panel-form { padding: 4.5rem 1.25rem 2.5rem; }
  .form-title { font-size: 2rem; }
  .options-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
