/* aether-web — css/auth.css (Auth SIWE шаг 2). Scoped auth-* / #auth-* — no collisions.
   Palette from MOCKUP_auth_design.html (blue #5B8DFF accent). */

/* fonts — use our canon Inter everywhere (buttons/inputs don't inherit font-family by default).
   .pf-mono spans keep their JetBrains Mono (own rule). */
.hdr-auth,.auth-overlay,.auth-dd{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;}
.hdr-auth button,.auth-overlay button,.auth-overlay input,.auth-dd button,.auth-dd-item,.auth-dd-add{font-family:inherit;}

/* header slot */
.hdr-auth{display:flex;align-items:center;gap:9px;}
.auth-login-btn{font-size:13px;color:#EAF0F6;background:none;border:none;cursor:pointer;font-weight:500;}
.auth-signup-btn{font-size:13px;font-weight:600;background:linear-gradient(135deg,#4A7BF0,#7FA8FF);color:#fff;border:none;border-radius:9px;padding:8px 15px;cursor:pointer;}
.auth-chip{display:flex;align-items:center;gap:9px;background:#090D12;border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:4px 10px 4px 5px;cursor:pointer;}
.auth-av{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#4A7BF0,#7FA8FF);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff;flex-shrink:0;overflow:hidden;}
.auth-av .user-ic,.auth-dd-av .user-ic,.auth-acc-av .user-ic{width:60%;height:60%;display:block;transform:translateY(7%)}   /* T14: белый силуэт юзера в круге (currentColor=#fff), ~60% диаметра, чуть ниже оптического центра */
.auth-chip-info{display:flex;flex-direction:column;line-height:1.1;}
.auth-chip-info .nm{font-size:12.5px;font-weight:600;color:#EAF0F6;}
.auth-chip-info .ad{font-size:10px;color:#67768A;}
.auth-chip .chev{color:#67768A;font-size:10px;}
@media(max-width:760px){.auth-chip-info{display:none;}}

/* overlay + modal */
.auth-overlay{position:fixed;inset:0;background:rgba(5,8,12,.72);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;z-index:10000;padding:20px;}
/* FIX-wallet-cta-modal v2 (канон E): фоновый radial-глоу сине-янтарный сверху модалки (слой фона — за контентом, без z-index/скролл-рисков) */
.auth-modal{width:380px;max-width:100%;background:#161F2B;border:1px solid rgba(255,255,255,.09);border-radius:18px;padding:28px;box-shadow:0 24px 60px rgba(0,0,0,.5);position:relative;color:#EAF0F6;font-family:'Inter',sans-serif;max-height:92vh;overflow:auto;}
.auth-x{position:absolute;top:14px;right:14px;background:none;border:none;color:#67768A;font-size:16px;cursor:pointer;}
/* FIX-wallet-cta-modal v2 (канон E): знак EXOS в скруглённом квадрате 52px, синий градиент + мягкий глоу; знак белым (asset — синий градиент, на синем квадрате нужен инверт) */
/* Kamron 22.07: убран квадрат-подложка и глоу — просто наша градиентная иконка (exos-mark со своим градиентом) */
.auth-mlogo{width:56px;height:56px;display:flex;align-items:center;justify-content:center;margin:0 auto 12px}
.auth-mlogo img{width:56px;height:56px;object-fit:contain}
.auth-mt{text-align:center;font-size:19px;font-weight:700;letter-spacing:-.3px;margin-bottom:4px;}
.auth-msub{text-align:center;font-size:12.5px;color:#AEB9C8;margin-bottom:22px;}
.auth-google{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;background:#090D12;border:1px solid rgba(255,255,255,.06);border-radius:11px;padding:13px;font-size:13.5px;font-weight:600;color:#8A99AC;cursor:not-allowed;position:relative;opacity:.7;}
.auth-google .soon{position:absolute;right:12px;font-size:8.5px;color:#F7B955;border:1px solid rgba(247,185,85,.3);border-radius:4px;padding:1px 6px;font-weight:600;}
/* 10a: GIS button wrapper. color-scheme:light removes the GIS dark-theme white halo around the
   iframe (CSS can't reach inside the iframe — only color-scheme on the wrapper helps). Centered,
   reserved height to avoid a layout jump before GIS renders, and the same vertical rhythm as the
   email/tabs block below (the official Google button is rendered at width=324 to match the
   100%-wide fields). */
#auth-google-slot{color-scheme:light;display:flex;justify-content:center;align-items:center;min-height:44px;margin:4px 0 14px;}
.auth-or{display:flex;align-items:center;gap:12px;margin:18px 0;color:#67768A;font-size:11px;}
.auth-or::before,.auth-or::after{content:'';flex:1;height:1px;background:rgba(255,255,255,.06);}
.auth-email{display:flex;gap:8px;margin-bottom:12px;}
.auth-email input{flex:1;background:#090D12;border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:12px 13px;color:#EAF0F6;font-size:13px;outline:none;}
.auth-email input::placeholder,#auth-pw-in::placeholder{color:#67768A;}
.auth-email button,.auth-pw-btns button{background:linear-gradient(135deg,#4A7BF0,#7FA8FF);color:#fff;border:none;border-radius:10px;padding:0 16px;font-size:13px;font-weight:700;cursor:pointer;}
#auth-pw-in{background:#090D12;border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:12px 13px;color:#EAF0F6;font-size:13px;outline:none;margin-bottom:8px;}
.auth-pw-btns{display:flex;gap:8px;margin-bottom:8px;}
.auth-pw-btns button{flex:1;padding:11px 0;}
.auth-pw-btns button.ghost{background:transparent;border:1px solid rgba(255,255,255,.09);color:#EAF0F6;}
.auth-login-form{display:flex;flex-direction:column;gap:8px;margin-top:4px;}
.auth-login-form input{background:#090D12;border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:12px 13px;color:#EAF0F6;font-size:13px;outline:none;}
.auth-login-form input::placeholder{color:#67768A;}
.auth-login-form button{background:linear-gradient(135deg,#4A7BF0,#7FA8FF);color:#fff;border:none;border-radius:10px;padding:11px;font-size:13px;font-weight:700;cursor:pointer;}
.auth-err{color:#f87171;font-size:11.5px;min-height:14px;margin:8px 0;text-align:center;}
.auth-err a{color:#5B8DFF;}
.auth-err.is-note{color:#8A99AC;}   /* neutral progress (e.g. “Sending code…”) */
.auth-err.is-ok{color:#3DDC97;}     /* success (e.g. “A new code was sent.”) */
.auth-wlabel{font-size:10.5px;color:#67768A;letter-spacing:.5px;margin-bottom:10px;text-transform:uppercase;}
/* Login wallet tiles переехали на общий .auth-add-grid / .auth-aw (см. add-wallet ниже) — старые
   .auth-wallets / .auth-w* удалены: login и add-wallet теперь рендерятся одним _renderWalletGrid. */

/* email-section tabs (login | register) */
.auth-tabs{display:flex;gap:6px;background:#090D12;border:1px solid rgba(255,255,255,.06);border-radius:11px;padding:4px;margin-bottom:14px;}
.auth-tab{flex:1;background:none;border:none;border-radius:8px;padding:9px 0;font-size:13px;font-weight:600;color:#8A99AC;cursor:pointer;transition:all .15s;}
.auth-tab.active{background:linear-gradient(135deg,#4A7BF0,#7FA8FF);color:#fff;}

/* shared form (login + register steps) */
/* step transition: .auth-form is re-created on every _renderTabBody → this fires the fade per step swap */
@keyframes authFade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.auth-form{display:flex;flex-direction:column;gap:9px;animation:authFade .18s ease;}
@media (prefers-reduced-motion:reduce){.auth-form{animation:none;}}
.auth-form input{background:#090D12;border:1px solid rgba(255,255,255,.06);border-radius:10px;padding:12px 13px;color:#EAF0F6;font-size:13px;outline:none;width:100%;}
.auth-form input:focus{border-color:rgba(91,141,255,.4);}
.auth-form input::placeholder{color:#67768A;}
.auth-primary-btn{background:linear-gradient(135deg,#4A7BF0,#7FA8FF);color:#fff;border:none;border-radius:10px;padding:12px;font-size:13px;font-weight:700;cursor:pointer;}
.auth-primary-btn:hover{filter:brightness(1.06);}
.auth-pw-wrap{position:relative;display:flex;}
.auth-pw-wrap input{padding-right:62px;}
.auth-pw-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:none;border:none;color:#67768A;font-size:11.5px;font-weight:600;cursor:pointer;padding:6px 8px;}
.auth-pw-toggle:hover{color:#5B8DFF;}
.auth-pw-helper{font-size:11px;color:#67768A;margin:-3px 2px 2px;}

/* register-step headings + links */
.auth-reg-title{font-size:14.5px;font-weight:700;color:#EAF0F6;margin-bottom:1px;}
.auth-reg-sub{font-size:11.5px;color:#67768A;margin-bottom:6px;line-height:1.45;}
.auth-reg-sub b{color:#8A99AC;font-weight:600;}
.auth-reg-row{display:flex;justify-content:space-between;margin-top:2px;}
.auth-link{font-size:11.5px;color:#5B8DFF;cursor:pointer;}
.auth-link:hover{text-decoration:underline;}
.auth-link.is-disabled{color:#67768A;cursor:default;pointer-events:none;text-decoration:none;}  /* resend cooldown */
.auth-dev-hint{font-size:11px;color:#F7B955;background:rgba(247,185,85,.07);border:1px solid rgba(247,185,85,.2);border-radius:8px;padding:7px 10px;}
.auth-dev-hint b{font-family:'JetBrains Mono','SFMono-Regular',monospace;letter-spacing:1px;}

/* add-wallet mini-modal (link a new wallet to the current account — NOT the login modal) */
.auth-add-modal{width:404px;text-align:center;}
.auth-add-modal .auth-msub{margin-bottom:20px;}
.auth-add-modal .auth-err{text-align:center;}
.auth-add-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;}
.auth-add-detecting{grid-column:1/-1;font-size:12px;color:#67768A;padding:16px 0;}
.auth-aw{aspect-ratio:1;background:#1A2533;border:1px solid rgba(255,255,255,.06);border-radius:15px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;cursor:pointer;transition:all .18s ease;padding:8px 4px;}
/* Все плитки ОДИНАКОВО ЯРКИЕ (без .soon-затемнения) — установлен кошелёк или нет. Hover на ВСЕХ:
   lift + scale + glow, transition .18s, cursor:pointer. Установлен/нет различается ТОЛЬКО поведением
   клика (вход/привязка vs редирект на install), не видом. Применяется к login и add-wallet (общий класс). */
.auth-aw:hover{border-color:#5B8DFF;background:#1F2B3A;transform:translateY(-2px) scale(1.03);box-shadow:0 6px 18px rgba(91,141,255,.18);}
.auth-aw .ic{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;}
.auth-aw .ic img{width:100%;height:100%;object-fit:contain;}
.auth-aw .nm{font-size:10px;font-weight:500;color:#EAF0F6;text-align:center;line-height:1.1;}
.auth-add-siwe{margin-top:14px;background:rgba(91,141,255,.06);border:1px solid rgba(91,141,255,.18);border-radius:10px;padding:9px 12px;font-size:10px;color:#8A99AC;line-height:1.5;text-align:center;}
.auth-add-siwe b{color:#5B8DFF;}
.auth-siwe-note{margin-top:14px;background:rgba(91,141,255,.05);border:1px solid rgba(91,141,255,.15);border-radius:10px;padding:9px 12px;font-size:10.5px;color:#8A99AC;line-height:1.5;}
.auth-siwe-note b{color:#5B8DFF;}
.auth-foot{text-align:center;font-size:10.5px;color:#67768A;margin-top:18px;line-height:1.5;}

/* dropdown */
.auth-dd{position:fixed;width:280px;background:#161F2B;border:1px solid rgba(255,255,255,.09);border-radius:16px;padding:8px;box-shadow:0 24px 60px rgba(0,0,0,.5);z-index:10001;color:#EAF0F6;}
.auth-dd-head{display:flex;align-items:center;gap:12px;padding:12px;}
.auth-dd-av{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#4A7BF0,#7FA8FF);display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;color:#fff;}
.auth-dd-head .nm{font-size:14px;font-weight:700;} .auth-dd-head .ad{font-size:11px;color:#67768A;}
.auth-dd-div{height:1px;background:rgba(255,255,255,.06);margin:6px 0;}
.auth-dd-wlabel{font-size:9.5px;color:#67768A;letter-spacing:1px;text-transform:uppercase;padding:8px 12px 6px;}
.auth-dd-wallet{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;}
.auth-dd-wallet:hover{background:#121C27;}
.auth-dd-wallet .wic{width:26px;height:26px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:13px;background:rgba(246,133,27,.15);}
.auth-dd-wallet .winfo{flex:1;} .auth-dd-wallet .wn{font-size:12.5px;font-weight:500;} .auth-dd-wallet .wa{font-size:10px;color:#67768A;}
.auth-dd-wallet .chk{color:#5B8DFF;font-size:13px;}
/* T15 #1: отвязать кошелёк из дропдауна — тап-зона ≥40px (confirm в JS перед удалением) */
.auth-dd-wallet .auth-dd-del{min-width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;color:#67768A;cursor:pointer;font-size:13px;border-radius:9px;flex-shrink:0;transition:color .12s,background .12s;}
.auth-dd-wallet .auth-dd-del:hover,.auth-dd-wallet .auth-dd-del:focus-visible{color:#f87171;background:rgba(248,113,113,.1);outline:none;}
.auth-dd-add{display:flex;align-items:center;gap:8px;padding:9px 12px;font-size:12px;color:#5B8DFF;cursor:pointer;border-radius:9px;}
.auth-dd-add:hover{background:#121C27;}
.auth-dd-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:9px;cursor:pointer;font-size:13px;color:#8A99AC;}
.auth-dd-item:hover{background:#121C27;color:#EAF0F6;}
.auth-dd-item.danger{color:#f87171;}

/* account panel */
.auth-account{width:720px;max-width:100%;background:#0C1219;border:1px solid rgba(255,255,255,.06);border-radius:16px;padding:28px;position:relative;color:#EAF0F6;max-height:92vh;overflow:auto;}
.auth-acc-head{display:flex;align-items:center;gap:18px;padding-bottom:22px;border-bottom:1px solid rgba(255,255,255,.06);margin-bottom:22px;}
.auth-acc-av{width:64px;height:64px;border-radius:50%;background:linear-gradient(135deg,#4A7BF0,#7FA8FF);display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;color:#fff;flex-shrink:0;}
.auth-acc-head .nm{font-size:20px;font-weight:700;} .auth-acc-head .em{font-size:13px;color:#67768A;margin-top:3px;}
.auth-acc-head .badge{font-size:10px;color:#5B8DFF;background:rgba(91,141,255,.1);border-radius:6px;padding:3px 9px;margin-left:auto;}
.auth-acc-bt{font-size:13px;font-weight:600;margin-bottom:14px;}
.auth-acc-bt .cnt{font-size:11px;color:#67768A;font-weight:400;}
.auth-wrow{display:flex;align-items:center;gap:14px;background:#121C27;border:1px solid rgba(255,255,255,.06);border-radius:12px;padding:14px 16px;margin-bottom:10px;}
.auth-wrow .wic{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:15px;background:rgba(246,133,27,.15);}
.auth-wrow .winfo{flex:1;min-width:0;} .auth-wrow .wn{font-size:14px;font-weight:600;}
/* T15 #6: адрес усечён (_short) + copy-по-тапу; сеть отдельной меткой — раньше полный адрес+сеть ломались на 3 строки (word-break:break-all) */
.auth-wrow .wa{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:3px;font-size:11.5px;padding:0;position:static;}
/* Аккаунт-правка #4 (Kamron 19.07): класс .wa коллизирует с whale-alert-рядом (components.css:767/770 —
   амбер-полоса ::before + padding:0 8px). Гасим ОБА только для аккаунт-кошелька: полоса убрана,
   padding:0 → чипы адреса/ETHEREUM встают на левое ребро слова «Primary» (.wn на 118, без 8px-сдвига).
   Глобальный .wa (киты) не тронут. */
.auth-wrow .wa::before{display:none;}
.auth-wrow .waddr{color:#8A99AC;cursor:pointer;padding:3px 8px;border-radius:6px;background:rgba(255,255,255,.04);transition:background .12s,color .12s;white-space:nowrap;}
.auth-wrow .waddr:hover,.auth-wrow .waddr:focus-visible{background:rgba(91,141,255,.14);color:#cdd8e6;outline:none;}
.auth-wrow .waddr.ok{color:#3DDC97;background:rgba(61,220,151,.14);}
.auth-wrow .wnet{font-size:9.5px;text-transform:uppercase;letter-spacing:.05em;color:#67768A;border:1px solid rgba(255,255,255,.1);border-radius:5px;padding:2px 7px;}
.auth-wrow .pri{font-size:9.5px;color:#5B8DFF;border:1px solid rgba(91,141,255,.3);border-radius:5px;padding:3px 9px;}
.auth-wrow .setpri{font-size:11px;color:#5B8DFF;cursor:pointer;}
.auth-wrow .auth-wdel{font-size:13px;color:#67768A;cursor:pointer;flex-shrink:0;min-width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;}   /* T15 #1: тап-зона ≥40px */
.auth-wrow .auth-wdel:hover,.auth-wrow .auth-wdel:focus-visible{background:rgba(248,113,113,.1);outline:none;}
.auth-wrow .auth-wdel:hover{color:#f87171;}
.auth-acc-add{display:flex;align-items:center;justify-content:center;gap:9px;background:none;border:1px dashed rgba(255,255,255,.09);border-radius:12px;padding:14px;width:100%;color:#5B8DFF;font-size:13px;font-weight:500;cursor:pointer;margin-top:4px;}
/* Аккаунт-правки #1/#2 (Kamron 19.07): базовые правила выше ставят display:flex → перебивают HTML-атрибут
   [hidden]. Селектор [hidden] (спец. 0,2,0 > 0,1,0) чинит без !important: скрытие Add-wallet/Connect-another
   при подключённом кошельке реально работает. КОРЕНЬ прошлого промаха «спрятал, а видно». */
.auth-dd-add[hidden],.auth-acc-add[hidden]{display:none;}
.auth-set-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-top:1px solid rgba(255,255,255,.06);font-size:13.5px;}
.auth-set-row .lbl{flex:1;} .auth-set-row .val{color:#67768A;font-size:12.5px;}
.auth-acc-note{margin-top:14px;font-size:11.5px;color:#F7B955;}

/* T15/B2: модал смены пароля (3 шага) + кликабельная строка настроек */
.auth-set-act{cursor:pointer;} .auth-set-act:hover,.auth-set-act:focus-visible{background:rgba(255,255,255,.03);outline:none;} .auth-set-act .val{color:#5B8DFF;font-size:16px;}
.auth-cp{position:relative;width:min(92vw,380px);background:#151A22;border:1px solid #232A36;border-radius:16px;padding:26px 22px 22px;display:flex;flex-direction:column;gap:12px;}
.auth-cp .auth-x{position:absolute;top:14px;right:14px;background:none;border:0;color:#67768A;font-size:15px;cursor:pointer;}
.auth-cp-title{font-size:18px;font-weight:700;color:#E6E9EF;margin:0 0 4px;}
.auth-cp-in{width:100%;box-sizing:border-box;background:#0E1320;border:1px solid #2B3340;border-radius:10px;padding:13px 14px;color:#E6E9EF;font-size:14px;outline:none;}
.auth-cp-in:focus{border-color:#5B8DFF;}
.auth-cp-code{letter-spacing:6px;text-align:center;font-family:'JetBrains Mono',monospace;font-size:18px;}
.auth-cp-btn{width:100%;background:#5B8DFF;color:#0B0E13;border:0;border-radius:10px;padding:14px;font-size:14px;font-weight:700;cursor:pointer;}
.auth-cp-btn:hover{background:#6f9bff;}
.auth-cp-link{background:none;border:0;color:#5B8DFF;font-size:13px;cursor:pointer;padding:6px;align-self:center;}
.auth-cp-link:disabled{color:#5B6373;cursor:default;}
.auth-cp-hint{font-size:13px;line-height:19px;color:#8A93A6;}
.auth-cp-done{font-size:16px;font-weight:700;color:#3DDC97;}
.auth-cp-err{font-size:12.5px;color:#f87171;min-height:16px;}
