/* Login Screen Styles */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #0a1628 0%, #1a2942 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.login-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.login-container {
  text-align: center;
  max-width: 420px;
  width: 90%;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 0.95rem;
  color: #9ca3af;
  margin-bottom: 32px;
  font-weight: 400;
}

/* Input Groups */
.login-input-group {
  margin-bottom: 20px;
  text-align: left;
}

.login-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #d1d5db;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.login-input:focus {
  border-color: #00A86B;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.15);
}

.login-input::placeholder {
  color: #6b7280;
}

.login-input:invalid:not(:placeholder-shown) {
  border-color: #E34234;
}

/* Legacy password input support */
.password-input-group {
  position: relative;
  margin-bottom: 24px;
}

.password-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 0.3em;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  outline: none;
  transition: all 0.3s ease;
}

.password-input:focus {
  border-color: #00A86B;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.1);
}

.password-input::placeholder {
  letter-spacing: normal;
  color: #6b7280;
}

/* Login Button */
.login-button {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #00A86B 0%, #008556 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
  margin-top: 8px;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 168, 107, 0.4);
}

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

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

/* Error Message */
.login-error {
  margin-top: 16px;
  padding: 12px;
  background: rgba(227, 66, 52, 0.15);
  border: 1px solid rgba(227, 66, 52, 0.3);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.875rem;
  display: none;
  text-align: center;
}

.login-error.show {
  display: block;
  animation: shake 0.5s ease;
}

/* Success Message */
.login-success {
  margin-top: 16px;
  padding: 12px;
  background: rgba(0, 168, 107, 0.15);
  border: 1px solid rgba(0, 168, 107, 0.3);
  border-radius: 8px;
  color: #34d399;
  font-size: 0.875rem;
  display: none;
  text-align: center;
}

.login-success.show {
  display: block;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.login-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #6b7280;
}

.login-loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* ========== PASSWORD CHANGE MODAL ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.modal-container {
  max-width: 420px;
  width: 90%;
  padding: 32px;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.password-change-modal {
  text-align: center;
}

.modal-header {
  margin-bottom: 28px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: #9ca3af;
  line-height: 1.5;
}

.password-change-modal .login-input-group {
  text-align: left;
}

.password-change-modal .login-button {
  margin-top: 16px;
}

/* Password strength indicator */
.password-strength {
  margin-top: 8px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.password-strength-bar.weak {
  width: 33%;
  background: #E34234;
}

.password-strength-bar.medium {
  width: 66%;
  background: #f59e0b;
}

.password-strength-bar.strong {
  width: 100%;
  background: #00A86B;
}

.password-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 6px;
  text-align: left;
}

/* ========== USER SELECTION SCREEN (Legacy) ========== */
.user-select-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #0a1628 0%, #1a2942 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
  overflow-y: auto;
  padding: 20px;
}

.user-select-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.user-select-container {
  text-align: center;
  max-width: 900px;
  width: 100%;
  padding: 40px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.user-select-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.user-select-subtitle {
  font-size: 1.1rem;
  color: #9ca3af;
  margin-bottom: 40px;
  font-weight: 400;
}

.user-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.user-select-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.user-select-card:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.2);
}

.user-select-card:active {
  transform: translateY(-2px);
}

.user-select-card .avatar {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}

.user-select-card .name {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.user-select-card .role {
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.3;
}

/* User type indicators */
.user-select-card.boss {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.08);
}

.user-select-card.boss:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
}

.user-select-card.guest {
  border-color: rgba(236, 72, 153, 0.3);
  background: rgba(236, 72, 153, 0.08);
}

.user-select-card.guest:hover {
  border-color: rgba(236, 72, 153, 0.6);
  background: rgba(236, 72, 153, 0.15);
  box-shadow: 0 12px 32px rgba(236, 72, 153, 0.2);
}

.user-select-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: #6b7280;
}

/* Section dividers */
.user-select-section {
  margin-bottom: 24px;
}

.user-select-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  text-align: left;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .login-container {
    padding: 28px 20px;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
  
  .login-subtitle {
    font-size: 0.875rem;
    margin-bottom: 24px;
  }
  
  .login-input {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
  
  .login-button {
    padding: 12px;
  }
  
  .modal-container {
    padding: 24px 20px;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
  
  .user-select-container {
    padding: 24px 16px;
  }
  
  .user-select-title {
    font-size: 1.5rem;
  }
  
  .user-select-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .user-select-card {
    padding: 16px 12px;
  }
  
  .user-select-card .avatar {
    font-size: 2.5rem;
  }
  
  .user-select-card .name {
    font-size: 0.9rem;
  }
}
