:root {
  --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  background: var(--gradient-bg);
  -webkit-font-smoothing: antialiased;
}

/* - Animated Background - */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-animation .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 15s ease-in-out infinite;
}

.bg-animation .orb:nth-child(1) {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.bg-animation .orb:nth-child(2) {
  width: 400px;
  height: 400px;
  background: #8b5cf6;
  bottom: -80px;
  right: -80px;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -60px) scale(1.05); }
  50% { transform: translate(-30px, 40px) scale(0.95); }
  75% { transform: translate(50px, 20px) scale(1.02); }
}

.bg-animation::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* - Centered Layout - */
.auth-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 40px;
}

/* - Card - */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

/* - Icon Header - */
.auth-icon {
  width: 72px;
  height: 72px;
  background: rgba(var(--primary-rgb), 0.15);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
}

.auth-icon i {
  font-size: 32px;
  color: var(--primary-light);
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 14px;
  color: #64748b;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.6;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
}

.form-input-wrap {
  position: relative;
}

.form-input-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  font-size: 18px;
  transition: color 0.2s;
  z-index: 1;
  pointer-events: none;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

.form-input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.form-input::placeholder {
  color: #475569;
}

.form-input:focus {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-input-wrap:focus-within i {
  color: var(--primary-light);
}

.form-input.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.invalid-feedback {
  color: #fca5a5;
  font-size: 12px;
  margin-top: 8px;
  display: block !important;
}

/* Toggle Password */
.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #475569;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  transition: color 0.2s;
  z-index: 1;
}

.toggle-password:hover {
  color: #94a3b8;
}

/* - Alerts - */
.auth-alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #fca5a5;
}

.auth-alert-error i {
  font-size: 18px;
  color: #ef4444;
  position: static;
  pointer-events: auto;
  transform: none;
}

.auth-alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #86efac;
}

.auth-alert-success i {
  font-size: 18px;
  color: #22c55e;
  position: static;
  pointer-events: auto;
  transform: none;
}

/* - Submit Button - */
.auth-btn {
  width: 100%;
  height: 50px;
  background: var(--gradient-1);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
  position: relative;
  overflow: hidden;
}

.auth-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(var(--primary-rgb), 0.45);
}

.auth-btn:hover::before {
  opacity: 1;
}

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

/* - Footer Link - */
.auth-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: #64748b;
}

.auth-footer a {
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: #a5b4fc;
}

/* - Responsive - */
@media (max-width: 575.98px) {
  .auth-wrapper {
    padding: 20px;
  }
  .auth-card {
    padding: 32px 24px;
    border-radius: 20px;
  }
}
