/* P7.14 C06: authentication consumes the existing system tokens, not a second
   palette or density. No tenant lookup is performed before authentication. */
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) {
  --auth-link:var(--sys-accent);--auth-blue:var(--sys-accent);--auth-blue-2:var(--sys-accent);
  --auth-blue-deep:var(--sys-accent-strong);
  --auth-ink:var(--sys-text);--auth-muted:var(--sys-muted);
  --auth-line:var(--sys-line);--auth-soft:var(--sys-soft);
  --purple:var(--sys-accent);--purple-light:var(--sys-soft);
  --ink:var(--sys-text);--muted:var(--sys-muted);--line:var(--sys-line);
  color:var(--sys-text)!important;background:var(--sys-bg)!important;
  font-family:Tahoma,"Segoe UI",Arial,sans-serif!important;
  font-size:13px!important;line-height:1.55;
}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(.auth-access-pane,.auth-card) {
  background-color:var(--sys-panel)!important;color:var(--sys-text)!important;
  border-color:var(--sys-line)!important;
}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(.auth-heading h2,.auth-card>h2,.auth-card>h1,.auth-card label,.auth-label-row label) {color:var(--sys-text)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(.auth-card>p,.auth-heading p,.auth-description,.auth-card small,.auth-access-footer) {color:var(--sys-muted)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(.auth-card .brand,.back-link,.auth-label-row a,.auth-switch a,.text-button) {color:var(--auth-link)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(.login-tabs,.auth-mode-badge,.first-login-note,.auth-trust-line,.auth-emblem,.tenant-choice,.tenant-choice-icon) {
  background:var(--sys-soft)!important;color:var(--sys-text)!important;border-color:var(--sys-line)!important;
}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .login-tabs a {color:var(--sys-text)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .login-tabs a:is(:hover,[aria-current=page]) {background:var(--sys-panel)!important;color:var(--auth-link)!important}
/* Explicit scope beats older, page-specific !important sizes without changing
   the layout, radio choices, hidden credentials or the shape of any workflow. */
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card :is(input,select):not([type=hidden]):not([type=checkbox]):not([type=radio]) {
  box-sizing:border-box!important;width:100%!important;max-width:100%!important;
  height:var(--novel-control-height)!important;min-height:var(--novel-control-height)!important;
  padding:7px 10px!important;border:1px solid var(--sys-line)!important;
  border-radius:var(--novel-control-radius)!important;
  background:var(--sys-panel)!important;color:var(--sys-text)!important;
  font:inherit!important;box-shadow:none!important;
}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card input::placeholder {color:var(--sys-muted)!important;opacity:1}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card :is(input,select):is(:disabled,[readonly]) {background:var(--sys-soft)!important;color:var(--sys-muted)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card :is(input,select):focus {
  border-color:var(--sys-accent)!important;outline:2px solid var(--sys-focus)!important;outline-offset:1px!important;
}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card .auth-control input {padding-inline:44px!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card .stack-form .password-field input {padding-inline-end:44px!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) input[type=hidden] {display:none!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(input[type=radio],input[type=checkbox]) {accent-color:var(--sys-accent)}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card :is(button,.button) {
  box-sizing:border-box;min-height:var(--novel-button-height)!important;
  padding:7px 14px!important;border-radius:var(--novel-control-radius)!important;font:inherit!important;
}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card :is(button.primary,.auth-submit,.button.wide) {
  background:var(--sys-accent)!important;color:var(--sys-on-accent)!important;
  border:1px solid var(--sys-accent)!important;box-shadow:none!important;
}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card :is(button.primary,.auth-submit,.button.wide):hover {background:var(--sys-accent-strong)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-card .password-field>button {
  width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;
  padding:5px!important;inset-inline-end:4px!important;top:50%!important;transform:translateY(-50%)!important;
  color:var(--sys-muted)!important;background:transparent!important;border:0!important;
}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(button,a,input,select):focus-visible {outline:2px solid var(--sys-accent)!important;outline-offset:2px!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(button[aria-disabled=true],button:disabled) {cursor:wait;opacity:.65}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) :is(input,select)[aria-invalid=true] {border-color:#C53647!important}
/* Brand artwork retains its layout, but follows the same selected accent. */
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-brand-pane {background:var(--sys-accent)!important;color:var(--sys-on-accent)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-brand-pane :is(h1,strong,p,.auth-brand-word,.auth-brand-eyebrow,.auth-brand-footer) {color:var(--sys-on-accent)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-logo-mark:not(.auth-logo-mark-inverse) {background:var(--sys-accent)!important;color:var(--sys-on-accent)!important}
@media (prefers-reduced-motion:reduce) {html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) * {animation:none!important;transition:none!important}}

/* Links must remain readable when a selected accent is too dark on dark panels. */
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page).theme-dark {--auth-link:var(--sys-text);color-scheme:dark}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page).theme-light {color-scheme:light}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-trust-line :is(b,small) {color:var(--sys-text)!important}
html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .auth-logo-mark-inverse {color:var(--sys-accent)!important}

html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .empty-state {background:var(--sys-soft)!important;color:var(--sys-text)!important;border-color:var(--sys-line)!important}

html body.novel-auth-ui:is(.auth,.auth-body.auth-premium-page) .tenant-choice small {color:var(--sys-text)!important}
