/* cp-face sign-in composition (templates/auth_base.html.j2): the router's pages, a face's sign-in and every
   anonymous page (signed out, not linked yet, wrong company, not found, errors). The live helpdesk login's
   composition (2026-09-25): a centered 438px column, the paper songbird on its branch full column width in a 2.1:1
   box, a glass card with the white wordmark and one blue 58px button. No headline on the plain sign-in. */

body.auth-page {
  background: radial-gradient(ellipse at 50% 42%, rgba(61, 96, 100, .18), transparent 62%) no-repeat, var(--canvas);
}
.auth {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100svh; padding: 32px 24px; overflow-x: clip;
}
.auth-column { width: 100%; max-width: 438px; animation: auth-rise .48s var(--ease) both; }
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* the art: decorative, full column width; the box crops the image's empty margins and keeps the branch whole */
.auth-art {
  width: 100%; height: auto; aspect-ratio: 2.1; margin: 0 0 4px;
  object-fit: cover; object-position: center 65%; pointer-events: none; user-select: none;
}

.auth-card {
  position: relative; padding: 48px 36px 40px;
  border: 1px solid var(--line); border-radius: var(--r-auth);
  background: var(--glass); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.auth-logo { display: block; width: 220px; max-width: 85%; height: auto; margin: 0 auto 46px; }
.auth-title {
  margin: -10px 0 var(--s4); text-align: center; text-wrap: balance;
  font-size: 1.375rem; line-height: 1.3; font-weight: 500; letter-spacing: -.02em; color: var(--text);
}
.auth-text { margin: 0 0 var(--s4); color: var(--muted); text-align: center; text-wrap: balance; }
.auth-text:last-of-type { margin-bottom: var(--s5); }
.auth-text strong { color: var(--text); font-weight: 500; }

/* the router's email step */
.auth-form { margin: 0; }
.auth-label { display: block; margin: 0 0 var(--s2); color: var(--muted); font-size: .8125rem; font-weight: 500; letter-spacing: .01em; }
.auth-input.input { min-height: 52px; padding: 13px 16px; font-size: 1rem; }
.auth-alert {
  display: flex; gap: 10px; align-items: flex-start; margin: var(--s3) 0 0; padding: 10px 14px;
  border: 1px solid var(--err-line); border-radius: var(--r-control); background: var(--err-bg); color: var(--err-ink);
  font-size: .875rem; line-height: 1.5;
}
.auth-alert .icon { margin-top: 1px; }
.auth-alert a { color: inherit; text-decoration-color: currentColor; }
.auth-form .btn-lg { margin-top: var(--s4); }
.auth-title + .auth-form .btn-lg { margin-top: 0; }
/* "Continue as <email>": one text block that wraps before the address, and inside it only when it must */
.btn-text { display: block; min-width: 0; text-align: center; }
.btn-email { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.auth-card:has(> .auth-alt:last-child), .auth-card:has(> .auth-actions:last-child > .auth-alt:last-child) {
  padding-bottom: 24px;
}
.auth-card > .auth-alt:last-child { margin-top: var(--s2); }

/* a reference to quote to support, and the actions under the text */
.auth-ref {
  margin: 0 0 var(--s5); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-control);
  background: var(--sunken); text-align: center;
}
.auth-ref .eyebrow { margin: 0 0 var(--s1); }
.auth-ref code { border: 0; background: none; padding: 0; font-size: .875rem; letter-spacing: .02em; }
.auth-ref p { margin: var(--s1) 0 0; color: var(--muted); font-size: .8125rem; }
.auth-actions { display: grid; gap: var(--s2); }
.auth-alt {
  display: flex; align-items: center; justify-content: center; min-height: var(--touch); margin: 0;
  color: var(--muted); font-size: .875rem; text-decoration-color: transparent;
}
.auth-alt:hover { color: var(--text); text-decoration-color: currentColor; }
.auth-card > :last-child { margin-bottom: 0; }

/* development only: the list of sign-in states (/dev/states) */
.dev-states { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.dev-states li { margin: 0; }
.dev-states a {
  display: flex; align-items: center; min-height: var(--touch); padding: 0 var(--s3); border-radius: 10px;
  color: var(--text); text-decoration: none;
}
.dev-states a:hover { background: var(--raised-hover); }

/* under the card */
.auth-help { margin: var(--s5) 0 0; color: var(--muted); font-size: .8125rem; text-align: center; }
.auth-help a { color: var(--muted); text-decoration-color: rgba(172, 189, 197, .45); }
.auth-help a:hover { color: var(--text); text-decoration-color: currentColor; }

@media (max-width: 480px) {
  .auth { padding: 24px 20px; }
  .auth-card { padding: 32px 24px 28px; border-radius: 20px; }
  .auth-logo { width: 195px; margin-bottom: 32px; }
  .auth-title { margin-top: -4px; }
  .auth .btn-lg { font-size: .9375rem; padding: 12px 16px; }
}
@media (max-height: 640px) and (min-width: 481px) {
  .auth { justify-content: flex-start; }
}
@media (forced-colors: active) {
  .auth-card { border: 1px solid CanvasText; }
  .auth-alert { border-color: CanvasText; }
}
@media print {
  body.auth-page { background: #ffffff !important; }
  .auth-art, .auth-help { display: none; }
  .auth-card { border-color: #bbbbbb; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .auth-title, .auth-text { color: #000000; }
}
