/* =====================================================================
   VELOX — Auth (login / register / OTP verify)
   App-like on mobile, split panel on desktop. Reuses landing.css tokens.
   ===================================================================== */
.auth-body { min-height: 100vh; background: var(--bg); }
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.auth-bg .blob { position: absolute; border-radius: 50%; filter: blur(100px); }
.auth-bg .b1 { width: 460px; height: 460px; top: -160px; right: -100px; background: radial-gradient(circle, var(--red) 0%, transparent 68%); opacity: 0.26; }
.auth-bg .b2 { width: 380px; height: 380px; bottom: -160px; left: -120px; background: radial-gradient(circle, var(--red-deep) 0%, transparent 70%); opacity: 0.22; }
.auth-bg .grid { position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 70%); }

.auth-shell { position: relative; z-index: 2; min-height: 100vh; display: grid;
  grid-template-columns: 1.05fr 0.95fr; }

/* Left brand panel (desktop only) */
.auth-aside { position: relative; overflow: hidden; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255,45,70,0.08), rgba(255,255,255,0.01)); }
.auth-aside .brand { font-size: 1.4rem; }
.auth-aside-mid { max-width: 460px; }
.auth-aside-mid h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 18px; }
.auth-aside-mid p { color: var(--muted); font-size: 1.05rem; }
.auth-aside-stats { display: flex; gap: 30px; margin-top: 30px; }
.auth-aside-stats .n { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; }
.auth-aside-stats .n span { color: var(--red-soft); }
.auth-aside-stats .l { font-size: 0.8rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; }
.auth-aside-foot { color: var(--muted-2); font-size: 0.85rem; }

/* Right form column */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .brand-mobile { display: none; justify-content: center; margin-bottom: 26px; }
.auth-head { margin-bottom: 26px; }
.auth-head h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.85rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-head p { color: var(--muted); font-size: 0.98rem; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-size: 0.82rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.input, .phone-input input, select.input {
  width: 100%; padding: 14px 15px; border-radius: 13px; font-size: 1rem; font-family: var(--font-body);
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); transition: border-color 0.25s, box-shadow 0.25s; }
.input:focus, .phone-input input:focus, select.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--glow-soft); }
.input::placeholder { color: var(--muted-2); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239a9aa9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

/* Phone input with country code */
.phone-input { display: flex; align-items: stretch; gap: 0; }
.phone-input .cc { display: flex; align-items: center; padding: 0 14px; font-weight: 600; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-2); border-right: none; border-radius: 13px 0 0 13px; white-space: nowrap; }
.phone-input input { border-radius: 0 13px 13px 0; }

.auth-form .btn { width: 100%; margin-top: 4px; }

.field-err { color: var(--red-soft); font-size: 0.82rem; }
.flash { padding: 11px 14px; border-radius: 12px; font-size: 0.88rem; border: 1px solid; }
.flash.ok { background: rgba(126,224,168,0.08); border-color: rgba(126,224,168,0.3); color: #9be8bb; }
.flash.demo { background: var(--glow-soft); border-color: rgba(255,45,70,0.3); color: var(--red-soft); display: flex; align-items: center; gap: 10px; }
.flash.demo b { font-family: var(--font-mono); letter-spacing: 0.3em; font-size: 1.05rem; color: #fff; }

.auth-alt { margin-top: 22px; text-align: center; font-size: 0.92rem; color: var(--muted); }
.auth-alt a { color: var(--red-soft); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted-2); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Segmented role toggle */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 4px; }
.segmented button { padding: 11px; border-radius: 10px; font-weight: 600; font-size: 0.92rem; color: var(--muted); transition: 0.25s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.segmented button svg { width: 17px; height: 17px; }
.segmented button.active { background: linear-gradient(135deg, var(--red), var(--red-deep)); color: #fff; box-shadow: 0 8px 20px -10px var(--glow); }

/* OTP boxes */
.otp-row { display: flex; gap: 10px; justify-content: space-between; }
.otp-row input { width: 100%; aspect-ratio: 1; text-align: center; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); transition: 0.2s; }
.otp-row input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--glow-soft); }
.otp-row input.filled { border-color: rgba(255,45,70,0.5); }
.otp-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 0.88rem; color: var(--muted); }
.otp-meta button { color: var(--red-soft); font-weight: 600; }
.otp-meta button:disabled { color: var(--muted-2); cursor: default; }
.otp-phone { font-weight: 600; color: var(--text); }

.password-toggle { text-align: center; margin-top: 18px; }
.password-toggle button { font-size: 0.86rem; color: var(--muted); }
.password-toggle button:hover { color: var(--text); }
.password-panel { margin-top: 16px; display: none; flex-direction: column; gap: 14px;
  padding: 18px; border: 1px dashed var(--border-2); border-radius: 16px; }
.password-panel.open { display: flex; }

.loc-box { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 14px; }
.loc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.loc-head strong { font-size: 0.86rem; }
.loc-head button { font-size: 0.78rem; padding: 7px 12px; border-radius: 9px; border: 1px solid rgba(255,45,70,0.3); color: var(--red-soft); background: var(--glow-soft); }
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.loc-note { margin-top: 8px; font-size: 0.78rem; color: var(--muted-2); }

.back-home { position: fixed; top: 22px; left: 22px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: var(--muted); padding: 9px 14px; border-radius: 11px; border: 1px solid var(--border-2); background: rgba(8,8,12,0.6); backdrop-filter: blur(10px); }
.back-home:hover { color: var(--text); }
.back-home svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card .brand-mobile { display: flex; }
  .auth-main { padding: 30px 20px 40px; align-items: flex-start; min-height: 100vh; }
  .auth-card { max-width: 460px; padding-top: 30px; }
  .back-home { background: transparent; border-color: transparent; padding: 9px 4px; }
}
@media (max-width: 420px) {
  .otp-row { gap: 7px; }
  .loc-grid { grid-template-columns: 1fr; }
}
