/**
 * Invo India — Auth Layout
 * Beautiful glassmorphism login page
 */

/* ─── Auth Page Layout ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background orbs */
.auth-page::before {
  content: '';
  position: absolute;
  top: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.2) 0%, transparent 70%);
  animation: orb1 8s ease-in-out infinite alternate;
}

.auth-page::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.15) 0%, transparent 70%);
  animation: orb2 10s ease-in-out infinite alternate;
}

@keyframes orb1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(80px, 60px) scale(1.1); } }
@keyframes orb2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, -40px) scale(1.15); } }

/* Floating particles */
.auth-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.3);
  animation: float linear infinite;
}

@keyframes float {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* ─── Auth Card ─────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  position: relative;
  z-index: 10;
  animation: authCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card-header {
  padding: 36px 36px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #6C63FF, #00D4AA);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.4);
  animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from { box-shadow: 0 8px 20px rgba(108, 99, 255, 0.4); }
  to   { box-shadow: 0 8px 30px rgba(0, 212, 170, 0.5); }
}

.auth-logo-text {
  text-align: left;
}

.auth-logo-text .app-name {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.auth-logo-text .app-tagline {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.auth-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
}

.auth-subtitle {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
}

.auth-card-body {
  padding: 28px 36px;
}

.auth-card-footer {
  padding: 16px 36px 28px;
  text-align: center;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-card-footer a { color: #6C63FF; font-weight: 600; }
.auth-card-footer a:hover { color: #8b85ff; }

/* Auth Form Elements */
.auth-form-group {
  margin-bottom: 20px;
}

.auth-form-group label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  display: block;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 13px 16px 13px 46px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 14.5px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  outline: none;
  -webkit-text-fill-color: #fff;
}

.auth-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px rgba(26, 26, 46, 0.9) inset;
  -webkit-text-fill-color: #fff;
}

.auth-input::placeholder { color: rgba(255, 255, 255, 0.3); }

.auth-input:focus {
  border-color: rgba(108, 99, 255, 0.6);
  background: rgba(108, 99, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.auth-input.error {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.06);
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 17px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-input:focus ~ .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
  color: rgba(108, 99, 255, 0.8);
}

.auth-input-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  font-size: 17px;
  transition: color 0.2s ease;
}
.auth-input-toggle:hover { color: rgba(255, 255, 255, 0.7); }

.auth-error {
  font-size: 12px;
  color: #fca5a5;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  display: none;
}
.auth-error.show { display: flex; animation: fadeInDown 0.2s ease; }

/* Auth Submit Button */
.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6C63FF, #5a52d5);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.45);
}

.auth-btn:hover {
  background: linear-gradient(135deg, #7c75ff, #6C63FF);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(108, 99, 255, 0.55);
}

.auth-btn:active { transform: scale(0.98); }

.auth-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.auth-btn:hover::after { opacity: 1; }

.auth-btn .btn-spinner { display: none; }
.auth-btn.loading .btn-text { opacity: 0; }
.auth-btn.loading .btn-spinner { display: inline-block; }

/* Remember me & Links */
.auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.auth-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  accent-color: #6C63FF;
}

.auth-link {
  font-size: 13px;
  color: #6C63FF;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.auth-link:hover { color: #8b85ff; }

/* Alert in auth */
.auth-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInDown 0.3s ease;
}

.auth-alert.error   { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.2); color: #fca5a5; }
.auth-alert.success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.2); color: #86efac; }
.auth-alert.info    { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.2); color: #93c5fd; }

/* OTP input */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.otp-input {
  width: 50px;
  height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  outline: none;
}

.otp-input:focus {
  border-color: rgba(108, 99, 255, 0.6);
  background: rgba(108, 99, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
  transform: scale(1.05);
}

.otp-input.filled {
  border-color: rgba(0, 212, 170, 0.5);
  background: rgba(0, 212, 170, 0.07);
}

/* Auth side panel (for wider screens) */
@media (min-width: 1024px) {
  .auth-page.split-layout {
    padding: 0;
    justify-content: flex-start;
  }

  .auth-split-left {
    flex: 1;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
  }

  .auth-split-right {
    width: 480px;
    min-height: 100vh;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
  }
}
