/* =====================================================================
   Pantallas de acceso (login / registro / recuperación) — Ateria Agro Services
   Estructura tomada de los componentes "Thenty Log In Form" y "Thenty Sign Up Form":
   tarjeta de 340 px · campos con etiqueta de 12 px · inputs de 14 px con padding 12 px · foco con borde de acento
   · casilla de términos de 18 px · botón a todo el ancho en mayúsculas · enlace a la pantalla contraria.
   Los colores usan los tokens de Ateria (styles.css), no el naranja del componente original.
   ===================================================================== */

.auth-page {
  min-height: 100vh; display: grid; grid-template-rows: auto 1fr;
  background:
    radial-gradient(900px 520px at 85% 10%, rgba(31, 107, 45, .5), transparent 62%),
    radial-gradient(700px 400px at 0% 100%, rgba(183, 227, 27, .08), transparent 60%),
    var(--bg);
}
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 2rem); }
.auth-top .brand img { height: 48px; }
.auth-top a.back { font-size: .85rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.auth-top a.back:hover { color: var(--lime); }
.auth-main { display: grid; place-items: center; padding: 1.5rem 1rem 4rem; }

.auth-card {
  width: min(100%, 340px); display: flex; flex-direction: column; gap: 20px; padding: 20px;
  background: linear-gradient(145deg, var(--surface-2), #0c2113);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
}
.auth-card--wide { width: min(100%, 420px); }
.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-title { margin: 0; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 2rem; line-height: 1; letter-spacing: .01em; }
.auth-lead { margin: 0; font-size: 13px; color: var(--muted); }

.auth-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field-label { font-size: 12px; font-weight: 600; color: var(--text); }
.input {
  width: 100%; padding: 12px; font: 400 14px/1.2 var(--font); color: #fff;
  background: rgba(7, 18, 10, .55); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; outline: none;
  transition: border-color .05s;
}
.input::placeholder { color: rgba(255, 255, 255, .4); }
.input:focus { border-color: var(--lime); }
.input[aria-invalid="true"] { border-color: #ff8a8a; }
.field-hint { margin: 0; font-size: 11px; color: var(--muted); }

.pw { position: relative; }
.pw .input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--lime); }
.pw-toggle svg { width: 18px; height: 18px; }

.role-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-pill { position: relative; }
.role-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.role-pill span {
  display: block; text-align: center; padding: 10px 8px; border-radius: 10px; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(7, 18, 10, .55); color: var(--text);
}
.role-pill input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.role-pill input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--text); }
.check input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--lime); }
.check a { color: var(--lime); }

.auth-submit { width: 100%; height: 40px; padding: 0 16px; letter-spacing: .06em; font-size: 13px; text-transform: uppercase; }
.auth-submit[disabled] { opacity: .65; cursor: wait; }
.auth-submit.is-error { background: #ff6b6b; border-color: #ff6b6b; color: #2a0a0a; }

.auth-msg { margin: 0; min-height: 0; font-size: 13px; line-height: 1.4; }
.auth-msg:empty { display: none; }
.auth-msg.err { color: #ff8a8a; }
.auth-msg.ok { color: var(--lime); }
.auth-msg button { background: none; border: 0; padding: 0; font: inherit; color: var(--lime); text-decoration: underline; cursor: pointer; }

.auth-alt { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-alt a { color: var(--lime); font-weight: 700; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth-links { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.auth-links a { color: var(--muted); text-decoration: none; }
.auth-links a:hover { color: var(--lime); }

.auth-done { display: flex; flex-direction: column; gap: 14px; text-align: center; }
.auth-done .icon { width: 56px; height: 56px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(183, 227, 27, .12); color: var(--lime); }
.auth-done .icon svg { width: 28px; height: 28px; }
.auth-done p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-done strong { color: #fff; }
.hidden { display: none !important; }

/* ---------- Idiomas y registro cerrado ---------- */
.auth-top__right { display: flex; align-items: center; gap: 1rem; }
.auth-top .lang { margin: 0; }

.auth-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.auth-soon {
  margin: 0; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; line-height: 1.4;
  border: 1px dashed rgba(243, 207, 33, .5); border-radius: 10px; background: rgba(243, 207, 33, .07); color: var(--text);
}
.auth-form.is-closed .auth-fields { opacity: .5; }
.auth-form.is-closed [data-submit] { opacity: .55; cursor: not-allowed; }
.auth-alt .soon-badge { margin-inline-start: 4px; }
