:root {
  --primary: #D42B2B;
  --primary-dark: #A81E1E;
  --primary-light: #FF5555;
  --dark: #111111;
  --dark2: #1A1A1A;
  --dark3: #242424;
  --border: rgba(255,255,255,.08);
  --text: #F0F0F0;
  --text-muted: #888;
  --input-bg: rgba(255,255,255,.05);
  --success: #22C55E;
  --warning: #F59E0B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #0D0D0D;
  overflow: hidden;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  animation: orbFloat 8s ease-in-out infinite;
}
.bg-orb-1 { width: 500px; height: 500px; background: var(--primary); top: -200px; left: -150px; animation-delay: 0s; }
.bg-orb-2 { width: 400px; height: 400px; background: #8B0000; bottom: -150px; right: -100px; animation-delay: 3s; }
.bg-orb-3 { width: 300px; height: 300px; background: #FF2222; top: 50%; left: 50%; transform: translate(-50%,-50%); opacity: .1; animation-delay: 1.5s; }
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
@keyframes orbFloat {
  0%,100% { transform: scale(1) translate(0,0); }
  50% { transform: scale(1.08) translate(10px,-15px); }
}

.auth-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 60px;
}

.auth-left {
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
  max-width: 460px;
  flex-shrink: 0;
}
@media (min-width: 992px) { .auth-left { display: flex; } }

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
}
.brand-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}

.auth-headline {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.auth-headline span { color: var(--primary-light); }

.auth-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 38px;
}

.feature-list { display: flex; flex-direction: column; gap: 14px; }
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #ccc;
  font-weight: 600;
}
.feature-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary-light);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--primary-light);
}

.auth-card {
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  flex-shrink: 0;
}

.card-brand-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.card-brand-mobile img { height: 36px; width: auto; }
@media (min-width: 992px) { .card-brand-mobile { display: none; } }

.auth-page { display: none; animation: fadeSlideIn .35s ease forwards; }
.auth-page.active { display: block; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-title { font-size: 24px; font-weight: 900; letter-spacing: -.8px; margin-bottom: 4px; }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }

.form-label-custom {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #AAA;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.input-group-custom { position: relative; margin-bottom: 18px; }
.input-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  z-index: 2;
  pointer-events: none;
}
.input-custom {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 13px 44px 13px 42px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.input-custom::placeholder { color: #555; font-weight: 400; }
.input-custom:focus {
  border-color: var(--primary);
  background: rgba(212,43,43,.06);
  box-shadow: 0 0 0 3px rgba(212,43,43,.15);
}
.input-custom.error   { border-color: var(--primary) !important; }
.input-custom.success { border-color: var(--success) !important; }

.toggle-pass {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  z-index: 2;
  transition: color .2s;
}
.toggle-pass:hover { color: var(--text); }

.error-msg {
  font-size: 11.5px;
  color: var(--primary-light);
  font-weight: 600;
  margin-top: -12px;
  margin-bottom: 14px;
  display: none;
  align-items: center;
  gap: 5px;
}
.error-msg.show { display: flex; }

.strength-bar { display: none; margin-top: -10px; margin-bottom: 16px; }
.strength-bar.show { display: block; }
.strength-track { height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
.strength-fill { height: 100%; border-radius: 2px; transition: width .4s ease, background .4s ease; width: 0%; }
.strength-label { font-size: 11px; font-weight: 700; }

.form-check-custom { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.form-check-custom input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-check-custom label { font-size: 13px; color: #999; font-weight: 600; cursor: pointer; }
.forgot-link { font-size: 13px; color: var(--primary-light); font-weight: 700; text-decoration: none; margin-left: auto; transition: opacity .2s; cursor: pointer; }
.forgot-link:hover { opacity: .75; }

.btn-auth {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .2px;
  transition: all .25s;
  box-shadow: 0 6px 24px rgba(212,43,43,.35);
  position: relative;
  overflow: hidden;
}
.btn-auth::before { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0); transition: background .2s; }
.btn-auth:hover::before { background: rgba(255,255,255,.08); }
.btn-auth:active { transform: scale(.98); }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-auth .spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider hr { flex: 1; border-color: rgba(255,255,255,.08); }
.divider span { font-size: 12px; color: #555; font-weight: 600; }

.btn-social {
  width: 100%;
  padding: 11px;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .2s;
  text-decoration: none;
  margin-bottom: 10px;
}
.btn-social:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); color: var(--text); }

.auth-bottom { text-align: center; margin-top: 22px; font-size: 13px; color: #666; font-weight: 600; }
.auth-bottom a { color: var(--primary-light); font-weight: 700; text-decoration: none; cursor: pointer; }
.auth-bottom a:hover { text-decoration: underline; }

.otp-container { display: flex; gap: 10px; justify-content: center; margin: 24px 0; }
.otp-input {
  width: 52px; height: 58px;
  background: var(--input-bg);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 12px;
  font-size: 22px; font-weight: 800;
  font-family: inherit;
  color: var(--text);
  text-align: center;
  outline: none;
  transition: all .2s;
  caret-color: var(--primary-light);
}
.otp-input:focus { border-color: var(--primary); background: rgba(212,43,43,.08); box-shadow: 0 0 0 3px rgba(212,43,43,.15); }
.otp-input.filled { border-color: var(--primary-light); background: rgba(212,43,43,.1); }
.otp-input.shake { animation: shake .4s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.otp-info { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.otp-info strong { color: var(--text); }

.resend-wrap { text-align: center; font-size: 13px; color: #666; margin-top: 12px; font-weight: 600; }
.resend-btn { background: none; border: none; color: var(--primary-light); font-weight: 700; font-family: inherit; font-size: 13px; cursor: pointer; }
.resend-btn:disabled { color: #555; cursor: not-allowed; }
.resend-timer { color: var(--primary-light); font-weight: 700; }

.toast-container-custom { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast-custom {
  background: var(--dark3);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  animation: toastIn .3s ease forwards;
}
.toast-custom.removing { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); }  to { opacity:0; transform:translateX(40px); } }
.toast-icon { font-size: 18px; }
.toast-icon.success { color: var(--success); }
.toast-icon.error   { color: var(--primary-light); }
.toast-icon.info    { color: #60A5FA; }
.toast-text { font-size: 13px; font-weight: 700; color: var(--text); }

.steps-bar { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  color: #555;
  transition: all .3s;
  flex-shrink: 0;
}
.step-circle.active { border-color: var(--primary); color: var(--primary-light); background: rgba(212,43,43,.12); }
.step-circle.done   { border-color: var(--success); background: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: rgba(255,255,255,.1); margin: 0 6px; transition: background .3s; }
.step-line.done { background: var(--success); }

.success-icon {
  width: 72px; height: 72px;
  background: rgba(34,197,94,.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  color: var(--success);
  animation: popIn .5s cubic-bezier(.175,.885,.32,1.275) forwards;
}
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.terms-text { font-size: 11.5px; color: #555; text-align: center; margin-top: 16px; line-height: 1.6; }
.terms-text a { color: var(--primary-light); text-decoration: none; }

@media (max-width: 575px) {
  .auth-card { padding: 30px 22px; border-radius: 20px; }
  .otp-input { width: 44px; height: 50px; font-size: 18px; }
}

