/* Customer authentication: JAD/Axiom palette and control geometry, not CRM chrome. */
@font-face { font-family: "Source Sans 3"; src: url("../auth/source-sans-pro-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../auth/source-sans-pro-semibold.woff") format("woff"); font-weight: 600 700; font-display: swap; }
:root {
  color-scheme: light;
  --brand-blue: #05386b;
  --surface-base: #002b57;
  --surface-field-stroke: #e5f2ff;
  --surface-field-highlight: #93c0ed;
  --button-primary-fill: #05386b;
  --button-primary-hover: #2a5580;
  --button-secondary-fill: #f2f9ff;
  --button-secondary-shadow: #d9ecff;
  --button-label-on-fill: #fffffff2;
  --button-destructive: #be3a3a;
  --button-destructive-hover: #a83232;
  --text-on-dark: #fffffff2;
  --text-muted: #cce5ff;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-on-dark);
  background: var(--brand-blue);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.public-auth-shell { min-height: 100vh; min-height: 100svh; }
.public-auth { width: 100%; max-width: 563px; min-height: 100vh; min-height: 100svh; margin: auto; padding: 40px 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; }
.public-auth__logo { width: 100%; max-width: 515px; height: auto; object-fit: contain; }
.public-auth__title { text-align: center; font-size: 28px; line-height: 1.2; margin: 0; }
.public-auth__card { width: 100%; padding: 32px; border-radius: 8px; background: var(--surface-base); }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 16px; }
h3 { font-size: 18px; margin: 0 0 12px; }
p { margin: 0 0 20px; }
form, .auth-actions { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
label { font-weight: 600; }
input, button, a { font: inherit; letter-spacing: 0; }
input:not([type="hidden"]):not([type="checkbox"]) { width: 100%; min-width: 0; height: 40px; padding: 0 8px; border: 1px solid var(--surface-field-stroke); border-radius: 4px; background: #fcfeff; color: var(--brand-blue); }
input[readonly] { background: #e5f2ff !important; }
input::placeholder { color: #52677d; opacity: 1; }
:where(button, a, input, summary):focus-visible { outline: 3px solid var(--surface-field-highlight); outline-offset: 3px; }
.ds-btn { min-height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; transition: background-color 150ms ease; }
.ds-btn-primary { background: var(--button-primary-fill); color: var(--button-label-on-fill); border-color: var(--surface-field-highlight); }
.ds-btn-primary:hover { background: var(--button-primary-hover); }
.ds-btn-secondary { background: var(--button-secondary-fill); color: var(--brand-blue); border-color: var(--surface-field-stroke); }
.ds-btn-secondary:hover { background: var(--button-secondary-shadow); }
.ds-btn-danger { background: var(--button-destructive); color: var(--button-label-on-fill); }
.ds-btn-danger:hover { background: var(--button-destructive-hover); }
.ds-btn:disabled { opacity: .5; cursor: not-allowed; }
.buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.buttons > :only-child { grid-column: 1 / -1; }
.subtitle, .footer-note, .code-hint { color: var(--text-muted); }
.footer-note, .code-section { margin-top: 24px; font-size: 14px; }
.error-message, [role="alert"]:not(:empty) { margin-bottom: 20px; padding: 12px; border: 1px solid #ffb5b5; border-radius: 4px; color: #ffe1e1; background: #682c35; overflow-wrap: anywhere; }
[role="status"]:not(:empty) { margin-bottom: 16px; overflow-wrap: anywhere; }
.qr { display: block; width: 240px; max-width: 100%; height: auto; aspect-ratio: 1; align-self: center; background: white; }
.secret { padding: 12px; border: 1px solid var(--surface-field-highlight); border-radius: 4px; overflow-wrap: anywhere; }
.recovery-codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recovery-codes code { overflow-wrap: anywhere; }
.saved { display: flex; align-items: flex-start; gap: 8px; }
input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--surface-field-highlight); }
details { border-top: 1px solid var(--button-primary-hover); padding-top: 16px; }
summary { cursor: pointer; padding: 8px 0; }
details label { display: block; margin: 12px 0 8px; }
#passkeys section { margin-bottom: 24px; }
.passkey-list { list-style: none; padding: 0; margin: 0; }
.passkey-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--button-primary-hover); }
.passkey-description { min-width: 0; overflow-wrap: anywhere; }
.passkey-description dl { margin: 8px 0 0; font-size: 14px; }
.passkey-description dt { color: var(--text-muted); }
.passkey-description dd { margin: 2px 0 8px; }
.passkey-navigation { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.app-info, .user-info { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--button-primary-hover); margin-bottom: 20px; }
.app-info svg, .user-info svg { flex-shrink: 0; }
.app-details { min-width: 0; }
.app-details h2, .app-details p { margin: 0; }
.user-info, .app-details, .details { overflow-wrap: anywhere; }
.permission-list { list-style: none; padding: 0; margin: 0 0 24px; }
.permission-list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--button-primary-hover); }
.permission-icon { display: flex; }
.code-pill { font-family: monospace; font-size: 28px; text-align: center; padding: 16px; border: 1px solid var(--surface-field-highlight); border-radius: 4px; margin: 20px 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .public-auth { padding: 24px 16px; gap: 24px; }
  .public-auth__card { padding: 24px 16px; }
  .buttons { grid-template-columns: minmax(0, 1fr); }
  .passkey-list li { flex-direction: column; }
  .passkey-list form { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ds-btn { transition: none; } }
