.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
  }
  
  .auth-card {
    background: #1f1f1f;
    padding: 2.5rem;
    border-radius: 10px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  }
  
  .auth-card h2 {
    margin-bottom: 1.5rem;
    color: #fff;
  }
  
  .auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .auth-form input {
    padding: 0.75rem;
    background: #0f0f0f;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
  }
  
  .auth-form input:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.3);
    outline: none;
  }
  
  .auth-form .btn-primary {
    padding: 0.75rem;
    font-size: 1rem;
  }
  
  .password-wrapper {
    position: relative;
    display: block;
  }
  
  .password-wrapper input {
    width: 100%;
    padding-right: 44px; /* space for the toggle button */
  }
  
  .pw-toggle-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: #ccc;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
  }
  .pw-toggle-icon:hover {
    background: rgba(255,255,255,0.06);
  }
  .pw-toggle-icon:focus-visible {
    outline: 2px solid rgba(67, 97, 238, 0.45);
    outline-offset: 2px;
  }

  /* When used in a Bootstrap input-group, do not absolutely position. */
  .pc-pw-input-group .pw-toggle-icon{
    position: static;
    top: auto;
    right: auto;
    transform: none;
    width: auto;
    height: auto;
    border-radius: 0.375rem;
    background: transparent;
  }

  .pw-toggle-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
    fill: currentColor;
  }

  /* default: show "eye", hide "eye-off" */
  .pw-toggle-icon .pc-eye-off { display: none; }

  /* when pressed (showing password), swap icons */
  .pw-toggle-icon[aria-pressed="true"] .pc-eye-on { display: none; }
  .pw-toggle-icon[aria-pressed="true"] .pc-eye-off { display: block; }

  /* legacy hidden class compatibility */
  .pw-toggle-icon .hidden { display: none; }
  
  .auth-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .auth-card .btn {
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    min-width: 220px;
  }

  .auth-card {
    max-width: 420px;
    margin-inline: auto;
    padding: 2rem;
  }
  
  .auth-card .btn {
    min-width: 240px;
    font-weight: 500;
    font-size: 1rem;
  }
  
  .auth-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
  }
  
  .auth-card p {
    line-height: 1.5;
  }
  
  @media (max-width: 480px) {
    .auth-card {
      padding: 1.5rem;
    }
  
    .auth-card .btn {
      min-width: 100%;
    }
  
    .auth-card h2 {
      font-size: 1.2rem;
    }
  }

  /* Keep auth forms readable when cookie banner is visible. */
  body.has-cookie-banner .auth-page {
    padding-bottom: max(120px, calc(92px + env(safe-area-inset-bottom, 0px)));
  }

  @media (max-width: 600px) {
    body.has-cookie-banner .auth-page {
      align-items: flex-start;
      min-height: calc(100vh - var(--nav-height, 56px));
      padding-top: 1rem;
      padding-bottom: max(190px, calc(168px + env(safe-area-inset-bottom, 0px)));
    }

    body.has-cookie-banner .auth-card {
      margin-bottom: 0.5rem;
    }
  }
  
