/* --- Auth Page Styles --- */
.auth-page {
    display: flex;
    justify-content: center; /* Center the card on all screen sizes */
    align-items: center;
    min-height: 100vh;
    padding: 2rem; /* Consistent padding */
    position: relative;
    z-index: 1;
  }
  
  /* --- Auth Card --- */
  .auth-card {
    background: var(--card-bg, rgba(255, 255, 255, 0.95));
    padding: 2rem 3rem; /* Reduced vertical padding */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 90vw; /* Use viewport width for better responsiveness */
    max-width: 500px; /* Increased width for more content space */
    text-align: center;
    border: 1px solid var(--border-color, #ddd);
    transition: background-color 0.3s, border-color 0.3s;
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
  }
  
  .logo-link {
    display: block;
  }
  
  .auth-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
  }
  
  /* --- Text --- */
  .auth-card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--text-color, #222);
  }
  
  .auth-card p {
    color: var(--text-secondary, #555);
    margin-bottom: 2rem; /* Add more space after the intro text */
  }
  
  /* --- Form Elements --- */
  .form-group {
    margin-bottom: 0.8rem; /* Further reduced spacing between form fields */
    text-align: left;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary, #555);
  }
  
  .form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color, #ccc);
    background: var(--bg-color, #fff);
    color: var(--text-color, #222);
    font-size: 1rem;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
  }
  
  /* Hide the browser's default password reveal icon across browsers */
  .form-group input[type="password"] {
    /* For WebKit browsers (Chrome, Safari) */
    -webkit-appearance: none;
    /* For Firefox */
    -moz-appearance: none;
    /* Standard property */
    appearance: none;
  }

  .form-group input[type="password"]::-ms-reveal,
  .form-group input[type="password"]::-ms-clear {
    display: none;
  }
  .input-icon-wrapper input {
    padding-right: 2.5rem; /* Ensure space for the eye icon */
  }

  .form-group input:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  }
  
  /* --- Validation State Styling --- */
  .form-group.error input {
    border-color: #e63946;
  }
  .form-group.error input:focus {
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
  }
  .form-group.success input {
    border-color: #28a745;
  }
  
  /* --- Role Selection --- */
  .role-selection {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    justify-content: center; /* Center the radio buttons */
  }
  
  .role-selection label {
    flex: 1;
    position: relative;
  }
  
  .role-selection input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .role-selection span {
    display: block;
    padding: 0.6rem 1rem; /* Reduced padding for a smaller button */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--bg-color);
    transition: all 0.3s ease;
  }
  
  .role-selection input[type="radio"]:checked + span {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(55, 125, 255, 0.2);
  }
  
  /* --- Password Toggle --- */
  .input-icon-wrapper {
    position: relative; /* This is the container for the input and icon */
  }
  
  .password-toggle-icon {
    position: absolute;
    /* Position the icon 50% down from the top of the input field's space */
    top: 50%;
    right: 1rem;
    transform: translateY(-50%); /* Move the icon up by half its own height */
    cursor: pointer;
    color: var(--text-secondary, #777);
    transition: color 0.3s;
    z-index: 2; /* Ensure the icon is always above the input */
  }
  
  .password-toggle-icon:hover {
    color: var(--primary-color, #007bff);
  }
  
  /* --- Error Message --- */
  .error-message {
    color: #e63946;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: left;
    min-height: 1.2rem; /* Reserve space to prevent layout shifts */
  }
  
  /* --- Forgot Password --- */
  .form-options {
    display: flex;
    justify-content: flex-end; /* Keep this for alignment */
    margin-bottom: 1rem;
  }
  
  .forgot-password-link {
    font-size: 0.9rem;
    color: var(--primary-color, #007bff);
    text-decoration: none;
  }
  
  .forgot-password-link:hover {
    text-decoration: underline;
  }
  
  /* --- Button --- */
  .login-button {
    width: 100%;
    padding: 0.85rem;
    margin-top: 1rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-color, #007bff);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .login-button:hover {
    background: var(--primary-hover, #0056b3);
  }
  
  /* --- Footer --- */
  .auth-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
  }
  
  .auth-footer a {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    font-weight: 500;
  }
  
  .auth-footer a:hover {
    text-decoration: underline;
  }
  
  /* --- Background Video Overlay --- */
  .video-background video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }
  
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
  }

/* === PROFILE PAGE SPECIFIC STYLES === */
.auth-card h1 {
  text-align: center;
}

.profile-section {
  margin-top: 2.5rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

/* --- PROFILE INFO DISPLAY --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-item label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.info-item span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  background: var(--bg-color);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  text-transform: capitalize;
}

/* --- PASSWORD FORM --- */
.password-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.password-form .form-group {
  margin-bottom: 0;
}

.password-form .submit-btn {
  align-self: flex-start;
  margin-top: 1rem;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}
  
/* === RESPONSIVENESS === */

/* --- Tablet --- */
@media (max-width: 1024px) {
  /* No changes needed as desktop is now centered by default */
}

/* --- Mobile --- */
@media (max-width: 576px) {
  .auth-card {
    padding: 2rem 1.3rem; /* Reduce padding for smaller card */
    max-width: 95%; /* Allow card to fill the width */
    width: 95%; /* Make card narrower on mobile */
  }

  .logo-link {
    /* Pushes the logo down slightly on mobile screens */
    margin-top: 1.5rem;
  }

  .auth-logo {
    width: 60px; /* Smaller logo */
    height: 60px;
  }

  .auth-card h1 {
    font-size: 1.5rem; /* Smaller heading */
  }

  .auth-card p {
    margin-bottom: 1rem; /* Reduce space */
  }

  .form-group {
    margin-bottom: 0.9rem; /* Tighter spacing between fields */
  }

  .form-group input {
    padding: 0.7rem 0.9rem; /* Even smaller inputs */
    font-size: 0.8rem;
  }

  .login-button {
    margin-top: 0.5rem; /* Decrease space above the button */
    margin-bottom: 0.8rem; /* Add some space below the button */
    padding: 0.8rem;
    font-size: 0.9rem;
  }

  .auth-footer {
    margin-bottom: 2rem;
  }

  .role-selection {
    gap: 1.5rem; /* Reduce gap between role options */
  }
}