body, html {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(to right, #e7f3fd, #e8f3fd, #e8f3fd);
  }
  .login-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    max-width: 80%;
    text-align: center;
    border-radius: 5px;
  }
  .login-container h2 {
    margin: 20px 0;
    color: #0c60a7;
  }
  .register-text {
    text-decoration: none;
    color: #aaa;
    font-size: 12px;
  }
    .register-link {
    text-decoration: none; /* Removes the underline */
    color: #aaa; /* Sets the text color to a light grey */
    font-size: 12px;
  }

  .register-link:hover {
    text-decoration: underline; /* Adds underline on hover for visual feedback */
  }

  /* Step-by-step form container */
  .form-steps-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 320px; /* Prevent layout shifts - accommodate validation messages + button */
    height: 320px; /* Fixed height to prevent glitches during animation */
    display: flex;
    justify-content: center; /* Keep steps centered horizontally */
    align-items: center; /* Center vertically */
  }

  .form-step {
    flex: 0 0 100%;
    min-width: 100%;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
  }

  .form-step.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
  }

  .form-step.slide-out-left {
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
  }

  .form-step.slide-in-right {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
  }
  
  /* Add space for validation messages in password step */
  .form-step[data-step="3"] {
    padding-bottom: 20px; /* Space for register button */
    min-height: 320px; /* Ensure enough space for both fields + validation messages + button */
    justify-content: flex-start; /* Align content to top instead of center */
    padding-top: 20px; /* Add some top padding */
  }

  .input-group {
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
    position: relative; /* For absolute positioning of feedback messages */
    min-height: 60px; /* Reserve space for input + validation message */
    padding: 0; /* Remove any padding that could create gaps */
  }
  
  /* Add spacing under password fields for validation messages */
  .form-step[data-step="3"] .input-group {
    margin-bottom: 20px; /* Normal spacing */
    min-height: 60px; /* Reserve space for validation messages */
    padding: 0; /* Remove any padding */
  }
  .input-group label {
    display: block;
    color: #333;
    margin-bottom: 5px;
  }

  /* Password toggle button */
  .input-group.password-toggle {
    position: relative;
  }

  .password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: color 0.2s ease;
  }

  .password-toggle-btn:hover {
    color: #333;
  }

  .password-toggle-btn:focus {
    outline: none;
    color: #0c60a7;
  }

  .password-toggle-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
  }

  .input-group.password-toggle input {
    padding-right: 45px;
  }

  .input-group input {
  width: 100%;
  padding: 10px;
  border: none; /* No border */
  border-bottom: 1px solid #ccc; /* Only bottom border */
  border-radius: 0; /* No border-radius */
  box-sizing: border-box;
  margin: 0; /* Remove any default margins */
}

.input-group input::placeholder {
  color: #d0d0d0; /* Light grey placeholder text */
  opacity: 1; /* Full opacity - the color itself is already light */
}


  .login-btn {
    background: linear-gradient(to right, #0c60a7, #0c60a7);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    display: block;
    font-weight: bold;
    font-size: 16px;
    margin-top: 20px; /* Space above button */
  }

  /* Legacy error message - kept for backwards compatibility but hidden by default */
  #error-message {
    display: none;
  }

  /* Field Error Styles (Inline) */
  .field-error {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 8px;
    background-color: #ffebee;
    border-left: 3px solid #d32f2f;
    border-radius: 3px;
    animation: slideDown 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .field-error::before {
    content: "⚠";
    font-size: 14px;
    flex-shrink: 0;
  }

  /* Input Error State */
  .input-group input.error {
    border-bottom-color: #d32f2f;
    border-bottom-width: 2px;
    background-color: #fff5f5;
    transition: all 0.3s ease;
  }

  .input-group input.error:focus {
    outline: none;
    border-bottom-color: #d32f2f;
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.2);
  }

  /* General Error Notification */
  .error-notification {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-left: 4px solid #d32f2f;
    color: #c62828;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .error-notification .error-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
  }

  .error-notification .error-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
  }

  .error-notification .error-close {
    background: none;
    border: none;
    color: #c62828;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .error-notification .error-close:hover {
    background-color: rgba(198, 40, 40, 0.1);
    transform: scale(1.1);
  }

  .error-notification .error-close:active {
    transform: scale(0.95);
  }

  /* Animation for error appearance */
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Shake animation for invalid fields */
  @keyframes shake {
    0%, 100% {
      transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
      transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
      transform: translateX(5px);
    }
  }

  .input-group input.shake {
    animation: shake 0.4s ease-in-out;
  }

  /* Input focus styles */
  .input-group input:focus {
    outline: none;
    border-bottom-color: #0c60a7;
    border-bottom-width: 2px;
    transition: border-bottom-color 0.3s ease;
  }

  /* Success state */
  .input-group input.success {
    border-bottom-color: #4caf50;
    background-color: #f1f8f4;
    transition: all 0.3s ease;
  }

  .input-group input.success:focus {
    outline: none;
    border-bottom-color: #4caf50;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
  }

  /* Field Feedback Styles (Live Validation) */
  .field-feedback {
    font-size: 12px;
    margin-top: 0; /* No margin - will use negative positioning */
    padding: 4px 8px;
    border-radius: 0 0 3px 3px; /* Rounded bottom corners only */
    animation: slideDown 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    top: calc(100% - 1px); /* Position to touch the border exactly (accounting for 1px border) */
    left: 0;
    right: 0;
    z-index: 10;
    min-height: 24px; /* Prevent layout shifts */
  }

  .field-feedback-success {
    color: #2e7d32;
    background-color: #e8f5e9;
    border-left: 3px solid #4caf50;
  }

  .field-feedback-error {
    color: #d32f2f;
    background-color: #ffebee;
    border-left: 3px solid #d32f2f;
  }

  .field-feedback::before {
    font-size: 14px;
    flex-shrink: 0;
  }

  .field-feedback-success::before {
    content: "✓";
  }

  .field-feedback-error::before {
    content: "⚠";
  }

  h2 a:is(:link, :visited, :hover, :focus, :active) {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
  }
