/* ============================================================
   Vaxa Idea Flow, Log in screen
   Behaviour: R-AUTH-1 to R-AUTH-7 in docs/functionality-v3.md.
   No visual spec exists for this screen in the build brief (sections
   1-4 cover tokens, type, capture bar, Idea Details only), so this is
   built plain from css/tokens.css rather than transcribed from Figma.
   ============================================================ */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg-linen);
}

.login-card {
  width: 100%;
  max-width: 360px;
  padding: var(--space-8) var(--space-7);
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
}

.login-heading {
  margin: 0 0 var(--space-6);
  font-family: var(--font-outfit);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.login-field {
  margin-bottom: var(--space-4);
}

.login-label {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--type-field-label-family);
  font-size: var(--type-field-label-size);
  font-weight: var(--type-field-label-weight);
  color: var(--text-muted);
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: 8px;
  /* The system's field tokens, not the capture bar's own, per the
     build brief's capture bar input spec: "fill --color-bg-form-field-dark
     at 10%, 1px stroke --color-border-field-default at 20%". Both are
     a light colour from the published library, applied at low opacity
     over the dark ground here, same as everywhere else they're used. */
  background: color-mix(in srgb, var(--color-bg-form-field-dark) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-border-field-default) 20%, transparent);
  font-family: var(--type-field-input-family);
  font-size: var(--type-field-input-size);
  font-weight: var(--type-field-input-weight);
  letter-spacing: var(--type-field-input-tracking);
  color: var(--text-primary);
}

.login-input::placeholder {
  color: var(--text-muted);
}

.login-input:focus {
  outline: none;
  border-color: var(--brand-primary);
}

/* R-AUTH-6: one generic message. No per-field styling exists because
   there is no inline field validation to attach it to. */
.login-error {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border-radius: 8px;
  border: 1px solid var(--color-border-error-on-dark);
  color: var(--color-text-error-on-dark);
  font-family: var(--font-geist);
  font-size: 14px;
}

.login-error[hidden] {
  display: none;
}

.login-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: var(--brand-primary);
  color: var(--forest-deep);
  font-family: var(--type-button-family);
  font-size: var(--type-button-size);
  font-weight: var(--type-button-weight);
  cursor: pointer;
}

.login-submit:hover {
  background: var(--accent-hover);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.login-forgot-link,
.login-back-link {
  display: inline-block;
  margin-top: var(--space-4);
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-geist);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
}

.login-forgot-link:hover,
.login-back-link:hover {
  color: var(--text-primary);
}

/* R-AUTH-7 confirmation, shown after resetPassword resolves. Always the
   same message regardless of whether the email exists, per its doc
   comment in js/data-layer.js. */
.login-reset-confirm {
  margin: 0 0 var(--space-4);
  color: var(--text-muted);
  font-family: var(--font-geist);
  font-size: 14px;
  line-height: 1.5;
}

.login-reset-confirm[hidden],
.login-form[hidden],
.login-reset-form[hidden] {
  display: none;
}
