/* ═══════════════════════════════════════════════════════════════════════════
   Swiss+ v23 — строгий тёмный интерфейс банка.
   Последний слой стилей: сплошные поверхности вместо стекла, тонкие линии,
   один спокойный акцент, никаких свечений, переливов и размытия.
   ═══════════════════════════════════════════════════════════════════════════ */

html:not([data-theme="light"]) body.ui {
  --bg: #0A0B0D !important; --bg-2: #101114 !important;
  --surface: #131418 !important; --surface-strong: #17181D !important;
  --surface-2: #1B1D22 !important; --fill: #1F2126 !important;
  --glass-line: #24262C !important; --line: #212328 !important; --line-strong: #2E3138 !important;
  --ink: #F3F4F6 !important; --ink-2: #C9CCD2 !important; --muted: #8B9099 !important;
  --accent: #F3F4F6 !important; --on-accent: #0A0B0D !important;
  --focus: #8FB0FF !important; --blue: #8FB0FF !important; --blue-soft: rgb(143 176 255 / .10) !important;
  --up: #3DD68C !important; --green: #3DD68C !important; --down: #FF6B6B !important; --danger: #FF6B6B !important;
  --green-bg: rgb(61 214 140 / .10) !important; --err-bg: rgb(255 107 107 / .10) !important;
  --shadow: none !important; --shadow-lg: 0 24px 48px -24px rgb(0 0 0 / .8) !important;
  --blur: none !important; --ambient: none !important;
  --bar: #0D0E11; --field: #0F1013; --tab-ink: #7D828B; --plus: #9FB4E8; --btn-hover: #FFFFFF; --focus-ring: rgb(255 255 255 / .06); --field-focus: #5D6370;
  --radius: 14px; --radius-sm: 10px; --radius-card: 16px;
  background: var(--bg) !important; color: var(--ink);
  font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] { background: #0A0B0D !important; }

/* уровни клиента — только едва заметный оттенок акцента */
html body.ui.tier-silver   { --focus: #B9C2D0 !important; }
html body.ui.tier-gold     { --focus: #D9B46A !important; }
html body.ui.tier-diamond  { --focus: #A99BFF !important; }
html body.ui.tier-black    { --focus: #E8A0A8 !important; }
html body.ui.tier-platinum { --focus: #7FD3B4 !important; }

/* ── без фона-волн, зерна и цветных пятен ── */
body.ui::before, body.ui::after, html[data-theme="dark"] body.ui::after { content: none !important; display: none !important; background: none !important; }
body.ui .hh-bal::before { content: none !important; }

/* ── никакого стекла ── */
body.ui *, body.ui *::before, body.ui *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* световые кромки и блики на панелях убраны */
body.ui :is(.sheet, .panel, .tx-list, .table-wrap, .stats, .stat-grid, .inv-sum, .facts, .rcpt, .rates-line, .person, .tile, .fx, .qr-card, .quick a, .banner, .tabbar)::after,
body.ui :is(.sheet, .panel, .rcpt, .stats, .inv-sum, .facts)::before { content: none !important; }

/* ── поверхности ── */
body.ui :is(.panel, .tx-list, .table-wrap, .stats, .stat-grid, .inv-sum, .facts, .rcpt, .rates-line, .person, .tile, .fx, .qr-card, .pair, .payee-card, .kind-pick span, .drop, .chat, .pod-base) {
  background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: none !important;
  border-radius: var(--radius-card) !important;
}
body.ui .sheet { background: var(--surface-strong) !important; border: 1px solid var(--line-strong) !important; box-shadow: var(--shadow-lg) !important; }

/* ── шапка и боковое меню ── */
body.ui .topbar { background: var(--bg) !important; box-shadow: none !important; }
body.ui.scrolled .topbar { border-bottom: 1px solid var(--line) !important; }
body.ui .side { background: var(--bar) !important; border-right: 1px solid var(--line) !important; box-shadow: none !important; }
body.ui .side-nav a { border-radius: 10px; color: var(--ink-2); font-weight: 500; }
body.ui .side-nav a svg { color: var(--muted); }
body.ui .side-nav a:hover { background: var(--surface-2); }
body.ui .side-nav a.active { background: var(--fill) !important; color: var(--ink) !important; box-shadow: none !important; }
body.ui .side-nav a.active svg { color: var(--ink); }
body.ui .side-more { background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: none !important; border-radius: 12px !important; }
body.ui .side-search { background: var(--surface) !important; border: 1px solid var(--line) !important; }
body.ui .side-label { color: var(--muted); letter-spacing: .08em; }
.brand-badge { filter: none !important; border-radius: 9px; }

/* ── «Чаты»: обычная строгая кнопка ── */
.gg-glass, body .top-msgr, body .side-msgr {
  background: var(--surface) !important; border: 1px solid var(--line-strong) !important; box-shadow: none !important; color: var(--ink) !important;
}
.gg-glass::before, .gg-glass::after, body .top-msgr::before, body .top-msgr::after, body .side-msgr::before, body .side-msgr::after { content: none !important; animation: none !important; }
.gg-glass svg, body .top-msgr svg, body .side-msgr svg { filter: none !important; }
.gg-glass svg *, body .top-msgr svg *, body .side-msgr svg * { stroke: currentColor !important; }
body .top-msgr span, body .side-msgr span { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; color: inherit !important; }
body .top-msgr:hover, body .side-msgr:hover { background: var(--surface-2) !important; box-shadow: none !important; }
body .top-msgr.active, body .side-msgr.active { background: var(--fill) !important; }
body.ui .top-icon { color: var(--ink-2); }
body.ui .topbar .av, body.ui .top-right .av { box-shadow: none !important; }

/* ── нижняя панель: прикреплена к низу, сплошная ── */
.tab-pill, body.ui .tabbar .tab-pill { display: none !important; }
@media (max-width: 899px) {
  body.ui .tabbar {
    left: 0 !important; right: 0 !important; bottom: 0 !important; border-radius: 0 !important;
    height: calc(58px + env(safe-area-inset-bottom)) !important; padding: 0 4px env(safe-area-inset-bottom) !important;
    background: var(--bar) !important; border: 0 !important; border-top: 1px solid var(--line) !important; box-shadow: none !important;
  }
  body.ui .tabbar a { color: var(--tab-ink) !important; font-size: 10.5px !important; font-weight: 500 !important; }
  body.ui .tabbar a svg { width: 23px !important; height: 23px !important; stroke-width: 1.6 !important; }
  body.ui .tabbar a.active { color: var(--ink) !important; font-weight: 600 !important; }
  body.ui .tabbar a.active::before { content: none !important; }
  body.ui main.page, body.ui main.page.wide { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}

/* ── кнопки и поля ── */
body.ui .btn { border-radius: 12px !important; font-weight: 600; letter-spacing: -0.005em; box-shadow: none !important; }
body.ui .btn.sm, body.ui .btn.xs { border-radius: 10px !important; }
body.ui .btn:not(.primary):not(.dark):not(.blue) { background: var(--surface-2); border: 1px solid var(--line-strong) !important; }
body.ui .btn:not(.primary):not(.dark):not(.blue):hover { background: var(--fill); filter: none; }
body.ui .btn.primary, body.ui .btn.dark { background: var(--accent) !important; color: var(--on-accent) !important; border-color: var(--accent) !important; }
body.ui .btn.primary:hover, body.ui .btn.dark:hover { background: var(--btn-hover) !important; filter: none; }
body.ui .btn.blue { background: var(--focus) !important; color: var(--on-accent) !important; }
body.ui .btn.ghost { background: transparent !important; border-color: transparent !important; }
body.ui .input, body.ui select.input, body.ui textarea.input {
  background: var(--field) !important; border: 1px solid var(--line-strong) !important; border-radius: 12px !important; font-family: var(--font) !important; letter-spacing: 0 !important; }
body.ui .input:focus { background: var(--field) !important; border-color: var(--field-focus) !important; box-shadow: 0 0 0 3px var(--focus-ring) !important; }
body.ui label, body.ui .field > label { color: var(--muted); }

/* ── быстрые действия ── */
body.ui .quick a { background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: none !important; border-radius: 14px !important; color: var(--ink) !important; }
body.ui .quick a:hover { background: var(--surface-2) !important; transform: none !important; }
body.ui .quick a svg { color: var(--ink-2); }
body.ui .quick a.main { background: var(--accent) !important; color: var(--on-accent) !important; border-color: var(--accent) !important; }
body.ui .quick a.main svg { color: var(--on-accent); }
@media (min-width: 900px) { body.ui .quick a { border-radius: 12px !important; } }

/* ── значки операций и меню: один нейтральный стиль ── */
body.ui .av.sys.g, body.ui .av.sys.g.cat, body.ui .av.sys.g.mono, body.ui .av.sys.g.blue {
  background: var(--surface-2) !important; color: var(--ink-2) !important; border: 1px solid var(--line-strong) !important;
  box-shadow: none !important; border-radius: 12px !important; }
body.ui .av.sys.g svg { stroke-width: 1.6 !important; }
body.ui .av.sys.g.inv-fine { background: rgb(255 107 107 / .10) !important; color: var(--down) !important; border-color: rgb(255 107 107 / .25) !important; }
body.ui .av.sys:not(.g) { background: var(--fill); color: var(--ink); }

/* ── аватарки: тонкое кольцо уровня без свечения ── */
body.ui .av.ring { box-shadow: none !important; }
body.ui .av.ring:not(:has(img)) { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--ring) border-box !important; }
body.ui .av:not(.sys) { box-shadow: none; }

/* ── объявления ── */
body.ui .banner { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 12px !important; box-shadow: none !important; color: var(--ink-2); }
body.ui .banner.info::before { background: var(--focus) !important; box-shadow: none !important; }

/* ── уровень клиента ── */
body.ui .tier-chip { background: transparent !important; box-shadow: none !important; border: 1px solid currentColor; color: var(--focus) !important;
  -webkit-text-fill-color: currentColor !important; text-shadow: none !important; animation: none !important; }
body.ui .tier-chip::before, body.ui .tier-chip::after { content: none !important; }
body.ui .prog { background: var(--fill) !important; height: 4px !important; }
body.ui .prog i { background: var(--ink-2) !important; box-shadow: none !important; }

/* ── типографика ── */
body.ui h1, body.ui .page-head h1 { font-weight: 650; letter-spacing: -0.025em; }
body.ui h2, body.ui .h2 { font-weight: 600; letter-spacing: -0.015em; }
body.ui .page-head p, body.ui .muted { color: var(--muted); }
body.ui a:not(.btn):not(.rl-row):not([class*="tab"]) { text-decoration-thickness: 1px; }
body.ui .num, body.ui .amt, body.ui .bal, body.ui .money { font-variant-numeric: tabular-nums; }
body.ui .hh-bal .big, body.ui .hh-bal .amount, body.ui .hh-bal b { text-shadow: none !important; }
body.ui .up, body.ui .pos { color: var(--up); }

/* ── списки ── */
body.ui .rl-row:hover { background: var(--surface-2); }
body.ui .rl-row + .rl-row, body.ui .tx-list > * + * { border-top-color: var(--line) !important; }

/* ── без лишних анимаций: панели не «выплывают», всё на месте сразу ── */
body.ui .sr { opacity: 1 !important; transform: none !important; transition: none !important; }
body.ui .ptr { background: var(--surface-2) !important; box-shadow: none !important; color: var(--ink-2) !important; }
body.ui .ptr.ready { background: var(--fill) !important; color: var(--ink) !important; }

/* ── выпадающие окна и «Ещё» ── */
body.ui :is(.theme-pop, .sp-box, .lang-menu .menu, .dd-menu) { background: var(--surface-strong) !important; border: 1px solid var(--line-strong) !important; }

/* ═════ заставка при запуске: знак собирается — квадрат, плюс, затем четыре звезды по кругу ═════ */
html.splashing .splash { background: #0A0B0D !important; background-image: none !important;
  animation: spOut .45s cubic-bezier(.4, 0, .2, 1) 1.8s forwards !important; }
.splash-mark { display: grid; justify-items: center; gap: 0; }
.sm-logo { width: clamp(108px, 30vw, 136px); height: auto; overflow: visible; }
.sm-logo .sp-bg, .sm-logo .sp-edge { transform-origin: 512px 512px; opacity: 0; transform: scale(.86);
  animation: spBg .7s cubic-bezier(.2, .8, .2, 1) .05s forwards; }
.sm-logo .sp-plus { transform-origin: 512px 512px; opacity: 0; transform: scale(.4) rotate(-45deg);
  animation: spPlus .75s cubic-bezier(.2, .9, .25, 1.15) .3s forwards, spGlow 1.4s ease-in-out .9s forwards; }
.sm-logo .sp-s { transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(0) rotate(-72deg);
  animation: spStar .5s cubic-bezier(.2, .9, .3, 1.3) forwards, spTw 1.1s ease-in-out forwards; }
.sm-logo .sp-s0 { animation-delay: .72s, 1.2s; }
.sm-logo .sp-s1 { animation-delay: .82s, 1.3s; }
.sm-logo .sp-s2 { animation-delay: .92s, 1.4s; }
.sm-logo .sp-s3 { animation-delay: 1.02s, 1.5s; }
.sm-name { margin-top: 22px; font: 650 30px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", sans-serif;
  letter-spacing: -0.03em; color: #F3F4F6; opacity: 0; transform: translateY(8px); animation: spText .6s cubic-bezier(.2, .8, .2, 1) 1s forwards; }
.sm-name b { font-weight: 650; color: #F3F4F6; }
.sm-sub { margin-top: 8px; font: 500 12px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: #7D828B; opacity: 0; transform: translateY(6px); animation: spText .6s cubic-bezier(.2, .8, .2, 1) 1.15s forwards; }
@keyframes spBg { to { opacity: 1; transform: none; } }
@keyframes spPlus { to { opacity: 1; transform: none; } }
@keyframes spGlow { 0% { filter: none; } 45% { filter: drop-shadow(0 0 28px rgb(170 195 255 / .9)); } 100% { filter: drop-shadow(0 0 14px rgb(160 188 255 / .55)); } }
@keyframes spStar { to { opacity: 1; transform: none; } }
@keyframes spTw { 0%, 100% { filter: none; } 40% { filter: drop-shadow(0 0 18px rgb(200 215 255 / 1)); } }
@keyframes spText { to { opacity: 1; transform: none; } }
@keyframes spOut { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  html.splashing .splash { animation-duration: .25s !important; animation-delay: .5s !important; }
  .sm-logo *, .sm-name, .sm-sub { animation-duration: .01s !important; animation-delay: 0s !important; }
}
.sm-ai { width: clamp(108px, 30vw, 136px); height: auto; opacity: 0; transform: scale(.8) rotate(-20deg);
  animation: spAi .9s cubic-bezier(.2, .9, .25, 1.1) .05s forwards; }
@keyframes spAi { 60% { opacity: 1; filter: drop-shadow(0 0 30px rgb(150 120 255 / .7)); } to { opacity: 1; transform: none; filter: drop-shadow(0 0 12px rgb(150 120 255 / .35)); } }

/* ── заголовки страниц, знак «+» в названии, значки целей ── */
body.ui .ph h1, body.ui .page-head h1 { font-weight: 650 !important; letter-spacing: -0.03em !important; }
@media (max-width: 899px) { body.ui .ph h1, body.ui .page-head h1 { font-size: 30px !important; } }
body.ui .plus { color: var(--plus) !important; text-shadow: none !important; }
body.ui .vi { background: var(--surface-2) !important; border: 1px solid var(--line-strong); box-shadow: none !important; color: var(--v1, var(--ink-2)) !important; }
body.ui .vi svg { stroke-width: 1.7 !important; }

/* ── Услуги: сплошные плитки, без цветных пятен ── */
body.ui .svc-tile::before { background: var(--surface) !important; }
body.ui .svc-tile { border: 1px solid var(--line) !important; box-shadow: none !important; }
body.ui .svr { background: var(--surface) !important; box-shadow: none !important; border: 1px solid var(--line); }
body.ui .svr .svr-top { background: none !important; }

/* ── Маркет: один спокойный акцент вместо сине-фиолетовых градиентов ── */
body.ui :is(.mk-strip-ic, .mk-sg-ic, .mk-empty-ic) { background: var(--surface-2) !important; color: var(--ink) !important; border: 1px solid var(--line-strong); box-shadow: none !important; }
body.ui .mk-new { background: rgb(10 11 13 / .82) !important; color: #F3F4F6 !important; -webkit-text-fill-color: #F3F4F6; border: 1px solid rgb(255 255 255 / .14); font-weight: 600 !important; letter-spacing: .01em; }
body.ui .mk-limit i b, body.ui .mk-steps li.done::before { background: var(--ink-2) !important; }
body.ui .mk-steps li.done i { background: var(--ink) !important; color: var(--bg) !important; }
body.ui .mk-strip { background: var(--surface) !important; box-shadow: inset 0 0 0 1px var(--line) !important; }
body.ui { --mk-fill: var(--surface) !important; --mk-line: var(--line-strong) !important; }

/* ═════ v24: орёл + строгая надпись Swiss+ (вход, поддержка, админка, боковое меню) ═════ */
.brand .wm-eagle, .side-brand .wm-eagle { width: 46px; height: auto; flex: none; display: block; }
.brand, .side-brand { display: inline-flex; align-items: center; gap: 11px; }
.brand .wm, .side-brand .wm { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 600; letter-spacing: -0.015em; }
.brand .plus, .side-brand .plus { color: var(--plus, #9FB4E8) !important; font-weight: 500; text-shadow: none !important; }


/* ═════ v24: шапка банка — аватар слева ═════ */
body.ui .top-me { display: none; }
@media (max-width: 899px) {
  body.ui .top-me { display: inline-flex; align-items: center; margin-right: auto; border-radius: 50%; }
  body.ui .top-me .av { width: 38px; height: 38px; }
}

/* ═════ v24: заставка — орёл расправляет крылья, загорается крест, появляются звёзды ═════ */
.sm-eagle { width: clamp(190px, 54vw, 250px); height: auto; overflow: visible; }
.sm-eagle .eg-body { transform-box: view-box; transform-origin: 480px 300px; opacity: 0; transform: scale(.5, .82) translateY(18px);
  animation: egBody .85s cubic-bezier(.2, .85, .25, 1) .05s forwards; }
.sm-eagle .eg-cross { transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(.3);
  animation: egCross .55s cubic-bezier(.2, .9, .3, 1.25) .55s forwards, egGlow 1.2s ease-in-out 1s forwards; }
.sm-eagle .eg-s { transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(0) rotate(-72deg);
  animation: spStar .45s cubic-bezier(.2, .9, .3, 1.3) forwards, spTw 1s ease-in-out forwards; }
.sm-eagle .eg-s1 { animation-delay: .85s, 1.25s; } .sm-eagle .eg-s0 { animation-delay: .95s, 1.35s; }
.sm-eagle .eg-s2 { animation-delay: 1.05s, 1.45s; } .sm-eagle .eg-s3 { animation-delay: 1.15s, 1.55s; }
@keyframes egBody { 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes egCross { to { opacity: 1; transform: none; } }
@keyframes egGlow { 0%, 100% { filter: none; } 45% { filter: drop-shadow(0 0 22px rgb(190 210 255 / .95)); } }
.sm-name { margin-top: 26px !important; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-weight: 600 !important; letter-spacing: -0.015em !important; font-size: 28px !important; }
.sm-name b { color: #9FB4E8 !important; font-weight: 400 !important; }
@media (prefers-reduced-motion: reduce) { .sm-eagle * { animation-duration: .01s !important; animation-delay: 0s !important; } }

/* ═════ v24: окно «Ещё» — строгий список ═════ */
.more-sheet .ms-backdrop { background: rgb(0 0 0 / .55) !important; }
.more-sheet .ms-panel { left: 8px !important; right: 8px !important; bottom: calc(66px + env(safe-area-inset-bottom)) !important;
  padding: 8px 0 6px !important; border-radius: 18px !important; background: var(--surface-strong, #17181D) !important;
  border: 1px solid var(--line-strong, #2E3138) !important; box-shadow: 0 24px 60px -20px rgb(0 0 0 / .7) !important;
  transform: translateY(16px) !important; transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease !important;
  max-height: calc(100svh - 120px); overflow-y: auto; }
.more-sheet.open .ms-panel { transform: none !important; }
.more-sheet .ms-grip { background: var(--line-strong, #2E3138) !important; margin-bottom: 8px !important; }
.more-sheet .ms-head { padding: 0 18px 8px !important; }
.more-sheet .ms-head b { color: var(--ink, #F3F4F6) !important; font-size: 17px !important; font-weight: 650; }
.more-sheet .ms-head a { color: var(--muted, #8B9099) !important; font-weight: 500 !important; }
.more-sheet .ms-grid { display: block !important; }
.more-sheet .ms-item { display: flex !important; align-items: center; gap: 14px; padding: 10px 18px !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; color: var(--ink, #F3F4F6) !important; text-align: left !important; opacity: 1 !important; transform: none !important;
  transition: background-color .15s !important; position: relative; }
.more-sheet .ms-item + .ms-item::before { content: ""; position: absolute; left: 68px; right: 0; top: 0; height: 1px; background: var(--line, #212328); }
.more-sheet .ms-item::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.6px solid var(--muted, #8B9099); border-top: 1.6px solid var(--muted, #8B9099);
  transform: rotate(45deg); flex: none; opacity: .8; }
.more-sheet .ms-item:active, .more-sheet .ms-item:hover { background: var(--surface-2, #1B1D22) !important; }
.more-sheet .ms-ic { width: 36px !important; height: 36px !important; border-radius: 10px !important; flex: none; color: var(--ink-2, #C9CCD2) !important;
  background: var(--surface-2, #1B1D22) !important; border: 1px solid var(--line-strong, #2E3138) !important; box-shadow: none !important; }
.more-sheet .ms-ic svg { width: 19px !important; height: 19px !important; stroke-width: 1.7; }
.more-sheet .ms-label { font-size: 15.5px !important; font-weight: 500 !important; -webkit-line-clamp: 1 !important; letter-spacing: -0.01em; }
.more-sheet .ms-badge { top: -4px; right: -6px; }
@media (min-width: 900px) {
  .more-sheet .ms-panel { left: calc(var(--side-w, 260px) + 16px) !important; right: auto !important; bottom: auto !important; top: 110px !important; width: 360px !important; }
}
body.ui .tabbar a.ms-on { color: var(--ink) !important; }

/* ═════════════════ v24: светлая тема — тот же строгий стиль на белом ═════════════════ */
html[data-theme="light"] { background: #F4F5F7 !important; color-scheme: light; }
html[data-theme="light"] body.ui {
  --bg: #F4F5F7 !important; --bg-2: #ECEEF1 !important;
  --surface: #FFFFFF !important; --surface-strong: #FFFFFF !important;
  --surface-2: #F1F2F5 !important; --fill: #E9EBEF !important;
  --glass-line: #E2E4E8 !important; --line: #E6E8EC !important; --line-strong: #D5D8DE !important;
  --ink: #0B0D12 !important; --ink-2: #363B45 !important; --muted: #6B7180 !important;
  --accent: #0B0D12 !important; --on-accent: #FFFFFF !important;
  --focus: #2350C4 !important; --blue: #2350C4 !important; --blue-soft: rgb(35 80 196 / .08) !important;
  --up: #0F7B55 !important; --green: #0F7B55 !important; --down: #D0312D !important; --danger: #D0312D !important;
  --green-bg: rgb(15 123 85 / .08) !important; --err-bg: rgb(208 49 45 / .08) !important;
  --warn: #9A6200 !important; --warn-bg: #FFF4DC !important;
  --shadow: 0 1px 2px rgb(16 24 40 / .04) !important; --shadow-lg: 0 24px 48px -24px rgb(16 24 40 / .22) !important;
  --blur: none !important; --ambient: none !important;
  --bar: #FFFFFF; --field: #FFFFFF; --tab-ink: #7A808C; --plus: #2350C4; --btn-hover: #23262E; --focus-ring: rgb(35 80 196 / .12); --field-focus: #2350C4;
  --card: #0B0D12; --card-ink: #F3F4F6;
  background: #F4F5F7 !important; color: var(--ink);
}
html[data-theme="light"] body.ui.tier-silver   { --focus: #5B6678 !important; }
html[data-theme="light"] body.ui.tier-gold     { --focus: #9A6B12 !important; }
html[data-theme="light"] body.ui.tier-diamond  { --focus: #5B45D6 !important; }
html[data-theme="light"] body.ui.tier-black    { --focus: #B3122B !important; }
html[data-theme="light"] body.ui.tier-platinum { --focus: #0F7B55 !important; }
html[data-theme="light"] body.ui :is(.panel, .tx-list, .table-wrap, .stats, .stat-grid, .inv-sum, .facts, .rcpt, .rates-line, .person, .tile, .fx, .qr-card, .pair, .payee-card, .chat, .quick a:not(.main), .banner, .svc-tile) {
  box-shadow: 0 1px 2px rgb(16 24 40 / .04) !important; }
html[data-theme="light"] body.ui .topbar { background: var(--bg) !important; }
html[data-theme="light"] .wm-eagle { content: url("img/eagle-ink.svg"); }
html[data-theme="light"] body.ui .av.sys.g.inv-fine { background: rgb(208 49 45 / .08) !important; }
html[data-theme="light"] .more-sheet .ms-backdrop { background: rgb(16 24 40 / .32) !important; }
html[data-theme="light"] body.ui .top-msgr, html[data-theme="light"] body.ui .side-msgr { background: var(--surface) !important; color: var(--ink) !important; }

/* банковская карта и заставка остаются тёмными в обеих темах — как настоящая металлическая карта */
html[data-theme="light"] body.ui .svc-tile { color: var(--ink); }

/* ── выбор оформления в профиле ── */
.look-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.look-opt { display: grid; gap: 8px; justify-items: center; cursor: pointer; }
.look-opt input { position: absolute; opacity: 0; pointer-events: none; }
.look-prev { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; border: 1.5px solid var(--line-strong); display: grid; align-content: end; gap: 5px; padding: 10px; overflow: hidden; }
.look-prev i { display: block; height: 7px; border-radius: 3px; }
.look-prev i:first-child { width: 55%; height: 10px; }
.look-prev i:nth-child(2) { width: 85%; } .look-prev i:nth-child(3) { width: 70%; }
.lp-dark { background: #0A0B0D; } .lp-dark i { background: #23262E; } .lp-dark i:first-child { background: #F3F4F6; }
.lp-light { background: #F4F5F7; } .lp-light i { background: #DDE0E5; } .lp-light i:first-child { background: #0B0D12; }
.lp-auto { background: linear-gradient(135deg, #F4F5F7 0 50%, #0A0B0D 50% 100%); } .lp-auto i { background: #8B9099; opacity: .6; } .lp-auto i:first-child { background: #8B9099; opacity: 1; }
.look-name { font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-align: center; }
.look-opt input:checked + .look-prev { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.look-opt input:checked ~ .look-name { color: var(--ink); font-weight: 600; }
.look-opt input:focus-visible + .look-prev { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ═════ v24: окно входа — сплошная строгая карточка вместо стекла ═════ */
main.glass { background: #121317 !important; border: 1px solid #262930 !important; box-shadow: 0 30px 80px -30px rgb(0 0 0 / .9) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
main.glass::before, main.glass::after { content: none !important; }
main.glass .input { background: #0C0D10 !important; border-color: #2B2E36 !important; }
main.glass .input:focus { border-color: #6B7280 !important; box-shadow: 0 0 0 3px rgb(255 255 255 / .06) !important; }
main.glass .field > label { color: #9AA0AA !important; }

/* ═════ v25: ПК — вверху бокового меню блок клиента вместо логотипа ═════ */
body.ui .side-me { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin: 0 0 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: 0; }
body.ui .side-me:hover b { text-decoration: underline; text-underline-offset: 3px; }
body.ui .side-me .av { width: 42px; height: 42px; flex: none; }
body.ui .side-me > span { min-width: 0; display: grid; gap: 3px; }
body.ui .side-me b { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui .side-me small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
body.ui .side-tier { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--focus); padding: 2px 6px; border: 1px solid currentColor; border-radius: 5px; }

/* ═════ v26: телефоны — без задержки нажатий, без подсветки касаний, плавная прокрутка ═════ */
a, button, label, summary, .pk, .ms-item, .rl-row { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 899px) { body.ui .tabbar a { min-height: 48px; } }

/* ═════════════ v27: уведомления — колокольчик, панель и страница ═════════════ */
body.ui .top-bell { position: relative; display: grid !important; place-items: center; }
body.ui .top-bell svg { width: 22px; height: 22px; }
body.ui .top-bell.active { color: var(--ink); }
.bell-n { position: absolute; top: -3px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E5484D; color: #fff;
  font: 700 10.5px/18px var(--font, -apple-system, sans-serif); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--bg); pointer-events: none;
  animation: bellIn .35s cubic-bezier(.3, 1.6, .5, 1); }
.bell-dot { position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--focus); box-shadow: 0 0 0 2px var(--bg); pointer-events: none; }
.bell-n[hidden], .bell-dot[hidden] { display: none; }
@keyframes bellIn { from { transform: scale(.4); opacity: 0; } }

/* панель: на телефоне — снизу, на ПК — под колокольчиком */
.ib-sheet { position: fixed; inset: 0; z-index: 80; }
.ib-sheet[hidden] { display: none; }
.ib-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .5); opacity: 0; transition: opacity .25s ease; }
.ib-sheet.open .ib-backdrop { opacity: 1; }
.ib-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: min(82svh, 720px); display: flex; flex-direction: column;
  background: var(--surface-strong, #17181D); border: 1px solid var(--line-strong, #2E3138); border-bottom: 0; border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -20px 60px -20px rgb(0 0 0 / .6);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.ib-sheet.open .ib-panel { transform: none; }
.ib-grip { display: block; width: 38px; height: 4px; margin: 8px auto 4px; border-radius: 2px; background: var(--line-strong, #2E3138); flex: none; }
.ib-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 10px; flex: none; }
.ib-head b { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; color: var(--ink); }
.ib-head a { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.ib-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 0 14px; -webkit-overflow-scrolling: touch; }
.ib-load { display: flex; justify-content: center; gap: 6px; padding: 40px 0; }
.ib-load i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ibDot 1s ease-in-out infinite; }
.ib-load i:nth-child(2) { animation-delay: .15s; } .ib-load i:nth-child(3) { animation-delay: .3s; }
@keyframes ibDot { 50% { opacity: .25; transform: translateY(-3px); } }
@media (min-width: 900px) {
  .ib-backdrop { background: transparent; }
  .ib-panel { left: auto; bottom: auto; width: 420px; max-height: min(640px, calc(100vh - 100px)); border-radius: 16px; border-bottom: 1px solid var(--line-strong, #2E3138);
    transform: translateY(-6px); opacity: 0; transition: transform .2s ease, opacity .18s ease; box-shadow: 0 30px 70px -20px rgb(0 0 0 / .7); }
  .ib-sheet.open .ib-panel { opacity: 1; }
  .ib-grip { display: none; }
  .ib-head { padding-top: 14px; }
}
body.ib-open { overflow: hidden; }
@media (min-width: 900px) { body.ib-open { overflow: auto; } }

/* список */
.ib { display: grid; gap: 4px; }
.ib-cap { display: flex; align-items: center; gap: 8px; padding: 14px 18px 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ib-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #E5484D; color: #fff; font-size: 11px; line-height: 20px; text-align: center; letter-spacing: 0; }
main .ib-cap { padding-left: 2px; }
.ib-list { display: grid; }
main .ib-list { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.ib-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 18px; color: var(--ink); text-decoration: none; }
.ib-row + .ib-row::before { content: ""; position: absolute; left: 70px; right: 0; top: 0; height: 1px; background: var(--line); }
a.ib-row:active, .ib-row:has(a.ib-main:active) { background: var(--surface-2); }
.ib-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink-2); }
.ib-ic svg { width: 19px; height: 19px; stroke-width: 1.7; }
.ib-row.t-danger .ib-ic { color: var(--down); background: rgb(229 72 77 / .1); border-color: rgb(229 72 77 / .28); }
.ib-row.t-warn .ib-ic { color: #E2A33B; background: rgb(226 163 59 / .1); border-color: rgb(226 163 59 / .28); }
.ib-row.t-ok .ib-ic { color: var(--up); background: rgb(61 214 140 / .1); border-color: rgb(61 214 140 / .28); }
.ib-ic.in { color: var(--up); }
.ib-row.urgent::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--down); }
.ib-main { min-width: 0; display: grid; gap: 2px; color: inherit; text-decoration: none; }
.ib-cat { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.ib-cat em { font-style: normal; } .ib-cat em.hot { color: var(--down); }
.ib-t { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-side { display: grid; justify-items: end; gap: 6px; }
.ib-amt { font-size: 15px; font-weight: 600; white-space: nowrap; } .ib-amt.pos { color: var(--up); }
.ib-go { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); font-size: 12.5px; font-weight: 600;
  color: var(--ink); text-decoration: none; white-space: nowrap; }
.ib-go span { display: grid; width: 14px; height: 14px; } .ib-go svg { width: 14px; height: 14px; }
.ib-row.t-danger .ib-go, .ib-row.t-warn .ib-go { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ib-btns { display: flex; gap: 6px; } .ib-btns form { margin: 0; }
.ib-btn { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 600 12.5px var(--font, inherit); cursor: pointer; }
.ib-btn.solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ib-rec.new .ib-t::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--focus); vertical-align: middle; }
.ib-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 40px 24px 30px; }
.ib-ok { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgb(61 214 140 / .1); color: var(--up); margin-bottom: 6px; }
.ib-ok svg { width: 24px; height: 24px; }
.ib-empty b { font-size: 17px; } .ib-empty p { margin: 0; max-width: 300px; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 380px) { .ib-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 12px 14px; gap: 10px; } .ib-ic { width: 36px; height: 36px; } }

/* ═════ v27.1: карта Black — радуга рисуется видеокартой: плавно, без остановок и без нагрузки на процессор ═════
   Планета (canvas) рисуется в оттенках серого; сверху — широкая полоса радуги в режиме смешивания «цвет»,
   которая едет по кругу (сдвиг ровно на один период — шва нет). Тёмный фон под ней остаётся тёмным. */
body.ui .bcard.gl.t-black .bc-globe { filter: none; isolation: isolate; overflow: hidden; border-radius: inherit;
  background: radial-gradient(120% 140% at 64% 46%, rgb(var(--gc) / .22) 0%, rgb(var(--gc) / .06) 38%, transparent 62%), var(--cb); }
body.ui .bcard.gl.t-black .bc-globe canvas { filter: grayscale(1) brightness(1.3); }
body.ui .bcard.gl.t-black .bc-globe::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 200%; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(90deg, #FF3B5C 0%, #FF9F0A 7.14%, #FFE14D 14.28%, #34D27A 21.42%, #2FD3F5 28.57%, #3D63FF 35.71%, #B04DFF 42.85%, #FF3B5C 50%);
  mix-blend-mode: color; opacity: .95; will-change: transform; transform: translate3d(0, 0, 0);
  animation: bkRainbow 14s linear infinite; }
@keyframes bkRainbow { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { body.ui .bcard.gl.t-black .bc-globe::after { animation: none; } }
