/* ============================================================
   CuraSovo — Auth screens (Login / PW-Reset / TOTP)
   Light background with layered, slowly drifting brand waves
   along the bottom — echoes the marketing key visual.
   ============================================================ */

.auth {
  min-height: 100vh; min-height: 100dvh; position: relative;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1200px 600px at 18% -10%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%),
    radial-gradient(1000px 520px at 88% 8%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 55%),
    var(--surface-2);
}

/* stage holds the centred card + the waves; the bar sits below it */
.auth__stage {
  position: relative; flex: 1; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--sp-7) var(--sp-6);
}

/* grey footer bar */
.auth__bar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  padding: 14px var(--sp-7);
  background: var(--surface-3); border-top: 1px solid var(--border);
  font-size: var(--fs-xs); color: var(--text-3);
}
.auth__bar-trust { display: inline-flex; align-items: center; gap: 7px; }
.auth__bar-trust .ico { color: var(--teal); }

/* ---- waves (2 gradient-filled waves + 1 fine-line band) ---- */
.auth__waves { position: absolute; left: 0; right: 0; bottom: 0; height: 62vh; min-height: 440px; pointer-events: none; z-index: 0; }
.auth__waves svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
/* filled gradient waves */
.wave-fill { will-change: transform; }
.wave-fill--1 { animation: waveDrift 40s linear infinite; }
.wave-fill--2 { animation: waveDrift 56s linear infinite reverse; }
/* fine-line band */
.wave-grp { fill: none; stroke: var(--brand); stroke-width: 1; vector-effect: non-scaling-stroke; will-change: transform; }
.wave-grp path { fill: none; }
.wave-grp--a { opacity: .26; animation: waveDrift 30s linear infinite; }
@keyframes waveDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* exactly one period of the tiled path */
}
@media (prefers-reduced-motion: reduce) { .wave-fill, .wave-grp { animation: none !important; } }

/* ---- card -------------------------------------------------- */
.auth__brand { position: relative; z-index: 2; margin-bottom: var(--sp-6); }
.auth__brand img { height: 40px; display: block; }

.auth-card {
  position: relative; z-index: 2; width: 100%; max-width: 408px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: 0 24px 60px rgba(24,33,51,.14), 0 4px 14px rgba(24,33,51,.06);
  padding: var(--sp-7) var(--sp-7) var(--sp-6);
}
.auth-card__head { margin-bottom: var(--sp-5); }
.auth-card__head h1 { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -0.02em; }
.auth-card__head p { color: var(--text-3); font-size: var(--fs-sm); margin-top: 5px; }

.auth-card .field { margin-bottom: var(--sp-4); }
.auth-card .field > label { display: block; margin-bottom: 6px; }
.auth-card .btn--primary { width: 100%; justify-content: center; height: 44px; }
.auth-card .row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }

.auth-foot { position: relative; z-index: 2; margin-top: var(--sp-5); text-align: center; font-size: var(--fs-sm); color: var(--text-3); }
.auth-foot .trust-chip { margin: 0 auto var(--sp-3); }
.auth-link { background: none; border: 0; font: inherit; color: var(--brand); font-weight: var(--fw-semi); cursor: pointer; padding: 0; }
.auth-link:hover { text-decoration: underline; }

/* remember checkbox */
.checkrow { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }

/* lang switch pinned top-right */
.auth__lang { position: absolute; top: var(--sp-5); right: var(--sp-5); z-index: 3; }

/* TOTP code inputs */
.code-row { display: flex; gap: 10px; justify-content: space-between; margin-bottom: var(--sp-4); }
.code-row input {
  width: 100%; height: 56px; text-align: center; font-size: 24px; font-weight: var(--fw-semi);
  font-family: var(--font-mono); border: 1px solid var(--border-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
}
.code-row input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }

/* success check */
.auth-success { text-align: center; padding: var(--sp-3) 0 var(--sp-2); }
.auth-success__ring {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto var(--sp-4);
  display: grid; place-items: center; background: var(--st-paid-bg); color: var(--st-paid-fg);
}
.auth-success__ring .ico { font-size: 30px; }

/* view switching */
.auth-view { display: none; }
.auth-view.is-active { display: block; animation: authIn .28s var(--ease); }
@keyframes authIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .auth-card { padding: var(--sp-6) var(--sp-5); }
}
