:root { color-scheme:light; font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; color:#242832; background:#f8f9fb; font-synthesis:none; }
* { box-sizing:border-box; }
body { margin:0; min-width:300px; }
button,input { font:inherit; }
button { cursor:pointer; }
[hidden] { display:none!important; }
.auth-page { width:100%; max-width:460px; margin:0 auto; padding:48px 20px 28px; }
.brand { display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:28px; font-size:20px; font-weight:650; letter-spacing:.02em; }
.brand-mark { width:35px; height:35px; flex:none; }
.brand-mark path { stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.candle-up { stroke:#089981; fill:#089981; }
.candle-down { stroke:#e53935; fill:#e53935; }
.brand small { display:block; margin-top:5px; font-size:11px; font-weight:400; color:#77808f; letter-spacing:.04em; }
.auth-card { padding:30px; background:#fff; border:1px solid #e3e7ed; border-radius:12px; box-shadow:0 8px 30px #1f2b4410; }
.auth-heading h1 { margin:0 0 9px; font-size:24px; line-height:1.4; font-weight:650; letter-spacing:-.02em; }
.auth-heading p { margin:0; color:#727b89; font-size:13px; line-height:1.7; }
.auth-tabs { display:flex; margin:24px 0; border-bottom:1px solid #e5e8ee; }
.auth-tabs button { flex:1; position:relative; min-height:42px; padding:8px; border:0; background:transparent; color:#77808f; font-size:14px; font-weight:600; }
.auth-tabs button[aria-selected="true"] { color:#2962ff; }
.auth-tabs button[aria-selected="true"]::after { content:""; position:absolute; bottom:-1px; height:2px; left:12px; right:12px; background:#2962ff; border-radius:2px; }
.auth-form { display:grid; gap:17px; }
.field { display:grid; gap:7px; min-width:0; }
.field label { font-size:13px; font-weight:550; color:#424a57; }
.field input { width:100%; min-width:0; height:43px; padding:10px 12px; border:1px solid #d8dee8; border-radius:6px; background:#fff; color:#222a35; font-size:14px; outline:none; transition:border-color .12s,box-shadow .12s; }
.field input::placeholder { color:#a0a7b2; }
.field input:focus { border-color:#2962ff; box-shadow:0 0 0 3px #2962ff12; }
.field input[aria-invalid="true"] { border-color:#d3423c; }
.field small { color:#858d9b; font-size:11px; line-height:1.6; }
.password-field { display:flex; position:relative; }
.password-field input { padding-right:58px; }
.password-toggle { position:absolute; right:4px; top:4px; bottom:4px; padding:0 9px; border:0; border-radius:4px; background:transparent; color:#6c7788; font-size:12px; }
.password-toggle:hover { color:#2962ff; background:#f3f6fd; }
.auth-submit { min-height:44px; padding:11px 14px; border:1px solid #2962ff; border-radius:6px; background:#2962ff; color:#fff; font-size:14px; font-weight:600; }
.auth-submit:hover { background:#2456e0; }
button:focus-visible { outline:2px solid #2962ff; outline-offset:3px; }
button:disabled { cursor:wait; opacity:.6; }
input:disabled { opacity:.8; background:#fafbfc; }
.form-message { margin:0; color:#d3423c; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.form-message:empty { display:none; }
.form-message[data-kind="progress"] { color:#69778c; }
.form-footnote { margin:0; text-align:center; font-size:12px; color:#89919e; line-height:1.7; }
.auth-footer { margin-top:22px; text-align:center; color:#929aa6; font-size:11px; line-height:1.9; }
.no-script { margin:20px 0 0; font-size:13px; color:#d3423c; line-height:1.7; }
@media (max-width:480px) { .auth-page { padding:30px 16px 22px; } .auth-card { padding:24px; } .brand { margin-bottom:22px; } }
@media (prefers-reduced-motion:reduce) { .field input { transition:none; } }

@media (max-width:760px), (pointer:coarse) {
  body { min-height:100vh; min-height:100dvh; }
  .auth-page { padding:max(28px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
  .auth-card { padding:22px; }
  .auth-tabs button { min-height:48px; }
  .field input { height:48px; font-size:16px; scroll-margin-block:90px 24px; }
  .field small { font-size:12px; }
  .password-toggle { top:2px; bottom:2px; right:2px; min-width:48px; padding-inline:10px; font-size:13px; }
  .auth-submit { min-height:48px; font-size:16px; }
  .auth-footer { padding-bottom:env(safe-area-inset-bottom); }
}
@media (max-width:360px) {
  .auth-page { padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right)); }
  .auth-card { padding:18px; }
  .brand { font-size:18px; }
}
@media (max-height:500px) and (pointer:coarse) {
  .auth-page { padding-top:max(12px,env(safe-area-inset-top)); }
  .brand { margin-bottom:16px; }
  .auth-heading h1 { font-size:22px; }
}
