/* ============================================================
   auth.css — Login, Register, OTP Pages
   Extends style.css — Royal Indian Festival Theme
   ============================================================ */

/* ============================================================
   AUTH BODY — Full page centered layout
   ============================================================ */
.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;  /* blocks horizontal scroll */
overflow-y: auto;    /* allows vertical scroll on small screens */
}

/* ============================================================
   BACKGROUND DECORATION
   ============================================================ */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.auth-bg-glow.g1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232, 57, 138, 0.12), transparent 70%);
  top: -100px;
  left: -100px;
  animation: driftA 12s ease-in-out infinite alternate;
}

.auth-bg-glow.g2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(232, 160, 32, 0.1), transparent 70%);
  bottom: -80px;
  right: -80px;
  animation: driftB 10s ease-in-out infinite alternate;
}

@keyframes driftA {
  from { transform: translate(0, 0); }
  to   { transform: translate(40px, 30px); }
}

@keyframes driftB {
  from { transform: translate(0, 0); }
  to   { transform: translate(-30px, -20px); }
}

.auth-mandala {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: mandalaRotate 30s linear infinite;
}

@keyframes mandalaRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================================
   AUTH CONTAINER
   ============================================================ */
.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ============================================================
   BRAND LOGO (top of auth page)
   ============================================================ */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.auth-brand:hover { opacity: 0.8; }

.auth-brand span {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
}

.auth-brand em {
  font-style: italic;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   AUTH CARD
   ============================================================ */
.auth-card {
  width: 100%;
  background: var(--grad-card);
  border: 1px solid rgba(245, 208, 96, 0.15);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(245,208,96,0.08);
  animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Card header */
.auth-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   ERROR MESSAGE
   ============================================================ */
.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: #f87171;
  font-weight: 600;
  margin-bottom: 20px;
  animation: shake 0.4s ease;
}

.auth-error.hidden { display: none; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ============================================================
   INPUT GROUPS
   ============================================================ */
.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}

.input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 208, 96, 0.15);
  border-radius: 12px;
  color: var(--text-light);
  font-size: 0.95rem;
  font-family: 'Nunito', sans-serif;
  outline: none;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.input-wrap input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.input-wrap input:focus {
  border-color: var(--gold-main);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.12);
}

/* Password toggle button */
.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
  line-height: 1;
}

.toggle-password:hover { opacity: 1; }

/* ── PHONE INPUT ── */
.phone-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 208, 96, 0.15);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.phone-input-wrap:focus-within {
  border-color: var(--gold-main, #e8a020);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 100%;
  flex-shrink: 0;
  user-select: none;
}

.phone-flag { font-size: 1rem; line-height: 1; }

.phone-code {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--gold-main, #e8a020);
  font-family: 'Nunito', sans-serif;
}

.phone-divider {
  width: 1px;
  height: 20px;
  background: rgba(245, 208, 96, 0.2);
  margin-left: 4px;
}

.phone-input-wrap input {
  flex: 1;
  padding: 13px 10px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-light, #fdf6ee);
  font-size: 0.95rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  min-width: 0;  /* prevents flex overflow */
}

.phone-input-wrap input::placeholder {
  color: var(--text-muted, #b8a9d0);
  opacity: 0.5;
  letter-spacing: 0;
}

.phone-wa-icon {
  display: flex;
  align-items: center;
  padding: 0 12px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.field-note{
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.phone-input-wrap:focus-within .phone-wa-icon { opacity: 1; }

/* SVG input icons */
.input-icon svg,
.error-icon svg,
.toggle-password svg,
.auth-icon svg {
  display: block;
  flex-shrink: 0;
}

.auth-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: rgba(245, 208, 96, 0.08);
  border: 1px solid rgba(245, 208, 96, 0.15);
  border-radius: 20px;
}

.auth-icon svg { color: var(--gold-light, #f5d060); }

/* sidebar nav SVGs */
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-nav a svg { flex-shrink: 0; opacity: 0.85; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; }

/* ============================================================
   OTP INPUT — special large input for OTP page
   ============================================================ */
.otp-input-wrap {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0;
}

.otp-single {
  width: 52px;
  height: 58px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: 'Baloo Bhai 2', sans-serif;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 208, 96, 0.2);
  border-radius: 12px;
  color: var(--gold-light);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: var(--gold-main);
}

.otp-single:focus {
  border-color: var(--gold-main);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.15);
  background: rgba(255,255,255,0.08);
}

/* Fallback single OTP input (if not using split boxes) */
input#otpCode {
  text-align: center;
  letter-spacing: 6px;
  font-family: 'Baloo Bhai 2', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold-light);
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: var(--grad-gold);
  color: var(--text-dark);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Baloo Bhai 2', sans-serif;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  margin-top: 8px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 160, 32, 0.45);
}

.auth-btn:active { transform: translateY(0); }

/* Loading state */
.auth-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-icon { font-size: 1.1rem; }

/* ============================================================
   DIVIDER
   ============================================================ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(245, 208, 96, 0.12);
}

/* ============================================================
   SWITCH PAGE LINK
   ============================================================ */
.switch-page {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.switch-page a {
  color: var(--gold-light);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.switch-page a:hover { color: var(--gold-main); }

/* ============================================================
   OTP TIMER / RESEND
   ============================================================ */
.otp-resend {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.otp-timer {
  font-weight: 700;
  color: var(--gold-light);
  font-family: 'Baloo Bhai 2', sans-serif;
}

.resend-btn {
  background: none;
  border: none;
  color: var(--gold-main);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s;
}

.resend-btn:hover { color: var(--gold-light); }
.resend-btn:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .auth-title { font-size: 1.5rem; }
  .otp-single { width: 44px; height: 50px; font-size: 1.2rem; }
}

/* ============================================================
   PASSWORD STRENGTH METER
   ============================================================ */
.password-strength {
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

.strength-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}