/* ===============================================
   LOGIN PAGE - ULTRA MODERN CSS SYSTEM
   =============================================== */

/* === LOGIN CONTAINER === */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
  animation: floatingElements 20s ease-in-out infinite;
}

.login-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></svg>') repeat;
  animation: particleFloat 30s linear infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes floatingElements {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(120deg); }
  66% { transform: translateY(15px) rotate(240deg); }
}

@keyframes particleFloat {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-100px); }
}

/* === LOGIN WRAPPER === */
.login-wrapper {
  max-width: 420px;
  width: 100%;
  position: relative;
  z-index: 10;
  animation: fadeInUp 0.8s ease-out;
}

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

/* === LOGIN HEADER === */
.login-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.login-logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem auto;
  box-shadow: 0 20px 40px rgba(79, 172, 254, 0.3);
  transform: translateY(0);
  transition: all 0.3s ease;
  position: relative;
}

.login-logo::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #4facfe, #00f2fe, #4facfe);
  border-radius: 22px;
  z-index: -1;
  animation: rotate 3s linear infinite;
}

.login-logo:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 25px 50px rgba(79, 172, 254, 0.4);
}

.login-logo svg {
  width: 40px;
  height: 40px;
  color: white;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-welcome {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin: 1rem 0;
  text-shadow: 0 4px 8px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
}

/* === LOGIN CARD === */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.15),
    0 16px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a202c;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.login-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  border-radius: 2px;
}

/* === LOGIN FORM === */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-form-group {
  position: relative;
}

.login-form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.login-form-icon {
  width: 16px;
  height: 16px;
  color: #6b7280;
}

.login-form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  box-sizing: border-box;
}

.login-form-input:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 
    0 0 0 4px rgba(79, 172, 254, 0.1),
    0 4px 12px rgba(79, 172, 254, 0.15);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.login-form-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.login-password-container {
  position: relative;
}

.login-password-input {
  padding-right: 3rem;
}

.login-password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-password-toggle:hover {
  background: rgba(79, 172, 254, 0.1);
}

.login-toggle-icon {
  width: 20px;
  height: 20px;
  color: #6b7280;
}

/* === LOGIN OPTIONS === */
.login-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 0;
}

.login-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #374151;
}

.login-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  accent-color: #4facfe;
}

.login-checkbox-text {
  font-weight: 500;
}

.login-forgot-link {
  font-size: 0.875rem;
  color: #4facfe;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.login-forgot-link:hover {
  color: #00f2fe;
  text-decoration: underline;
}

/* === LOGIN BUTTON === */
.login-button {
  width: 100%;
  padding: 1.25rem;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.login-button:hover::before {
  left: 100%;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px rgba(79, 172, 254, 0.3),
    0 6px 12px rgba(79, 172, 254, 0.2);
}

.login-button:active {
  transform: translateY(2px);
}

.login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-button-icon {
  width: 20px;
  height: 20px;
}

/* === LOGIN LOADING === */
.login-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15);
}

.login-loading-text {
  color: #374151;
  font-weight: 500;
  margin: 0;
}

/* === LOGIN FOOTER === */
.login-footer {
  text-align: center;
  margin-top: 2rem;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.login-footer-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  margin: 0;
}

.login-footer-link {
  color: #4facfe;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.login-footer-link:hover {
  color: #00f2fe;
  text-decoration: underline;
}

/* === ERROR STATES === */
.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-error-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.login-form-input-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* === SUCCESS STATES === */
.login-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-success-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 480px) {
  .login-container {
    padding: 1rem;
  }
  
  .login-wrapper {
    max-width: 100%;
  }
  
  .login-card {
    padding: 2rem 1.5rem;
  }
  
  .login-welcome {
    font-size: 2rem;
  }
  
  .login-logo {
    width: 60px;
    height: 60px;
  }
  
  .login-logo svg {
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
  .login-container {
    background: #000;
  }
  
  .login-card {
    background: #fff;
    border: 2px solid #000;
  }
  
  .login-form-input {
    border: 2px solid #000;
  }
  
  .login-button {
    background: #000;
    border: 2px solid #000;
  }
}