/* Shared login dialog; all rules stay inside the overlay or the compact account gate. */
.site-auth-dialog{--auth-ink:#18181b;--auth-muted:#71717a;--auth-line:#e4e4e7;--auth-gold:#27272a;--auth-soft:#eeeef0;width:min(900px,calc(100vw - 48px));max-width:none;max-height:calc(100dvh - 48px);padding:0;border:1px solid #e4e4e7;border-radius:16px;background:#fff;color:var(--auth-ink);font:14px/1.7 var(--sans,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif);box-shadow:0 24px 90px #20202025;overflow:auto}
.site-auth-dialog::backdrop{background:#20202060;backdrop-filter:blur(4px)}
.site-auth-dialog,.site-auth-dialog *{box-sizing:border-box}
.site-auth-dialog [hidden],.site-auth-dialog .hidden{display:none!important}
.site-auth-dialog button,.site-auth-dialog input{font-family:inherit}
.site-auth-dialog button{cursor:pointer}
.site-auth-dialog button:disabled{opacity:.5;cursor:default}
.site-auth-dialog :focus-visible{outline:2px solid var(--auth-gold);outline-offset:4px}
.site-auth-layout{display:grid;grid-template-columns:360px minmax(0,1fr);min-height:540px}
.site-auth-illustration{position:relative;isolation:isolate;min-height:540px;overflow:hidden;background:#f1eadb;border-right:1px solid #e4e4e7}
.site-auth-illustration>img{position:absolute;z-index:-1;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center bottom}
.site-auth-illustration-copy{padding:34px 30px;color:#3f3f46}
.site-auth-illustration-copy>span{font-size:12px;color:#71717a;letter-spacing:.02em}
.site-auth-illustration-copy h2{font-size:34px;line-height:1.5;letter-spacing:-.8px;font-weight:500;margin:25px 0 13px}
.site-auth-content{position:relative;min-width:0;padding:40px 40px 30px}
.site-auth-close{position:absolute;top:14px;right:14px;display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:5px;background:transparent;color:#71717a;padding:7px}
.site-auth-close:hover{background:var(--auth-soft);color:var(--auth-ink)}
.site-auth-close svg{display:block;width:18px;height:18px}
.site-auth-heading{text-align:center}
.site-auth-heading h1{font-size:26px;line-height:1.5;font-weight:550;margin:0 0 10px;letter-spacing:-.5px}
.site-auth-heading #site-auth-description{font-size:13px;line-height:1.8;color:var(--auth-muted);margin:0 auto 22px;max-width:340px}
.site-auth-area-label{display:block;font-size:11px;line-height:1.6;color:#71717a;margin-bottom:5px}
.site-auth-qr-frame{display:grid;place-items:center;width:248px;height:248px;margin:0 auto;background:#fff;padding:12px}
#site-auth-qr{display:block;width:224px;height:224px;max-width:100%;object-fit:contain}
#site-auth-qr-placeholder{font-size:11px;line-height:1.85;color:#71717a;text-align:center;padding:12px 4px}
.site-auth-code-row{display:flex;align-items:center;justify-content:space-between;gap:24px;width:min(310px,100%);margin:18px auto 0;padding-top:18px;border-top:1px solid var(--auth-line)}
.site-auth-code-area{min-width:0}
#site-auth-code{display:block;font:500 36px/1.25 var(--mono,'Cascadia Code',Consolas,monospace);letter-spacing:.16em;color:#18181b;user-select:all;font-variant-numeric:tabular-nums;white-space:nowrap}
.site-auth-progress{display:flex;justify-content:center;align-items:center;gap:16px;min-height:28px;margin:9px auto 0}
#site-auth-countdown{font-size:11px;margin:0;color:#71717a;font-variant-numeric:tabular-nums}
#site-auth-countdown.expiring{color:#9c4937}
.site-auth-actions{display:flex;align-items:center;flex:none}
.site-auth-primary{display:inline-flex;align-items:center;justify-content:center;min-width:120px;min-height:36px;padding:7px 13px;border:1px solid #18181b;border-radius:6px;font-size:12px;line-height:1.6;white-space:nowrap;background:#18181b;color:#fff}
.site-auth-primary:hover:not(:disabled){background:#3f3f46;border-color:#3f3f46}
.site-auth-secondary{min-height:24px;padding:2px 0;border:0;background:none;color:var(--auth-muted);font-size:11px;line-height:1.7;white-space:nowrap}
.site-auth-secondary:hover{color:var(--auth-gold)}
.site-auth-status{font-size:12px;color:var(--auth-muted);line-height:1.8;margin:10px auto 0;max-width:350px;text-align:center}
.site-auth-status:empty{display:none}
.site-auth-status[data-error=true]{color:#9c4937}
.site-auth-guide{margin-top:24px}
.site-auth-guide:has(#site-auth-guide-image:empty){display:none}
.site-auth-guide h2{font-size:11px;font-weight:400;color:#71717a;margin:0 0 9px}
#site-auth-guide-image{min-height:88px;border:1px dashed #e4e4e7;border-radius:7px;background:#fafafa}
body.site-auth-open{overflow:hidden!important}
.console-auth-gate{max-width:500px;background:#fff;border:1px solid var(--line,#e4e4e7);border-radius:12px;padding:29px;margin:18px 0}
.console-auth-gate h2{font-size:20px;font-weight:500;margin:0 0 10px}
.console-auth-gate p{font-size:13px;line-height:1.9;color:var(--muted,#71717a);margin:0 0 22px}
.console-auth-gate button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 20px;border:1px solid #18181b;border-radius:6px;background:#18181b;color:#fff;font:13px/1.6 var(--sans,'Segoe UI',sans-serif);cursor:pointer}
.console-auth-gate button:hover{background:#3f3f46;border-color:#3f3f46}
@media(max-width:780px){.site-auth-dialog{width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);border-radius:12px}.site-auth-layout{grid-template-columns:minmax(0,1fr);min-height:0}.site-auth-illustration{display:none}.site-auth-content{padding:34px 30px 28px}.site-auth-heading #site-auth-description{margin-bottom:18px}.site-auth-qr-frame{width:236px;height:236px}#site-auth-qr{width:212px;height:212px}}
@media(max-width:400px){.site-auth-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.site-auth-content{padding:32px 24px 25px}.site-auth-qr-frame{width:224px;height:224px;padding:12px}#site-auth-qr{width:200px;height:200px}.site-auth-code-row{gap:16px;margin-top:16px}#site-auth-code{font-size:33px;letter-spacing:.13em}.site-auth-primary{min-width:116px;font-size:11px;padding:7px 11px}.site-auth-progress{gap:12px}.console-auth-gate{padding:23px}}
@media(max-width:360px){.site-auth-code-row{gap:12px}#site-auth-code{font-size:28px;letter-spacing:.1em}.site-auth-primary{min-width:100px;padding:7px 9px}}
@media(prefers-reduced-motion:reduce){.site-auth-dialog::backdrop{backdrop-filter:none}}

/* One compact task per dialog: scan, get a code, continue. */
.site-auth-dialog{width:min(420px,calc(100vw - 32px));border-color:#e4e4e7;border-radius:8px;box-shadow:0 16px 48px #18181b1f}
.site-auth-dialog::backdrop{background:#18181b66;backdrop-filter:none}
.site-auth-layout{grid-template-columns:minmax(0,1fr);min-height:0}
.site-auth-illustration{display:none}
.site-auth-content{padding:32px 30px 24px}
.site-auth-heading h1{font-size:23px;font-weight:600;letter-spacing:0;margin-bottom:9px}
.site-auth-heading #site-auth-description{font-size:13px;margin-bottom:18px}
.site-auth-qr-frame{width:224px;height:224px;padding:10px;border:1px solid var(--auth-line);border-radius:6px}
#site-auth-qr{width:202px;height:202px}
.site-auth-code-row{width:100%;margin-top:20px;padding-top:18px;gap:16px}
#site-auth-code{font-size:32px;color:var(--auth-ink);letter-spacing:.13em}
.site-auth-primary{min-height:36px;min-width:112px;border-radius:6px}
.console-auth-gate{border-radius:8px;background:#fff;padding:24px}
@media(max-width:400px){.site-auth-dialog{width:calc(100vw - 24px)}.site-auth-content{padding:30px 22px 22px}.site-auth-heading h1{font-size:22px}.site-auth-qr-frame{width:212px;height:212px}#site-auth-qr{width:190px;height:190px}.site-auth-code-row{gap:12px}#site-auth-code{font-size:28px;letter-spacing:.11em}.site-auth-primary{min-width:104px;font-size:11px}}
@media(max-width:350px){.site-auth-content{padding-inline:18px}#site-auth-code{font-size:25px}.site-auth-primary{min-width:98px}}
