/* Match the product's MagicLinkEntryPage and OrgSelectorPage shared auth card,
   using the clean-light preset and brand colors from themePrimitives.ts. */
:root {
  font-family: Inter, sans-serif;
  font-size: 16px;
  color: #1a1a1a;
  background: #f8f9fa;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  --accent: hsl(210, 98%, 48%);
  --accent-hover: hsl(210, 100%, 35%);
  --muted: #666;
  --border: rgba(0, 0, 0, .06);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(ellipse 80% 60% at 50% 40%, hsl(210 98% 48% / .04), transparent 70%); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
svg { display: block; }
.page-shell { width: 100%; max-width: 400px; }
.auth-card { padding: 36px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: 0 20px 60px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .02); }
.brand { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; margin-bottom: 32px; color: inherit; text-decoration: none; font-size: .95rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; color: var(--accent); }
h1 { margin: 0; font-size: 1.15rem; line-height: 1.5; letter-spacing: -.01em; font-weight: 700; overflow-wrap: anywhere; }
p { font-size: .85rem; line-height: 1.5; color: var(--muted); }
.intro { margin: 4px 0 24px; }
.intro strong { color: #1a1a1a; font-weight: 600; }
form { margin-top: 24px; }
label { display: block; margin: 0 0 8px; font-size: .8rem; font-weight: 600; line-height: 1.5; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select { display: block; width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, .015); color: #1a1a1a; padding: 12px 14px; font-size: .9rem; transition: border-color .15s, box-shadow .15s; }
/* Own the closed control in Chrome and Safari while preserving the native
   select's keyboard, screen-reader and mobile picker behavior. */
select { -webkit-appearance: none; appearance: none; line-height: 1.5; padding-right: 44px; cursor: pointer; }
select:invalid { color: var(--muted); }
.select-field { position: relative; }
.select-chevron { position: absolute; top: 50%; right: 14px; width: 18px; height: 18px; transform: translateY(-50%); pointer-events: none; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
select:disabled + .select-chevron { opacity: .5; }
input::placeholder { color: #757575; opacity: 1; }
label > input { margin-top: 8px; }
form > label:not(:first-child):not(.visually-hidden) { margin-top: 20px; }
form > input[type="hidden"] + label { margin-top: 0; }
input:hover, select:hover { border-color: rgba(0, 0, 0, .2); }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px hsl(210 98% 48% / .1); }
input:disabled, select:disabled { background: #f8f9fa; color: var(--muted); cursor: not-allowed; }
button, .button, .secondary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 14px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: #fff; font-size: .9rem; font-weight: 600; line-height: 1.5; text-decoration: none; text-align: center; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
form button { margin-top: 20px; }
button:hover, .button:hover { background: var(--accent-hover); text-decoration: none; box-shadow: 0 6px 20px hsl(210 98% 48% / .25); }
button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.button-arrow { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.secondary-button { border-color: var(--border); background: transparent; color: #1a1a1a; }
.secondary-button:hover { border-color: rgba(0, 0, 0, .2); background: rgba(0, 0, 0, .02); text-decoration: none; }
.passkeys-heading { margin: 0 0 10px; font-size: .8rem; font-weight: 600; }
.passkey-list { display: grid; gap: 10px; }
.saved-passkey { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, .015); }
.passkey-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .8rem; font-weight: 600; line-height: 1.5; }
button.passkey-remove { flex: none; width: auto; margin: 0; padding: 6px 8px; color: #a32c32; background: transparent; font-size: .75rem; }
button.passkey-remove:hover { background: rgba(244, 67, 54, .04); box-shadow: none; }
button.passkey-remove:disabled { color: var(--muted); background: transparent; opacity: .7; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, .015); font-size: .8rem; line-height: 1.5; font-weight: 400; cursor: pointer; }
.check input { width: 17px; height: 17px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.check span { min-width: 0; overflow-wrap: anywhere; }
.field-note, .form-note { margin: 12px 0 0; font-size: .75rem; line-height: 1.5; }
.sign-in-note { margin: 16px 0 0; font-size: .75rem; text-align: center; }
.sign-in-note a { margin-left: 3px; font-weight: 600; text-decoration: none; }
.sign-in-note a:hover { text-decoration: underline; }
.account-actions { display: grid; gap: 12px; margin-top: 24px; }
.utility-links, .flow-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; font-size: .75rem; }
.utility-links { margin-top: 8px; }
.flow-links { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.utility-links a, .flow-links a, .staff-link, .back-link a { text-decoration: none; }
.utility-links a:hover, .flow-links a:hover, .staff-link:hover, .back-link a:hover { text-decoration: underline; }
.staff-link { justify-self: center; color: var(--muted); font-size: .7rem; margin-top: 4px; }
.back-link { margin: 20px 0 0; text-align: center; font-size: .75rem; }
.recovery-link { overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0, 0, 0, .015); }
.setup-steps { margin: 0 0 24px; padding-left: 20px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.setup-steps li + li { margin-top: 10px; }
.confirmation-code { margin: 20px 0; padding: 16px; border: 1px solid var(--border); border-radius: 10px; text-align: center; font-size: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .18em; color: #1a1a1a; background: #f8f9fa; }
.email-help { margin-top: 24px; font-size: .75rem; color: var(--muted); }
.email-help summary { cursor: pointer; }
.email-help strong { overflow-wrap: anywhere; }
.email-help form { margin-top: 12px; }
[role="alert"], [role="status"] { margin: 16px 0; padding: 12px; border-radius: 10px; font-size: .82rem; line-height: 1.5; overflow-wrap: anywhere; }
[role="alert"] { color: #a32c32; border: 1px solid rgba(244, 67, 54, .08); background: rgba(244, 67, 54, .04); }
[role="status"] { color: var(--accent-hover); border: 1px solid hsl(210 98% 48% / .14); background: hsl(210 98% 48% / .05); }
[role="alert"]:empty, [role="status"]:empty { display: none; }
.site-footer { margin: 16px 0 0; color: #757575; font-size: .65rem; text-align: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus-visible, select:focus-visible { outline-offset: 2px; }
::selection { background: hsl(210, 100%, 92%); color: #1a1a1a; }

@media (max-width: 599px) {
  .auth-card { padding: 28px; }
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select { font-size: 16px; }
  button, .button, .secondary-button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.authenticator-qr { display: block; width: min(256px, 100%); height: auto; margin: 24px auto; }
.setup-key { display: block; padding: 12px; overflow-wrap: anywhere; user-select: all; }
.backup-codes { padding: 16px; border: 1px solid #e5e7eb; border-radius: 8px; line-height: 1.8; white-space: pre-wrap; user-select: all; }
