/* Sign-in screens (signin, verify-otp, verify-pin, verify-totp). Scoped to .auth8-*; nothing else uses these names. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

.auth-body { position: relative; overflow-x: hidden; }
.auth8-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.auth8-bg i { position: absolute; border-radius: 50%; filter: blur(110px); }
.auth8-bg i:first-child { width: 620px; height: 620px; left: -160px; top: -200px; background: rgba(108, 92, 231, .28); animation: a8drift 18s ease-in-out infinite alternate; }
.auth8-bg i:last-child { width: 520px; height: 520px; right: -160px; bottom: -180px; background: rgba(255, 159, 90, .22); animation: a8drift 22s ease-in-out infinite alternate-reverse; }
:root[data-theme="dark"] .auth8-bg i:first-child { background: rgba(120, 100, 255, .3); }
:root[data-theme="dark"] .auth8-bg i:last-child { background: rgba(255, 130, 90, .12); }
@keyframes a8drift { to { transform: translate(60px, 40px); } }

.auth8-card { position: relative; z-index: 1; width: min(540px, 100%); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 36px; padding: 30px 36px 24px; overflow: hidden;
    box-shadow: 0 50px 90px -50px rgba(60, 50, 160, .55); view-transition-name: a8card; }
.auth8-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 130px; background: radial-gradient(70% 100% at 50% 0%, rgba(108, 92, 231, .13), transparent); pointer-events: none; }
.auth8-card > * { position: relative; }

.auth8-top { display: flex; align-items: center; gap: 14px; min-height: 54px; }
.auth8-mark { width: 54px; height: 54px; border-radius: 19px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7B6BF2, #5546D6); box-shadow: 0 14px 26px -12px rgba(108, 92, 231, .9), 0 0 0 6px rgba(108, 92, 231, .08); }
.auth8-name { min-width: 0; } .auth8-name b { display: block; font-size: 17.5px; letter-spacing: -.01em; color: var(--color-text); }
.auth8-name span { font-size: 12.5px; color: var(--color-text-muted); }
.auth8-slot { margin-left: auto; flex: none; }
.auth8-tag { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--tint-1); color: var(--tint-1-fg); }

.auth8-steps { display: flex; align-items: center; margin: 20px 0 18px; view-transition-name: a8steps; width: max-content; }
.auth8-node { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--color-border-soft); color: var(--color-text-muted); }
.auth8-node.is-on { background: var(--color-accent); color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-accent) 16%, transparent); }
.auth8-node.is-done { background: var(--tint-3); color: var(--tint-3-fg); }
.auth8-line { flex: 0 0 56px; height: 3px; border-radius: 3px; background: var(--color-border); margin: 0 8px; position: relative; overflow: hidden; }
.auth8-line i { position: absolute; inset: 0; width: 0; background: var(--tint-3-fg); }
.auth8-line.is-done i { width: 100%; }

.auth8-head h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.04em; line-height: 1.15; color: var(--color-text); }
.auth8-head p { margin: 0 0 18px; color: var(--color-text-muted); font-size: 14.5px; line-height: 1.5; }
.auth8-head p strong { color: var(--color-text); overflow-wrap: anywhere; }
.auth8-card .flash { display: block; border-radius: 16px; margin: 0 0 14px; }
.auth8-card .flash .flash-note { margin-top: 6px; font-size: 12.5px; opacity: .9; }

/* The one input: label inside, round submit button inside */
.auth8-field { position: relative; display: flex; align-items: center; min-height: 66px; padding: 0 10px 0 52px; border: 1.5px solid var(--color-border); border-radius: 22px; background: var(--color-surface); transition: border-color .2s, box-shadow .2s; }
.auth8-field:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-accent) 14%, transparent); }
.auth8-field > svg.icon { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); }
.auth8-field:focus-within > svg.icon { color: var(--color-accent-strong); }
.auth8-lb { position: absolute; left: 52px; top: 10px; font-size: 11.5px; font-weight: 600; color: var(--color-accent-strong); }
.auth8-field input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--color-text); padding: 22px 8px 8px 0; box-shadow: none !important; border-radius: 0 !important; background: transparent !important; }
.auth8-field input::placeholder { color: var(--color-text-muted); opacity: .7; }
.auth8-field input.pin-input { letter-spacing: .3em; width: 100%; max-width: none; text-align: left; margin: 0; }
.auth8-send { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: linear-gradient(135deg, #7B6BF2, #5546D6); box-shadow: 0 12px 22px -10px rgba(108, 92, 231, .9); transition: transform .25s var(--ease-spring, ease); }
.auth8-send:hover { transform: scale(1.06); } .auth8-send:active { transform: scale(.95); }
.auth8-send:focus-visible, .auth8-dk:focus-visible, .auth8-go:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-accent) 50%, transparent); outline-offset: 2px; }
.auth8-send.is-loading { opacity: .7; }

.auth8-way { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.auth8-way > span { font-size: 12.5px; color: var(--color-text-muted); font-weight: 500; }
.auth8-dock { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--color-canvas); border: 1px solid var(--color-border); }
.auth8-dk { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 0; background: transparent; color: var(--color-text-muted); cursor: pointer; text-decoration: none; transition: background .25s, color .25s; }
.auth8-dk:hover { background: var(--color-surface); color: var(--color-accent-strong); }
.auth8-dk[hidden] { display: none; }
.auth8-hint { font-size: 12.5px; color: var(--color-text-muted); margin: 8px 0 0; text-align: right; }

/* Code boxes and the main button */
.auth8-card .otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin: 4px 0 14px; }
.auth8-card .otp-box { width: 100%; min-width: 0; height: 64px; border-radius: 19px; border: 1.5px solid var(--color-border); background: var(--color-surface); text-align: center; font-size: 27px; font-weight: 600; color: var(--color-text); padding: 0; transition: border-color .2s, box-shadow .2s, background .2s; }
.auth8-card .otp-box:focus { border-color: var(--color-accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-accent) 15%, transparent); outline: 0; }
.auth8-card .otp-box.is-filled { border-color: var(--color-accent); }
.auth8-card .otp-boxes.is-shaking { animation: a8shake .45s; } @keyframes a8shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.auth8-card .otp-input, .auth8-card .pin-input { border-radius: 16px; }
.auth8-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--color-text-muted); margin: 0 0 14px; }
.auth8-meta b { color: var(--color-text); }
.auth8-meta .l { display: flex; gap: 8px; align-items: center; min-width: 0; }
.auth8-trust { display: flex; gap: 9px; align-items: center; color: var(--color-text); font-weight: 500; cursor: pointer; }
.auth8-trust input { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 99px; background: var(--color-border); position: relative; margin: 0; cursor: pointer; transition: background .25s; flex: none; border: 0; padding: 0; }
.auth8-trust input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s; }
.auth8-trust input:checked { background: var(--color-accent); } .auth8-trust input:checked::after { transform: translateX(14px); }
.auth8-trust input:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-accent) 50%, transparent); outline-offset: 2px; }
.auth8-go { position: relative; overflow: hidden; display: flex; width: 100%; justify-content: center; align-items: center; gap: 8px; padding: 17px; font-family: inherit; font-weight: 600; font-size: 15.5px; line-height: 1; border: 0; border-radius: 20px; color: #fff; cursor: pointer; background: linear-gradient(135deg, #7B6BF2, #5546D6); box-shadow: 0 18px 30px -14px rgba(108, 92, 231, .9); }
.auth8-go::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); animation: a8shine 3.8s 1s infinite; }
@keyframes a8shine { to { left: 110%; } }
.auth8-card .auth-resend-form { text-align: center; margin: 10px 0 0; }
.auth8-card .auth-link-btn { background: none; border: 0; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px; color: var(--color-accent-strong); padding: 6px; }
.auth8-card .auth-link-btn:disabled { opacity: .55; cursor: default; }
.auth8-card .auth-link { color: var(--color-text-muted); font-size: 13px; text-decoration: none; }
.auth8-card .auth-link:hover { color: var(--color-accent-strong); }
.auth8-links { text-align: center; margin: 6px 0 0; }
.auth8-card .auth-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.auth8-ring { position: relative; display: block; width: 52px; height: 52px; }
.auth8-ring svg { transform: rotate(-90deg); display: block; } .auth8-ring circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.auth8-ring .t { stroke: var(--color-border-soft); } .auth8-ring .p { stroke: #E8833A; stroke-dasharray: 138.2; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.auth8-ring em { position: absolute; inset: 0; display: grid; place-items: center; font-family: inherit; font-weight: 600; font-size: 11.5px; font-style: normal; color: var(--tint-2-fg); }

.auth8-tape { margin-top: 18px; display: flex; align-items: center; gap: 10px; background: var(--color-canvas); border-radius: 16px; padding: 9px 14px; font-size: 11.5px; color: var(--color-text-muted); }
.auth8-tape svg { color: var(--tint-3-fg); flex: none; }
.auth8-tape-mq { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.auth8-tape-in { display: inline-flex; white-space: nowrap; animation: a8tape 30s linear infinite; }
.auth8-tape-in span { padding-right: 34px; } .auth8-tape-in span::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--tint-3-fg); margin-right: 10px; vertical-align: middle; opacity: .7; }
@keyframes a8tape { to { transform: translateX(-50%); } }

.auth8-qr { text-align: center; margin: 4px 0 10px; }

@media (max-width: 560px) {
    .auth-body { padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom)); align-items: center; min-height: 100vh; min-height: 100dvh; }
    .auth8-card { padding: 24px 20px 20px; border-radius: 30px; }
    .auth8-head h1 { font-size: 26px; }
    .auth8-card .otp-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)) 10px repeat(3, minmax(0, 1fr)); gap: 8px; }
    .auth8-card .otp-box:nth-child(4) { grid-column: 5; }
    .auth8-card .otp-box { height: 58px; font-size: 25px; border-radius: 16px; }
    .auth8-line { flex-basis: 40px; }
    .auth8-way { flex-wrap: wrap; }
}
@media (max-width: 360px) { .auth8-tag { display: none; } .auth8-card .otp-boxes { gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)) 6px repeat(3, minmax(0, 1fr)); } .auth8-card .otp-box { height: 52px; font-size: 21px; } }
.auth8-trust { min-height: 44px; }
@media (min-width: 1500px) { .auth8-card { width: 580px; } }
@media (prefers-reduced-motion: reduce) {
    .auth8-bg i, .auth8-go::after, .auth8-tape-in, .auth8-card .otp-boxes.is-shaking { animation: none !important; }
    .auth8-tape-in { flex-wrap: wrap; white-space: normal; } .auth8-tape-in span:nth-child(n+5) { display: none; }
}

/* ---------- 2026.11.17-5: the sign-in card is a staff pass on a lanyard ---------- */
.auth-shell { position: relative; }
.auth-shell::before { content: ""; position: absolute; left: 50%; bottom: calc(100% - 22px); width: 26px; height: 100vh; margin-left: -13px; z-index: 0; pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.10) 0 2px, transparent 2px 5px),
        linear-gradient(90deg, #3F31B8, #6A5AE6 30%, #7D6FF0 50%, #6A5AE6 70%, #3F31B8);
    box-shadow: 0 0 0 1px rgba(40, 30, 120, .25), 0 10px 20px -8px rgba(40, 30, 120, .5); border-radius: 0 0 3px 3px; }
.auth-shell::after { content: ""; position: absolute; left: 50%; top: -14px; width: 34px; height: 30px; margin-left: -17px; z-index: 3; pointer-events: none; border-radius: 7px 7px 10px 10px;
    background: linear-gradient(90deg, #8E8C9C, #F4F3F8 40%, #C9C7D3 60%, #8A8898); box-shadow: inset 0 -6px 0 -3px rgba(0,0,0,.18), 0 3px 6px rgba(0,0,0,.3); }
.auth8-card { margin-top: 10px; }
.auth8-card::after { content: ""; position: absolute; left: 50%; top: 12px; width: 58px; height: 10px; margin-left: -29px; border-radius: 6px; z-index: 2;
    background: var(--color-canvas, #F5F6FB); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28); }
.auth8-card { background-image:
        linear-gradient(100deg, #ffd1dc 0%, #c9f2ff 25%, #e3ffd6 50%, #fff1c2 75%, #e1d4ff 100%),
        repeating-radial-gradient(circle at 100% 0%, rgba(108, 92, 231, .045) 0 1px, transparent 1px 7px);
    background-size: 220% 6px, 100% 160px; background-position: 0 100%, 0 0; background-repeat: no-repeat; }
.auth8-card:hover { background-position: 100% 100%, 0 0; transition: background-position 1.6s ease; }
.auth-body .auth-shell { animation: a8swing 1.6s cubic-bezier(.3, .7, .3, 1) both; transform-origin: 50% -60vh; }
@keyframes a8swing { 0% { transform: rotate(1.4deg); } 35% { transform: rotate(-.8deg); } 65% { transform: rotate(.35deg); } 100% { transform: rotate(0); } }
@media (max-width: 560px) { .auth-shell::after { top: -12px; } .auth8-card::after { top: 10px; } }
@media (prefers-reduced-motion: reduce) { .auth-body .auth-shell { animation: none; } .auth8-card:hover { transition: none; } }
:root[data-theme="dark"] .auth8-card::after { background: #14152A; }
/* 2026.11.17-7: the three step circles keep their round shape on iPhone */
.auth8-node { flex: 0 0 32px; min-width: 32px; min-height: 32px; aspect-ratio: 1 / 1; }
.auth8-node svg { width: 15px; height: 15px; flex: none; }
.auth8-steps { flex-wrap: nowrap; max-width: 100%; }
