/* =====================================================================
   Auth screens (login / create account / OTP / reset)
   3-zone layout from the Design DNA: navy brand panel · form · info rail
   ===================================================================== */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

.auth-topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(16px, 4vw, 48px); background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.auth-topbar__links { display: flex; gap: 26px; align-items: center; }
.auth-topbar__links a, .auth-topbar__lang { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; font-size: 14.5px; transition: color .2s; }
.auth-topbar__links a:hover { color: var(--primary-color); }
.auth-topbar__links svg { color: var(--primary-color); }

.auth-layout { flex: 1; display: grid; grid-template-columns: minmax(320px, 31%) minmax(0, 1fr) minmax(260px, 24%); }

/* Navy brand panel */
.auth-brand { position: relative; overflow: hidden; padding: clamp(32px, 4vw, 56px) clamp(24px, 3.5vw, 56px); background: linear-gradient(160deg, var(--secondary-2) 0%, var(--secondary-color) 60%, #01183B 100%); color: #fff; display: flex; flex-direction: column; }
.auth-brand__glow { position: absolute; width: 520px; height: 520px; right: -220px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(11, 96, 242, .45), transparent 65%); filter: blur(10px); animation: drift 14s ease-in-out infinite alternate; pointer-events: none; }
@keyframes drift { to { transform: translate(-60px, 80px); } }
.auth-brand__title { position: relative; color: #fff; font: 800 clamp(32px, 3.2vw, 46px)/1.08 var(--font-head); letter-spacing: -.025em; }
.auth-brand__title span { display: block; color: var(--gold); }
.auth-brand__lead { position: relative; margin-top: 16px; font-size: 17px; color: rgba(255, 255, 255, .88); max-width: 420px; }
.auth-features { position: relative; list-style: none; margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }
.auth-features li { display: flex; gap: 18px; align-items: center; opacity: 0; animation: rise-in .6s var(--ease) forwards; }
.auth-features li:nth-child(2) { animation-delay: .08s; } .auth-features li:nth-child(3) { animation-delay: .16s; } .auth-features li:nth-child(4) { animation-delay: .24s; }
.auth-features__icon { width: 60px; height: 60px; flex: none; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); display: grid; place-items: center; transition: background .3s, border-color .3s; }
.auth-features li:hover .auth-features__icon { background: var(--primary-color); border-color: var(--primary-color); }
.auth-features__icon svg { width: 26px; height: 26px; color: #fff; }
.auth-features strong { display: block; font: 700 17px var(--font-head); }
.auth-features span span, .auth-features div span { display: block; color: rgba(255, 255, 255, .75); font-size: 14px; }
.auth-brand__note { position: relative; display: flex; gap: 16px; align-items: center; margin-top: auto; padding-top: 26px; border-top: 2px solid var(--gold); font-size: 15px; color: rgba(255, 255, 255, .9); }
.auth-brand__note svg { width: 34px; height: 34px; color: var(--gold); }
.auth-brand__map { position: absolute; left: 0; right: 0; bottom: 30px; width: 100%; opacity: .14; pointer-events: none; }
.auth-brand__slogan { position: relative; margin-top: 22px; font: 600 11px var(--font); letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }

/* Main column */
.auth-main { padding: clamp(24px, 3vw, 40px) clamp(16px, 3vw, 40px); display: flex; flex-direction: column; align-items: center; }
.auth-tabs { width: 100%; max-width: 720px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.auth-tab { position: relative; padding: 14px 22px; font: 600 13px var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.auth-tab.is-active { color: var(--primary-color); background: #fff; border-radius: 10px 10px 0 0; }
.auth-tab.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--primary-color); }
.auth-card { width: 100%; max-width: 720px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 30px clamp(18px, 3vw, 34px); box-shadow: var(--sh-md); }
.auth-card--narrow { max-width: 480px; border-radius: var(--r-lg); margin-top: 6vh; text-align: center; }
.auth-card--narrow form, .auth-card--narrow .field { text-align: left; }
.auth-card__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary-color); }
.auth-card__icon svg { width: 28px; height: 28px; }
.auth-card__title { font: 800 28px/1.2 var(--font-head); color: var(--ink); }
.auth-card__sub { margin: 4px 0 22px; color: var(--ink-2); font-size: 16px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field--full { grid-column: 1 / -1; }
.field label { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--ink); }
.field label b { color: var(--danger); }
.field__link { margin-left: auto; font-weight: 500; font-size: 13px; }
.field input, .field select, .field textarea { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: 15px var(--font); color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:disabled { background: var(--surface-2); color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(11, 96, 242, .12); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field small { font-size: 12.5px; color: var(--primary-color); }
.field small.muted-warn { color: var(--muted); }
.field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23011E49' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 36px; }
.field__phone { display: grid; grid-template-columns: 88px 1fr; gap: 10px; }
.field__pw { position: relative; }
.field__pw input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 50%; display: grid; place-items: center; }
.pw-toggle:hover { background: var(--primary-tint); }
.pw-meter { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .3s var(--ease), background .3s; }
.pw-meter span[data-level="2"] { background: var(--warning); }
.pw-meter span[data-level="3"] { background: var(--primary-color); }
.pw-meter span[data-level="4"] { background: var(--success); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin: 6px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--primary-color); flex: none; }
.check a { text-decoration: underline; text-underline-offset: 2px; }

.auth-btn { position: relative; width: 100%; height: 50px; margin-top: 18px; border: 0; border-radius: var(--r-md); background: var(--primary-color); color: #fff; font: 600 14px var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 10px 22px rgba(11, 96, 242, .28); transition: background .2s, transform .15s, box-shadow .2s; overflow: hidden; }
.auth-btn:hover { background: var(--primary-hover); box-shadow: 0 14px 28px rgba(11, 96, 242, .34); }
.auth-btn:hover svg { transform: translateX(4px); }
.auth-btn svg { transition: transform .25s var(--ease); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn::before { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); transform: skewX(-20deg); transition: left .6s; }
.auth-btn:hover::before { left: 120%; }
.auth-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.auth-hint svg { color: var(--primary-color); width: 16px; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 15px; color: var(--ink-2); }
.auth-switch a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; margin-top: 18px; font-weight: 500; font-size: 14px; }
.auth-alert { display: flex; gap: 10px; align-items: center; padding: 12px 14px; margin-bottom: 16px; border-radius: var(--r-sm); background: var(--danger-tint); color: #A1341A; font-size: 14px; border: 1px solid #F5CFC3; text-align: left; animation: rise-in .3s var(--ease); }
.auth-dev { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--r-sm); background: #FBF5E3; color: #7A5E12; font-size: 13.5px; border: 1px dashed #E2CC86; }
.auth-dev strong { letter-spacing: .2em; font-size: 15px; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }

/* OTP boxes */
.otp-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 6px 0 4px; }
.otp-inputs input { width: 100%; height: 60px; text-align: center; font: 800 26px var(--font-head); color: var(--ink); border: 1.5px solid var(--line-strong); border-radius: var(--r-md); transition: border-color .2s, box-shadow .2s, transform .15s; }
.otp-inputs input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(11, 96, 242, .14); transform: translateY(-2px); }
.otp-inputs input.filled { border-color: var(--primary-color); background: var(--primary-tint); }
.otp-inputs.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.auth-resend { margin-top: 16px; display: flex; justify-content: center; gap: 6px; font-size: 14px; color: var(--muted); }
.auth-resend button { border: 0; background: none; font: 600 14px var(--font); color: var(--primary-color); cursor: pointer; }
.auth-resend button:disabled { color: var(--muted-2); cursor: default; }

/* Info rail */
.auth-rail { padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 28px) clamp(24px, 3vw, 40px) 0; display: flex; flex-direction: column; gap: 18px; }
.rail-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-low); }
.rail-card h3 { display: flex; align-items: center; gap: 10px; font: 700 18px var(--font-head); margin-bottom: 14px; }
.rail-card h3 svg { color: var(--primary-color); width: 26px; height: 26px; }
.rail-countries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rail-countries span { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-pill); background: var(--bg); font-weight: 500; font-size: 14px; transition: background .2s, transform .2s; }
.rail-countries span:hover { background: var(--primary-tint); transform: translateY(-1px); }
.rail-countries img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.rail-steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.rail-steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; color: var(--primary-color); font-weight: 500; font-size: 14.5px; }
.rail-steps li::before { content: counter(s); width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--primary-color); color: #fff; display: grid; place-items: center; font: 700 14px var(--font); }
.rail-card--center { text-align: center; }
.rail-shield { width: 46px; height: 54px; margin-bottom: 8px; }
.rail-security-title { justify-content: center; font-size: 20px !important; }
.rail-card--center p { font-size: 14px; color: var(--ink-2); }

.auth-footer { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; align-items: center; padding: 16px clamp(16px, 4vw, 48px); background: #fff; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.auth-footer nav { display: flex; gap: 18px; }
.auth-footer nav a { color: var(--muted); }
.auth-footer nav a:hover { color: var(--primary-color); }
.auth-footer p { display: flex; align-items: center; gap: 6px; }
.auth-footer svg { width: 16px; color: var(--secondary-color); }
.anim-rise { animation: rise-in .45s var(--ease) both; }

@media (max-width: 1200px) {
  .auth-layout { grid-template-columns: minmax(300px, 38%) 1fr; }
  .auth-rail { display: none; }
}
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { padding-bottom: 28px; }
  .auth-features, .auth-brand__map { display: none; }
  .auth-brand__note { margin-top: 22px; }
  .auth-topbar__links span { display: none; }
  .auth-topbar__links { gap: 14px; }
}
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .otp-inputs { gap: 6px; }
  .otp-inputs input { height: 52px; font-size: 22px; }
}
