/* =========================
   AUTH (Login / Register)
   Un solo archivo, ordenado por secciones
========================= */


/* =========================================================
   AUTH - BASE (COMPARTIDO)
========================================================= */
.auth-wrap{
  padding: 52px 0;
  max-width: 1180px;
  margin: 0 auto;
}

.auth-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
}

/* Títulos (register-left) */
.auth-title{
  margin: 0 0 10px 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  line-height: 1.20;
}

.auth-subtitle{
  margin: 0 0 16px 0;
  color: rgba(15, 23, 42, 0.60);
  max-width: 100%;
  line-height: 1.55;
}

/* Foto (bloque común) */
.auth-photo{
  width: 100%;
  max-width: 420px;
  height: 320px;
  border-radius: 24px;
  background: #e9eef5;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.auth-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* Card */
.auth-card{
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.06);
}

/* Form basics */
.auth-label{
  display: block;
  margin: 10px 0 6px 0;
  font-size: 0.82rem;
  color: rgba(15,23,42,0.75);
  font-weight: 600;
}

.auth-input{
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  padding: 10px 14px;
  outline: none;
  background: #f8fafc;
}

.auth-input:focus{
  border-color: rgba(37,99,235,0.55);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Input con ícono + ojo */
.auth-input-icon{
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon i{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(15,23,42,0.45);
  pointer-events: none;
}

/* izquierda (candado) + derecha (ojo) */
.auth-input-icon .auth-input{
  padding-left: 36px;
  padding-right: 46px;
}

.auth-eye{
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: rgba(15,23,42,0.45);
  cursor: pointer;
}

.auth-hint{
  margin: 6px 0 0 0;
  font-size: 0.78rem;
  color: rgba(37,99,235,0.60);
  line-height: 1.35;
}

.auth-check{
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 0.78rem;
  color: rgba(15,23,42,0.60);
}

.auth-check a{
  color: rgba(37,99,235,0.80);
  text-decoration: none;
}

.auth-check a:hover{ text-decoration: underline; }

.auth-submit{
  width: 100%;
  margin-top: 14px;
  background: rgba(37,99,235,1);
  color: white;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
  cursor: pointer;
}

.auth-submit:hover{
  background: rgb(30, 75, 170);
  color: #fff;
  border-color: rgb(30, 75, 170);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.20);
}

.auth-bottom{
  margin: 12px 0 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(15,23,42,0.60);
}

.auth-bottom a{
  color: rgba(37,99,235,0.90);
  font-weight: 700;
  text-decoration: none;
}

.auth-bottom a:hover{ text-decoration: underline; }

.auth-error{
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #f1b0b7;
  background: #fff5f5;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* Responsive base */
@media (max-width: 991px){
  .auth-grid{ grid-template-columns: 1fr; }
  .auth-photo{ max-width: 100%; height: 260px; }
  .auth-wrap{ max-width: 100%; }
}


/* =========================================================
   LOGIN (ESPECÍFICO)
========================================================= */
.auth-grid-login{
  grid-template-columns: 0.9fr 1.1fr; /* form izquierda, foto derecha */
  gap: 30px;
  align-items: center;
}

.auth-right{
  display: flex;
  justify-content: center; /* trae la foto “hacia adentro” */
}

.auth-form-title{
  margin: 0 0 6px 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  font-size: 1.8rem;
}

.auth-form-subtitle{
  margin: 0 0 14px 0;
  color: rgba(15, 23, 42, 0.60);
}

.auth-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
}

.auth-check-inline{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.60);
}

.auth-link{
  font-size: 0.85rem;
  color: rgba(37, 99, 235, 0.85);
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover{ text-decoration: underline; }

.auth-grid-login .auth-card{
  justify-self: start;
  max-width: 560px;
  width: 100%;
}

.auth-photo-login{
  max-width: 490px;
  width: 100%;
  height: 380px;
}

@media (max-width: 991px){
  .auth-grid-login{ grid-template-columns: 1fr; }
  .auth-grid-login .auth-card{ justify-self: stretch; max-width: 100%; }
  .auth-photo-login{ height: 260px; max-width: 100%; }
}


/* =========================================================
   REGISTER (ESPECÍFICO)
========================================================= */

/* ===== Teléfono Chile (+56 fijo) ===== */
.auth-phone{
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;

  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  overflow: hidden;

  padding: 0 16px;
  gap: 10px;

  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.auth-phone:focus-within{
  background: #fff;
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

.auth-phone-prefix{
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid rgba(15,23,42,.10);

  font-weight: 800;
  color: rgba(15,23,42,.55);
  line-height: 1;
  white-space: nowrap;
}

/* Importante: el widget del form puede traer estilos, los anulamos acá */
.auth-phone input,
.auth-phone .auth-input{
  flex: 1 1 auto;
  min-width: 0;

  height: 100%;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;

  padding: 0 !important;
  border-radius: 0 !important;

  font-size: 1rem;
  color: rgba(15,23,42,.85);
}

.auth-phone input::placeholder{
  color: rgba(15,23,42,.45);
}

/* Mobile: compacto */
@media (max-width: 420px){
  .auth-phone{ height: 46px; padding: 0 14px; gap: 8px; }
  .auth-phone-prefix{ padding-right: 10px; }
}

/* ===== Dirección con comuna fija + tooltip ===== */
.auth-address{
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;

  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;

  overflow: visible; /* permite tooltip fuera */
}

.auth-address:focus-within{
  background: #fff;
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

.auth-address-prefix{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;

  padding: 0 14px;
  font-weight: 800;
  color: rgba(15,23,42,.55);
  border-right: 1px solid rgba(15,23,42,.10);
  white-space: nowrap;
}

.auth-address .auth-input{
  flex: 1;
  min-width: 0;

  height: 100%;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;

  padding: 0 14px !important;
  border-radius: 0 !important;
}

.auth-address .auth-input::placeholder{
  color: rgba(15,23,42,.45);
}

/* Botón (!) */
.auth-tip{
  flex: 0 0 auto;
  position: relative;

  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 8px;

  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;

  color: rgba(15,23,42,.65);
  font-weight: 900;
  line-height: 1;

  cursor: help;
  user-select: none;
}

.auth-tip:hover{ border-color: rgba(37,99,235,.35); }

/* Tooltip (hover/focus) */
.auth-tip::after{
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 10px);

  width: 280px;
  padding: 10px 12px;
  border-radius: 12px;

  background: #0f172a;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;

  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: .15s ease;
  z-index: 999;
}

.auth-tip::before{
  content:"";
  position: absolute;
  right: 14px;
  top: calc(100% + 4px);

  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #0f172a;

  opacity: 0;
  transform: translateY(-4px);
  transition: .15s ease;
  z-index: 999;
}

.auth-tip:hover::after,
.auth-tip:hover::before,
.auth-tip:focus::after,
.auth-tip:focus::before{
  opacity: 1;
  transform: translateY(0);
}
