/* Signed-out auth: same language as the homepage. */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fafafa;
  color: #0f172a;
}

.auth-shell {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 56px;
  text-align: center;
}

.auth-logo {
  display: block;
  margin-bottom: 40px;
  line-height: 0;
}

.auth-logo img {
  width: 140px;
  height: auto;
}

.auth-icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  margin: 0 auto 20px;
  display: block;
}

.auth-shell h1 {
  max-width: none;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 12px;
}

.auth-lede {
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 34ch;
  margin: 0 auto 36px;
}

.auth-lede--wide {
  max-width: 42ch;
}

.auth-error {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto 20px;
  padding: 12px 16px;
  border: 1px solid rgba(250, 20, 20, 0.15);
  border-radius: 12px;
  background: rgba(250, 20, 20, 0.06);
  color: #991b1b;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: left;
}

.auth-ok {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto 20px;
  color: #166534;
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-field textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.45;
}

.auth-field input[readonly] {
  background: #f4f4f5;
  color: #52525b;
}

/* Off-screen field that only bots fill in (beta application). */
.auth-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-panel {
  width: 100%;
  max-width: 26rem;
  text-align: left;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-field label,
.auth-field__head label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin-bottom: 6px;
}

.auth-field__head label {
  margin-bottom: 0;
}

.auth-field__hint {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0074ff;
  text-decoration: none;
}

.auth-field__hint:hover {
  text-decoration: underline;
}

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

.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 1rem;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  outline: none;
  border-color: #0074ff;
  box-shadow: 0 0 0 2px rgba(0, 116, 255, 0.12);
}

.auth-field input[type="password"],
.auth-field input.has-toggle {
  padding-right: 68px;
}

.auth-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #64748b;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.auth-toggle:hover,
.auth-toggle[aria-pressed="true"] {
  color: #0074ff;
}

.auth-note {
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 18px;
}

/* Checkbox rows. Scoped under .auth-field so they win over the text-field label and input rules above. */
.auth-check,
.auth-field .auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.45;
  color: #475569;
  cursor: pointer;
}
.auth-check input,
.auth-field .auth-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  border-radius: 5px;
  accent-color: #0074ff;
  cursor: pointer;
}
.auth-field .auth-check input:focus { box-shadow: none; }
.auth-field .auth-check input:focus-visible { outline: 2px solid rgba(0, 116, 255, 0.5); outline-offset: 2px; }
.auth-check a,
.auth-note a { color: #0074ff; font-weight: 600; text-decoration: none; }
.auth-check a:hover,
.auth-note a:hover { text-decoration: underline; }

.auth-submit {
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.auth-links {
  margin: 28px 0 0;
  font-size: 0.95rem;
  color: #64748b;
}

.auth-links a {
  color: #0074ff;
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-back {
  display: inline-block;
  margin: -16px 0 28px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.auth-back:hover {
  color: #0074ff;
}

.auth-choices {
  width: 100%;
  max-width: 36rem;
  display: grid;
  gap: 0;
  text-align: left;
}

.auth-choice {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  padding: 8px 0 28px;
}

.auth-choice + .auth-choice {
  border-top: 1px solid #d7d7d7;
  padding-top: 28px;
}

.auth-choice h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.auth-choice p {
  flex: 1;
  color: #64748b;
  font-size: 0.925rem;
  line-height: 1.55;
  margin: 0 0 12px;
}

.auth-choice span {
  color: #0074ff;
  font-size: 0.875rem;
  font-weight: 600;
}

.auth-choice:hover h2 {
  color: #0074ff;
}

@media (min-width: 640px) {
  .auth-choices {
    position: relative;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .auth-choices::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #d7d7d7;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .auth-choice {
    padding: 0 36px 8px 0;
  }

  .auth-choice + .auth-choice {
    border-top: 0;
    padding: 0 0 8px 36px;
  }
}

.auth-apps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: -16px auto 32px;
  padding: 0;
  font-size: .9rem;
  font-weight: 500;
  color: #334155;
}

.auth-apps li {
  flex: 0 0 auto;
}

.auth-apps img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.auth-apps__more {
  margin-left: 6px;
  color: #94a3b8;
  font-weight: 400;
}

/* Pay screen for an organization locked over an unpaid invoice. */
.auth-bill {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.auth-bill li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
}

.auth-bill li:first-child { border-top: 0; }

.auth-bill small {
  display: block;
  color: #64748b;
  font-size: 0.8rem;
}

.auth-bill__total {
  font-weight: 700;
  background: #f8fafc;
  border-radius: 0 0 12px 12px;
}

.auth-bill__note { margin-top: 16px; text-align: center; }

.auth-signout {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: #0074ff;
  font-weight: 600;
  cursor: pointer;
}

.auth-signout:hover { text-decoration: underline; }

/* Two-factor and single sign-on */
.auth-code {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.auth-alt {
  width: 100%;
  max-width: 26rem;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 10px;
}

.auth-alt form { margin: 0; }

.auth-alt .btn-ghost,
.auth-linkbtn {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}

.auth-linkbtn {
  border: 0;
  background: none;
  padding: 4px 0;
  color: #0074ff;
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-linkbtn:hover { text-decoration: underline; }
