/* ============================================================
   AUTH.CSS - Login & Register Page
   ============================================================ */

.auth-body {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  cursor: auto;
}

/* BG */
.auth-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(200,168,75,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,168,75,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}
.auth-orb { position: absolute; border-radius: 50%; filter: blur(100px); }
.auth-orb.orb-1 { width: 500px; height: 500px; background: rgba(200,168,75,0.07); top: -150px; left: -100px; animation: orbFloat 12s ease-in-out infinite; }
.auth-orb.orb-2 { width: 400px; height: 400px; background: rgba(53,185,126,0.05); bottom: -100px; right: 20%; animation: orbFloat 16s ease-in-out infinite reverse; }

/* Back link */
.auth-back {
  position: fixed; top: 1.5rem; left: 2rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--slate);
  z-index: 10;
  transition: color var(--tr);
}
.auth-back:hover { color: var(--gold); }

/* Container */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  position: relative; z-index: 1;
}

/* ── LEFT PANEL ── */
.auth-left {
  background: var(--navy-card);
  border-right: 1px solid var(--border-lt);
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top left, rgba(200,168,75,0.06), transparent 60%);
  pointer-events: none;
}

.auth-logo {
  display: inline-flex; align-items: center; gap: 0.7rem;
  margin-bottom: 3rem; text-decoration: none;
}

.auth-left-content { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2rem; }
.auth-left-content h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--cream);
}
.auth-left-content h2 em { color: var(--gold); font-style: italic; }
.auth-left-content > p { font-size: 0.92rem; color: var(--slate); line-height: 1.7; max-width: 380px; }

.auth-features { display: flex; flex-direction: column; gap: 1.2rem; }
.af-item { display: flex; align-items: flex-start; gap: 1rem; }
.af-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--gold-dim); border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.af-title { font-size: 0.88rem; font-weight: 600; color: var(--cream); margin-bottom: 0.15rem; }
.af-sub   { font-size: 0.78rem; color: var(--slate); }

.auth-testimonial {
  background: rgba(200,168,75,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.auth-testimonial p { font-size: 0.88rem; color: var(--slate-lt); line-height: 1.65; font-style: italic; margin-bottom: 1rem; }
.at-author { display: flex; align-items: center; gap: 0.75rem; }
.at-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 600; color: var(--gold);
}
.at-author strong { display: block; font-size: 0.85rem; color: var(--cream); }
.at-author span   { font-size: 0.75rem; color: var(--slate); }

.auth-left-footer {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; color: var(--slate); margin-top: 2rem;
}
.auth-left-footer a { color: var(--slate); transition: color var(--tr); }
.auth-left-footer a:hover { color: var(--gold); }

/* ── RIGHT PANEL ── */
.auth-right {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2rem;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--navy-card);
  border: 1px solid var(--border-lt);
  border-radius: 24px;
  padding: 2.5rem 2.5rem 2rem;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  position: relative; overflow: hidden;
}

/* Tabs */
.auth-tabs {
  display: flex; position: relative;
  background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 4px;
  margin-bottom: 2rem;
}
.auth-tab {
  flex: 1; padding: 0.65rem;
  background: none; border: none;
  font-size: 0.88rem; font-weight: 500;
  color: var(--slate); cursor: pointer;
  position: relative; z-index: 1;
  transition: color 0.3s;
  border-radius: 9px;
  font-family: var(--ff-body);
}
.auth-tab.active { color: var(--cream); }
.tab-indicator {
  position: absolute;
  height: calc(100% - 8px); width: calc(50% - 4px);
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 9px;
  top: 4px; left: 4px;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.tab-indicator.right { transform: translateX(100%); }

/* Form wrap */
.auth-form-wrap { transition: opacity 0.3s, transform 0.3s; }
.auth-form-wrap.hidden {
  display: none; opacity: 0; transform: translateX(20px);
}
.auth-form-wrap.slide-in { animation: slideIn 0.35s ease forwards; }
.auth-form-wrap.slide-out { animation: slideOut 0.25s ease forwards; }
@keyframes slideIn  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(-20px); } }

.auth-form-header { margin-bottom: 1.8rem; }
.auth-form-header h3 {
  font-family: var(--ff-display);
  font-size: 1.6rem; font-weight: 600;
  color: var(--cream); margin-bottom: 0.3rem;
}
.auth-form-header p { font-size: 0.84rem; color: var(--slate); }

/* Fields */
.auth-fg { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.auth-fg label {
  font-size: 0.8rem; font-weight: 500;
  color: var(--slate-lt);
  display: flex; justify-content: space-between; align-items: center;
}
.forgot-link { font-size: 0.78rem; color: var(--gold); }
.forgot-link:hover { text-decoration: underline; }

.auth-input-wrap {
  position: relative; display: flex; align-items: center;
}
.input-icon {
  position: absolute; left: 0.9rem;
  color: var(--slate); flex-shrink: 0;
  pointer-events: none; z-index: 1;
}
.auth-input-wrap input {
  width: 100%;
  background: var(--navy-light);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 0.75rem 2.8rem 0.75rem 2.6rem;
  color: var(--cream); font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.auth-input-wrap input:not([class]):not([style*="padding-left"]) { padding-left: 2.6rem; }
.auth-input-wrap input[style*="padding-left"] { padding-left: 1rem; }
.auth-input-wrap input::placeholder { color: rgba(255,255,255,0.18); }
.auth-input-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,168,75,0.1);
}
.auth-input-wrap input.error { border-color: var(--danger); }
.eye-btn {
  position: absolute; right: 0.9rem;
  background: none; border: none; cursor: pointer;
  color: var(--slate); padding: 0; line-height: 0;
  transition: color 0.3s;
}
.eye-btn:hover { color: var(--gold); }
.auth-err { font-size: 0.73rem; color: var(--danger); min-height: 1em; }

/* Remember me */
.auth-remember {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--slate);
  cursor: pointer; margin-bottom: 1.2rem;
}
.auth-remember input[type="checkbox"] { accent-color: var(--gold); width: 14px; height: 14px; cursor: pointer; }
.auth-remember a { color: var(--gold); }

/* Submit Button */
.btn-auth-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--gold);
  color: var(--navy);
  border: none; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; font-family: var(--ff-body);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.btn-auth-submit:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(200,168,75,0.3); }
.btn-auth-submit:active { transform: translateY(0); }
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(9,14,29,0.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem;
}
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background:var(--border-lt); }
.auth-divider span { font-size: 0.75rem; color: var(--slate); white-space: nowrap; }

/* Social */
.auth-social { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-lt);
  border-radius: 10px;
  font-size: 0.84rem; color: var(--cream); font-weight: 500;
  cursor: pointer; font-family: var(--ff-body);
  transition: border-color 0.3s, background 0.3s;
}
.social-btn:hover { border-color: var(--border); background: rgba(255,255,255,0.07); }

/* Role Toggle */
.role-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.role-opt input[type="radio"] { display: none; }
.role-opt span {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.7rem 0.4rem;
  background: var(--navy-light);
  border: 1.5px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  font-size: 0.78rem; color: var(--slate);
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  text-align: center;
}
.role-opt input:checked + span {
  border-color: var(--gold);
  color: var(--gold-light);
  background: var(--gold-dim);
}
.role-icon { font-size: 1.2rem; }

/* Password strength */
.password-strength { margin-top: 0.4rem; }
.ps-bar { height: 3px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; margin-bottom: 0.3rem; }
.ps-fill { height: 100%; width: 0%; border-radius: 3px; transition: width 0.4s, background 0.4s; }
.ps-label { font-size: 0.72rem; color: var(--slate); }

/* OTP Overlay */
.otp-overlay {
  position: absolute; inset: 0;
  background: rgba(9,14,29,0.95);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.otp-box {
  text-align: center; padding: 2rem;
  max-width: 320px; width: 100%;
}
.otp-icon { font-size: 3rem; margin-bottom: 1rem; }
.otp-box h4 {
  font-family: var(--ff-display); font-size: 1.5rem;
  font-weight: 600; color: var(--cream); margin-bottom: 0.5rem;
}
.otp-box p { font-size: 0.85rem; color: var(--slate); margin-bottom: 1.5rem; }
.otp-inputs { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1rem; }
.otp-digit {
  width: 44px; height: 52px;
  background: var(--navy-light);
  border: 1.5px solid var(--border-lt);
  border-radius: 10px;
  text-align: center; font-size: 1.2rem; font-weight: 700;
  color: var(--cream); font-family: var(--ff-mono);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.otp-digit:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,168,75,0.15); }
.otp-timer { font-size: 0.78rem; color: var(--slate); margin-bottom: 1.5rem; }
.otp-cancel {
  width: 100%; padding: 0.7rem;
  background: none; border: 1px solid var(--border-lt);
  border-radius: 10px; color: var(--slate);
  font-family: var(--ff-body); font-size: 0.87rem; cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.otp-cancel:hover { border-color: var(--border); color: var(--cream); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .auth-container { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { min-height: 100vh; padding: 5rem 1.5rem 2rem; }
}
@media (max-width: 480px) {
  .auth-card { padding: 1.8rem 1.5rem; }
  .role-toggle { grid-template-columns: 1fr; }
  .otp-digit { width: 38px; height: 46px; }
}
