/* ─────────────────────────────────────────────
   threewebsite — auth pages (login / register / OTP)
   ───────────────────────────────────────────── */

body.auth-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
  animation: authFade 0.6s var(--ease);
}
@keyframes authFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.auth-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
}

/* Left: dark brand side */
.auth-aside {
  background: var(--ink);
  color: var(--white);
  padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::before {
  content: ""; position: absolute;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,63,255,0.25) 0%, transparent 60%);
  top: -240px; right: -240px; pointer-events: none;
}
.auth-aside .brand { color: var(--white); z-index: 1; position: relative; }
.auth-aside .brand-mark { background: var(--white); color: var(--ink); }
.auth-aside .brand-text em { color: var(--accent); }
.auth-hero {
  position: relative; z-index: 1;
  max-width: 440px;
}
.auth-hero .eyebrow { color: rgba(255,255,255,0.62); }
.auth-hero .eyebrow::before { background: var(--accent); }
.auth-hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 3.6vw, 2.9rem);
  line-height: 1.1; margin: 16px 0 20px;
  letter-spacing: -0.02em;
}
.auth-hero p { color: rgba(255,255,255,0.72); font-size: 1.02rem; }
.auth-features {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; z-index: 1;
}
.auth-features li {
  display: flex; gap: 12px; align-items: center;
  color: var(--white); font-size: 0.95rem;
}
.auth-features svg {
  width: 20px; height: 20px; color: var(--accent); flex-shrink: 0;
  stroke-width: 2;
}
.auth-footnote {
  position: relative; z-index: 1;
  font-size: 0.82rem; color: rgba(255,255,255,0.52);
}

/* Right: form panel */
.auth-main {
  padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 440px; margin: 0 auto;
}
.auth-card h2 {
  font-size: 2rem; margin: 0 0 8px; letter-spacing: -0.02em;
}
.auth-card .subhead { color: var(--muted); margin-bottom: 32px; }

.auth-form .form-row { margin-bottom: 18px; }
.auth-form label {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem; font-weight: 500;
  color: var(--ink); margin-bottom: 8px;
}
.auth-form input {
  width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-input);
  background: #fff;
  font-size: 0.95rem; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,63,255,0.15);
}
.auth-form .form-row.invalid input { border-color: var(--danger); }
.auth-form .form-err {
  color: var(--danger); font-size: 0.82rem;
  margin-top: 6px; display: none;
}
.auth-form .form-row.invalid .form-err { display: block; }

.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--muted); background: transparent;
  transition: color 0.2s;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle svg { width: 18px; height: 18px; }

.auth-submit {
  width: 100%; justify-content: center; margin-top: 8px;
  padding: 15px 22px;
}

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 32px 0; color: var(--muted);
  font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.auth-switch {
  text-align: center;
  color: var(--muted);
  font-size: 0.93rem;
}
.auth-switch a {
  color: var(--ink); font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.auth-switch a:hover { color: var(--accent); border-color: var(--accent); }

.auth-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 0.88rem;
  margin-bottom: 32px;
  transition: color 0.2s;
}
.auth-back:hover { color: var(--ink); }
.auth-back svg { width: 14px; height: 14px; }

/* ─── OTP input boxes ─── */
.otp-row {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 10px; margin: 8px 0 20px;
}
.otp-row input {
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem; font-weight: 600;
  padding: 18px 0;
  letter-spacing: 0;
}
.otp-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,63,255,0.15); }
.otp-row.shake { animation: shake 0.35s; }
@keyframes shake {
  10%,90% { transform: translateX(-1px); }
  20%,80% { transform: translateX(2px); }
  30%,50%,70% { transform: translateX(-4px); }
  40%,60% { transform: translateX(4px); }
}

.otp-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
  font-size: 0.88rem; color: var(--muted);
}
.otp-meta .timer {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink); font-weight: 600;
}
.otp-meta .timer.expired { color: var(--danger); }
.btn-resend {
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem; font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px; line-height: 1;
}
.btn-resend[disabled] {
  color: var(--muted); border-color: var(--line);
  cursor: not-allowed;
}
.btn-resend:hover:not([disabled]) { color: var(--accent); border-color: var(--accent); }

.otp-hint {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.otp-hint strong { color: var(--ink); font-family: 'Syne', sans-serif; }

/* Dev hint banner */
.dev-hint {
  background: #FFF9E6;
  border: 1px solid #F5E0A6;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.85rem;
  color: #785B1A;
  margin-bottom: 20px;
}
.dev-hint code {
  background: #fff; padding: 2px 6px; border-radius: 4px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { padding: 32px; min-height: auto; }
  .auth-aside::before { width: 360px; height: 360px; top: -180px; right: -180px; }
  .auth-main { padding: 40px 28px; }
  .auth-hero h1 { font-size: 1.7rem; }
  .auth-features { margin-top: 20px; }
}
