/* ═══════════════════════════════════════════════════
   nSmarTrac — shared form fields (login, landing, demo)
   Used with common-sense.js validation
   ═══════════════════════════════════════════════════ */

.auth-field {
  margin-bottom: 1.125rem;
}

.auth-field__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 0.375rem;
}

.auth-field__label .nsm-cs-required {
  margin-left: 0.125rem;
}

.auth-field .error,
.auth-field .text-danger {
  font-size: 0.8125rem;
  margin-top: 0.375rem;
  color: hsl(var(--destructive)) !important;
}

.auth-field > .form-control,
.auth-field > textarea.form-control {
  height: 2.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  min-width: 0;
  width: 100%;
}

.auth-field > textarea.form-control {
  height: auto;
  min-height: 6.5rem;
  padding: 0.75rem 1rem;
  resize: vertical;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap.nsm-cs-field-wrap {
  position: relative;
}

.auth-input-wrap__icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  font-size: 0.9375rem;
  pointer-events: none;
}

.auth-input-wrap__icon.fad {
  --fa-primary-color: hsl(var(--muted-foreground));
  --fa-secondary-color: hsl(var(--muted-foreground) / 0.45);
  --fa-secondary-opacity: 1;
  color: hsl(var(--muted-foreground));
}

.auth-input-wrap .form-control {
  padding-left: 2.5rem;
  height: 2.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  min-width: 0;
  width: 100%;
}

.auth-input-wrap .form-control:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2);
}

.auth-input-wrap--textarea .auth-input-wrap__icon {
  top: 0.875rem;
  transform: none;
}

.auth-input-wrap--textarea textarea.form-control {
  padding-top: 0.75rem;
  min-height: 6.5rem;
  height: auto;
  resize: vertical;
}

.auth-input-wrap--password .form-control.is-invalid {
  background-image: none;
  padding-right: 2.75rem;
}

.auth-input-wrap__toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.auth-input-wrap__toggle:hover,
.auth-input-wrap__toggle:focus {
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.6);
  outline: none;
}

.auth-input-wrap__toggle .far,
.auth-input-wrap__toggle .fad {
  font-size: 0.9375rem;
}

.auth-card__title--start {
  text-align: left;
}

.auth-card__title {
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  text-align: center;
}

.auth-card__submit {
  font-weight: 600;
}

.auth-card__submit .fad,
.auth-card__submit .far {
  color: hsl(var(--primary-foreground));
}

.auth-form .row .auth-field {
  margin-bottom: 0;
}

.auth-form__submit-row {
  margin-top: 1rem;
  padding-top: 0.25rem;
}

.auth-form__hint {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

/* Prevent iOS Safari from zooming when focusing inputs (< 16px triggers auto-zoom). */
@media (pointer: coarse) {
  .auth-field .form-control,
  .auth-field textarea.form-control,
  .auth-input-wrap .form-control,
  .auth-input-wrap textarea.form-control {
    font-size: 16px;
  }
}
