/* Аккаунт и вход (этап 4, 30.11.2026). Все цвета — токены темы (тёмная/светлая), вёрстка окна — по макету входа (вход/финал), на телефоне — нижняя шторка. */
.ac-veil { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ac-veil[hidden] { display: none; }
.ac-modal { position: relative; width: 430px; max-width: calc(100% - 24px); max-height: calc(100vh - 24px); overflow-y: auto; padding: 36px 36px 26px; background: var(--pan); color: var(--ink); border: 0; border-top: 1px solid var(--gold); border-radius: 0 0 18px 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); font-family: var(--font); font-weight: 300; animation: pop 150ms ease-out; }
.ac-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 0; border-radius: 50%; color: var(--mute); font-size: 22px; line-height: 1; cursor: pointer; }
.ac-x:hover { color: var(--ink); }
.ac-pane { display: none; flex-direction: column; gap: 20px; }
.ac-pane.on { display: flex; }
.ac-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--gold); font-weight: 400; }
.ac-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
.ac-modal h3 { margin: 8px 0 0; font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.ac-modal h3 em { font-style: normal; color: var(--gold); }
.ac-lead { margin: 10px 0 0; color: var(--mute); font-size: 14px; }
.ac-lead b { color: var(--ink); font-weight: 400; }
.ac-perk { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 13px; }
.ac-perk .ico { color: var(--gold); flex: none; width: 18px; height: 18px; }
.ac-stack { display: flex; flex-direction: column; gap: 14px; }
.ac-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 8px; background: var(--gold); color: var(--on-gold); font: 500 15px var(--font); cursor: pointer; transition: filter var(--t), background var(--t); }
.ac-btn:hover { filter: brightness(1.08); }
.ac-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.ac-btn .ico { width: 18px; height: 18px; }
.ac-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.ac-btn.ghost:hover { border-color: var(--gold); color: var(--gold); filter: none; }
.ac-alt { text-align: center; font-size: 13.5px; color: var(--mute); margin: 0; }
.ac-link { display: inline; padding: 0 0 1px; background: none; border: 0; border-bottom: 1px solid var(--gold); color: var(--ink); font: inherit; font-weight: 400; cursor: pointer; }
.ac-link:hover { color: var(--gold); }
.ac-legal { margin: 0; font-size: 12px; line-height: 1.55; color: var(--mute); }
.ac-legal a { color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.ac-legal a:hover { color: var(--gold); }
.ac-lbl { display: block; font-size: 12.5px; color: var(--mute); margin-bottom: 4px; }
.ac-field { width: 100%; height: 46px; padding: 0; border: 0; border-bottom: 1px solid var(--line4, var(--line)); border-radius: 0; background: transparent; color: var(--ink); font: 300 18px var(--font); outline: 0; transition: border-color var(--t); }
.ac-field:focus { border-bottom: 2px solid var(--gold); }
.ac-field.bad { border-bottom: 2px solid var(--dn); }
.ac-field::placeholder { color: var(--dim); }
.ac-err { display: none; align-items: flex-start; gap: 8px; margin-top: 10px; color: var(--dn-text); font-size: 13.5px; line-height: 1.45; font-weight: 400; }
.ac-err.on { display: flex; }
.ac-err .ico { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.ac-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.ac-steps li { counter-increment: s; display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.ac-steps li:last-child { border: 0; }
.ac-steps li::before { content: "0" counter(s); color: var(--gold); font-size: 12.5px; font-weight: 400; }
.ac-steps b { font-weight: 500; }
.ac-num { align-self: center; min-width: 96px; padding: 6px 22px; text-align: center; font: 600 44px/1.15 var(--font); letter-spacing: .04em; color: var(--gold); border: 1px solid var(--line); border-radius: 12px; font-variant-numeric: tabular-nums; }
.ac-wait { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--mute); }
.ac-wait b { color: var(--ink); font-weight: 400; }
.ac-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line); border-top-color: var(--gold); animation: ac-sp 1s linear infinite; }
@keyframes ac-sp { to { transform: rotate(360deg); } }
.ac-cells { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ac-cell { height: 58px; display: grid; place-items: center; border-bottom: 1px solid var(--line4, var(--line)); font-size: 28px; font-weight: 500; }
.ac-cell.focus { border-bottom: 2px solid var(--gold); }
.ac-cell.focus:empty::after { content: ""; width: 2px; height: 28px; background: var(--gold); animation: ac-bl 1s steps(1) infinite; }
@keyframes ac-bl { 50% { opacity: 0; } }
.ac-cells.bad .ac-cell { border-bottom-color: var(--dn); color: var(--dn-text); }
.ac-cells input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: text; font-size: 16px; }
.ac-row2 { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--mute); }
.ac-row2 b { color: var(--ink); font-weight: 400; }
.ac-ok { width: 84px; height: 84px; margin: 0 auto; display: grid; place-items: center; border: 1px solid var(--up); border-radius: 50%; color: var(--up); }
.ac-ok .ico { width: 36px; height: 36px; }
.ac-center { text-align: center; }
.ac-dev { padding: 10px 12px; border: 1px dashed var(--gold); border-radius: 8px; font-size: 12.5px; line-height: 1.5; color: var(--mute); }
.ac-dev b { color: var(--ink); font-weight: 500; letter-spacing: .08em; }
.ac-dev button { margin-top: 6px; }
.ac-note { text-align: center; font-size: 12.5px; color: var(--mute); }
/* меню аккаунта — формат TradingView в нашем стиле (04.12.2026) */
.ctx.ac-menu { width: 288px; max-width: calc(100vw - 16px); padding: 8px; display: block; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
:root[data-theme="light"] .ctx.ac-menu { box-shadow: 0 14px 36px rgba(27, 42, 34, .18); }
.ac-menu .am-head { display: flex; align-items: center; gap: 9px; padding: 6px 8px 10px; }
.ac-menu .am-head img { height: 24px; width: auto; } /* 04.12: знак не квадратный (43:26) — не сплющивать */
.ac-menu .am-head b { font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.ac-menu .am-plan { margin-left: auto; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.ac-menu .am-plan.pro { border-color: var(--gold); background: var(--gold); color: var(--on-gold); }
.ac-menu .am-card { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 6px; border: 1px solid var(--gold); border-radius: 12px; background: color-mix(in srgb, var(--gold) 6%, transparent); }
.ac-menu button.am-ava { position: relative; flex: none; width: 46px; height: 46px; padding: 0; border-radius: 50%; overflow: visible; }
.ac-menu button.am-ava:hover { background: none; }
.am-ava img, .am-ava .am-ini { display: block; width: 46px; height: 46px; border-radius: 50%; }
.am-ava .am-ini { display: grid; place-items: center; background: var(--pan2); border: 1px solid var(--gold); color: var(--gold); font-size: 19px; font-weight: 600; box-sizing: border-box; }
.am-ava .am-edit { position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--on-gold); border: 2px solid var(--pan); }
.am-ava .am-edit .ico { width: 11px; height: 11px; }
.am-ava:hover img, .am-ava:hover .am-ini { box-shadow: 0 0 0 2px var(--gold); }
.ac-menu .am-id { display: grid; gap: 3px; min-width: 0; }
.ac-menu .am-id b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-menu .am-st { font-size: 11.5px; color: var(--mute); }
.ac-menu .am-st[data-sync="idle"] { color: var(--up); }
.ac-menu .am-st[data-sync="error"] { color: var(--dn-text); }
.ac-menu .am-pick { padding: 4px 4px 8px; }
.ac-menu .am-pick[hidden] { display: none; }
.ac-menu .am-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 2px 2px 8px; }
.ac-menu .am-grid button { width: auto; padding: 0; aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; }
.ac-menu .am-grid button:hover { background: none; border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.ac-menu .am-grid button.on { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 30%, transparent); }
.ac-menu .am-grid img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.ac-menu button.am-none { display: flex; width: 100%; box-sizing: border-box; align-items: center; justify-content: center; gap: 6px; padding: 6px; color: var(--mute); font-size: 12px; text-align: center; border: 1px dashed var(--line); border-radius: 999px; }
.ac-menu button.am-none.on { border-color: var(--gold); color: var(--gold); }
.ac-menu > button, .ac-menu > a { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-align: left; font-size: 13.5px; text-decoration: none; background: none; border: 0; cursor: pointer; font-family: var(--font); }
.ac-menu > button:hover, .ac-menu > a:hover { background: var(--pan2); }
.ac-menu > button > .ico, .ac-menu > a > .ico { flex: none; width: 19px; height: 19px; color: var(--mute); }
.ac-menu .am-t { flex: 1; }
.ac-menu .ico.am-ext { width: 15px; height: 15px; opacity: .7; }
.ac-menu .am-sw { position: relative; flex: none; width: 36px; height: 20px; border-radius: 999px; background: var(--line); transition: background .15s; }
.ac-menu .am-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.ac-menu [aria-checked="true"] .am-sw { background: var(--gold); }
.ac-menu [aria-checked="true"] .am-sw::after { transform: translateX(16px); background: var(--on-gold); }
.ac-menu > .danger, .ac-menu > .danger > .ico { color: var(--dn-text); }
.ac-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
/* аватар на кнопке «Аккаунт» в шапке */
#acctBtn .ac-ava { width: 22px; height: 22px; border-radius: 50%; margin-left: -4px; }
#acctBtn .ac-ava[hidden], #acctBtn .ico[hidden] { display: none; }
/* подвал и кнопка в левой панели графика */
.ac-foot { display: inline-flex; align-items: center; gap: 8px; }
.ac-foot button { padding: 0; border: 0; background: none; color: var(--gold); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ac-foot .ac-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.ac-foot[data-sync="idle"] .ac-dot { background: var(--up); }
.ac-foot[data-sync="busy"] .ac-dot { background: var(--gold); }
.ac-foot[data-sync="error"] .ac-dot { background: var(--dn); }
@media (max-width: 600px) {
  .ac-veil { align-items: flex-end; }
  .ac-modal { width: 100%; max-width: none; padding: 26px 18px 30px; border-radius: 18px 18px 0 0; }
  .ac-modal h3 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .ac-modal, .ac-spin { animation: none; } }
.ac-modal [hidden] { display: none !important; }
/* согласие с условиями: без отметки кнопки входа недоступны (03.12.2026) */
.ac-consent { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--mute); cursor: pointer; }
.ac-consent input { flex: none; margin: 1px 0 0; } /* вид — общий стиль галочки (style.css, 04.12.2026) */
.ac-consent a { color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.ac-consent a:hover { color: var(--gold); }
.ctx.ac-menu > button:first-of-type { padding-right: 10px; }
/* «Управление аккаунтом» (04.12.2026): мелкая серая ссылка под «Выйти» и окно с очисткой устройства / удалением */
.ac-menu > button.am-manage { display: block; width: auto; margin: 2px 0 2px 41px; padding: 4px 0; border-radius: 0; font-size: 11.5px; color: var(--mute); }
.ac-menu > button.am-manage:hover { background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.am-mg .ac-modal { width: 460px; }
.am-mg .ac-modal h3 { margin: 0 0 4px; font-size: 22px; }
.am-mg-main, .am-mg-conf { display: flex; flex-direction: column; gap: 16px; }
.am-mg-row { display: flex; align-items: center; gap: 16px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.am-mg-row > div { display: grid; gap: 4px; flex: 1; font-size: 13px; }
.am-mg-row b { font-weight: 500; }
.am-mg-row span { color: var(--mute); line-height: 1.45; }
.am-mg-row .ac-btn { width: auto; min-height: 38px; flex: none; font-size: 13.5px; padding: 0 16px; }
.am-mg .ac-btn.am-red { background: var(--dn); color: #fff; }
.am-mg-btns { display: flex; gap: 10px; justify-content: flex-end; }
.am-mg-btns .ac-btn { width: auto; min-height: 40px; }
@media (max-width: 600px) { .am-mg-row { flex-direction: column; align-items: stretch; } }

/* Фото из Telegram (04.12.2026): своя золотая рамка — у готовых аватаров она нарисована в картинке */
img.tgp { object-fit: cover; border: 2px solid var(--gold); box-sizing: border-box; background: var(--pan2); }
.ac-menu button.am-tgp { display: flex; width: 100%; box-sizing: border-box; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; margin-bottom: 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; }
.ac-menu button.am-tgp img { width: 30px; height: 30px; border-radius: 50%; }
.ac-menu button.am-tgp.on { border-color: var(--gold); color: var(--gold); }

/* 04.12.2026: источники аватара над сеткой — фото TG, своё фото, загрузка */
.ac-menu .am-srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ac-menu .am-srcs button.am-tgp { flex: 1 1 calc(50% - 3px); width: auto; margin-bottom: 0; min-width: 0; }
.ac-menu .am-srcs button.am-tgp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-menu button.am-up { justify-content: center; padding: 5px 10px; color: var(--mute); border-style: dashed; min-height: 42px; }
.ac-menu button.am-up:hover { color: var(--gold); border-color: var(--gold); }
