/* Login Page Styles */

#page-content:has(.login-container) {
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
}

.login-container {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Hide sidebar and navbar when on login page */
body:has(.login-container) #sidebar,
body:has(.login-container) header {
  display: none !important;
}

body:has(.login-container) main {
  width: 100% !important;
  margin-left: 0 !important;
  padding: 0 !important;
}

/* Left Side - Branding */
.login-left {
  width: 66.666%;
  background: linear-gradient(to bottom right, #4318FF, #9333EA, #4F46E5);
  position: relative;
  overflow: hidden;
}

.login-left-background {
  position: absolute;
  inset: 0;
}

.login-blur-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: pulse 3s ease-in-out infinite;
}

.login-blur-circle-1 {
  top: 80px;
  left: 80px;
  width: 288px;
  height: 288px;
  background: rgba(255, 255, 255, 0.1);
}

.login-blur-circle-2 {
  bottom: 80px;
  right: 80px;
  width: 384px;
  height: 384px;
  background: rgba(147, 51, 234, 0.2);
  animation-delay: 1s;
}

.login-blur-circle-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: rgba(79, 70, 229, 0.1);
}

.login-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.1;
}

.login-left-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 64px;
}

.login-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  max-width: 600px;
}

.login-stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.login-stat-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.login-stat-value {
  font-size: 36px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 8px;
}

.login-stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-sm);
}

.login-left-main {
  max-width: 800px;
}

.login-title {
  font-size: 48px;
  font-weight: var(--font-weight-bold);
  margin-bottom: 24px;
  line-height: 1.2;
}

.login-description {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
  line-height: 1.6;
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.login-feature-badge {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--font-size-sm);
}

.login-left-gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 128px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
}

/* Right Side - Login Form */
.login-right {
  width: 33.333%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-form-container {
  width: 100%;
  max-width: 448px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-container {
  background: linear-gradient(to bottom right, #4318FF, #9333EA);
  padding: 16px;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-logo {
  height: 80px;
  width: auto;
}

.login-form-title {
  font-size: 30px;
  font-weight: var(--font-weight-bold);
  color: #1A1A1A;
  margin-bottom: 8px;
}

.login-form-subtitle {
  color: #666666;
  font-size: var(--font-size-base);
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  display: block;
  color: #1A1A1A;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
}

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

.login-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.login-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: var(--font-size-base);
  transition: all 0.2s ease;
  outline: none;
}

.login-input:focus {
  border-color: #4318FF;
  box-shadow: 0 0 0 4px rgba(67, 24, 255, 0.1);
}

.login-password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.login-password-toggle:hover {
  color: #666666;
}

.login-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: #1A1A1A;
}

.login-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #4318FF;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  cursor: pointer;
}

.login-checkbox:focus {
  outline: 2px solid #4318FF;
  outline-offset: 2px;
}

.login-forgot-link {
  background: none;
  border: none;
  color: #4318FF;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.login-forgot-link:hover {
  color: #3614CC;
}

.login-submit-btn {
  width: 100%;
  background: linear-gradient(to right, #4318FF, #9333EA);
  color: white;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-submit-btn:hover {
  box-shadow: 0 8px 12px rgba(147, 51, 234, 0.5);
}

.login-submit-icon {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.login-submit-btn:hover .login-submit-icon {
  transform: translateX(4px);
}

/* Demo Credentials Box */
.login-demo-box {
  margin-top: 32px;
  padding: 16px;
  background: linear-gradient(to right, #EFF6FF, #F3E8FF);
  border-radius: 12px;
  border: 1px solid #BFDBFE;
}

.login-demo-title {
  font-size: 12px;
  color: #666666;
  text-align: center;
  margin-bottom: 8px;
  font-weight: var(--font-weight-medium);
}

.login-demo-credentials {
  font-size: 12px;
  color: #1A1A1A;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-demo-value {
  font-family: monospace;
  background: white;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.login-demo-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: linear-gradient(to right, #4318FF, #9333EA);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-demo-btn:hover {
  box-shadow: 0 4px 8px rgba(67, 24, 255, 0.3);
  transform: translateY(-1px);
}

/* Sign Up Link */
.login-signup {
  margin-top: 32px;
  text-align: center;
}

.login-signup-text {
  color: #666666;
  font-size: var(--font-size-sm);
}

.login-signup-link {
  background: none;
  border: none;
  color: #4318FF;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.login-signup-link:hover {
  color: #3614CC;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .login-container {
    flex-direction: column;
  }
  
  .login-left {
    display: none;
  }
  
  .login-right {
    width: 100%;
    padding: 24px;
  }
  
  .login-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
  }
  
  .login-stat-card {
    padding: 16px;
  }
  
  .login-stat-value {
    font-size: 28px;
  }
  
  .login-title {
    font-size: 36px;
  }
  
  .login-description {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .login-left {
    display: none;
  }
  
  .login-right {
    padding: 16px;
  }
  
  .login-logo {
    height: 60px;
  }
  
  .login-form-title {
    font-size: 24px;
  }
  
  .login-form-subtitle {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .login-left {
    display: none;
  }
  
  .login-right {
    padding: 12px;
  }
  
  .login-form-container {
    max-width: 100%;
  }
  
  .login-logo {
    height: 50px;
  }
  
  .login-form-title {
    font-size: 22px;
  }
  
  .login-form-subtitle {
    font-size: 13px;
  }
  
  .login-input {
    padding: 10px 14px 10px 44px;
    font-size: 14px;
  }
  
  .login-submit-btn {
    padding: 14px;
    font-size: var(--font-size-base);
  }
}
