/* ============================================================
   Ring Fenced — Auth Page Styles  (v3 — immersive split)
   ============================================================ */

/* ── Shell ─────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── Left panel — cinematic brand panel ─────────────────────── */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 3rem 3.5rem;
}

/* Full-bleed background image */
.auth-brand-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.auth-brand-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(.45) saturate(1.1);
}

/* Gradient overlays */
.auth-brand-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(135deg, rgba(240,90,36,.22) 0%, transparent 55%),
    linear-gradient(to top, rgba(10,10,10,.92) 0%, rgba(10,10,10,.55) 50%, rgba(10,10,10,.35) 100%);
}
.auth-brand-noise {
  position: absolute; inset: 0; z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Content layers */
.auth-brand-logo {
  position: relative; z-index: 3;
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  text-decoration: none;
}
.auth-brand-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #f05a24, #ff8c42);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; color: #fff; font-weight: 800;
  box-shadow: 0 4px 16px rgba(240,90,36,.45);
}

.auth-brand-content {
  position: relative; z-index: 3;
  margin-top: auto;
  padding-bottom: 1rem;
}

/* Stats row */
.auth-stats {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.auth-stat-value {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -.04em;
  color: #fff;
  line-height: 1;
}
.auth-stat-value span { color: #f05a24; }
.auth-stat-label {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  margin-top: .25rem;
}

.auth-brand-tagline {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.25rem;
}
.auth-brand-tagline .accent { color: #f05a24; }

.auth-brand-desc {
  font-size: .9375rem;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 2.25rem;
}

.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.auth-brand-feature {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .875rem;
  color: rgba(255,255,255,.75);
}
.auth-brand-feature .feature-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f05a24;
  flex-shrink: 0;
  box-shadow: 0 0 8px #f05a24;
}

/* Floating phone card */
.auth-phone-float {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: -28px;
  transform: translateY(-55%);
  animation: auth-float 4.5s ease-in-out infinite;
}
@keyframes auth-float {
  0%,100% { transform: translateY(-55%); }
  50%      { transform: translateY(-60%); }
}

.auth-phone-card {
  width: 186px;
  background: rgba(14,14,14,.82);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  padding: 1.25rem .875rem 1.5rem;
  backdrop-filter: blur(24px);
  box-shadow: 0 32px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
}
.auth-phone-notch {
  width: 48px; height: 7px;
  background: rgba(255,255,255,.14);
  border-radius: 4px;
  margin: 0 auto 1rem;
}
.auth-phone-tag {
  font-size: .55rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.45);
  margin-bottom: .4rem;
}
.auth-phone-caller {
  font-size: .9375rem; font-weight: 800;
  color: #fff; margin-bottom: .2rem;
}
.auth-phone-num {
  font-size: .65rem; color: rgba(255,255,255,.5); margin-bottom: .875rem;
}
.auth-phone-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .55rem;
  background: rgba(240,90,36,.18);
  border: 1px solid rgba(240,90,36,.32);
  border-radius: 999px;
  font-size: .575rem; font-weight: 700; color: #f05a24;
  margin-bottom: .875rem;
}
.auth-phone-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #f05a24;
  animation: pb-pulse 1.6s ease-in-out infinite;
}
@keyframes pb-pulse { 0%,100%{opacity:1}50%{opacity:.3} }

.auth-phone-msg {
  font-size: .6rem; line-height: 1.45;
  padding: .45rem .55rem;
  border-radius: 9px 9px 9px 2px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.7);
  margin-bottom: .325rem;
}
.auth-phone-msg.ai {
  border-radius: 9px 9px 2px 9px;
  background: rgba(240,90,36,.14);
  border: 1px solid rgba(240,90,36,.22);
  color: rgba(255,255,255,.85);
}
.auth-phone-risk {
  margin-top: .75rem;
}
.auth-phone-risk-label {
  display: flex; justify-content: space-between;
  font-size: .55rem; color: rgba(255,255,255,.45);
  margin-bottom: .3rem;
}
.auth-phone-risk-bar {
  height: 3px; background: rgba(255,255,255,.1);
  border-radius: 2px; overflow: hidden;
}
.auth-phone-risk-fill {
  height: 100%; width: 78%;
  background: linear-gradient(90deg,#f05a24,#ff4444);
  border-radius: 2px;
  animation: risk-anim 2s ease-in-out infinite;
}
@keyframes risk-anim { 0%,100%{opacity:1}50%{opacity:.65} }
.auth-phone-blocked {
  margin-top: .65rem; text-align: center;
  padding: .35rem;
  background: rgba(255,68,68,.1); border: 1px solid rgba(255,68,68,.2);
  border-radius: 6px;
  font-size: .575rem; font-weight: 700; color: #ff7070;
  letter-spacing: .08em; text-transform: uppercase;
}

.auth-brand-footer {
  position: relative; z-index: 3;
  margin-top: 2rem;
  font-size: .8rem;
  color: rgba(255,255,255,.3);
  font-style: italic;
}

/* ── Right panel — form ─────────────────────────────────────── */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: #0a0a0a;
  position: relative;
}

/* Subtle accent glow top-left */
.auth-form-panel::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(240,90,36,.07) 0%, transparent 70%);
  pointer-events: none;
}

.auth-form-wrap {
  width: 100%;
  max-width: 400px;
  position: relative; z-index: 1;
}

/* Back to home link */
.auth-home-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .825rem;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color .2s;
}
.auth-home-link:hover { color: rgba(255,255,255,.7); }
.auth-home-link svg { flex-shrink: 0; }

.auth-form-header { margin-bottom: 2rem; }
.auth-form-title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
  margin-bottom: .375rem;
}
.auth-form-subtitle { font-size: .9rem; color: rgba(255,255,255,.45); }
.auth-form-subtitle a { color: #f05a24; font-weight: 500; }
.auth-form-subtitle a:hover { text-decoration: underline; }

.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }
.auth-form .btn-primary { width: 100%; padding: .75rem; font-size: .9375rem; margin-top: .25rem; }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  color: rgba(255,255,255,.25); font-size: .8125rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,.08);
}

/* Footer links */
.auth-form-footer {
  font-size: .875rem;
  color: rgba(255,255,255,.45);
  margin-top: 1.5rem;
}
.auth-form-link { color: #f05a24; font-weight: 500; text-decoration: none; }
.auth-form-link:hover { text-decoration: underline; }

/* form elements */
.form-group { margin-bottom: 0; }
.form-label {
  display: block; font-size: .875rem; font-weight: 600;
  color: rgba(255,255,255,.6); margin-bottom: .5rem;
}
.form-label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .5rem;
}
.form-label-row .form-label { margin-bottom: 0; }
.form-label-link { font-size: .8rem; color: rgba(255,255,255,.4); text-decoration: none; transition: color .2s; }
.form-label-link:hover { color: #f05a24; }

.form-input {
  width: 100%; padding: .75rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  font-size: .9375rem; color: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  box-sizing: border-box;
}
.form-input:focus {
  border-color: rgba(240,90,36,.5);
  box-shadow: 0 0 0 3px rgba(240,90,36,.1);
}
.form-input::placeholder { color: rgba(255,255,255,.2); }

/* Flash / alerts */
.alert { padding: .875rem 1rem; border-radius: 10px; font-size: .875rem; display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; }
.alert-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: .1rem; }
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-error { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.2); color: #86efac; }

/* Flash */
.flash { padding:.875rem 1.25rem; border-radius:10px; font-size:.9rem; margin-bottom:1rem; border:1px solid; }
.flash-success { background:rgba(34,197,94,.08); border-color:rgba(34,197,94,.2); color:#86efac; }
.flash-error   { background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.2); color:#fca5a5; }
.flash-warning { background:rgba(234,179,8,.08); border-color:rgba(234,179,8,.2); color:#fde047; }
.flash-info    { background:rgba(59,130,246,.08); border-color:rgba(59,130,246,.2); color:#93c5fd; }

/* Terms */
.auth-terms { font-size:.8125rem; color:rgba(255,255,255,.3); text-align:center; line-height:1.6; margin-top:.5rem; }
.auth-terms a { color:rgba(255,255,255,.45); text-decoration:underline; text-decoration-color:rgba(255,255,255,.15); }
.auth-terms a:hover { color:#fff; }

/* Back link */
.auth-back { display:flex; align-items:center; gap:.5rem; font-size:.875rem; color:rgba(255,255,255,.35); text-decoration:none; margin-top:1.5rem; transition:color .2s; }
.auth-back:hover { color:#fff; }

/* OTP */
.otp-inputs { display:flex; gap:.625rem; justify-content:center; }
.otp-input {
  width:52px; height:56px; text-align:center; font-size:1.25rem; font-weight:600;
  border:1px solid rgba(255,255,255,.1); border-radius:10px;
  background:rgba(255,255,255,.04); color:#fff; outline:none;
  transition:border-color .2s, box-shadow .2s;
}
.otp-input:focus { border-color:rgba(240,90,36,.5); box-shadow:0 0 0 3px rgba(240,90,36,.1); }

/* Password toggle */
.password-wrap { position:relative; }
.password-toggle {
  position:absolute; right:.75rem; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; color:rgba(255,255,255,.35);
  display:flex; align-items:center; padding:.25rem; transition:color .2s;
}
.password-toggle:hover { color:#fff; }

/* logo icon global */
.logo-icon {
  background: linear-gradient(135deg,#f05a24,#ff8c42);
  border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:900; color:#fff;
  flex-shrink:0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-brand { display: none; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-form-panel { padding: 2rem 1.25rem; align-items: flex-start; padding-top: 3.5rem; }
}
