/*
 * themontessori.world — auth & account screens.
 *
 * The single-focus pages that live outside the public directory and the
 * trastienda: sign in, register, forgot / reset password, set a password. All
 * share one centred brand card. (The owner dashboard used to live here too; it
 * now uses the `listing` layout, alongside the editor it leads into.)
 *
 * Tokens and components are lifted from the public design system
 * (app/assets/stylesheets/public.css), kept
 * self-contained here so these standalone screens don't drag in the whole
 * profile stylesheet. Plain CSS served by Propshaft; NOT processed by Tailwind.
 */

/* ============================ Tokens ============================== */
/* Todos los tokens vienen de base.css (cargado antes que este archivo). Auth no
   redefine ninguno: su fondo es claro, así que el --greige/--maroon con AA de
   base sirve tal cual. */

/* ============================ Base ================================ */
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:"Hanken Grotesk",system-ui,sans-serif;font-size:17px;line-height:1.6;
  color:var(--ink);background:var(--cream-2);-webkit-font-smoothing:antialiased;
  min-height:100vh;display:flex;flex-direction:column;align-items:center;
  padding:28px;
}
a{color:inherit}
:focus-visible{outline:2.5px solid var(--action);outline-offset:3px;border-radius:6px}

/* ============================ Card =============================== */
.auth-card{
  width:100%;max-width:460px;background:var(--paper);
  border:1px solid var(--line);border-radius:18px;overflow:hidden;
  box-shadow:0 22px 50px rgba(45,42,38,.10);
  /* Centrado vertical con margen auto (no justify-content) para que, cuando la
     tarjeta es más alta que la pantalla, se apoye arriba y la página haga scroll
     en vez de recortar el botón de abajo. */
  margin-block:auto;
}
.auth-card.wide{max-width:560px}
.brandrule{display:flex;height:5px;width:100%}
.brandrule span{flex:1}
.auth-body{padding:38px 36px 36px}

.auth-brand{display:inline-flex;margin-bottom:22px}
.auth-brand svg{height:34px;width:auto;display:block}

.auth-eyebrow{
  font-size:.72rem;letter-spacing:.2em;text-transform:uppercase;
  font-weight:700;color:var(--greige);margin-bottom:12px;
}
.auth-body h1{
  font-family:"Fraunces",Georgia,serif;font-optical-sizing:auto;
  font-weight:540;letter-spacing:-0.015em;line-height:1.1;
  font-size:clamp(1.6rem,4.5vw,2rem);margin-bottom:12px;
}
.auth-lead{color:var(--ink-soft);font-size:1rem;line-height:1.6}
.auth-lead + .auth-form,.auth-lead + .auth-actions{margin-top:24px}

/* ===================== Pestañas acceso / registro ================ */
/* Cabecera clásica de dos pestañas: la activa se resalta con tinta e
   hilo inferior; el hilo base recorre todo el ancho por debajo. */
.auth-tabs{display:flex;margin:4px 0 30px;border-bottom:2px solid var(--line)}
.auth-tab{
  flex:1;text-align:center;padding:0 6px 15px;text-decoration:none;
  margin-bottom:-2px;border-bottom:2px solid transparent;color:var(--greige);
  transition:color .15s ease,border-color .15s ease;
}
.auth-tab-kicker{
  display:block;font-size:.82rem;font-weight:500;color:var(--greige);margin-bottom:5px;
}
.auth-tab-label{
  display:block;font-size:1.02rem;font-weight:700;
  text-transform:uppercase;letter-spacing:.03em;
}
.auth-tab.is-active{color:var(--ink);border-bottom-color:var(--ink)}
.auth-tab:not(.is-active):hover{color:var(--ink-soft)}
.auth-tabs + .auth-form{margin-top:0}

/* ============================ Forms ============================== */
.auth-form{margin-top:26px}
.auth-field{margin-bottom:18px}
.auth-field label{
  display:block;font-size:.8rem;font-weight:600;color:var(--ink-soft);
  margin-bottom:7px;
}
/* Campos de texto (email, contraseña…). Se excluye el checkbox: un control de
   marcar no debe heredar width:100% ni el aspecto de caja de texto. */
.auth-field input:not([type=checkbox]){
  display:block;width:100%;font-family:inherit;font-size:16px;color:var(--ink);
  background:var(--field-bg);border:1px solid var(--line);border-radius:8px;
  padding:12px 14px;transition:border-color .15s ease,box-shadow .15s ease;
}
.auth-field input::placeholder{color:var(--greige)}
.auth-field input:focus{
  outline:none;border-color:var(--action);
  box-shadow:0 0 0 3px var(--action-ring);
}

/* Honeypot antispam: fuera de pantalla, invisible para humanos. */
.auth-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Fila de aceptación de términos: checkbox pegado a su texto en una sola línea. */
.auth-terms{display:flex;align-items:flex-start;gap:10px;margin-bottom:22px}
.auth-terms input[type=checkbox]{
  flex:0 0 auto;width:19px;height:19px;margin:1px 0 0;
  accent-color:var(--action);cursor:pointer;
}
.auth-terms label{
  display:inline;margin:0;font-weight:400;font-size:.9rem;
  color:var(--ink-soft);line-height:1.45;cursor:pointer;
}
.auth-terms a{color:var(--maroon);text-decoration:underline}

/* ============================ Buttons ============================ */
.auth-actions{margin-top:26px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--action);color:#F7FAF6;
  border:none;border-radius:999px;padding:14px 26px;
  font-family:inherit;font-weight:600;font-size:1rem;cursor:pointer;
  text-decoration:none;transition:transform .12s ease,background .18s ease;
}
.btn.block{width:100%}
.btn:hover{background:var(--action-hover)}
.btn:active{transform:translateY(1px)}
.auth-submit{padding-top:16px;padding-bottom:16px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.btn-ghost{
  background:none;border:none;padding:0;color:var(--ink-soft);
  font-family:inherit;font-size:.95rem;font-weight:500;cursor:pointer;
  text-decoration:underline;text-underline-offset:3px;
}
.btn-ghost:hover{color:var(--ink)}
.auth-link{
  color:var(--maroon);font-weight:600;font-size:.95rem;text-decoration:none;
  border-bottom:1px solid var(--line);
}
.auth-link:hover{border-color:var(--greige)}

/* Banner de lanzamiento sobre el primer campo del alta. Mismo espíritu que el
   de la página pública de Contacto: caja cream con la regadera y un titular. */
.auth-launch{
  display:flex;align-items:center;gap:14px;margin-bottom:24px;padding:14px 16px;
  background:var(--cream);border:1px solid var(--line);border-radius:14px;
}
.auth-launch__icon{flex:none;width:56px;height:auto;object-fit:contain}
.auth-launch__text strong{
  display:block;font-family:"Fraunces",Georgia,serif;font-weight:600;
  font-size:1.05rem;color:var(--ink);margin-bottom:4px;
}
.auth-launch__text p{font-size:.9rem;line-height:1.5;color:var(--ink-soft)}

/* Enlace "¿Has olvidado tu contraseña?" bajo el campo de contraseña. */
.auth-forgot{margin:-2px 0 24px}

.auth-duplicate-alert{
  margin-bottom:22px;padding:12px 16px;background:var(--cream);
  border:1px solid var(--line);border-radius:12px;
  font-size:.92rem;line-height:1.5;color:var(--ink-soft);
}

/* Encabezado accesible oculto: las pestañas hacen de título visual. */
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* ============================ Notes / flashes ==================== */
.auth-note{
  margin-top:28px;padding:16px 18px;background:var(--cream);
  border:1px solid var(--line);border-radius:14px;
  font-size:.92rem;line-height:1.55;color:var(--ink-soft);
}
.auth-note a{color:var(--maroon);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.auth-foot{margin-top:26px;padding-top:22px;border-top:1px solid var(--line)}

.flash{
  padding:12px 16px;border-radius:12px;font-size:.92rem;font-weight:500;
  margin-bottom:22px;
}
.flash-notice{background:#EBF1E6;border:1px solid #cfe3cf;color:#3f6b4e}
.flash-alert{background:#F6E7E5;border:1px solid #e6cbc7;color:#9b463c}
.auth-errors{
  list-style:none;margin-bottom:22px;padding:12px 16px;
  background:#F6E7E5;border:1px solid #e6cbc7;border-radius:12px;
  color:#9b463c;font-size:.9rem;line-height:1.5;
}
.auth-errors li{padding-left:16px;position:relative}
.auth-errors li::before{content:"•";position:absolute;left:2px}

@media(max-width:560px){ .auth-body{padding:30px 24px 28px} }
