/* ---------- form fields ---------- */
.field {
  display: block;
  margin-bottom: 0.85rem;
}
.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  height: 46px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.96rem;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--brand-soft);
  outline: none;
}
/* Password visibility toggle - wraps each <input type="password"> so the
   eye button can sit inside the input's right padding without disturbing
   layout. The wrapper is display:block so .field input:width:100% still
   spans the full row. */
.pw-wrap {
  position: relative;
  display: block;
}
.pw-wrap input {
  /* leave room for the toggle on the right */
  padding-right: 3rem;
}
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}
.pw-toggle:hover {
  color: var(--text);
  background: var(--brand-soft);
}
.pw-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.auth-form .form-error {
  margin-bottom: 0.85rem;
}
.auth-foot {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}
.auth-foot a {
  color: var(--brand-strong);
  font-weight: 600;
}

/* ---------- spinner ---------- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid color-mix(in srgb, var(--on-brand) 35%, transparent);
  border-top-color: var(--on-brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -3px;
}
.spinner--lg {
  width: 24px;
  height: 24px;
  border-width: 3px;
  border-color: color-mix(in srgb, var(--text) 18%, transparent);
  border-top-color: var(--brand);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

