/* TSK-089: sign-in / register pop-up (public/auth-modal.js). */
.tk-auth-modal{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #50606b;border-radius:18px;background:#14212a;color:#eef5f7;box-shadow:0 30px 70px #000a;overflow:auto}
.tk-auth-modal::backdrop{background:#050806cc}
html.tk-auth-open{overflow:hidden}
.tk-auth-panel{position:relative;display:grid;gap:14px;padding:26px 24px 22px}
.tk-auth-panel h2{margin:0;padding-right:40px;font-size:1.45rem;letter-spacing:-.02em}
.tk-auth-panel h3{margin:0;font-size:1.05rem}
.tk-auth-reason{margin:-6px 0 0;color:#c4d1d6;line-height:1.45}
.tk-auth-close{position:absolute;top:12px;right:12px;width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:#eef5f7;font-size:1.7rem;line-height:1;cursor:pointer}
.tk-auth-close:hover{background:#25343e}
.tk-auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:12px;background:#0d171d}
.tk-auth-tabs [hidden]{display:none}
.tk-auth-tabs:has([hidden]){grid-template-columns:1fr}
.tk-auth-tabs button{min-height:42px;border:0;border-radius:9px;background:transparent;color:#c4d1d6;font:inherit;font-weight:800;cursor:pointer}
.tk-auth-tabs button[aria-selected=true]{background:#cfff4b;color:#10150d}
.tk-auth-form{display:grid;gap:12px}
.tk-auth-form[hidden],.tk-auth-social[hidden],.tk-auth-alt[hidden],.tk-auth-alt [hidden]{display:none}
.tk-auth-alt{display:grid;gap:8px}
.tk-auth-alt .tk-auth-or{margin:0 0 4px}
.tk-auth-alt .tk-button{width:100%;box-sizing:border-box;justify-content:center;text-align:center}
.tk-auth-form label{display:grid;gap:6px;font-weight:700;font-size:.92rem}
.tk-auth-form input{width:100%;box-sizing:border-box;min-height:46px;padding:10px 12px;border:1px solid #66737c;border-radius:10px;background:#0f1a21;color:#f5fafb;font:inherit}
.tk-auth-password{position:relative;display:block}
.tk-auth-password input{padding-right:52px}
.tk-auth-eye{position:absolute;top:50%;right:4px;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:44px;height:40px;border:0;border-radius:8px;background:transparent;color:#c4d1d6;cursor:pointer}
.tk-auth-eye .tk-eye-closed,.tk-auth-eye[aria-pressed=true] .tk-eye-open{display:none}
.tk-auth-eye[aria-pressed=true] .tk-eye-closed{display:block}
.tk-auth-form .tk-button{width:100%}
.tk-auth-link{justify-self:start;min-height:44px;padding:0 2px;border:0;background:none;color:#e2ffa0;font:inherit;font-weight:700;text-decoration:underline;cursor:pointer}
.tk-auth-hint{margin:0;color:#b6c3c8;font-size:.88rem;line-height:1.45}
.tk-auth-status{margin:0;font-size:.92rem;line-height:1.45;color:#dcf6ed}
.tk-auth-status:empty{display:none}
.tk-auth-status.error{color:#ffb4a6}
.tk-auth-or{display:flex;align-items:center;gap:12px;margin:0 0 12px;color:#9fb0b7;font-size:.85rem}
.tk-auth-or::before,.tk-auth-or::after{content:"";flex:1;border-top:1px solid #3d525c}
.tk-auth-providers{display:grid;gap:10px}
.tk-auth-provider{width:100%;justify-content:center;gap:10px}
.tk-auth-provider img{width:22px;height:22px;object-fit:contain}
.tk-auth-foot{margin:0;color:#9fb0b7;font-size:.8rem}
.tk-auth-foot a{color:inherit}
.tk-auth-modal :is(input,button,a):focus-visible{outline:3px solid #cfff4b;outline-offset:2px}
.tk-auth-toast{position:fixed;z-index:2147483000;left:50%;bottom:24px;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:12px 18px;border-radius:12px;background:#cfff4b;color:#10150d;font-weight:800;box-shadow:0 14px 36px #0008;transition:opacity .5s,transform .5s}
.tk-auth-toast.out{opacity:0;transform:translate(-50%,10px)}
@media(max-width:480px){.tk-auth-panel{padding:22px 16px 18px}}
html[data-color-mode=light] .tk-auth-modal{background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:0 30px 70px #263c2540}
html[data-color-mode=light] .tk-auth-modal::backdrop{background:#17272099}
html[data-color-mode=light] :is(.tk-auth-reason,.tk-auth-hint,.tk-auth-or,.tk-auth-foot,.tk-auth-eye){color:var(--soft)}
html[data-color-mode=light] .tk-auth-close{color:var(--ink)}
html[data-color-mode=light] .tk-auth-close:hover{background:var(--subtle)}
html[data-color-mode=light] .tk-auth-tabs{background:var(--subtle)}
html[data-color-mode=light] .tk-auth-tabs button{color:var(--soft)}
html[data-color-mode=light] .tk-auth-tabs button[aria-selected=true]{background:#38631a;color:#fff}
html[data-color-mode=light] .tk-auth-form input{background:var(--surface);color:var(--ink);border-color:#8ca394}
html[data-color-mode=light] .tk-auth-form .tk-button{background:#38631a;color:#fff;border-color:#38631a}
html[data-color-mode=light] .tk-auth-form .tk-button:hover{background:#2c4f14;color:#fff}
html[data-color-mode=light] .tk-auth-link{color:var(--accent)}
html[data-color-mode=light] .tk-auth-status{color:var(--ink)}
html[data-color-mode=light] .tk-auth-status.error{color:#a12a14}
html[data-color-mode=light] .tk-auth-or::before,html[data-color-mode=light] .tk-auth-or::after{border-top-color:var(--line)}
html[data-color-mode=light] .tk-auth-modal :is(input,button,a):focus-visible{outline-color:var(--accent)}
html[data-color-mode=light] .tk-auth-toast{background:#38631a;color:#fff}
