/* AssetHand — Auth pages (login, registro, forgot)
   Hereda variables de /css/styles.css */
.auth-body {
  margin: 0;
  background: #f8f9fb;
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout de UNA columna centrado (registro) ---------- */
.auth-body-single {
  background: linear-gradient(180deg, #faf6ec 0%, #ffffff 60%);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  box-sizing: border-box;
}
.auth-single {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: center;
}
.auth-card {
  width: 100%;
  background: #fff;
  border: 1px solid #eee5d3;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(15, 20, 25, 0.06);
  padding: 40px 36px;
  box-sizing: border-box;
}
.auth-card .auth-brand { margin-bottom: 24px; }
.auth-card h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink, #0f1419);
}
.auth-card .auth-sub { margin-bottom: 22px; }

/* Fila de 2 columnas (Nombre + Apellidos), apila en móviles */
.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .auth-card { padding: 28px 22px; border-radius: 14px; }
  .auth-card h1 { font-size: 24px; }
  .field-row-2 { grid-template-columns: 1fr; }
}
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Form pane (left) ---------- */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #fff;
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 36px;
}
.auth-brand img { height: 22px; width: auto; display: block; }

.auth-form-wrap h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  color: var(--ink);
}
.auth-sub {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 28px;
  line-height: 1.55;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .field { display: flex; flex-direction: column; gap: 6px; }
.auth-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .02em;
}
.auth-form .label-row {
  display: flex; align-items: center; justify-content: space-between;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.auth-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(176, 135, 45, 0.10);
}

.input-with-toggle { position: relative; }
.input-with-toggle input { padding-right: 42px; width: 100%; }
.pwd-toggle {
  position: absolute;
  top: 50%; right: 8px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: grid; place-items: center;
}
.pwd-toggle:hover { background: var(--bg-soft); color: var(--ink-2); }
.pwd-toggle svg { width: 18px; height: 18px; }

.auth-link-muted {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}
.auth-link-muted:hover { color: var(--brand-dark); }

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--brand);
  cursor: pointer;
  margin: 0;
}
.checkbox-row a { color: var(--brand-dark); font-weight: 500; }

.auth-error {
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(179, 38, 30, 0.15);
}

/* Aviso informativo (no error) que aparece sobre el formulario de registro
   cuando se llega redirigido desde el login porque el email no existía. */
.auth-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f6f1e2;
  color: #5c4a18;
  border: 1px solid rgba(176, 135, 45, 0.22);
  border-left: 3px solid #b0872d;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 11px 14px;
  border-radius: 10px;
  margin: 0 0 18px;
}
.auth-notice-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #b0872d;
}
.auth-notice-text { display: block; }

/* Indicador en vivo bajo el campo email del login */
.email-status {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
}
.email-status.ok   { color: #137333; }
.email-status.warn { color: #8a6917; }
.email-status svg  { width: 13px; height: 13px; flex-shrink: 0; }

/* Botón "Generar contraseña" (icono ⋯) dentro del campo, a la izquierda
   del ojo. Reutiliza la misma estética que .pwd-toggle. */
.input-with-toggle input { padding-right: 76px !important; }
#generatePwdBtn { right: 38px !important; color: #8a6917; }
#generatePwdBtn:hover { color: #b0872d; background: #f6f1e2; }
#generatePwdBtn.ok { color: var(--green, #137333); background: var(--green-bg, #e7f4ec); }

/* Forzar tamaño de SVGs en todos los .pwd-toggle: protege contra cachés
   antiguas que no tengan la regla `.pwd-toggle svg { width: 16px }` */
.input-with-toggle .pwd-toggle svg { width: 16px !important; height: 16px !important; }

.auth-form .btn-primary,
.auth-form .btn-block {
  width: 100%;
  height: 46px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.auth-form button[disabled] { opacity: 0.6; pointer-events: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  height: 1px;
  background: var(--line);
  flex: 1;
}

.auth-foot {
  margin-top: 32px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.auth-foot a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.auth-foot a:hover { color: var(--brand-dark); }

.pwd-hint {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .01em;
}

/* ---------- Side pane (right) ---------- */
.auth-side {
  background-color: #0f1419;
  background-image:
    /* Overlay oscuro más opaco (85%) para máxima legibilidad del texto */
    linear-gradient(135deg, rgba(15, 20, 25, 0.92) 0%, rgba(15, 20, 25, 0.85) 60%, rgba(15, 20, 25, 0.92) 100%),
    url('/img/auth-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: #e6e7ea;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 56px;
  position: relative;
  overflow: hidden;
}
.auth-side-inner {
  max-width: 460px;
}
.auth-side-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d9b66a;
  margin-bottom: 28px;
}
.auth-side blockquote {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
}
.auth-side blockquote em { font-style: italic; color: #d9b66a; }
.auth-side blockquote footer {
  margin-top: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9aa0a6;
  font-weight: 600;
}
.auth-side-stats {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.auth-side-stats > div { display: flex; flex-direction: column; gap: 4px; }
.auth-side-stats .n {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 30px;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.auth-side-stats .l {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9aa0a6;
  font-weight: 600;
}

/* ---------- Tips/Features card en el panel derecho ---------- */
.auth-side-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #fff;
  margin: 0 0 24px;
}
.auth-tips {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 16px;
}
.auth-tips li {
  display: flex; align-items: flex-start; gap: 12px;
}
.auth-tip-ico {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(176, 135, 45, 0.15);
  border: 1px solid rgba(176, 135, 45, 0.32);
  border-radius: 8px;
  color: #d9b66a;
}
.auth-tip-ico svg { width: 16px; height: 16px; }
.auth-tips li b {
  display: block;
  font: 600 13.5px/1.3 'Inter', sans-serif;
  color: #fff;
  margin-bottom: 2px;
}
.auth-tips li span {
  font: 400 12.5px/1.45 'Inter', sans-serif;
  color: #a8aab0;
  display: block;
}

/* ---------- Frase rotativa única (panel auth) ---------- */
.auth-tip-single { max-width: 520px; }
.auth-tip-single .auth-side-eyebrow { margin-bottom: 32px; }
.auth-tip-quote {
  margin: 0 0 32px;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: #fff;
  min-height: 5em; /* evita saltos cuando cambia la longitud */
  display: flex;
  align-items: flex-start;
}
.auth-tip-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(176, 135, 45, 0.15);
  border: 1px solid rgba(176, 135, 45, 0.32);
  color: #d9b66a;
  border-radius: 999px;
  font: 600 11px/1 'Inter', sans-serif;
  letter-spacing: .08em;
}

/* ---------- Modal de verificación de 6 dígitos ---------- */
.verify-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 20, 25, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.verify-modal[hidden] { display: none; }
.verify-card {
  width: 100%; max-width: 520px;
  background: #fff; border-radius: 18px;
  padding: 44px 48px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  text-align: center;
}
@media (max-width: 560px) {
  .verify-card { padding: 36px 26px 28px; }
}
.verify-ico {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: #f6f1e2;
  color: #b0872d;
  display: grid; place-items: center;
}
.verify-card h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--ink, #0f1419);
}
.verify-sub {
  font-size: 14px;
  color: var(--muted, #876b3a);
  margin: 0 0 26px;
  line-height: 1.55;
  word-break: break-word;
}
.verify-sub b { color: var(--ink, #0f1419); }
.verify-demo {
  background: #fdfaf2;
  border: 1px dashed rgba(176, 135, 45, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 4px;
  font-family: 'Inter', sans-serif;
}
.verify-demo span {
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: #8a6917; font-weight: 600;
}
.verify-demo b {
  font-family: 'JetBrains Mono', ui-monospace, 'Menlo', monospace;
  font-size: 22px; letter-spacing: 0.32em; color: #5c4a18;
}
.verify-card input {
  width: 100%; box-sizing: border-box;
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 24px; letter-spacing: 0.5em;
  padding: 18px 14px;
  border: 1.5px solid var(--line, #eee5d3);
  border-radius: 12px;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.verify-card input:focus {
  border-color: #b0872d;
  box-shadow: 0 0 0 3px rgba(176, 135, 45, 0.15);
}
.verify-card .auth-error { margin: 14px 0 0; }
.verify-card .btn { margin-top: 22px; padding-top: 14px; padding-bottom: 14px; font-size: 14.5px; }
.verify-foot {
  display: flex; justify-content: space-between; gap: 14px;
  margin-top: 22px;
  font-size: 13px;
}
.verify-foot button {
  background: none; border: 0; cursor: pointer;
  color: var(--muted, #876b3a); font: 500 12.5px/1 'Inter', sans-serif;
}
.verify-foot button:hover { color: #b0872d; text-decoration: underline; }

/* ---------- Selector de idioma (auth pages) ---------- */
.auth-main { position: relative; }
.auth-lang-wrap {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 10;
}
.ah-lang-selector {
  display: inline-flex;
  gap: 2px;
  background: #f1ece0;
  border: 1px solid #e5dac4;
  border-radius: 999px;
  padding: 3px;
}
.ah-lang-btn {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 5px 11px;
  font: 600 11px/1 'Inter', system-ui, sans-serif;
  color: #876b3a;
  cursor: pointer;
  letter-spacing: .04em;
  transition: background .12s, color .12s;
}
.ah-lang-btn.active {
  background: #fff;
  color: #0f1419;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}
.ah-lang-btn:hover:not(.active) { color: #b0872d; }

/* Selector de idioma dentro del sidebar / app */
.sidebar-lang-wrap {
  padding: 8px 16px 4px;
}
.sidebar-lang-wrap .ah-lang-selector {
  background: rgba(0,0,0,.08);
  border-color: rgba(255,255,255,.08);
  width: 100%;
  justify-content: center;
}
.sidebar-lang-wrap .ah-lang-btn { color: rgba(255,255,255,.55); }
.sidebar-lang-wrap .ah-lang-btn.active {
  background: rgba(255,255,255,.14);
  color: #fff;
  box-shadow: none;
}
.sidebar-lang-wrap .ah-lang-btn:hover:not(.active) { color: rgba(255,255,255,.85); }

/* ---------- Responsive: oculta el lateral en móvil/tablet ---------- */
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { padding: 40px 24px; }
  .auth-lang-wrap { top: 14px; right: 16px; }
}
