/* mixProject User Panel — sign-in screen.
   The auth block lifted verbatim from projectspanel.html. Everything else this
   screen needs — the colour tokens, .btn/.btn.primary, .toasts/.toast and
   .brandlogo — already lives in css/panel.css, which index.html (the sign-in page) loads first;
   only the handful of rules panel.css does not carry are repeated here.

   .fld IS SCOPED ON PURPOSE. panel.css uses .fld for a flex field GROUP, while
   this screen (and projectspanel.html) uses it for the input itself. Scoping the
   input rules under .auth-screen lets both meanings coexist without touching
   panel.css, which the panel pages depend on. */

@keyframes pop{from{opacity:0;transform:scale(.97) translateY(6px)}to{opacity:1;transform:none}}

/* From projectspanel.html's base layer — not present in panel.css. */
.icon-btn{width:38px;height:38px;border-radius:11px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink-2);display:grid;place-items:center;position:relative;transition:.18s}
.icon-btn:hover{background:var(--surface);color:var(--primary);border-color:var(--primary-line)}
.auth-screen .av{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font:700 9.5px/1 var(--ff);color:#fff;border:2px solid var(--surface);flex:0 0 auto}
.auth-screen .fld-l{font:700 11px/1 var(--ff);color:var(--ink-2);margin-bottom:6px;display:block}
.auth-screen .fld{display:block;width:100%;height:38px;padding:0 12px;border-radius:9px;border:1px solid var(--line-2);background:var(--surface-2);color:var(--ink);font:500 13px/1 var(--ff);outline:none}
.auth-screen .fld:focus{border-color:var(--primary)}

/* ════════ AUTH / SIGN-IN ════════ */
body.pre-auth .hdr,body.pre-auth .page-wrap{display:none}
body:not(.pre-auth) .auth-screen{display:none}
.auth-screen{position:fixed;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;padding:24px 24px 76px;overflow-y:auto;
  background:radial-gradient(1000px 560px at 10% -8%,var(--primary-soft),transparent 60%),radial-gradient(820px 460px at 108% 112%,var(--violet-soft),transparent 55%),var(--bg);}
.auth-theme{position:fixed;top:18px;right:20px}
#authCard{width:100%}
.auth-card{width:100%;max-width:432px;margin:0 auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--r3);box-shadow:var(--sh-card);padding:40px 38px 34px;animation:pop .2s ease}
.auth-brand{display:flex;align-items:center;justify-content:center;margin-bottom:24px}
.auth-brand img{height:40px}
.auth-badge{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;margin:0 auto 20px;background:linear-gradient(165deg,var(--primary-soft),var(--surface-2));border:1px solid var(--primary-line);color:var(--primary)}
.auth-badge svg{width:24px;height:24px}
.auth-success-ic{width:60px;height:60px;border-radius:50%;background:var(--green-soft);border:1px solid var(--green-line);color:var(--green);display:grid;place-items:center;margin:0 auto 20px;animation:pop .3s ease}
.auth-success-ic svg{width:28px;height:28px}
.auth-h1{font:800 22px/1.25 var(--fh);color:var(--ink);text-align:center}
.auth-sub{font:500 13px/1.55 var(--ff);color:var(--ink-3);text-align:center;margin-top:8px}
.auth-sub b{color:var(--ink-2);font-weight:700}
.auth-body{margin-top:28px;display:flex;flex-direction:column;gap:18px}
.auth-fld{display:flex;flex-direction:column;gap:8px}
.auth-fld .fld{height:44px;font-size:13.5px}
.auth-fld .fld.err{border-color:var(--red);background:var(--red-soft)}
.auth-fld .fld.otp{text-align:center;letter-spacing:.5em;font:700 17px/1 var(--fh);padding-left:8px}
.auth-err{display:flex;align-items:center;gap:6px;font:600 11.5px/1.4 var(--ff);color:var(--red)}
.auth-err svg{width:13px;height:13px;flex:0 0 auto}
.auth-pwwrap{position:relative}
.auth-pwwrap .fld{padding-right:42px}
.auth-eye{position:absolute;right:4px;top:4px;width:36px;height:36px;border-radius:8px;display:grid;place-items:center;color:var(--ink-3);cursor:pointer;transition:.14s}
.auth-eye:hover{color:var(--primary);background:var(--surface-3)}
.auth-eye.on{color:var(--primary)}
.auth-eye svg{width:16px;height:16px}
.auth-chip{display:flex;align-items:center;gap:11px;padding:11px 13px;border-radius:12px;border:1px solid var(--line-2);background:var(--surface-2)}
.auth-chip .av{margin:0;width:28px;height:28px;font-size:10.5px}
.auth-chip-tx{flex:1;min-width:0;font:700 12.5px/1.3 var(--ff);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.auth-chip-change{font:700 11.5px/1 var(--ff);color:var(--primary);cursor:pointer;flex:0 0 auto}
.auth-chip-change:hover{text-decoration:underline}
.auth-hint{display:flex;align-items:flex-start;gap:9px;padding:12px 14px;border-radius:11px;background:var(--primary-soft);border:1px solid var(--primary-line);font:500 11.5px/1.5 var(--ff);color:var(--ink-2)}
.auth-hint svg{width:14px;height:14px;color:var(--primary);flex:0 0 auto;margin-top:1px}
.auth-hint b{color:var(--ink);font-weight:700}
.auth-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
.auth-link{font:700 12.5px/1 var(--ff);color:var(--primary);cursor:pointer}
.auth-link:hover{text-decoration:underline}
.auth-link.muted{color:var(--ink-3)}
.auth-link.muted:hover{color:var(--ink-2)}
/* Resend, while its cooldown is still running — see startResendCountdown(). */
.auth-link.is-disabled{color:var(--ink-4);cursor:default;pointer-events:none}
.auth-link.is-disabled:hover{text-decoration:none}
.btn.block{width:100%}
.auth-req{display:flex;flex-direction:column;gap:10px;padding:14px 15px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line)}
.auth-req-row{display:flex;align-items:center;gap:8px;font:600 11.5px/1 var(--ff);color:var(--ink-4);transition:.15s}
.auth-req-row .dot{width:16px;height:16px;border-radius:50%;border:1.5px solid var(--line-2);display:grid;place-items:center;flex:0 0 auto;transition:.15s}
.auth-req-row .dot svg{width:9px;height:9px;opacity:0;color:#fff}
.auth-req-row.ok{color:var(--ink)}
.auth-req-row.ok .dot{background:var(--green);border-color:var(--green)}
.auth-req-row.ok .dot svg{opacity:1}
.auth-meter{height:6px;border-radius:4px;background:var(--surface-3);overflow:hidden;margin-top:4px}
.auth-meter i{display:block;height:100%;border-radius:4px;width:0%;transition:.25s}
.auth-meter-lbl{font:700 10.5px/1 var(--ff);color:var(--ink-4);margin-top:6px;text-align:right}
.auth-foot-note{text-align:center;font:600 12px/1.5 var(--ff);color:var(--ink-3);margin-top:26px}
.auth-foot-note b{color:var(--ink-2)}
.auth-demo{position:fixed;left:0;right:0;bottom:0;z-index:15;display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(10px);border-top:1px solid var(--line);font:600 11px/1.4 var(--ff);color:var(--ink-3);flex-wrap:wrap;text-align:center}
.auth-demo svg{width:13px;height:13px;vertical-align:-2px;color:var(--primary)}
.auth-demo b{color:var(--ink-2)}
.auth-demo button{font:700 11px/1 var(--ff);color:var(--primary);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.auth-demo button:hover{color:var(--primary-3)}
.auth-demo .sep{color:var(--line-2)}
@media(max-width:480px){.auth-card{padding:30px 22px 26px}.auth-screen{padding:16px 16px 70px}}
