.login-form-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  height: auto;
  margin-bottom: 40px;
  color: var(--color-near-black);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 24px;
  font-weight: 600;
}

.login-form-header-text {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: rgba(6, 6, 8, 0.5);
}

.login-form-header-text:not(:last-child) {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 24px;
  color: var(--color-near-black);
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  width: 100%;
}

.login-form-inputs {
  width: 100%;
  display: flex;
  margin-top: 0;
  flex-direction: column;
}

.login-form-button-login {
  align-self: stretch;
  margin: 24px 0 0;
  width: 100%;
  --button-background: var(--color-amber);
  --button-color: var(--color-near-black);
  --button-border-radius: 0;
  --button-font-family: 'IBM Plex Mono', monospace;
  --button-font-size: 13px;
  --button-font-weight: 500;
  --button-letter-spacing: 0.05em;
  --button-text-transform: uppercase;
  --button-padding: 14px;
}

.login-form-button-login::part(button),
.login-form-button-login button {
  background: var(--color-amber);
  color: var(--color-near-black);
  border: none;
  border-radius: 0;
  padding: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: 100%;
  cursor: pointer;
  transition: background 0.12s ease-out, color 0.12s ease-out;
}

.login-form-button-login::part(button):hover,
.login-form-button-login button:hover {
  background: var(--color-near-black);
  color: var(--color-amber);
}

.login-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 8px;
}

.login-form-row--forgot-only {
  justify-content: flex-end;
}

.login-form-forgot {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  color: var(--color-amber);
}

.login-form-footer {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  color: rgba(6, 6, 8, 0.5);
}

.login-form-footer .login-signup {
  display: flex;
  gap: 6px;
}

.login-form-footer a {
  color: var(--color-amber);
}

/* Shared native-button primitives for FTLs that need name/value submit semantics */
.btn-primary,
.btn-secondary {
  display: inline-block;
  width: 100%;
  padding: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease-out, color 0.2s ease-out;
  margin: 0;
}

.btn-primary {
  background: var(--color-near-black);
  color: var(--color-hard-white);
  border-color: var(--color-near-black);
}

.btn-primary:hover {
  background: #1a1a1e;
  border-color: #1a1a1e;
}

.btn-secondary {
  background: transparent;
  color: var(--color-near-black);
  border-color: rgba(6, 6, 8, 0.2);
}

.btn-secondary:hover {
  background: rgba(6, 6, 8, 0.05);
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-row > * {
  flex: 1;
  margin-top: 0;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* TOTP enrollment step list */
.totp-steps {
  margin: 0 0 24px;
  padding-left: 20px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  color: rgba(6, 6, 8, 0.7);
  line-height: 1.5;
}

.totp-steps li {
  margin-bottom: 12px;
}

.totp-qr {
  display: block;
  margin: 12px 0;
  max-width: 100%;
}

.totp-secret {
  display: inline-block;
  padding: 8px 12px;
  background: rgba(6, 6, 8, 0.05);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  word-break: break-all;
}

/* Terms-of-service scroll area */
.terms-text {
  max-height: 50vh;
  overflow-y: auto;
  padding: 16px;
  background: rgba(6, 6, 8, 0.03);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(6, 6, 8, 0.75);
  margin-bottom: 8px;
}

.terms-text h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-near-black);
  margin: 16px 0 8px;
}

.terms-text h2:first-child {
  margin-top: 0;
}

.terms-text p,
.terms-text ol,
.terms-text ul {
  margin-bottom: 8px;
}

/* OAuth consent claim/role list */
.consent-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  color: rgba(6, 6, 8, 0.75);
}

.consent-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(6, 6, 8, 0.08);
}

.consent-list li:last-child {
  border-bottom: none;
}

/* Static display row for x509 cert info */
.info-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.info-row .info-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(6, 6, 8, 0.6);
  margin-bottom: 4px;
}

.info-row .info-value {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  color: var(--color-near-black);
  word-break: break-word;
}

.info-row .info-value.muted {
  color: rgba(6, 6, 8, 0.5);
  font-style: italic;
}

.x509-counter {
  display: block;
  margin-top: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(6, 6, 8, 0.5);
  text-transform: uppercase;
}

/* Code success display */
.code-success-text {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  color: rgba(6, 6, 8, 0.75);
  margin-bottom: 12px;
}

.code-success-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(6, 6, 8, 0.15);
  background: rgba(255, 255, 255, 0.6);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--color-near-black);
  outline: none;
}

.code-error-text {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  color: #dc3545;
  margin: 0;
}
