/* ==========================================================================
   Login page — built on the site design system (style.css tokens, .btn, .field).
   Only layout + the OTP boxes live here.
   ========================================================================== */
.auth-body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; position: relative; isolation: isolate; overflow-x: hidden; }
.auth-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; max-width: var(--container); width: 100%; margin: 0 auto; }
.auth-top .back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-on-dark); transition: color .25s; }
.auth-top .back:hover { color: var(--gold-300); }
.auth-main { flex: 1; display: grid; place-items: center; padding: 12px 16px 48px; }

.auth-card {
  width: 100%; max-width: 440px; border-radius: var(--radius-xl); overflow: hidden;
  background: rgba(253, 250, 243, 0.94); border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201, 162, 39, 0.25);
  color: var(--ink);
  animation: auth-rise .8s var(--ease-out) both;
}
@keyframes auth-rise { from { opacity: 0; transform: translateY(28px) scale(.97); } to { opacity: 1; transform: none; } }

.auth-head {
  position: relative; overflow: hidden; padding: 26px 28px 24px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-900));
}
.auth-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-400), transparent); }
.auth-head img { width: 62px; height: 62px; object-fit: contain; padding: 8px; margin: 0 auto 12px; border-radius: 50%; background: var(--cream-50); box-shadow: 0 8px 20px -6px rgba(0,0,0,.55), 0 0 0 2px var(--gold-400); }
.auth-head h1 { font-family: var(--font-serif); font-size: 26px; font-weight: 700; line-height: 1.25; color: #fff; }
.auth-head p { margin-top: 6px; font-size: 13.5px; color: var(--gold-300); font-family: var(--font-serif); }

.auth-body-pad { padding: 26px 28px 8px; }
.auth-step { display: none; }
.auth-step.is-active { display: block; animation: step-in .5s var(--ease-out) both; }
@keyframes step-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

.auth-lead { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 18px; }
.auth-lead strong { color: var(--ink); }

.phone-row { display: flex; align-items: stretch; gap: 0; }
.phone-row .cc {
  display: inline-flex; align-items: center; padding: 0 14px; border-radius: 14px 0 0 14px; font-weight: 700; font-size: 15px;
  background: var(--cream-100); border: 1px solid var(--cream-300); border-right: 0; color: var(--maroon-700);
}
.phone-row input { border-radius: 0 14px 14px 0 !important; letter-spacing: .06em; font-weight: 600; }

.otp-row { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 6px; }
.otp-row input {
  width: 100%; min-width: 0; height: 56px; text-align: center; font: inherit; font-size: 22px; font-weight: 700; color: var(--maroon-800);
  border-radius: 14px; border: 1px solid var(--cream-300); background: rgba(255, 255, 255, .9);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.otp-row input:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 162, 39, .2); transform: translateY(-2px); }
.otp-row input.filled { border-color: var(--gold-500); background: #fff; }
.otp-row.shake { animation: shake .4s; }
.otp-row.shake input { border-color: #c0392b; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

.auth-msg { min-height: 20px; margin: 10px 0 0; font-size: 13px; font-weight: 600; }
.auth-msg.err { color: #b3261e; }
.auth-msg.ok { color: #1f7a45; }

.auth-actions { display: grid; gap: 12px; margin-top: 16px; }
.auth-actions .btn { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none !important; }
.btn .spin { width: 17px; height: 17px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }

.link-btn { font-size: 13.5px; font-weight: 700; color: var(--maroon-700); transition: color .2s; }
.link-btn:hover:not([disabled]) { color: var(--gold-600); text-decoration: underline; }
.link-btn[disabled] { color: var(--ink-mute); cursor: default; }
.otp-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .grid-2 { grid-template-columns: 1fr; } .otp-row input { height: 50px; font-size: 20px; } .auth-body-pad { padding: 22px 20px 6px; } }

.auth-foot { padding: 14px 28px 22px; text-align: center; font-size: 12.5px; color: var(--ink-mute); }
.auth-foot a { color: var(--maroon-700); font-weight: 600; }
.auth-foot a:hover { color: var(--gold-600); }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--ink-mute); }
.auth-secure i { color: var(--gold-600); }

.auth-card .field select {
  width: 100%; padding: 13px 16px; border-radius: 14px; font: inherit; font-size: 15px; color: var(--ink);
  background: rgba(255, 255, 255, 0.85); border: 1px solid var(--cream-300);
}
.auth-card .field select:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 162, 39, .18); }
.field .hint { margin-top: 5px; font-size: 12px; color: var(--ink-mute); }

@media (prefers-reduced-motion: reduce) { .auth-card, .auth-step.is-active { animation: none; } }
