/* ----------------------------------------------------------
   Login Page Styles
   ---------------------------------------------------------- */

: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;
  animation-delay: 0s;
}

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

.bg-animation .orb:nth-child(3) {
  width: 300px;
  height: 300px;
  background: #06b6d4;
  top: 50%;
  left: 60%;
  animation-delay: -10s;
}

@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); }
}

/* - Grid Pattern Overlay - */
.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;
}

/* - Layout - */
.login-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* - Left: Branding Panel - */
.login-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  color: #fff;
  position: relative;
}

.brand-content {
  max-width: 540px;
  text-align: center;
}

/* Logo + Badge row */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* AI Badge */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0;
}

.ai-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5);
  animation: pulse-ring 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}

.brand-logo-icon {
  width: 45px;
  height: 45px;
  background: var(--gradient-1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.4);
  overflow: hidden;
}

.brand-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.brand-logo-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
}

.brand-tagline {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-description {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 22px;
}

/* Key Features List */
.brand-features {
  margin-bottom: 20px;
  text-align: left;
}

.features-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
  padding: 8px 12px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  transition: background 0.2s, border-color 0.2s;
}

.feature-item:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: #e2e8f0;
}

.feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  color: #a5b4fc;
}

/* Solution Badges */
.brand-solutions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}

.solution-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 5px 12px;
  transition: all 0.2s;
}

.solution-badge:hover {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.4);
  color: #c7d2fe;
}

.solution-badge i {
  font-size: 12px;
  color: #6366f1;
}

/* Stats Row */
.brand-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
}

.brand-stat {
  text-align: center;
}

.brand-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
}

.brand-stat-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-top: 4px;
}

/* - Right: Login Form - */
.login-form-side {
  width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  flex-shrink: 0;
}

.login-card {
  width: 100%;
  max-width: 420px;
  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);
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 32px;
}

/* Social Buttons */
.social-login {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.social-btn i {
  font-size: 18px;
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.login-divider span {
  font-size: 12px;
  color: #475569;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Form */
.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:focus ~ i,
.form-input:focus + i {
  color: var(--primary-light);
}

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

/* Validation error styles */
.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 {
  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;
}

/* Remember / Forgot */
.form-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.form-check-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check-custom input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.form-check-custom input[type="checkbox"]:checked {
  background: var(--gradient-1);
  border-color: transparent;
}

.form-check-custom input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.form-check-custom span {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.forgot-link {
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #a5b4fc;
}

/* Submit Button */
.login-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;
}

.login-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;
}

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

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

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

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

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

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

.register-disabled {
  color: var(--primary-light);
  font-weight: 600;
  cursor: default;
  user-select: none;
}

/* - Responsive - */
@media (max-width: 991.98px) {
  .login-brand {
    display: none;
  }
  .login-form-side {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .login-form-side {
    padding: 20px;
  }
  .login-card {
    padding: 32px 24px;
    border-radius: 20px;
  }
  .brand-tagline {
    font-size: 28px;
  }
}
