/* ========================================================
   AUTH — Editorial "Hogar" line
   /login + /register + /forgot-password + /reset-password
   --------------------------------------------------------
   Single centered card · Inter throughout
   ======================================================== */

:root {
  --auth-display: 'Inter', system-ui, -apple-system, sans-serif;
  --auth-surface: rgba(17, 24, 39, 0.55);
  --auth-line-soft: rgba(255, 255, 255, 0.07);
  --auth-line-mid:  rgba(255, 255, 255, 0.13);
}

/* === Shell — full-page centered === */
.auth-shell {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 2rem;
  position: relative;
}
/* Ambient halos behind the card */
.auth-shell::before,
.auth-shell::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: -1;
}
.auth-shell::before {
  width: 460px; height: 460px;
  top: 10%; right: 10%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.14), transparent 70%);
}
.auth-shell::after {
  width: 380px; height: 380px;
  bottom: 5%; left: 8%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1), transparent 70%);
}

/* === Card === */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--auth-surface);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--auth-line-mid);
  border-radius: 22px;
  padding: 2.5rem 2.25rem 2.25rem;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  animation: auth-fade-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes auth-fade-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.auth-card--wide { max-width: 520px; }

/* === Head — brand mark + title === */
.auth-card__head {
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 1.1rem;
}
.auth-card__mark svg {
  width: 100%;
  height: 100%;
}
.auth-card__title {
  font-family: var(--auth-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 2.6vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.032em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.auth-card__title em {
  font-style: italic;
  font-weight: 700;
  color: var(--primary-light);
}
.auth-card__sub {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* === Alert === */
.auth-alert {
  display: none;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  margin-bottom: 1.25rem;
  background: rgba(248, 113, 113, 0.07);
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.88rem;
  color: #fca5a5;
}
.auth-alert.show { display: flex; }
.auth-alert svg { color: #f87171; flex-shrink: 0; margin-top: 1px; }

/* === Form === */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.auth-field__label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
  transition: color 0.3s ease;
}
.auth-field input,
.auth-field select {
  width: 100%;
  padding: 0.78rem 0.95rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--auth-line-soft);
  border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}
.auth-field input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}
.auth-field input:focus,
.auth-field select:focus {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.auth-field:focus-within .auth-field__label {
  color: var(--primary-light);
}
.auth-field input.error {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.04);
}
.auth-field__error {
  display: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: #fca5a5;
  margin-top: 0.15rem;
}
.auth-field__error.show { display: block; }

/* Password field (with eye toggle) */
.auth-field--password { position: relative; }
.auth-field--password input { padding-right: 2.6rem; }
.auth-password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 2rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease, background 0.3s ease;
}
.auth-password-toggle:hover {
  color: var(--primary-light);
  background: rgba(124, 58, 237, 0.06);
}

/* Password strength */
.auth-strength {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}
.auth-strength__bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}
.auth-strength__fill {
  height: 100%;
  width: 0%;
  background: var(--text-muted);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}
.auth-strength__fill.weak   { width: 33%;  background: #f87171; }
.auth-strength__fill.medium { width: 66%;  background: #fbbf24; }
.auth-strength__fill.strong { width: 100%; background: #34d399; }
.auth-strength__text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0;
  white-space: nowrap;
}

/* === Form options row === */
.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -0.25rem 0 0.25rem;
}
.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.auth-remember input {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}
.auth-link {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}
.auth-link:hover { color: var(--primary-light); }

/* === Checkbox group (terms / marketing) === */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}
.auth-check input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.auth-check a {
  color: var(--primary-light);
  font-weight: 500;
  text-decoration: none;
}
.auth-check a:hover { text-decoration: underline; }

/* === Submit button === */
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.95rem 1.5rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 6px 22px rgba(124, 58, 237, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}
.auth-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 38%, rgba(255, 255, 255, 0.16) 50%, transparent 62%);
  transform: translateX(-100%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(124, 58, 237, 0.42);
}
.auth-submit:hover::after { transform: translateX(100%); }
.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* === Divider === */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.25rem 0 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-line-soft);
}
.auth-divider span {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* === Social login buttons (Google, Microsoft) === */
.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  width: 100%;
}
.auth-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.78rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--auth-line-mid);
  border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  min-width: 0;
}
.auth-social:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.auth-social:active { transform: translateY(0); }
.auth-social__icon {
  flex-shrink: 0;
  display: inline-flex;
}
.auth-social__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
@media (max-width: 480px) {
  .auth-social-row { grid-template-columns: 1fr; }
}

/* Legacy alias — keep `.auth-google` working if referenced elsewhere */
.auth-google { /* deprecated, prefer .auth-social */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--auth-line-mid);
  border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}
.auth-google:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.2);
}

/* === Foot — link to other auth page === */
.auth-foot {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--auth-line-soft);
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.auth-foot a {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.25rem;
}
.auth-foot a:hover { text-decoration: underline; }

/* === Legal links below foot === */
.auth-legal {
  margin-top: 1.1rem;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.auth-legal a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}
.auth-legal a:hover { color: var(--primary-light); }

/* === Success screen (register) === */
.auth-success {
  display: none;
  text-align: center;
  padding: 1rem 0 0.5rem;
}
.auth-success.show { display: block; }
.auth-success__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-success__title {
  font-family: var(--auth-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.028em;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
}
.auth-success__msg {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

/* === Responsive === */
@media (max-width: 540px) {
  .auth-shell { padding: 2rem 1rem 1.5rem; }
  .auth-card { padding: 2rem 1.5rem 1.75rem; border-radius: 18px; }
  .auth-row { grid-template-columns: 1fr; gap: 1rem; }
  .auth-card__title { font-size: 1.55rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
