/* Auth pages (signup.html, login.html). Builds on tokens, .btn, .field, .consent from styles.css */

.auth {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(60% 45% at 85% -5%, rgba(0,178,236,.14), transparent 70%),
    radial-gradient(50% 40% at 0% 0%, rgba(15,27,127,.08), transparent 70%),
    var(--paper);
}

/* ---------- Top bar ---------- */
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.auth-top__logo img { height: 34px; width: auto; }
.auth-top__back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--muted); text-decoration: none; padding: 8px 14px; margin-right: -14px; border-radius: 999px; transition: color .2s, background-color .2s; }
.auth-top__back:hover { color: var(--navy); background: rgba(15,27,127,.06); }
.auth-top__back svg { transition: transform .2s var(--ease); }
.auth-top__back:hover svg { transform: translateX(-3px); }

/* ---------- Card ---------- */
.auth-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: clamp(8px, 4vh, 48px) var(--gutter) 40px; }
.auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(28px, 4vw, 44px); box-shadow: 0 1px 2px rgba(10,16,51,.04), 0 30px 60px -30px rgba(10,16,51,.25); }
.auth-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 12px; border-radius: 999px; background: var(--sky-50); color: var(--sky-text); font-size: 12.5px; font-weight: 800; letter-spacing: .04em; }
.auth-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }
.auth-title { font-size: clamp(28px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.03em; }
.auth-sub { margin-top: 8px; color: var(--muted); font-size: 16px; }
.auth-form { margin-top: 28px; }

/* Fields */
.auth .field { margin-bottom: 16px; }
.field__hint { font-size: 13px; color: var(--muted); }
.field.has-error .field__hint { display: none; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field__row a { font-size: 14px; font-weight: 700; color: var(--sky-text); text-decoration: none; }
.field__row a:hover { text-decoration: underline; }
.tel { display: flex; gap: 8px; }
.tel__cc { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.flag { width: 20px; height: 14px; border-radius: 3px; background: linear-gradient(90deg, #008751 33.3%, #fff 33.3% 66.6%, #008751 66.6%); box-shadow: 0 0 0 1px rgba(10,16,51,.12); }
.tel input { flex: 1; min-width: 0; }
.field input.is-valid { border-color: #9ADBB0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2316A34A' d='M8.3 13.3 5 10l-1.1 1.1 4.4 4.4 8-8-1.1-1.1z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field__suggest { font-size: 13.5px; color: var(--muted); }
.field__suggest button { border: 0; background: none; padding: 0; font-weight: 800; color: var(--sky-text); text-decoration: underline; }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 800; color: var(--navy); }
.pw__toggle:hover { background: var(--paper); }
.auth .consent { margin-top: 4px; font-size: 13.5px; }
.auth .consent a { color: var(--navy); font-weight: 700; }

/* Alerts */
.auth-alert { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; background: #FEF2F2; border: 1px solid #FECACA; color: #7F1D1D; font-size: 14.5px; font-weight: 600; }
.auth-alert--info { background: var(--sky-50); border-color: #C6EEFB; color: var(--ink); }
.auth-alert p + p { margin-top: 6px; }
.auth-alert__actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.auth-alert__actions a, .auth-alert__actions button { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--navy); text-decoration: underline; cursor: pointer; }

/* Submit */
.auth-submit { margin-top: 20px; }
.auth-submit__arrow { transition: transform .2s var(--ease); }
.auth-submit:hover .auth-submit__arrow { transform: translateX(3px); }
.auth-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: auth-spin .7s linear infinite; }
.auth-submit.is-loading { pointer-events: none; opacity: .92; }
.auth-submit.is-loading .auth-spinner { display: block; }
.auth-submit.is-loading .auth-submit__arrow { display: none; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-legal { margin-top: 14px; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.auth-legal a { color: inherit; }
.grecaptcha-badge { visibility: hidden !important; } /* disclosure shown in .auth-legal instead */

.auth-switch { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; font-size: 15px; color: var(--muted); }
.auth-switch a { color: var(--navy); font-weight: 800; text-decoration: none; border-bottom: 2px solid var(--sky); }

/* Success (signup) */
.auth-done { text-align: center; }
.auth-done:focus { outline: none; }
.auth-done__badge { width: 76px; height: 76px; margin: 0 auto 22px; }
.auth-done__badge svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.auth-done__badge circle { stroke: var(--green); stroke-width: 3; fill: #DCFCE7; stroke-dasharray: 151; stroke-dashoffset: 151; animation: auth-draw .6s var(--ease) forwards; }
.auth-done__badge path { stroke: var(--green); stroke-width: 4; stroke-dasharray: 40; stroke-dashoffset: 40; animation: auth-draw .4s var(--ease) .45s forwards; }
@keyframes auth-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .auth-done__badge circle, .auth-done__badge path { animation: none; stroke-dashoffset: 0; } }
.auth-done .auth-sub b { color: var(--ink); overflow-wrap: anywhere; }
.auth-next { margin: 24px 0; padding: 18px 20px; border-radius: var(--r); background: var(--sky-50); text-align: left; }
.auth-next__label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sky-text); }
.auth-next__title { font-size: 19px; font-weight: 800; margin: 4px 0; }
.auth-next p:last-child { color: var(--muted); font-size: 15px; }
.auth-done__actions { display: grid; gap: 10px; }
.btn--wa { background: #25D366; color: #fff; }
.btn--wa:hover { background: #1FBE5B; }
.btn--outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn--outline:hover { border-color: var(--navy); }

/* ---------- Footer ---------- */
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; padding-block: 0 28px; font-size: 13px; color: var(--muted); }
.auth-foot a { color: inherit; text-decoration: none; }
.auth-foot a:hover { color: var(--navy); }

/* ---------- Small screens: drop the card chrome, keep it flat and roomy ---------- */
@media (max-width: 560px) {
  .auth { background: #fff; }
  .auth-top { padding-block: 16px; }
  .auth-top__logo img { height: 30px; }
  .auth-top__back { font-size: 14px; }
  .auth-main { padding-top: 8px; }
  .auth-card { border: 0; box-shadow: none; padding: 8px 0 0; border-radius: 0; }
}
