/* ------------------------------------------------------------
   SHARED FORM STYLES
------------------------------------------------------------ */

.auth-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  padding: 1rem 0;
}

.auth-form label {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: var(--bg-muted);
  border: 1px solid var(--outline);
  color: var(--text);
  font-size: 0.95rem;
}

.auth-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px #ff660055;
  outline: none;
}

.auth-form button:not(.password-toggle) {
  width: 180px;
  padding: 0.8rem 1rem;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
  margin-top: 0.6rem;
}

.auth-form button:not(.password-toggle):hover {
  background: var(--primary-dark);
  box-shadow: 0 0 18px #ff660030;
}

/* ------------------------------------------------------------
   MOBILE: NARROWER INPUTS + BUTTONS (CENTERED)
------------------------------------------------------------ */
@media (max-width: 820px) {

  /* Pick how narrow you want it:
     - 320px looks clean on most phones
     - still responsive via 92vw so it never overflows
  */
  .auth-form label {
    width: 92vw;
    max-width: 320px;     /* ⬅ makes the fields narrower */
    margin: 0 auto;
  }

  .auth-form input,
  .auth-form select {
    width: 100%;
  }

  .auth-form button:not(.password-toggle) {
    width: 92vw;          /* ⬅ match the input width */
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Eye controls are outside the label and never submit the form. */
.auth-form .password-field {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.auth-form .password-field label {
  width: 100%;
  max-width: none;
  margin: 0;
}

.auth-form .password-field input {
  padding-right: 3.5rem;
}

.auth-form .password-toggle {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-form .password-toggle:hover {
  color: var(--primary-light);
  background: rgba(255, 126, 41, 0.08);
}

.auth-form .password-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle[aria-pressed="false"] .password-eye-slash {
  display: none;
}

@media (max-width: 820px) {
  .auth-form .password-field { max-width: 320px; }
}
