/* Scope public authentication layout so the admin shell owns its workspace. */
.auth-document {
  color-scheme: light;
  --auth-paper: var(--zy-paper);
  --auth-ink: var(--zy-ink);
  --auth-green: var(--zy-green);
  --auth-green-dark: var(--zy-green-ink);
  --auth-muted: var(--zy-muted);
  --auth-line: var(--zy-line);
  font-family: var(--zy-font);
  font-synthesis: none;
}
.auth-document * { box-sizing: border-box; }
.auth-document body { margin: 0; min-height: 100dvh; background: var(--auth-paper); color: var(--auth-ink); font: 14px/1.75 var(--zy-font); -webkit-font-smoothing: antialiased; }
.auth-document :is(h1, h2, p) { margin: 0; }
.auth-document [hidden] { display: none !important; }
.auth-document a { color: var(--auth-green-dark); text-decoration: none; }
.auth-document a:hover { text-decoration: underline; text-underline-offset: 4px; }
.auth-document :is(button, input, summary) { font: inherit; }
.auth-document :is(button, a, summary) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.auth-document :is(button, a, input, summary, [tabindex]):focus-visible { outline: 2px solid var(--zy-green-ink); outline-offset: 4px; }
.auth-document button { cursor: pointer; }
.auth-document button:disabled { opacity: 1; cursor: not-allowed; background: var(--zy-surface-muted); border-color: var(--zy-line); color: var(--zy-muted); }
.auth-document button[aria-busy="true"] { cursor: progress; }
.auth-document .auth-icon { width: 18px; height: 18px; flex-shrink: 0; fill: currentColor; }
.auth-document .auth-topbar { max-width: 1160px; margin: auto; padding: 30px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.auth-document .auth-brand { display: inline-flex; gap: 10px; align-items: center; color: var(--auth-ink); text-decoration: none; }
.auth-document .auth-brand img { display: block; }
.auth-document .auth-brand { min-width: 0; flex-shrink: 0; }
.auth-document .auth-brand img.brand-lockup { display: block; width: 180px; max-width: 100%; height: auto; aspect-ratio: 461 / 130; object-fit: contain; }
.auth-document .auth-brand > span { font-size: 21px; font-weight: 780; letter-spacing: -.5px; line-height: 1.2; }
.auth-document .auth-brand small { display: block; margin-top: 6px; font: 650 7px/1 Arial, sans-serif; letter-spacing: 1.6px; color: var(--auth-muted); }
.auth-document .auth-home-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--auth-muted); font-size: 13px; white-space: nowrap; }
.auth-document .auth-main { width: min(500px, calc(100% - 40px)); margin: 24px auto 0; padding: 38px 40px 26px; border: 1px solid var(--auth-line); border-radius: var(--zy-radius-panel); background: var(--zy-surface); box-shadow: var(--zy-shadow-panel); }
.auth-document .auth-eyebrow { color: var(--auth-green-dark); font-size: 12px; font-weight: 550; letter-spacing: .04em; }
.auth-document h1 { margin-top: 10px; font-size: 28px; font-weight: 720; line-height: 1.45; letter-spacing: -.045em; }
.auth-document .auth-description { margin-top: 9px; color: var(--auth-muted); font-size: 13px; }
.auth-document .auth-form { margin-top: 26px; }
.auth-document label { display: block; margin: 19px 0 7px; font-size: 13px; font-weight: 550; }
.auth-document input { display: block; width: 100%; min-width: 0; height: 48px; padding: 11px 14px; border: 1px solid var(--zy-control-line); border-radius: var(--zy-radius-control); background: var(--zy-surface); color: var(--auth-ink); font-size: 16px; line-height: 1.5; }
.auth-document input::placeholder { font-size: 13px; color: var(--auth-muted); }
.auth-document input:focus { border-color: var(--zy-green-ink); }
.auth-document .auth-password-field { position: relative; }
.auth-document .auth-password-field input { padding-right: 66px; }
.auth-document .auth-password-toggle { position: absolute; top: 2px; right: 2px; min-height: 44px; padding: 4px 12px; border: 0; border-radius: var(--zy-radius-control); background: transparent; color: var(--auth-green-dark); font-size: 12px; }
.auth-document .auth-password-toggle:hover { background: var(--zy-surface-muted); }
.auth-document .auth-primary { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 44px; margin-top: 24px; padding: 10px 16px; border: 1px solid transparent; border-radius: var(--zy-radius-control); background: var(--auth-green); color: var(--auth-ink); font-size: 14px; font-weight: 650; transition: background .15s; }
.auth-document .auth-primary:hover:not(:disabled) { background: var(--zy-green-hover); text-decoration: none; }
.auth-document .auth-primary:disabled { background: var(--zy-surface-muted); border-color: var(--zy-line); color: var(--zy-muted); }
.auth-document .auth-new-user { display: grid; gap: 5px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: 13px; }
.auth-document .auth-new-user a { display: inline-flex; align-items: center; gap: 7px; width: fit-content; font-weight: 550; }
.auth-document .auth-login-help { margin-top: 18px; color: var(--auth-muted); font-size: 12px; }
.auth-document .auth-login-help a { display: inline-block; margin-left: 4px; }
.auth-document .auth-message { min-height: 22px; margin-top: 14px; font-size: 12px; overflow-wrap: anywhere; color: var(--auth-green-dark); }
.auth-document .auth-message[data-state="error"] { color: var(--zy-danger); }
.auth-document .auth-message[data-state="pending"] { color: var(--auth-muted); }
.auth-document .auth-message:not(:empty) { padding: 10px 12px; border-radius: var(--zy-radius-control); background: var(--zy-surface-muted); }
.auth-document .auth-message[data-state="error"]:not(:empty) { background: var(--zy-danger-soft); }
.auth-document .auth-message[data-state="success"]:not(:empty) { background: var(--zy-green-soft); }
.auth-document .auth-footer { padding: 24px 20px 30px; text-align: center; color: var(--auth-muted); font-size: 11px; }
.auth-document .auth-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.auth-document .auth-steps li { display: grid; gap: 6px; color: var(--auth-muted); font-size: 11px; border-top: 2px solid var(--zy-line); padding-top: 10px; }
.auth-document .auth-steps li[aria-current] { color: var(--auth-green-dark); border-color: var(--auth-green); font-weight: 600; }
.auth-document .auth-step-number { font: 600 11px/1.5 Arial, sans-serif; }
.auth-document .auth-field-help { margin-top: 9px; color: var(--auth-muted); font-size: 12px; line-height: 1.85; }
.auth-document .auth-help { margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: 12px; }
.auth-document .auth-help summary { cursor: pointer; color: var(--auth-ink); }
.auth-document .auth-help p { margin: 10px 0 7px; }
.auth-document .auth-help a, .auth-document .auth-bottom-link a { display: inline-flex; align-items: center; gap: 5px; }
.auth-document .auth-help .auth-icon { width: 14px; height: 14px; }
.auth-document .auth-bottom-link { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; color: var(--auth-muted); font-size: 12px; }
.auth-document .auth-callout { margin-top: 23px; padding: 15px 17px; background: var(--zy-surface-muted); border-left: 3px solid var(--zy-control-line); color: var(--auth-muted); font-size: 12px; }
.auth-document .auth-main--error .auth-eyebrow { color: var(--zy-danger); }
.auth-document .auth-main--error .auth-callout { border-color: var(--zy-danger); background: var(--zy-danger-soft); color: var(--auth-ink); }
.auth-document .auth-verified { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding: 14px; border-radius: var(--zy-radius-control); background: var(--zy-surface-muted); font-size: 11px; color: var(--auth-muted); }
.auth-document .auth-verified-icon { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--zy-green-soft); color: var(--auth-green-dark); }
.auth-document .auth-verified-icon .auth-icon { width: 15px; height: 15px; }
.auth-document .auth-verified > div { flex: 1; min-width: 0; }
.auth-document .auth-verified strong { display: block; font-size: 12px; font-weight: 550; color: var(--auth-ink); overflow-wrap: anywhere; }
.auth-document .auth-verified > a { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.auth-document .auth-result { margin-top: 24px; }
.auth-document .auth-result h2 { font-size: 17px; font-weight: 650; }
.auth-document .auth-result > p:not(.auth-field-help) { margin-top: 7px; color: var(--auth-muted); font-size: 12px; }
.auth-document .auth-secret { margin-top: 14px; padding: 15px; border: 1px solid var(--zy-line); border-radius: var(--zy-radius-control); background: var(--zy-surface-muted); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; font: 13px/1.9 ui-monospace, Consolas, monospace; }
.auth-document .auth-secret-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.auth-document .auth-copy-button { min-height: 44px; padding: 8px 15px; border: 1px solid var(--zy-control-line); border-radius: var(--zy-radius-control); background: var(--zy-surface); color: var(--auth-green-dark); font-size: 12px; }
.auth-document .auth-copy-button:hover { background: var(--zy-surface-muted); }
.auth-document .auth-secret-note { color: var(--auth-muted); font-size: 11px; }
.auth-document.auth-embedded body { min-height: 100dvh; background: var(--zy-surface); }
.auth-document.auth-embedded .auth-topbar { padding: 28px 32px 0; }
.auth-document.auth-embedded .auth-brand img { width: 32px; height: 32px; }
.auth-document.auth-embedded .auth-brand img.brand-lockup { width: 164px; height: auto; }
.auth-document.auth-embedded .auth-brand > span { font-size: 18px; }
.auth-document.auth-embedded .auth-home-link { display: none; }
.auth-document.auth-embedded .auth-main { width: 100%; margin: 0; padding: 28px 32px 14px; border: 0; border-radius: 0; box-shadow: none; }
.auth-document.auth-embedded h1 { font-size: 26px; }
.auth-document.auth-embedded .auth-footer { display: none; }
@media (max-width: 560px) {
  .auth-document .auth-brand img.brand-lockup { width: 160px; height: auto; }
  .auth-document .auth-topbar { padding: 22px 22px; gap: 16px; }
  .auth-document .auth-brand > span { font-size: 19px; }
  .auth-document .auth-main { width: calc(100% - 32px); margin-top: 10px; padding: 30px 24px 20px; border-radius: var(--zy-radius-panel); }
  .auth-document h1 { font-size: 25px; }
  .auth-document .auth-home-link { font-size: 12px; }
  .auth-document.auth-embedded .auth-topbar { padding: 26px 24px 0; }
  .auth-document.auth-embedded .auth-main { width: 100%; padding: 24px 24px 12px; }
}
@media (max-width: 360px) {
  .auth-document .auth-topbar { padding-inline: 16px; gap: 10px; }
  .auth-document .auth-brand img.brand-lockup { width: 144px; }
  .auth-document .auth-main { padding-inline: 20px; }
  .auth-document .auth-verified { gap: 8px; padding: 12px; }
  .auth-document .auth-verified-icon { display: none; }
  .auth-document.auth-embedded .auth-topbar { padding-inline: 20px; }
  .auth-document.auth-embedded .auth-main { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) { .auth-document * { transition: none !important; } }
