/* Auth is a standalone full-screen route; do not reserve space for the normal fixed header. */
.auth-page-body { padding-top: 0 !important; }

/* ============================================================
   AUTH PAGES - Login / Register / OTP
   ============================================================ */

.auth-page {
  min-height: 100vh;
  background: var(--clr-bg);
  display: flex;
  align-items: stretch;
  padding: 0;
  padding-top: 0 !important; /* Override body padding-top */
}

.auth-visual {
  flex: 0 0 480px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0c10 0%, #111318 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12);
}

.auth-visual-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(245,183,49,0.08) 0%, transparent 70%);
}

.auth-visual img {
  position: relative;
  z-index: 2;
  max-width: 340px;
  filter: drop-shadow(0 20px 60px rgba(245,183,49,0.2));
}

.auth-visual .brand {
  position: relative;
  z-index: 2;
  margin-bottom: var(--sp-8);
  text-align: center;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
  background: var(--clr-bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  margin-bottom: var(--sp-2);
}
.auth-card .subtitle {
  color: var(--clr-text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--sp-8);
}

.auth-method-btns {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.auth-method-btn {
  width: 100%;
  padding: 13px var(--sp-5);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--clr-border);
}

.auth-method-btn.primary {
  background: var(--clr-gold);
  color: #0d0f14;
  border-color: var(--clr-gold);
}
.auth-method-btn.primary:hover {
  background: var(--clr-gold-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.auth-method-btn.google {
  background: var(--clr-bg-input);
  color: var(--clr-text);
}
.auth-method-btn.google:hover {
  border-color: #4285F4;
  color: var(--clr-white);
}
.auth-method-btn.google img { width: 18px; height: 18px; }
.auth-method-btn.google.is-loading { opacity: 0.6; pointer-events: none; }

.auth-method-btn.email {
  background: var(--clr-bg-input);
  color: var(--clr-text);
}
.auth-method-btn.email:hover { border-color: var(--clr-blue); color: var(--clr-blue); }

.auth-footer {
  text-align: center;
  margin-top: var(--sp-6);
  font-size: var(--font-size-sm);
  color: var(--clr-text-muted);
}
.auth-footer a { color: var(--clr-gold); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── OTP Input ── */
.otp-inputs {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  margin: var(--sp-6) 0;
  direction: ltr;
}

.otp-input {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  background: var(--clr-bg-input);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-white);
  outline: none;
  transition: all var(--transition);
  caret-color: var(--clr-gold);
}
.otp-input:focus {
  border-color: var(--clr-gold);
  box-shadow: 0 0 0 3px rgba(245,183,49,0.2);
}
.otp-input.filled { border-color: var(--clr-gold); background: var(--clr-gold-bg); }

.otp-timer {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-4);
}
.otp-timer .count { color: var(--clr-gold); font-weight: 700; }
.otp-resend {
  display: none;
  text-align: center;
  font-size: var(--font-size-sm);
}
.otp-resend a { color: var(--clr-gold); cursor: pointer; font-weight: 600; }
.otp-resend.visible { display: block; }

.phone-display {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-6);
}
.phone-display .phone { color: var(--clr-white); font-weight: 700; direction: ltr; display: inline-block; }

/* ── Steps Wizard ── */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--sp-8);
}

.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.auth-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  right: -50%;
  height: 2px;
  background: var(--clr-border);
  z-index: 0;
}
.auth-step.done:not(:last-child)::after,
.auth-step.active:not(:last-child)::after {
  background: var(--clr-gold);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--clr-bg-input);
  border: 2px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--clr-text-muted);
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.auth-step.active .step-num {
  background: var(--clr-gold);
  border-color: var(--clr-gold);
  color: #0d0f14;
}

.auth-step.done .step-num {
  background: var(--clr-green);
  border-color: var(--clr-green);
  color: #fff;
}

.step-label {
  font-size: var(--font-size-xs);
  color: var(--clr-text-dim);
  margin-top: 4px;
  white-space: nowrap;
}
.auth-step.active .step-label { color: var(--clr-gold); }
.auth-step.done .step-label   { color: var(--clr-green); }

/* ── Success Page ── */
.auth-success {
  text-align: center;
  padding: var(--sp-8) 0;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--clr-green-bg);
  border: 3px solid var(--clr-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-6);
  animation: successPop 0.5s cubic-bezier(.68,-.55,.27,1.55);
}
.success-icon svg { width: 36px; height: 36px; color: var(--clr-green); }
@keyframes successPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1);   opacity: 1; }
}

.auth-success h2 { font-size: var(--font-size-xl); margin-bottom: var(--sp-3); }
.auth-success p  { color: var(--clr-text-muted); font-size: var(--font-size-sm); margin-bottom: var(--sp-8); }

/* ── Profile completion form ── */
.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--sp-6);
}

.avatar-upload-area {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--clr-bg-input);
  border: 2px dashed var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}
.avatar-upload-area:hover { border-color: var(--clr-gold); }
.avatar-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.avatar-upload-area .upload-icon {
  color: var(--clr-text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
}
.avatar-upload-area .upload-icon svg { width: 24px; height: 24px; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .auth-visual { display: none; }
  .auth-page { padding-top: var(--header-h) !important; }
}

@media (max-width: 480px) {
  .auth-main  { padding: var(--sp-4); }
  .otp-input  { width: 44px; height: 52px; font-size: var(--font-size-xl); }
}


/* Responsive hardening v1.2.1 – removed from auth.css: all rules consolidated in responsive.css */


/* ── Password visibility toggle ── */
.form-group .form-control-icon:has(.password-toggle) { position: relative; }
.form-control-icon .has-password-toggle { padding-left: 48px; }
.password-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--clr-text-muted);
  cursor: pointer;
  z-index: 3;
  transition: color .18s ease, background-color .18s ease;
}
.password-toggle:hover,
.password-toggle:focus-visible { color: var(--clr-gold); background: rgba(255,203,5,.08); outline: none; }
.password-toggle-icon { width: 19px; height: 19px; display: block; }
.password-toggle-eye-off { display: none; }
.password-toggle.is-visible .password-toggle-eye { display: none; }
.password-toggle.is-visible .password-toggle-eye-off { display: block; }

/* ── Register password strength guide ── */
.password-guide {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--clr-border);
  border-radius: 12px;
  background: var(--clr-bg-input);
}
.password-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: 12px;
  color: var(--clr-text-muted);
}
.password-strength-label { font-weight: 700; white-space: nowrap; }
.password-strength-label[data-level="weak"] { color: #ef4444; }
.password-strength-label[data-level="medium"] { color: #f59e0b; }
.password-strength-label[data-level="good"] { color: #3b82f6; }
.password-strength-label[data-level="strong"] { color: var(--clr-green); }
.password-strength-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--clr-border);
  margin-bottom: 11px;
}
.password-strength-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--clr-text-dim);
  transition: width .22s ease, background-color .22s ease;
}
.password-strength-bar[data-level="weak"] > span { background: #ef4444; }
.password-strength-bar[data-level="medium"] > span { background: #f59e0b; }
.password-strength-bar[data-level="good"] > span { background: #3b82f6; }
.password-strength-bar[data-level="strong"] > span { background: var(--clr-green); }
.password-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}
.password-rules li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--clr-text-dim);
  transition: color .18s ease;
}
.password-rule-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--clr-border);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  color: transparent;
  transition: all .18s ease;
}
.password-rules li.is-valid { color: var(--clr-green); }
.password-rules li.is-valid .password-rule-icon {
  color: #fff;
  border-color: var(--clr-green);
  background: var(--clr-green);
}
.password-rules li.is-invalid .password-rule-icon {
  color: transparent;
  border-color: rgba(239,68,68,.45);
}
@media (max-width: 480px) {
  .password-guide-head { align-items: flex-start; }
  .password-rules { grid-template-columns: 1fr; }
}

/* Password confirmation feedback */
.password-confirm-status {
  min-height: 18px;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.6;
  font-weight: 700;
}
.password-confirm-status.is-valid { color: var(--clr-green); }
.password-confirm-status.is-invalid { color: #ef4444; }
#reg-password-confirm[aria-invalid="true"] { border-color: rgba(239,68,68,.55); }
#reg-password-confirm[aria-invalid="false"] { border-color: rgba(34,197,94,.45); }
