/* ========================================
   Login Page Specific Styles - Fix for oversized layout
   ======================================== */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  width: 100%;
  max-width: 400px; /* Reasonable size for login form */
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 2.5rem 2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: #718096;
  font-size: 0.875rem;
}

/* Form specific styles */
#login-form {
  margin-top: 1.5rem;
}

#login-form .form-group {
  margin-bottom: 1.5rem;
}

#login-form .form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4a5568;
}

#login-form .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  transition: all 0.2s;
}

#login-form .form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#login-form .btn-primary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

#login-form .btn-primary:hover {
  background: #5a67d8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.btn-secondary {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

.divider {
  margin: 2rem 0;
  height: 1px;
  background: #e2e8f0;
  position: relative;
}

.divider::after {
  content: 'OR';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 0 1rem;
  color: #a0aec0;
  font-size: 0.75rem;
  font-weight: 600;
}

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

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.error-message {
  display: block;
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.d-none {
  display: none !important;
}

/* Alert styles */
#alert-container {
  margin-bottom: 1.5rem;
}

.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-error {
  background: #fed7d7;
  color: #742a2a;
  border: 1px solid #fc8181;
}

.alert-success {
  background: #c6f6d5;
  color: #22543d;
  border: 1px solid #68d391;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .login-container {
    padding: 1rem;
  }
  
  .login-card {
    padding: 2rem 1.5rem;
    max-width: 100%;
    margin: 0 0.5rem;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
}

/* High resolution screens - ensure card doesn't get too big */
@media (min-width: 1920px) {
  .login-card {
    max-width: 450px; /* Slightly larger but still reasonable */
  }
}

/* Ultra-wide monitors (32" and above) */
@media (min-width: 2560px) {
  .login-container {
    padding: 3rem;
  }
  
  .login-card {
    max-width: 480px; /* Still contained, not full-screen */
    padding: 3rem 2.5rem;
  }
}

/* Dark mode support */
[data-theme="dark"] .login-container {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

[data-theme="dark"] .login-card {
  background: #2d3748;
  color: #e2e8f0;
}

[data-theme="dark"] .login-title {
  color: #f7fafc;
}

[data-theme="dark"] .login-subtitle {
  color: #a0aec0;
}

[data-theme="dark"] .form-label {
  color: #cbd5e0;
}

[data-theme="dark"] .form-control {
  background: #1a202c;
  border-color: #4a5568;
  color: #e2e8f0;
}

[data-theme="dark"] .form-control:focus {
  border-color: #667eea;
  background: #1a202c;
}

[data-theme="dark"] .divider {
  background: #4a5568;
}

[data-theme="dark"] .divider::after {
  background: #2d3748;
  color: #718096;
}

[data-theme="dark"] a {
  color: #9f7aea;
}

[data-theme="dark"] a:hover {
  color: #b794f4;
}