/* =============================================================================
   FORMS — styles for form elements.
   Every value here derives from tokens.css. If you need a new value,
   add a token first; never inline it.
============================================================================= */

/* -------------------------------------------------------------- login page */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-4);
}

.login-card {
  background: var(--c-surface);
  border: var(--rule-hair);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  padding: var(--sp-6);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.login-header h1 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-top: var(--sp-4);
}

.login-logo {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 200px;
  height: auto;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Inputs fill the card: the filter-bar min-width would otherwise size them. */
.login-form .field > input {
  width: 100%;
  min-width: 0;
}

/* One action, one column: the submit button spans the form. */
.login-actions {
  display: flex;
  margin-top: var(--sp-2);
}

.login-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ------------------------------------------------------------ welcome page */
.welcome-card {
  background: var(--c-surface);
  border: var(--rule-hair);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: var(--sp-6);
  max-width: 600px;
}

/* The badge that sends an internal admin to what needs attention, above the card. */
.welcome-attention {
  margin-bottom: var(--sp-4);
}

.welcome-card h2 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.user-info__row {
  display: flex;
  gap: var(--sp-4);
}

.user-info__label {
  font-weight: var(--fw-medium);
  color: var(--c-ink-muted);
  min-width: 140px;
}

.user-info__value {
  color: var(--c-ink);
}

.logout-form {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--sp-6);
}

/* ------------------------------------------------------------ error pages */
.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-4);
}

.error-card {
  background: var(--c-surface);
  border: var(--rule-hair);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  padding: var(--sp-6);
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.error-card h1 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  color: var(--c-neg);
  margin-bottom: var(--sp-4);
}

.error-card p {
  color: var(--c-ink-muted);
  margin-bottom: var(--sp-4);
}

/* ------------------------------------------------------------ field errors */
.field--error {
  position: relative;
}

.field__error {
  display: block;
  color: var(--c-neg);
  font-size: var(--fs-xs);
  margin-top: var(--sp-1);
  line-height: 1.4;
}
