/* ==========================================================================
   Кошелёк — стили
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-outer: #eceef2;
  --bg2: #f2f2f5;
  --card: #f2f2f4;
  --text: #111113;
  --text2: #2b2b2f;
  --hint: #8e8e93;
  --hint2: #b2b2b7;
  --sep: #e8e8ec;
  --link: #3c9be0;
  --accent: #46a2df;
  --accent-dark: #2d88d4;
  --accent-soft: #e1eff9;
  --accent-soft2: #d4e7f6;
  --green: #31a24c;
  --green-soft: #e4f3e7;
  --red: #e5534b;
  --red-soft: #fdeceb;
  --orange: #f59300;
  --input-border: #dcdce1;
  --field-bg: #ffffff;
  --round-btn: #f0f0f2;
  --tabbar-bg: rgba(255, 255, 255, .82);
  --tab-on: rgba(20, 20, 30, .055);
  --tab-text: #2a2a2e;
  --cut: #ffffff;
  --overlay: rgba(0, 0, 0, .38);
  --sheet-bg: #ffffff;
  --shadow: 0 6px 30px rgba(20, 30, 50, .10);
  --radius: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #18222d;
  --bg-outer: #0e141b;
  --bg2: #111a23;
  --card: #212d3b;
  --text: #f4f6f8;
  --text2: #dfe5ea;
  --hint: #7f91a4;
  --hint2: #5d6e80;
  --sep: #243140;
  --link: #62b1ef;
  --accent: #4c9ee0;
  --accent-dark: #3585cf;
  --accent-soft: #1f3348;
  --accent-soft2: #29425c;
  --green: #4cc26a;
  --green-soft: #1d3a2a;
  --red: #f0645c;
  --red-soft: #3f2327;
  --input-border: #2f3f50;
  --field-bg: #1c2733;
  --round-btn: #243241;
  --tabbar-bg: rgba(29, 40, 52, .85);
  --tab-on: rgba(255, 255, 255, .07);
  --tab-text: #d3dbe3;
  --cut: #1d2834;
  --overlay: rgba(0, 0, 0, .55);
  --sheet-bg: #1c2733;
  --shadow: 0 6px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.3;
  color: var(--text);
  background: var(--bg-outer);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
b { font-weight: 600; }

.ic { display: inline-flex; width: 24px; height: 24px; flex: none; align-items: center; justify-content: center; }
.ic svg { width: 100%; height: 100%; display: block; }

.muted { color: var(--hint); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.up { color: var(--green); }
.down { color: var(--red); }
.warn { color: var(--orange); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: -.01em; }
.pad { padding: 16px; }
.pad-h { padding: 0 16px; }
.pad-v { padding: 16px 0; }
.ml-auto { margin-left: auto; }
.link { color: var(--link); font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.link.strong { font-weight: 700; }
.link.danger, .danger { color: var(--red); }
.link .ic { width: 20px; height: 20px; }

/* ---------- Каркас ---------- */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
}
@media (min-width: 520px) {
  #app { box-shadow: 0 0 0 1px rgba(0, 0, 0, .03), 0 10px 60px rgba(0, 0, 0, .06); }
}
.view.has-tabbar .page { padding-bottom: 120px; }
.view.has-topbar .page { padding-bottom: 32px; }
.page.enter { animation: pageIn .22s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Верхняя панель подстраниц ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  height: 54px; padding: 0 4px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--sep);
}
.tb-back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--link); border-radius: 50%; }
.tb-back .ic { width: 28px; height: 28px; }
.tb-title { text-align: center; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { display: flex; justify-content: flex-end; }

/* ---------- Нижнее меню ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center;
  padding: 0 24px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.tabbar[hidden] { display: none; }
.tabbar::before {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 96px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 78%);
  pointer-events: none;
}
.tabbar-inner {
  position: relative;
  pointer-events: auto;
  width: 100%; max-width: 432px; height: 66px;
  display: flex; align-items: stretch; padding: 5px;
  border-radius: 34px;
  background: var(--tabbar-bg);
  backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 2px 24px rgba(0, 0, 0, .09), 0 0 0 .5px rgba(0, 0, 0, .04);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 29px; color: var(--tab-text);
  font-size: 12px; font-weight: 500; letter-spacing: -.01em;
  transition: background .2s, color .2s;
}
.tab .ic { width: 24px; height: 24px; }
.tab.on { background: var(--tab-on); color: var(--link); }
.tab:active { transform: scale(.96); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 13px;
  font-weight: 600; font-size: 16.5px; letter-spacing: -.01em;
  transition: transform .1s, filter .15s, opacity .15s;
  user-select: none;
}
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn .ic { width: 22px; height: 22px; }
.btn-lg { height: 48px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-light { background: var(--accent-soft); color: var(--link); }
.btn-buy { background: var(--green); color: #fff; }
.btn-sell { background: var(--red); color: #fff; }
.btn-sell-light { background: var(--red-soft); color: var(--red); }
.btn.is-disabled { opacity: .5; }
.btn-mini { height: 30px; padding: 0 12px; border-radius: 9px; background: var(--bg2); font-size: 13.5px; font-weight: 600; color: var(--link); display: inline-flex; align-items: center; gap: 4px; }
.btn-mini .ic { width: 16px; height: 16px; }
.btn-mini.danger { color: var(--red); }
.btn-row { display: flex; gap: 10px; }
.page > .btn-row { padding: 16px 16px 0; }
.btn-row > * { flex: 1; min-width: 0; }
.icon-btn { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; color: var(--link); border-radius: 50%; vertical-align: middle; }
.icon-btn .ic { width: 20px; height: 20px; }

.bottom-bar { padding: 16px 16px 8px; display: flex; gap: 10px; }
.bottom-bar.two > * { flex: 1; }

/* ==========================================================================
   Кошелёк
   ========================================================================== */
.w-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 16px 0;
}
.round-btn {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--round-btn); color: #8a8a90;
}
.round-btn .ic { width: 21px; height: 21px; }
.setup-pill {
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 12px 0 8px; border-radius: 28px;
  background: var(--accent-soft); text-align: left;
  min-width: 0;
}
.setup-pill:active { filter: brightness(.97); }
.ring { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(28deg); }
.ring-bg { fill: none; stroke: var(--accent-soft2); stroke-width: 3.6; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 3.6; stroke-linecap: round; transition: stroke-dasharray .6s; }
.ring b { position: relative; font-size: 13px; font-weight: 500; color: var(--hint); letter-spacing: -.02em; }
.setup-pill.done .ring-fg { stroke: var(--green); }
.setup-text { display: flex; flex-direction: column; min-width: 0; }
.setup-text b { font-size: 16px; font-weight: 500; color: var(--text); white-space: nowrap; }
.setup-text span { font-size: 14px; color: var(--hint); white-space: nowrap; }
.setup-chev { color: var(--link); }
.setup-chev .ic { width: 22px; height: 22px; }

.w-balance { text-align: center; padding: 26px 16px 0; }
.w-bal-row { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.w-cur { font-size: 32px; color: #505056; }
:root[data-theme="dark"] .w-cur { color: #9fb0c1; }
.w-amt { font-size: 33px; color: var(--text); font-variant-numeric: tabular-nums; }
.w-eye { color: #8e8e93; margin-left: 2px; }
.w-eye .ic { width: 22px; height: 22px; }
.w-bal-sub { margin-top: 8px; font-size: 16px; color: var(--hint); }
.w-bal-sub .link { font-weight: 400; }

.w-actions { display: grid; grid-template-columns: repeat(3, 1fr); padding: 26px 16px 0; }
.w-actions.four { grid-template-columns: repeat(4, 1fr); }
.w-act { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--link); font-size: 14.5px; font-weight: 500; }
.w-act-ic {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #56b2ea 0%, #2c85d0 100%);
  box-shadow: 0 2px 6px rgba(45, 133, 208, .25);
}
.w-act-ic .ic { width: 22px; height: 22px; }
.w-act:active .w-act-ic { transform: scale(.94); }

/* Баннеры */
.banners { margin-top: 22px; }
.banner-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 16px; scroll-padding: 0 16px; scrollbar-width: none;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner {
  flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always;
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  min-height: 74px; padding: 9px 12px 9px 18px; border-radius: 14px;
  background: var(--bsoft); color: var(--text);
}
.banner::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: repeating-linear-gradient(135deg, var(--bmain) 0 4px, color-mix(in srgb, var(--bmain) 60%, #fff) 4px 7px);
}
.banner-art { width: 56px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; }
.banner-emoji { font-size: 44px; line-height: 1; display: inline-block; }
.banner-emoji.wave { animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 80%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.banner-circle { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.banner-circle.blue { background: linear-gradient(180deg, #5cb7f2, #2d8bd8); }
.banner-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.banner-text b { color: var(--bmain); font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.banner-text span { font-size: 14px; line-height: 18px; color: var(--text2); }
.banner-chev { color: var(--bmain); }
.banner-green { --bmain: #34a452; --bsoft: #e4f3e7; }
.banner-blue { --bmain: #2e8ad6; --bsoft: #e2eff9; }
.banner-orange { --bmain: #e98500; --bsoft: #fdf1e0; }
.banner-purple { --bmain: #8f45e8; --bsoft: #f1e8fd; }
.banner-yellow { --bmain: #c48a00; --bsoft: #fcf5dd; }
:root[data-theme="dark"] .banner-green { --bsoft: #1d3527; }
:root[data-theme="dark"] .banner-blue { --bsoft: #1c3247; }
:root[data-theme="dark"] .banner-orange { --bsoft: #3a2c1a; }
:root[data-theme="dark"] .banner-purple { --bsoft: #2d2340; }
:root[data-theme="dark"] .banner-yellow { --bsoft: #37301a; }

.dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: #c4dff3; transition: width .25s, background .25s; }
.dots i.on { width: 24px; background: var(--accent); }
:root[data-theme="dark"] .dots i { background: #2d4660; }
:root[data-theme="dark"] .dots i.on { background: var(--accent); }

.assets-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 16px 12px; font-size: 16.5px; }
.assets-head .link { font-weight: 500; }
.assets-head .ic { width: 20px; height: 20px; margin-left: 2px; }

/* Строка актива */
.asset-list { padding: 0 16px; }
.asset-row { display: flex; align-items: center; gap: 12px; height: 65px; }
.asset-row .coin-ic { flex: none; }
.asset-main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-bottom: 1px solid var(--sep); }
.asset-row:last-child .asset-main { border-bottom-color: transparent; }
.asset-top, .asset-bot { display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.asset-name { font-size: 16.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.asset-amt { font-size: 16.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.asset-price, .asset-fiat { font-size: 14.5px; color: var(--hint); font-variant-numeric: tabular-nums; }
.asset-price b { font-weight: 500; }
.asset-row:active { opacity: .7; }

.coin-ic { display: inline-flex; flex: none; border-radius: 50%; }
.coin-ic svg { width: 100%; height: 100%; display: block; }

/* ==========================================================================
   Общие блоки
   ========================================================================== */
.section-title { padding: 22px 16px 8px; font-size: 14px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: .02em; }
.section-title.between { display: flex; justify-content: space-between; align-items: center; }
.section-title .link { text-transform: none; letter-spacing: 0; }

.card { margin: 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); }
.card + .card { margin-top: 10px; }

.list { margin: 0 16px; border-radius: var(--radius); background: var(--card); overflow: hidden; }
.list + .list { margin-top: 14px; }
.cell {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 14px; text-align: left; position: relative; cursor: pointer;
}
.cell + .cell::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--sep); }
.cell:active { background: color-mix(in srgb, var(--text) 5%, transparent); }
div.cell:active { background: none; }
.cell-ic { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; overflow: hidden; }
.cell-ic .ic { width: 20px; height: 20px; }
.cell-ic .avatar { border-radius: 50%; }
.profile-cell .cell-ic { width: 44px; height: 44px; border-radius: 50%; }
.profile-cell .cell + .cell::before { left: 70px; }
.cell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cell-title { font-size: 16px; font-weight: 500; }
.cell.danger .cell-title { color: var(--red); }
.cell-sub { font-size: 13.5px; color: var(--hint); overflow: hidden; text-overflow: ellipsis; }
.cell-right { color: var(--hint); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.cell-right .ic { width: 20px; height: 20px; }
.cell-chev { color: var(--hint2); display: flex; }
.cell-chev .ic { width: 20px; height: 20px; }

.kv-list { display: flex; flex-direction: column; }
.kv-list.card { padding: 4px 16px; }
.kv { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 11px 0; font-size: 15px; }
.kv + .kv { border-top: 1px solid var(--sep); }
.kv > span { color: var(--hint); flex: none; }
.kv > b { font-weight: 500; text-align: right; word-break: break-word; }
.kv .copyable { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.kv .copyable .ic { width: 16px; height: 16px; color: var(--link); }
.kv-list.compact .kv { padding: 8px 0; font-size: 14.5px; }

.hero { text-align: center; padding: 22px 24px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero h2 { font-size: 22px; font-weight: 700; margin-top: 4px; }
.hero p { font-size: 15px; line-height: 1.4; max-width: 330px; }
.hero-circle { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.hero-circle.big { width: 92px; height: 92px; }
.hero-circle.big > .ic { width: 44px; height: 44px; }
.hero-circle.green { background: linear-gradient(180deg, #5fdc72, #29b83e); }
.hero-circle.orange { background: linear-gradient(180deg, #ffe3b8, #ffc97a); }
.hero-circle.blue { background: linear-gradient(180deg, #5cb7f2, #2d8bd8); }

.note { margin: 16px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); display: flex; gap: 10px; font-size: 14px; line-height: 1.4; color: var(--text2); }
.note .ic { color: var(--link); width: 20px; height: 20px; }
.warn-note { background: #fff4e3; }
.warn-note .ic { color: var(--orange); }
:root[data-theme="dark"] .warn-note { background: #3a2c1a; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 24px; gap: 6px; }
.empty .sticker { margin-bottom: 6px; }
.empty-title { font-size: 17px; font-weight: 600; }
.empty-text { font-size: 14.5px; color: var(--hint); max-width: 300px; line-height: 1.4; }
.empty .btn { margin-top: 12px; }

.sticker { flex: none; cursor: pointer; }
.sticker svg { display: block; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-soft2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Поля ввода */
.form { padding: 8px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.field {
  position: relative; display: flex; align-items: center;
  min-height: 48px; padding: 0 14px; border-radius: 14px;
  background: var(--field-bg); border: 1px solid var(--input-border);
  transition: border-color .15s, box-shadow .15s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.field input, .field textarea, .field select {
  flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none;
  font-size: 17px; padding: 12px 0; resize: none; appearance: none; -webkit-appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--hint2); }
.field-label {
  position: absolute; left: 12px; top: -9px; padding: 0 5px;
  background: var(--field-bg); font-size: 13.5px; color: var(--hint); line-height: 16px;
  pointer-events: none;
}
.field-suffix { display: flex; align-items: center; gap: 10px; color: var(--hint); font-size: 15px; font-weight: 500; flex: none; }
.field-suffix.ghost { font-weight: 400; font-size: 14px; color: var(--hint2); }
.field-suffix .ic { width: 20px; height: 20px; }
.field-hint { margin-top: -8px; padding: 0 4px; }
.field-tools { display: flex; gap: 2px; flex: none; }
.field-tools button { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--link); border-radius: 50%; }
.field-tools .ic { width: 22px; height: 22px; }
.addr-field textarea { font-size: 15px; padding: 14px 0; }
.big-field { margin: 12px 16px 0; min-height: 60px; }
.big-field input { font-size: 26px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field.disabled { background: var(--bg2); }
.field.disabled input { color: var(--hint); }
.check-line { display: flex; gap: 10px; align-items: center; font-size: 14.5px; color: var(--text2); padding: 0 4px; }
.check-line input { width: 20px; height: 20px; accent-color: var(--accent); }

.select {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  height: 40px; padding: 0 12px 0 14px; border-radius: 14px;
  border: 1px solid var(--input-border); background: var(--field-bg); font-size: 16px; text-align: left;
}
.select .ic { width: 20px; height: 20px; color: var(--hint); }
.select.big { margin: 12px 16px 0; width: calc(100% - 32px); height: 54px; font-weight: 600; font-size: 17px; justify-content: flex-start; }
.select.big > .ic:last-child { margin-left: auto; }
.select.big .ml-auto + .ic { margin-left: 0; }

.seg { display: flex; margin: 14px 16px 0; padding: 3px; border-radius: 12px; background: var(--bg2); }
.seg button { flex: 1; height: 36px; border-radius: 9px; font-size: 14.5px; font-weight: 600; color: var(--hint); transition: background .2s, color .2s; }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
:root[data-theme="dark"] .seg button.on { background: var(--card); }

.switch { position: relative; display: inline-flex; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: #d7d7dc; transition: background .2s; }
:root[data-theme="dark"] .switch span { background: #3a4a5b; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

.chips-row { display: flex; gap: 8px; padding: 12px 16px 0; }
.chips-row.scroll { overflow-x: auto; scrollbar-width: none; }
.chips-row.scroll::-webkit-scrollbar { display: none; }
.chips-row.wrap { flex-wrap: wrap; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px 0 14px; border-radius: 14px;
  border: 1px solid var(--input-border); background: var(--field-bg);
  font-size: 15.5px; color: var(--hint); white-space: nowrap;
}
.chip .ic { width: 18px; height: 18px; color: var(--hint); }
.chip.on { border-color: var(--accent); color: var(--link); background: var(--accent-soft); }
.chip.on .ic { color: var(--link); }
.chip .coin-ic { width: 18px !important; height: 18px !important; }
a.chip, button.chip:not([data-chip]):not([data-coin]) { padding: 0 14px; }

.search { display: flex; align-items: center; gap: 8px; margin: 12px 16px 8px; padding: 0 12px; height: 40px; border-radius: 12px; background: var(--bg2); color: var(--hint); }
.sheet .search { margin: 4px 0 8px; }
.search .ic { width: 20px; height: 20px; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); min-width: 0; }
.search input::-webkit-search-cancel-button { display: none; }

.toolbar { display: flex; flex-direction: column; }
.toggle-line { display: flex; justify-content: space-between; align-items: center; padding: 4px 16px 8px; font-size: 15px; color: var(--hint); }

.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; flex: none; }

/* Профиль как в Telegram (Настройки, Mini App) */
.tg-profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 22px 16px 14px; }
.tg-profile img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; display: block; }
.tg-name { font-size: 19px; font-weight: 600; margin-top: 10px; }
.tg-nick { font-size: 15px; color: var(--accent); }
.tg-id { font-size: 12.5px; color: var(--hint); margin-top: 4px; }

/* Выбор из списка */
.pick-list { display: flex; flex-direction: column; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-radius: 12px; text-align: left; width: 100%; }
.coin-links .pick-row, .page > .pick-list .pick-row { padding: 9px 16px; border-radius: 0; }
.pick-row:active { background: var(--bg2); }
.pick-row.sel { background: var(--accent-soft); }
.pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-main b { font-size: 16px; font-weight: 600; }
.pick-main span { font-size: 14px; color: var(--hint); }
.pick-right { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.pick-right b { font-size: 15.5px; font-weight: 500; }
.pick-right span { font-size: 13.5px; color: var(--hint); }
.pick-check { color: var(--link); }
.fiat-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; flex: none; }
.pay-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.pay-dot.big { width: 20px; height: 20px; }

/* ==========================================================================
   Шторки, диалоги, тосты
   ========================================================================== */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .25s; }
.sheet {
  position: relative; width: 100%; max-width: 480px; max-height: 92vh;
  background: var(--sheet-bg); border-radius: 18px 18px 0 0;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-full { height: 92vh; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--hint2); opacity: .6; margin: 8px auto 0; flex: none; cursor: grab; }
.sheet-head { display: flex; align-items: center; justify-content: center; position: relative; min-height: 44px; padding: 4px 52px; flex: none; touch-action: none; }
.sheet-head h3 { font-size: 17px; font-weight: 600; text-align: center; }
.sheet-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--bg2); color: var(--hint); display: flex; align-items: center; justify-content: center; }
.sheet-x .ic { width: 18px; height: 18px; }
.sheet-body { overflow-y: auto; padding: 4px 16px 20px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.sheet-body > .seg, .sheet-body > .chips-row, .sheet-body > .select.big, .sheet-body > .big-field, .sheet-body > .form { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.sheet-body > .select.big { width: 100%; }
.sheet-body > .section-title { padding: 6px 0 0; }
.sheet-body .kv-list { background: var(--card); border-radius: 14px; padding: 2px 14px; }

.modal-wrap { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .2s; }
.modal {
  position: relative; width: 100%; max-width: 320px; padding: 20px 18px 14px; border-radius: 18px;
  background: var(--sheet-bg); box-shadow: var(--shadow); text-align: center;
  transform: scale(.92); opacity: 0; transition: transform .2s, opacity .2s;
  display: flex; flex-direction: column; gap: 10px;
}
.modal-wrap.open .modal-backdrop { opacity: 1; }
.modal-wrap.open .modal { transform: none; opacity: 1; }
.modal h3 { font-size: 18px; font-weight: 600; }
.modal p { font-size: 15px; color: var(--text2); line-height: 1.4; word-break: break-word; }
.modal .field { text-align: left; }
.modal-btns { display: flex; gap: 8px; margin-top: 6px; }
.modal-btns.col { flex-direction: column; }
.modal-btns button { flex: 1; height: 44px; border-radius: 12px; background: var(--bg2); font-weight: 600; color: var(--link); }
.modal-btns button.primary { background: var(--accent); color: #fff; }
.modal-btns button.danger { background: var(--red-soft); color: var(--red); }

.toasts { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  max-width: 440px; width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; background: rgba(32, 34, 40, .94); color: #fff; font-size: 14.5px; line-height: 1.35;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  transform: translateY(-20px); opacity: 0; transition: transform .25s, opacity .25s;
}
.toast.show { transform: none; opacity: 1; }
.toast .ic { width: 22px; height: 22px; color: #7cc4f7; }
.toast-success .ic { color: #6ee08a; }
.toast-error .ic { color: #ff8a80; }

/* PIN */
.pin-screen {
  position: fixed; inset: 0; z-index: 150; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 60px 24px calc(30px + env(safe-area-inset-bottom));
  opacity: 0; transition: opacity .2s;
}
.pin-screen.open { opacity: 1; }
.pin-top { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pin-lock { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(180deg, #56b2ea, #2c85d0); color: #fff; display: flex; align-items: center; justify-content: center; }
.pin-lock .ic { width: 32px; height: 32px; }
.pin-title { font-size: 20px; font-weight: 600; margin-top: 8px; }
.pin-sub { font-size: 14.5px; color: var(--hint); min-height: 20px; text-align: center; }
.pin-sub.err { color: var(--red); }
.pin-dots { display: flex; gap: 18px; margin-top: 18px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--hint2); transition: background .15s, border-color .15s; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.shake { animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 28px; }
.pin-keys button { width: 76px; height: 76px; border-radius: 50%; background: var(--bg2); font-size: 30px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.pin-keys button:active { background: var(--accent-soft2); }
.pin-keys button[data-k="del"], .pin-keys button[data-k="x"] { background: none; }
.pin-keys button small { font-size: 15px; color: var(--link); }
.pin-keys .ic { width: 30px; height: 30px; }

/* Сканер */
.scanner-sheet .sheet-body { gap: 16px; }
.scan-view { position: relative; aspect-ratio: 1; width: 100%; max-height: 52vh; border-radius: 18px; overflow: hidden; background: #0b0f14; display: flex; align-items: center; justify-content: center; }
.scan-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: relative; width: 62%; aspect-ratio: 1; }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid #fff; }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.scan-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.scan-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scan-line { position: absolute; left: 8%; right: 8%; height: 2px; background: #5cc3ff; box-shadow: 0 0 12px #5cc3ff; animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { top: 10%; } 50% { top: 88%; } }
.scan-msg { position: absolute; bottom: 14px; left: 14px; right: 14px; color: #fff; text-align: center; font-size: 14px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.scan-manual { display: flex; flex-direction: column; gap: 10px; }

/* ==========================================================================
   Активы / монета
   ========================================================================== */
.assets-total { text-align: center; padding: 20px 16px 8px; }
.assets-total-v { font-size: 30px; font-weight: 700; margin: 4px 0; }
.coin-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 16px 0; }
.coin-bal { font-size: 28px; font-weight: 700; margin-top: 6px; text-align: center; }
.coin-chart-card { margin-top: 22px; padding: 14px 0 10px; }
.coin-price-top { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; }
.coin-price { font-size: 22px; font-weight: 700; margin-top: 2px; }
.coin-change { font-weight: 600; font-size: 15px; }
.coin-chart { height: 170px; margin-top: 8px; }
.line-chart { width: 100%; height: 100%; display: block; }
.frames { display: flex; justify-content: space-around; padding: 6px 12px 0; }
.frames button { height: 32px; min-width: 44px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--hint); }
.frames button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
:root[data-theme="dark"] .frames button.on { background: var(--bg2); }
.about { font-size: 15px; line-height: 1.45; color: var(--text2); }
.about .kv-list { margin-top: 10px; }

/* История */
.hist-list { padding: 0 16px; }
.list-day { font-size: 14px; font-weight: 600; color: var(--hint); padding: 16px 0 4px; }
.hist-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 64px; text-align: left; }
.hist-ic { position: relative; flex: none; display: inline-flex; }
.hist-badge { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bg); color: #fff; display: flex; align-items: center; justify-content: center; }
.hist-badge .ic { width: 12px; height: 12px; }
.hist-ic.big .hist-badge { width: 26px; height: 26px; right: -2px; bottom: -2px; }
.hist-ic.big .hist-badge .ic { width: 15px; height: 15px; }
.hist-main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-bottom: 1px solid var(--sep); }
.hist-top, .hist-bot { display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.hist-title { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.hist-amt { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hist-bot { font-size: 14px; color: var(--hint); }
.hist-bot span:first-child { overflow: hidden; text-overflow: ellipsis; }
.tx-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 6px; }
.tx-amt { font-size: 26px; font-weight: 700; margin-top: 6px; text-align: center; }
.tx-fiat { color: var(--hint); }

/* Пополнение / вывод */
.deposit-card { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 14px; padding: 18px 16px; }
.qr-box { position: relative; width: 220px; height: 220px; padding: 12px; background: #fff; border-radius: 18px; color: #111; }
.qr-box.small { width: 170px; height: 170px; margin: 0 auto; }
.qr-svg { width: 100%; height: 100%; display: block; }
.qr-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px; background: #fff; border-radius: 50%; display: flex; }
.addr { word-break: break-all; text-align: center; font-size: 15px; line-height: 1.4; padding: 10px 12px; border-radius: 12px; background: var(--bg); width: 100%; cursor: pointer; }
.addr.big { font-size: 20px; font-weight: 600; letter-spacing: .04em; }
.card .addr { background: var(--bg); }
.deposit-card .btn-row { width: 100%; }
.deposit-card + .kv-list.card { margin-top: 12px; }
.wd-head { display: flex; align-items: center; gap: 12px; margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--card); }
.wd-head > div { flex: 1; }
.wd-avail { font-size: 17px; }
.form + .kv-list.card { margin-top: 16px; }

.success { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 0 4px; }
.success h2 { font-size: 23px; font-weight: 700; }
.success p { font-size: 15px; line-height: 1.4; margin-bottom: 8px; }
.success .btn-row { width: 100%; }

/* Настройка аккаунта */
.setup-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.setup-head h2 { font-size: 22px; font-weight: 700; }
.setup-head p { color: var(--hint); font-size: 15px; line-height: 1.4; }
.setup-progress { height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; margin: 6px 0; }
.setup-progress div { height: 100%; background: var(--accent); border-radius: 3px; }
.steps { display: flex; flex-direction: column; gap: 8px; }
.steps.static { padding: 0 16px; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--card); text-align: left; width: 100%; }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; flex: none; }
.step-n .ic { width: 18px; height: 18px; }
.step.done .step-n { background: var(--green); }
.step.done .step-main b { color: var(--hint); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--hint) 50%, transparent); }
.step-main { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.step-main b { font-size: 15.5px; font-weight: 600; }
.step-main span { font-size: 13.5px; color: var(--hint); }

/* ==========================================================================
   Биржа
   ========================================================================== */
.ex-head { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--sep); }
.ex-pair { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.ex-pair b { font-weight: 600; letter-spacing: .01em; }
.ex-pair > .ic { width: 20px; height: 20px; color: var(--hint); margin-left: -4px; }
.pair-icons { position: relative; width: 36px; height: 34px; flex: none; }
.pair-icons .coin-ic { position: absolute; width: 22px !important; height: 22px !important; }
.pair-icons .coin-ic:first-child { left: 0; top: 0; z-index: 1; }
.pair-icons .coin-ic:last-child { right: 0; bottom: 0; box-shadow: 0 0 0 1.5px var(--bg); }
.ex-chart-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--hint); }
.ex-chart-btn .ic { width: 26px; height: 26px; }
.ex-stats { display: flex; justify-content: space-between; padding: 11px 16px 12px; border-bottom: 1px solid var(--sep); }
.ex-stats > div { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.ex-stats > div.right { align-items: flex-end; }
.ex-stats b { font-size: 15.5px; font-weight: 500; font-variant-numeric: tabular-nums; }

.ex-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; padding: 16px 16px 0; }
.ex-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bs-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.bs-seg button { height: 32px; border-radius: 12px; font-weight: 600; font-size: 16.5px; background: var(--bg2); color: #a0a0a6; transition: background .2s, color .2s; }
.bs-seg button.on[data-side="buy"] { background: var(--green); color: #fff; }
.bs-seg button.on[data-side="sell"] { background: var(--red); color: #fff; }
.ex-form .field { min-height: 50px; padding: 0 10px 0 14px; }
.ex-form .field input { font-size: 16.5px; padding: 12px 0; font-variant-numeric: tabular-nums; }
.ex-form .field.num { margin-top: 2px; }
.stepper { display: flex; gap: 2px; }
.stepper button { width: 30px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.stepper .ic { width: 20px; height: 20px; }
.stepper .ic svg { stroke-width: 2.4; }
.ex-form .select { height: 42px; }

.slider { user-select: none; touch-action: none; margin-top: -4px; }
.sl-track { position: relative; height: 22px; margin: 0 8px; cursor: pointer; }
.sl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 3px; border-radius: 2px; background: var(--sep); }
.sl-fill { position: absolute; left: 0; top: 10px; height: 3px; border-radius: 2px; background: var(--green); }
.bs-seg.sell ~ .slider .sl-fill { background: var(--red); }
.sl-node { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--bg); border: 2px solid var(--sep); transition: border-color .15s; }
.sl-node.on { border-color: var(--green); }
.sl-thumb { position: absolute; top: 2px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--bg); border: 2px solid #b5b5bb; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.sl-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--hint); margin-top: 3px; }
.sl-labels span { cursor: pointer; }
.ex-avail { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.ex-line { line-height: 1.35; word-break: break-all; }

.ex-book { min-width: 0; font-variant-numeric: tabular-nums; }
.ob-tools { display: flex; align-items: center; gap: 6px; height: 32px; }
.ob-tools button[data-ob] { width: 24px; height: 24px; padding: 2px; border-radius: 6px; opacity: .55; }
.ob-tools button[data-ob].on { opacity: 1; }
.ob-tools svg { width: 100%; height: 100%; display: block; }
.ob-tick { margin-left: auto; display: flex; align-items: center; font-size: 14.5px; }
.ob-tick .ic { width: 16px; height: 16px; color: var(--hint); }
.ob-head { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--hint); line-height: 1.25; margin: 12px 0 6px; }
.ob-head span:last-child { text-align: right; }
.ob-row { position: relative; display: flex; justify-content: space-between; width: 100%; height: 26px; align-items: center; font-size: 15px; }
.ob-row i { position: absolute; right: 0; top: 1px; bottom: 1px; }
.ob-row span { position: relative; }
.ob-row.ask { color: var(--red); }
.ob-row.ask i { background: color-mix(in srgb, var(--red) 11%, transparent); }
.ob-row.bid { color: var(--green); }
.ob-row.bid i { background: color-mix(in srgb, var(--green) 11%, transparent); }
.ob-mid { padding: 8px 0 6px; display: flex; flex-direction: column; }
.ob-mid b { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.ob-mid span { font-size: 14px; color: var(--hint); }

.ex-tabs { display: flex; gap: 22px; padding: 0 16px; margin-top: 28px; border-bottom: 1px solid var(--sep); overflow-x: auto; scrollbar-width: none; }
.ex-tabs::-webkit-scrollbar { display: none; }
.ex-tabs button { flex: none; padding: 10px 0 12px; font-size: 16px; font-weight: 500; color: var(--hint); position: relative; white-space: nowrap; }
.ex-tabs button.on { color: var(--link); }
.ex-tabs button.on::after { content: ''; position: absolute; left: -8px; right: -8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--link); }
.ex-chips .chip { height: 34px; font-size: 14.5px; }
.ex-chips .chip.on { background: var(--bg); }
.ex-orders { padding: 6px 16px 0; }
.order { padding: 12px 0; border-bottom: 1px solid var(--sep); display: flex; flex-direction: column; gap: 8px; }
.order-top { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.order-top > span:nth-child(2) { flex: 1; }
.order-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 14px; }
.order-grid div { display: flex; flex-direction: column; gap: 2px; }
.order-grid span { color: var(--hint); font-size: 13px; }
.order-grid b { font-weight: 500; font-variant-numeric: tabular-nums; }
.status { font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 8px; background: var(--bg2); color: var(--hint); }
.status.filled, .status.activated { color: var(--green); background: var(--green-soft); }
.status.cancelled { color: var(--red); background: var(--red-soft); }
.status.active { color: var(--link); background: var(--accent-soft); }

.pair-row { padding: 8px 4px; }
.fav { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--hint2); flex: none; }
.fav.on { color: #ffb400; }
.fav .ic { width: 20px; height: 20px; }

/* График */
.chart-top { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; }
.chart-price { font-size: 28px; font-weight: 700; }
.chart-stats { display: flex; flex-direction: column; gap: 3px; font-size: 13px; text-align: right; }
.chart-stats div { display: flex; gap: 8px; justify-content: flex-end; }
.chart-stats b { font-weight: 500; font-variant-numeric: tabular-nums; }
.chart-box { padding: 8px 12px 0; height: 330px; }
.candles { width: 100%; height: 100%; display: block; }
.candles .grid { stroke: var(--sep); stroke-width: 1; }
.candles .axis { fill: var(--hint); font-size: 9px; font-family: var(--font); }
.candles .last { stroke: var(--link); stroke-dasharray: 3 3; stroke-width: 1; }

/* ==========================================================================
   Обмен
   ========================================================================== */
.swap { padding: 22px 16px 0; }
.swap-label { display: flex; justify-content: space-between; align-items: center; font-size: 16px; color: var(--text2); }
.swap-bal { display: flex; align-items: center; gap: 6px; color: var(--hint); }
.swap-bal > .ic { width: 20px; height: 20px; color: #9c9ca2; --cut: var(--bg); }
.swap-bal .link { margin-left: 8px; font-size: 16px; }
.swap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.swap-coin { display: flex; align-items: center; gap: 10px; flex: none; }
.swap-coin b { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.swap-coin .ic { width: 22px; height: 22px; color: var(--text); margin-left: -6px; }
.swap-coin .ic svg { stroke-width: 2.2; }
.swap-input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; text-align: right;
  font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.swap-input::placeholder { color: #9e9ea4; }
.swap-input.md { font-size: 25px; }
.swap-input.sm { font-size: 20px; }
.swap-input.xs { font-size: 16px; }
.swap-hint { text-align: right; font-size: 14px; color: var(--hint); min-height: 18px; margin-top: 4px; }
.swap-divider { position: relative; height: 40px; margin: 22px 0 26px; display: flex; align-items: center; justify-content: center; }
.swap-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--sep); }
.swap-flip { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--link); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px var(--bg); transition: transform .3s; }
.swap-flip:active { transform: rotate(180deg); }
.swap-flip .ic { width: 20px; height: 20px; }
.swap-flip .ic svg { stroke-width: 2.3; }
.swap-go { margin-top: 44px; }
.swap-rate { text-align: center; font-size: 13.5px; color: var(--hint); margin-top: 12px; }
.swap-confirm { background: var(--card); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.sc-row { display: flex; align-items: center; gap: 12px; }
.sc-row > div { display: flex; flex-direction: column; }
.sc-row b { font-size: 18px; }
.sc-arrow { color: var(--link); padding-left: 10px; }

/* ==========================================================================
   P2P
   ========================================================================== */
.p2p-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 16px 0; }
.p2p-logo { width: 80px; height: 80px; border-radius: 22px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(180deg, #5bb6ee 0%, #2c86d2 100%); box-shadow: 0 6px 18px rgba(44, 134, 210, .25); }
.p2p-logo .ic { width: 50px; height: 50px; }
.p2p-hero h1 { font-size: 26px; font-weight: 700; margin-top: 22px; letter-spacing: -.01em; }
.p2p-hero p { font-size: 16px; line-height: 21.5px; color: var(--hint); margin-top: 12px; max-width: 320px; }
.p2p-hero .btn-row { width: 100%; margin-top: 26px; gap: 12px; }
.p2p-hero .btn { font-size: 17.5px; }
.p2p-hero .btn .ic { width: 22px; height: 22px; }
.p2p-profile { display: flex; align-items: center; gap: 12px; padding: 30px 16px 8px; font-size: 17px; }
.p2p-profile b { flex: 1; font-weight: 500; }
.pp-ic { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(180deg, #5bb6ee, #2c86d2); color: #fff; display: flex; align-items: center; justify-content: center; }
.pp-ic .ic { width: 20px; height: 20px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; margin-top: 30px; border-bottom: 1px solid var(--sep); }
.tabs2 button { padding: 0 0 14px; font-size: 17px; font-weight: 600; color: var(--hint); position: relative; }
.tabs2 button.on { color: var(--link); }
.tabs2 button.on::after { content: ''; position: absolute; left: 16px; right: 0; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--link); }
.tabs2 button:last-child.on::after { left: 0; right: 16px; }
.p2p-filters { padding-top: 14px; }
.deals, .ads, .offers { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.deal-card, .ad-card, .offer { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-radius: 16px; background: var(--card); }
.deal-card:active { filter: brightness(.97); }
.dc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14.5px; color: var(--hint); }
.dc-top b { font-weight: 500; }
.st-green { color: var(--green); }
.st-orange { color: var(--orange); }
.st-red { color: var(--red); }
.st-blue { color: var(--link); }
.dc-mid { display: flex; align-items: center; gap: 6px; font-size: 17.5px; flex-wrap: wrap; }
.dc-mid b { font-weight: 500; }
.dc-mid .coin-ic { margin-right: 2px; }
.dc-arr { color: var(--hint); display: flex; }
.dc-arr .ic { width: 20px; height: 20px; }
.dc-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14.5px; color: var(--hint); }
.dc-bot > span { display: flex; align-items: center; gap: 6px; }
.dc-bot .ic { width: 20px; height: 20px; }
.ad-price { font-size: 20px; font-weight: 700; }

.coin-tabs { display: flex; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--sep); overflow-x: auto; scrollbar-width: none; }
.coin-tabs::-webkit-scrollbar { display: none; }
.coin-tabs button { flex: none; padding: 12px 2px; font-weight: 600; font-size: 15.5px; color: var(--hint); position: relative; }
.coin-tabs button.on { color: var(--text); }
.coin-tabs button.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--link); }
.offers + .muted { margin-top: 10px; }
.page > .muted.small.pad-h { margin-top: 10px; }
.of-top { display: flex; align-items: center; gap: 8px; }
.of-top b { font-size: 15.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-stats { margin-left: auto; white-space: nowrap; }
.verified { color: var(--link); display: flex; }
.verified .ic { width: 16px; height: 16px; }
.of-price { display: flex; align-items: baseline; gap: 6px; }
.of-price b { font-size: 21px; font-weight: 700; }
.of-info { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.of-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.of-bot .btn { height: 38px; padding: 0 22px; border-radius: 11px; font-size: 15.5px; }
.pay-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pay-tags i { font-style: normal; font-size: 12.5px; padding: 3px 8px; border-radius: 7px; background: var(--bg); color: var(--text2); border-left: 3px solid var(--c, var(--hint2)); }
.sheet-merchant { padding: 4px 0; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.page > .quick { padding: 12px 16px 0; }
.quick button { height: 34px; padding: 0 12px; border-radius: 10px; background: var(--accent-soft); color: var(--link); font-weight: 600; font-size: 14.5px; }

.deal-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 24px 4px; }
.deal-hero h2 { font-size: 21px; font-weight: 700; }
.deal-hero p { font-size: 15px; line-height: 1.4; max-width: 330px; }
.deal-timer { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 10px; background: #fff4e3; color: var(--orange); font-weight: 600; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .deal-timer { background: #3a2c1a; }
.deal-timer .ic { width: 18px; height: 18px; }
.deal-steps { display: flex; align-items: center; padding: 14px 24px 18px; }
.deal-steps > div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; color: var(--hint); width: 70px; }
.deal-steps > div i { width: 26px; height: 26px; border-radius: 50%; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 600; font-size: 13px; }
.deal-steps > div.cur i { background: var(--accent); color: #fff; }
.deal-steps > div.cur { color: var(--text); }
.deal-steps > div.done i { background: var(--green); color: #fff; }
.deal-steps > div i .ic { width: 15px; height: 15px; }
.deal-steps > b { flex: 1; height: 2px; background: var(--sep); margin-bottom: 18px; }
.counterparty { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.counterparty > div { flex: 1; min-width: 0; }
.counterparty .btn { height: 38px; padding: 0 12px; font-size: 15px; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.chat-sheet .sheet-body { height: 70vh; }
.chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.msg { max-width: 80%; align-self: flex-start; padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: var(--card); font-size: 15px; display: flex; flex-direction: column; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg i { font-style: normal; font-size: 11px; opacity: .6; align-self: flex-end; margin-top: 2px; }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; height: 44px; border-radius: 22px; border: 1px solid var(--input-border); background: var(--field-bg); padding: 0 16px; outline: 0; font-size: 15.5px; min-width: 0; }
.chat-input .btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; }

.profile-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px 8px; text-align: center; }
.profile-head h2 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.badge-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 600; font-size: 14px; }
.badge-ok .ic { width: 18px; height: 18px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 0; }
.stats-grid > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--card); }
.stats-grid b { font-size: 20px; font-weight: 700; }
.stats-grid span { font-size: 13px; color: var(--hint); }

/* ==========================================================================
   Ещё
   ========================================================================== */
.more-sec { padding: 26px 16px 0; }
.more-sec:first-child { padding-top: 22px; }
.more-title { display: flex; align-items: center; gap: 10px; padding: 0 9px; color: var(--hint); font-size: 17px; font-weight: 500; }
.more-title .ic { width: 22px; height: 22px; --cut: var(--bg); }
.more-title .ic svg { stroke-width: 1.8; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 22px; margin-top: 20px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; }
.tile-ic { width: 62px; height: 62px; border-radius: 17px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .12s; }
.tile-ic .ic { width: 32px; height: 32px; }
.tile-ic .ic svg { stroke-width: 2.2; }
.tile:active .tile-ic { transform: scale(.93); }
.tile-label { font-size: 13px; color: var(--text2); line-height: 1.2; white-space: nowrap; letter-spacing: -.01em; }
.tile-badge { position: absolute; top: -4px; right: calc(50% - 38px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.more-foot { text-align: center; padding: 30px 0 0; }

/* Сервисы */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 14px 16px 0; }
.sticker-cell { aspect-ratio: 1; border-radius: 16px; background: var(--card); display: flex; align-items: center; justify-content: center; }
.sticker-cell.on-blue, .sticker-big.on-blue { background: linear-gradient(180deg, #5cb7f2, #2d8bd8); }
.sticker-big.on-blue { border-radius: 24px; }
.sticker-big { display: flex; justify-content: center; padding: 10px 0 20px; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sep); }
.checks { padding: 8px 16px 0; }
.check-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.check-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.check-btns { display: flex; gap: 6px; }
.levels { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px; }
.level { padding: 12px 14px; border-radius: 14px; background: var(--card); display: flex; flex-direction: column; gap: 2px; border: 1.5px solid transparent; }
.level.cur { border-color: var(--accent); }
.level span { font-size: 13.5px; color: var(--hint); }
.inbox { padding: 0 16px; }
.inbox-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sep); }
.inbox-item > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.inbox-item > div span { font-size: 14px; color: var(--hint); }
.inbox-item.unread b::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.inbox-item i { font-style: normal; white-space: nowrap; }
.fee-card { padding: 10px 16px 4px; }
.fee-head { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.faq { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.faq details { border-radius: 14px; background: var(--card); padding: 0 14px; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0; font-weight: 600; font-size: 15.5px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 20px; height: 20px; color: var(--hint); transition: transform .2s; }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq p { padding-bottom: 14px; font-size: 15px; line-height: 1.45; color: var(--text2); }
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 0; }
.video-card { display: flex; flex-direction: column; gap: 6px; font-size: 14px; cursor: pointer; }
.video-thumb { position: relative; aspect-ratio: 16/10; border-radius: 14px; background: linear-gradient(135deg, #2b3440, #151b22); display: flex; align-items: center; justify-content: center; }
.video-thumb span { position: absolute; right: 8px; bottom: 6px; font-size: 12px; color: #fff; background: rgba(0, 0, 0, .55); padding: 1px 6px; border-radius: 6px; }

/* Админ */
.coin-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.coin-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 7px; border-radius: 18px; background: var(--card); font-weight: 600; font-size: 14.5px; border: 1.5px solid transparent; }
.coin-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--link); }
.adm-current { padding: 12px 16px 0; }
.adm-current b { color: var(--text); font-weight: 600; }
.adm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 16px 10px; }
.page > .btn-block { margin: 0 16px; width: calc(100% - 32px); }
.page > .btn-block + .list { margin-top: 16px; }
.adm-list { padding: 0 16px; display: flex; flex-direction: column; }
.adm-row { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; width: 100%; text-align: left; }
.adm-row.sel { background: var(--accent-soft); }
.adm-logs { padding: 0 16px; }
.adm-log { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--sep); font-size: 14.5px; }
.adm-log > span { flex: 1; display: flex; flex-direction: column; }

/* Мелкие экраны */
@media (max-width: 370px) {
  .btn-row .btn { font-size: 15px; padding: 0 10px; gap: 6px; }
  .btn-row .btn .ic { width: 18px; height: 18px; }
  .setup-text b { font-size: 15px; }
  .setup-text span { font-size: 13px; }
  .ex-main { gap: 12px; }
  .ob-row { font-size: 13.5px; }
  .tile-ic { width: 56px; height: 56px; }
  .tile-label { font-size: 12px; }
  .swap-coin b { font-size: 23px; }
}
