body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden; /* Prevent scrolling during login */
}

.login-container {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.login-container h1 {
  margin-bottom: 1.5rem;
  color: #e6007e;
  font-size: 1.75rem;
}

form {
  display: flex;
  flex-direction: column;
}

label {
  text-align: left;
  margin: 0.5rem 0 0.25rem;
  font-weight: 600;
  color: #333;
}

input {
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

input:focus {
  border-color: #e6007e;
  outline: none;
  box-shadow: 0 0 0 3px rgba(230, 0, 126, 0.1);
}

input:invalid {
  border-color: #ff4444;
}

/* Password container for toggle button */
.password-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.password-container input {
  margin-bottom: 0;
  flex: 1;
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  color: #666;
}

.password-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(230, 0, 126, 0.3);
}

.eye-icon {
  font-size: 1.2rem;
  user-select: none;
}

button[type="submit"] {
  background: #e6007e;
  color: #fff;
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  position: relative;
  overflow: hidden;
}

button[type="submit"]:hover:not(:disabled) {
  background: #692a80;
  transform: translateY(-1px);
}

button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}

button[type="submit"]:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

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

.error {
  color: #d32f2f;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #ffebee;
  border-radius: 4px;
  border-left: 4px solid #d32f2f;
}

.logo {
  display: block;
  margin: 0 auto 1rem;
  width: auto;
  height: 50px;
  user-select: none;
}

/* Security notice styling */
.security-notice {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #28a745;
}

.security-notice p {
  font-size: 0.8em;
  color: #666;
  margin: 0.25rem 0;
  text-align: center;
}

/* Responsive design */
@media (max-width: 480px) {
  .login-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .login-container h1 {
    font-size: 1.5rem;
  }
  
  input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  .login-container {
    border: 2px solid #000;
  }
  
  input {
    border: 2px solid #000;
  }
  
  button[type="submit"] {
    border: 2px solid #000;
  }
}

/* Password Change Modal */
.password-change-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.password-change-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  text-align: center;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.password-change-content h2 {
  margin-bottom: 1rem;
  color: #e6007e;
  font-size: 1.5rem;
}

.password-change-content p {
  margin-bottom: 1.5rem;
  color: #666;
  text-align: left;
}

.password-requirements {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: left;
}

.password-requirements p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: #333;
}

.password-requirements ul {
  margin: 0;
  padding-left: 1.2rem;
}

.password-requirements li {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}