/* Swiss+ v5 — каркас (телефон / компьютер) и экраны клиента.
   Принципы: строгая сетка, тонкие линии вместо карточек с тенями, табличные цифры,
   цвет — только там, где он что-то значит (карта ЕС, плюс/минус, ошибки). */

:root { --side-w: 244px; --gut: 16px; }

/* ───────── каркас ───────── */
.shell { min-height: 100vh; }
.side { display: none; }
.main-col { min-width: 0; }
.topbar .crumb { display: none; }
.top-avatar { display: inline-flex; }
.topnav { display: none !important; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .side {
    display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px 16px;
  }
  .side-brand { display: flex; align-items: center; font-weight: 700; font-size: 21px; letter-spacing: -0.04em; padding: 2px 10px 10px; }
  .side-brand img { height: 30px; }
  .side-brand .plus { color: var(--danger); font-weight: 500; }
  .side-nav { display: grid; gap: 1px; }
  .side-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 6px; }
  .side-nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: var(--radius-sm);
    color: var(--ink-2); font-weight: 500; font-size: 14.5px; position: relative; }
  .side-nav a svg { width: 19px; height: 19px; flex: none; color: var(--muted); }
  .side-nav a:hover { background: var(--bg); color: var(--ink); }
  .side-nav a.active { background: var(--bg); color: var(--ink); font-weight: 600; }
  .side-nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; background: var(--ink); }
  .side-nav a.active svg { color: var(--ink); }
  .side-badge { margin-left: auto; font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
  .side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 6px 0; display: grid; gap: 12px; }
  .side-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .side-user b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user small { display: block; font-size: 12px; color: var(--muted); }
  .side-foot .lang { justify-self: start; }

  .topbar { background: color-mix(in srgb, var(--bg) 90%, transparent); }
  .topbar-inner { max-width: none; padding: 0 40px; height: 60px; }
  .topbar .brand { display: none; }
  .topbar .crumb { display: block; font-size: 13.5px; color: var(--muted); }
  .top-avatar { display: none; }
  main.page, main.page.wide { max-width: 1180px; margin: 0; padding: 26px 40px 64px; }
  main.page.narrow { max-width: 680px; }
  .tabbar { display: none !important; }
}

@media (max-width: 899px) {
  .topbar-inner { height: 52px; gap: 12px; padding: 0 var(--gut); }
  main.page, main.page.wide { max-width: 640px; margin: 0 auto; padding: 16px var(--gut) calc(var(--tabbar-h) + 36px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: .01em; }
  .tabbar a svg { width: 23px; height: 23px; }
  .tabbar a.active { color: var(--ink); font-weight: 600; }
  .tabbar a.active::before { content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--ink); }
  .tab-badge { top: 7px; left: calc(50% + 7px); }
}

/* ───────── заголовки страниц ───────── */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 22px; flex-wrap: wrap; }
.ph h1 { font-size: 32px; line-height: 1.05; font-weight: 700; letter-spacing: -0.045em; margin: 0; }
.ph .sub { color: var(--muted); margin-top: 6px; font-size: 14.5px; }
.ph .acts { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 899px) { .ph h1 { font-size: 28px; } .ph { margin-bottom: 18px; } }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.back::before { content: "←"; }

.h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 10px; }
.h2 h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.h2 a, .h2 .aside { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.h2 a:hover { color: var(--ink); }
.col > .h2:first-child, .dash .h2.first { margin-top: 0; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 0 11px; font-weight: 550; font-size: 14.5px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--ink); }
.tabs a .n { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* ───────── деньги ───────── */
.money small { font-size: .62em; font-weight: inherit; letter-spacing: 0; opacity: .7; }
.up { color: var(--green); } .down { color: var(--danger); }
.mono { font-family: var(--mono); letter-spacing: .02em; }

/* ───────── главная ───────── */
.dash { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 0 40px; align-items: start; }
.dash > .col { min-width: 0; }
@media (max-width: 899px) {
  .dash { display: flex; flex-direction: column; }
  .dash > .col { display: contents; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; }
}

.hero { padding: 2px 0 0; }
.hero .hero-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.hero .hero-top .flag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--card); }
.eye-btn { border: 0; background: none; color: var(--muted); padding: 4px; margin-left: -2px; cursor: pointer; display: inline-grid; }
.eye-btn svg { width: 18px; height: 18px; }
.hero-bal { font-size: 54px; font-weight: 650; letter-spacing: -0.055em; line-height: 1; margin: 10px 0 8px; white-space: nowrap; }
.hero-bal .cc { font-size: 20px; font-weight: 550; letter-spacing: -0.01em; color: var(--muted); margin-left: 8px; }
.hero-sub { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--muted); }
.hero-sub b { font-weight: 600; color: var(--ink-2); }

.flash .hero-bal { animation: pulse 1.2s ease; }
@media (max-width: 899px) { .hero-bal { font-size: 44px; } .hero-bal .cc { font-size: 17px; } }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0 0; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; font-size: 12.5px; font-weight: 550; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; line-height: 1.2; }
.quick a:hover { border-color: var(--ink); }
.quick a .qi { width: 22px; height: 22px; display: grid; place-items: center; }
.quick a svg { width: 22px; height: 22px; }
.quick a.main { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (min-width: 900px) { .quick a { flex-direction: row; justify-content: center; padding: 0 10px; height: 46px; font-size: 14px; gap: 9px; } .quick a svg { width: 19px; height: 19px; } }

/* ───────── банковская карта ───────── */
.bcard-wrap { perspective: 1400px; }
.bcard { position: relative; width: 100%; max-width: 420px; aspect-ratio: 85.6 / 53.98; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1); cursor: pointer; }
.bcard.flipped { transform: rotateY(180deg); }
.bcard .face { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  color: #fff; padding: 6% 6.5%; display: flex; flex-direction: column;
  background:
    radial-gradient(140% 100% at 0% 0%, rgb(255 255 255 / .16), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgb(0 0 0 / .28), transparent 60%),
    var(--card);
  box-shadow: 0 1px 0 rgb(255 255 255 / .12) inset, 0 20px 40px -22px rgb(0 20 80 / .55), 0 2px 6px rgb(0 0 0 / .08); }
.bcard .face::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgb(255 255 255 / .018) 0 2px, transparent 2px 5px); }
.bcard .rear { transform: rotateY(180deg); padding: 0; }
.bc-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.bc-brand { font-weight: 700; font-size: clamp(15px, 4.6cqw, 19px); letter-spacing: -0.035em; }
.bc-brand span { opacity: .75; font-weight: 500; }
.bc-type { font-size: 10px; letter-spacing: .16em; font-weight: 600; opacity: .8; text-transform: uppercase; }
.bc-mid { display: flex; align-items: center; gap: 10px; margin-top: auto; margin-bottom: 7%; position: relative; z-index: 1; }
.chip { width: 15%; aspect-ratio: 1.3; border-radius: 5px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #E8DDBA 0%, #C9B37A 45%, #E4D6A8 70%, #B89D5E 100%); box-shadow: inset 0 0 0 1px rgb(90 70 20 / .25); }
.chip::before { content: ""; position: absolute; inset: 22% 0; border-top: 1px solid rgb(90 70 20 / .35); border-bottom: 1px solid rgb(90 70 20 / .35); }
.chip::after { content: ""; position: absolute; inset: 0 34%; border-left: 1px solid rgb(90 70 20 / .35); border-right: 1px solid rgb(90 70 20 / .35); }
.bc-nfc { width: 22px; height: 22px; opacity: .85; }
.bc-num { font-family: var(--mono); font-size: clamp(14px, 5.2cqw, 20px); letter-spacing: .12em; position: relative; z-index: 1; white-space: nowrap; }
.bc-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 3.5%; position: relative; z-index: 1; font-size: 11.5px; }
.bc-bottom .k { display: block; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .65; margin-bottom: 2px; }
.bc-bottom .v { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.bcard .eu-stars { right: 5%; top: 8%; transform: none; width: 34%; height: auto; aspect-ratio: 1; opacity: .95; }
.bcard .face.front { container-type: inline-size; }
.bcard .stripe { height: 18%; background: #0B0F1A; margin-top: 8%; }
.bcard .sig { display: flex; align-items: center; gap: 10px; margin: 6% 6.5% 0; }
.bcard .sig .sigpad { flex: 1; height: 34px; background: repeating-linear-gradient(90deg, #F4F1E8 0 6px, #E9E3D2 6px 12px); border-radius: 3px; }
.bcard .sig .cvv { background: #fff; color: #0A0B0D; font-family: var(--mono); font-weight: 600; padding: 7px 10px; border-radius: 3px; font-size: 14px; letter-spacing: .1em; }
.bcard .back-info { margin: 5% 6.5% 0; display: grid; gap: 8px; font-size: 12px; position: relative; z-index: 1; }
.bcard .back-info .mono { font-size: 15px; letter-spacing: .1em; }
.bcard .back-info .row2 { display: flex; gap: 24px; }
.bcard .back-info .k { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; opacity: .65; display: block; }
.card-tools { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.card-tools .btn { flex: 1; }

/* ───────── списки-линейки ───────── */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rl { display: block; }
.rl > * + * { border-top: 1px solid var(--line); }
.rl-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; color: inherit; }
a.rl-row:hover { background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
.rl-row .t1 { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-row .t2 { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-row .amt { text-align: right; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.rl-row .amt .t2 { font-weight: 400; text-align: right; }
.rl-row.in .amt > .money, .rl-row.in .amt > span:first-child { color: var(--green); }
.rl-row.struck .amt { text-decoration: line-through; opacity: .55; }
.rl-foot { display: flex; justify-content: space-between; padding: 12px 14px; font-size: 13.5px; }
.rl-foot b { font-weight: 650; }
.av.sys.g { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.av.sys.g svg { width: 20px; height: 20px; }
.av.sys.g.blue { background: var(--card); color: #fff; border-color: var(--card); }
.av.sq { border-radius: var(--radius-sm); }

.day { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 2px 7px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.day:first-child { padding-top: 0; }
.day .dt { font-weight: 500; font-variant-numeric: tabular-nums; }
.feed .sheet + .day { padding-top: 18px; }
.tag.mini { height: 18px; font-size: 10.5px; padding: 0 5px; margin-left: 4px; }

/* ───────── счета на главной ───────── */
.accts .rl-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.prog { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 7px; }
.prog i { display: block; height: 100%; background: var(--ink); }
.prog.blue i { background: var(--card); }
.prog.big { height: 8px; border-radius: 4px; margin-top: 12px; }
.add-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--muted); font-weight: 550; font-size: 14px; }
.add-row .av { border-style: dashed; background: transparent; }
.add-row:hover { color: var(--ink); }

/* ───────── реквизиты ───────── */
.kvc { list-style: none; margin: 0; padding: 0; }
.kvc li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 11px 14px; }
.kvc li + li { border-top: 1px solid var(--line); }
.kvc .k { font-size: 12.5px; color: var(--muted); grid-column: 1; }
.kvc .v { grid-column: 1; font-weight: 550; font-size: 15px; overflow-wrap: anywhere; }
.kvc .v.mono { font-size: 14.5px; letter-spacing: .04em; }
.kvc .cp { grid-column: 2; grid-row: 1 / span 2; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.ok { color: var(--green); border-color: var(--green); }

/* ───────── квитанция ───────── */
.rcpt { max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative; }
.rcpt-head { padding: 26px 22px 20px; text-align: center; border-bottom: 1px dashed var(--line-strong); }
.rcpt-head .stamp { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--green); letter-spacing: .02em; }
.rcpt-head .stamp svg { width: 16px; height: 16px; }
.rcpt-head .stamp.rev { color: var(--danger); }
.rcpt-head .big { font-size: 40px; font-weight: 650; letter-spacing: -0.045em; margin: 10px 0 4px; }
.rcpt-head .ttl { font-weight: 600; }
.rcpt-head .t2 { color: var(--muted); font-size: 13.5px; }
.rcpt ul { list-style: none; margin: 0; padding: 10px 22px 14px; }
.rcpt li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; font-size: 14px; }
.rcpt li .k { color: var(--muted); white-space: nowrap; }
.rcpt li .dots { flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); min-width: 12px; }
.rcpt li .v { text-align: right; font-weight: 550; }
.rcpt li .v small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.rcpt-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 22px 22px; }
.rcpt-foot .btn:only-child { grid-column: 1 / -1; }
.rcpt-head { position: relative; }
.rcpt-head::before, .rcpt-head::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); bottom: -10px; }
.rcpt-head::before { left: -10px; clip-path: inset(0 0 0 50%); } .rcpt-head::after { right: -10px; clip-path: inset(0 50% 0 0); }

/* ───────── формы ───────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 599px) { .form-grid { grid-template-columns: 1fr; } }
.icon-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-pick label { cursor: pointer; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick span { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.icon-pick svg { width: 22px; height: 22px; }
.icon-pick input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kind-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kind-pick label { cursor: pointer; }
.kind-pick input { position: absolute; opacity: 0; }
.kind-pick span { display: block; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); height: 100%; }
.kind-pick b { display: block; font-size: 14.5px; }
.kind-pick small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.35; }
.kind-pick input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.drop { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .pv { width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--bg); display: grid; place-items: center; overflow: hidden; flex: none; border: 1px solid var(--line); }
.drop .pv img { width: 100%; height: 100%; object-fit: cover; }
.drop .pv svg { width: 22px; height: 22px; color: var(--muted); }
.drop b { display: block; font-size: 14px; } .drop small { color: var(--muted); font-size: 12.5px; }
[data-only] { display: none; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }

/* ───────── инвестиции ───────── */
.inv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.inv-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 18px; }
.inv-sum > div { padding: 12px 14px; min-width: 0; }
.inv-sum > div + div { border-left: 1px solid var(--line); }
.inv-sum .k { font-size: 12px; color: var(--muted); }
.inv-sum .v { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) { .inv-sum .v { font-size: 14px; white-space: normal; overflow-wrap: anywhere; } .inv-sum > div { padding: 10px 11px; } }
.move-box { display: none; margin-top: 12px; padding: 14px; }
.move-box.open { display: block; }
.logo-av { width: 40px; height: 40px; border-radius: var(--radius-sm); overflow: hidden; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 12px; letter-spacing: .02em; flex: none; }
.logo-av img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.logo-av.lg { width: 56px; height: 56px; font-size: 15px; }
.logo-av.bond { background: var(--card); color: #fff; }
.logo-av.commodity { background: #7A5C1E; color: #fff; }
.mkt-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 110px auto; gap: 12px; align-items: center; padding: 11px 14px; }
.mkt-row .spark { width: 110px; height: 30px; }
.mkt-row .px { text-align: right; font-weight: 600; white-space: nowrap; }
.mkt-row .px small { display: block; font-weight: 550; font-size: 12.5px; }
@media (max-width: 599px) { .mkt-row { grid-template-columns: 40px minmax(0, 1fr) auto; } .mkt-row .spark { display: none; } }
.chg { font-variant-numeric: tabular-nums; }
.chg.up::before { content: "▲ "; font-size: .8em; } .chg.down::before { content: "▼ "; font-size: .8em; }

.sec-head { display: flex; gap: 14px; align-items: center; }
.sec-head h1 { font-size: 26px; margin: 0; font-weight: 700; letter-spacing: -0.035em; }
.sec-head .t2 { color: var(--muted); font-size: 14px; }
.sec-price { font-size: 40px; font-weight: 650; letter-spacing: -0.05em; margin: 16px 0 2px; line-height: 1; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 0 36px; align-items: start; }
@media (max-width: 899px) { .sec-grid { display: flex; flex-direction: column; } .sec-grid > .col { display: contents; } }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.facts > div { padding: 10px 14px; border-top: 1px solid var(--line); min-width: 0; }
.facts > div:nth-child(-n+2) { border-top: 0; }
.facts > div:nth-child(even) { border-left: 1px solid var(--line); }
.facts .k { font-size: 12px; color: var(--muted); } .facts .v { font-weight: 600; margin-top: 2px; font-size: 14.5px; }
.book { display: grid; grid-template-columns: 1fr 1fr; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.book > div { min-width: 0; }
.book .bh { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 11.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.book .br { display: flex; justify-content: space-between; padding: 6px 12px; position: relative; }
.book .br i { position: absolute; top: 2px; bottom: 2px; opacity: .1; }
.book .bids .br i { right: 0; background: var(--green); } .book .asks .br i { left: 0; background: var(--danger); }
.book .bids .p { color: var(--green); font-weight: 600; } .book .asks .p { color: var(--danger); font-weight: 600; }
.book .bids { border-right: 1px solid var(--line); }
.book .empty { padding: 14px 12px; font-size: 13px; text-align: left; }
.trade-box { padding: 16px; }
.side-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.side-seg label { cursor: pointer; } .side-seg input { position: absolute; opacity: 0; }
.side-seg span { display: block; text-align: center; padding: 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.side-seg label + label span { border-left: 1px solid var(--line-strong); }
.side-seg input:checked + span { background: var(--ink); color: var(--bg); }
.side-seg input[value=sell]:checked + span { background: var(--danger); color: #fff; }
.est { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; color: var(--muted); }
.est b { color: var(--ink); font-weight: 600; }
.desc { white-space: pre-line; color: var(--ink-2); line-height: 1.55; }

/* ───────── магазин ───────── */
.shop-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.shop-bar form { flex: 1; min-width: 200px; display: flex; }
.chips { display: flex; gap: 6px; }
.chips a { padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.chips a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 599px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; }
.tile:hover { border-color: var(--ink); }
.tile .img { aspect-ratio: 4 / 3; background: var(--bg); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.tile .img img { width: 100%; height: 100%; object-fit: cover; }
.tile .img .ph-ic { width: 38px; height: 38px; color: var(--line-strong); }
.tile .body { padding: 10px 12px 12px; display: grid; gap: 3px; flex: 1; }
.tile .ttl { font-weight: 600; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .price { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; margin-top: auto; padding-top: 6px; }
.tile .by { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.stars { display: inline-flex; gap: 1px; color: var(--ink); vertical-align: -2px; }
.stars svg { width: 13px; height: 13px; }
.stars .off { color: var(--line-strong); }
.item-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
@media (max-width: 899px) { .item-grid { grid-template-columns: 1fr; gap: 18px; } }
.item-img { aspect-ratio: 4 / 3; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.item-img img { width: 100%; height: 100%; object-fit: contain; background: var(--bg); }
.item-img .ph-ic { width: 60px; height: 60px; color: var(--line-strong); }
.escrow-note { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); padding: 12px 14px; border-left: 3px solid var(--card); background: color-mix(in srgb, var(--card) 6%, var(--surface)); margin-top: 12px; }
.escrow-note svg { width: 18px; height: 18px; flex: none; color: var(--card); margin-top: 1px; }
.rate-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate-stars input { position: absolute; opacity: 0; }
.rate-stars label { cursor: pointer; color: var(--line-strong); }
.rate-stars label svg { width: 30px; height: 30px; }
.rate-stars input:checked ~ label, .rate-stars label:hover, .rate-stars label:hover ~ label { color: var(--ink); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--muted); }
.steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); margin: 3px 0 0 3px; }
.steps li.done { color: var(--ink); } .steps li.done::before { background: var(--ink); border-color: var(--ink); }
.steps li.now { color: var(--ink); font-weight: 600; } .steps li.now::before { border-color: var(--ink); }

/* ───────── статусы ───────── */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.st.ok::before { background: var(--green); } .st.wait::before { background: #D59A00; } .st.bad::before { background: var(--danger); }
.st.info::before { background: var(--card); }

/* ───────── «Ещё» и рейтинг ───────── */
.more-head { display: flex; align-items: center; gap: 14px; padding: 16px 14px; }
.more-head b { display: block; font-size: 17px; }
.more-head small { color: var(--muted); }
.more-list .rl-row { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 11px 14px; }
.more-list .rl-row .av.sys.g { width: 36px; height: 36px; }
.more-list .chev { width: 18px; height: 18px; color: var(--muted); }
.rank { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; }
.rank .n { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--muted); }
.rank.top1 .n { color: var(--ink); }
.rank .v { font-weight: 650; text-align: right; font-size: 15.5px; white-space: nowrap; }
.rank .bar { height: 3px; background: var(--line); margin-top: 6px; } .rank .bar i { display: block; height: 100%; background: var(--card); }
.rank.me { background: color-mix(in srgb, var(--card) 5%, var(--surface)); }

/* ───────── Face ID ───────── */
.pk-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pk-row .av { width: 36px; height: 36px; }
.pk-row b { display: block; font-size: 14.5px; } .pk-row small { color: var(--muted); font-size: 12.5px; }
.pk-row form { margin-left: auto; }
.btn-face { display: flex; width: 100%; margin-top: 10px; gap: 10px; }
.glass .btn-face { background: transparent; color: #fff; border-color: rgb(255 255 255 / .25); height: 48px; }
.glass .btn-face:hover { border-color: rgb(255 255 255 / .6); }
.glass .or { display: flex; align-items: center; gap: 10px; color: #6F809A; font-size: 12px; margin: 12px 0 0; }
.glass .or::before, .glass .or::after { content: ""; flex: 1; height: 1px; background: rgb(255 255 255 / .12); }

/* ───────── админ ───────── */
.q-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; }
.decide { display: grid; gap: 10px; padding: 16px; }
.decide .row { gap: 8px; }
.note-box { padding: 12px 14px; border-left: 3px solid var(--line-strong); background: var(--bg); font-size: 14px; white-space: pre-line; }
.note-box.bad { border-color: var(--danger); } .note-box.ok { border-color: var(--green); }

.muted-link { color: var(--muted); font-size: 13.5px; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0 !important; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.pad { padding: 16px; }
.empty-state { padding: 26px 16px; color: var(--muted); font-size: 14px; }
.empty-state b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty-state .btn { margin-top: 12px; }
.bcard .face.has-img { background-size: cover; background-position: center; }
@media (max-width: 899px) {
  .dash, .sec-grid { align-items: stretch; }
  .dash .h2.first, .sec-grid .h2.first { margin-top: 30px; }
  .dash > .col > section.o1 + section, .quick + .h2 { margin-top: 30px; }
}
.rl-row.req-row { grid-template-columns: 40px minmax(0, 1fr); }
.rl-row.req-row .row { grid-column: 2; }
.add-row .av svg { width: 18px; height: 18px; }
.av.sys.g.lg svg { width: 32px; height: 32px; }

/* ───────── уровни карт ─────────
   Строго: однотонный «металл», тонкая гравировка, никаких блёсток. */
.bc-top { align-items: center; }
.bc-brand { display: flex; align-items: center; }
.bc-sep { display: inline-block; width: 1px; height: .9em; background: currentColor; opacity: .35; margin: 0 10px 0 11px; }
.bc-brand .bc-tier { font-size: clamp(9px, 2.5cqw, 11px); font-weight: 600; letter-spacing: .26em; text-transform: uppercase; opacity: .8; }
.bcard .guilloche { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .16; pointer-events: none; }

/* Silver — матовый титан, шлифовка по горизонтали */
.bcard.t-silver .face { color: #15171A;
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / .05) 0 1px, rgb(0 0 0 / .02) 1px 2px),
    linear-gradient(120deg, #D7DADD 0%, #B8BCC1 38%, #CDD0D4 55%, #A9AEB4 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), inset 0 0 0 1px rgb(0 0 0 / .08), 0 20px 40px -24px rgb(30 35 45 / .55); }
.bcard.t-silver .face::after { background: none; }
.bcard.t-silver .eu-stars g { fill: #6E747B; }
.bcard.t-silver .eu-stars { filter: drop-shadow(0 1px 0 rgb(255 255 255 / .55)); opacity: .85; }
.bcard.t-silver .bc-brand span { opacity: .55; }
.bcard.t-silver .rear .stripe { background: #22252A; }

/* Black — чёрный анодированный металл */
.bcard.t-black .face { color: #E9E9EA;
  background:
    radial-gradient(120% 90% at 0% 0%, rgb(255 255 255 / .07), transparent 55%),
    linear-gradient(160deg, #1C1D20 0%, #0E0F11 60%, #08090A 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), inset 0 0 0 1px rgb(255 255 255 / .05), 0 22px 44px -22px rgb(0 0 0 / .7); }
.bcard.t-black .face::after { background: repeating-linear-gradient(115deg, rgb(255 255 255 / .012) 0 2px, transparent 2px 5px); }
.bcard.t-black .eu-stars g { fill: none; stroke: #8B8D92; stroke-width: .9; }
.bcard.t-black .eu-stars { opacity: .9; }
.bcard.t-black .chip { background: linear-gradient(135deg, #8C8F94 0%, #55585D 45%, #7A7D82 70%, #3F4246 100%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .4); }
.bcard.t-black .chip::before, .bcard.t-black .chip::after { border-color: rgb(0 0 0 / .45); }
.bcard.t-black .rear .stripe { background: #000; }

/* чип уровня */
.tier-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tier-chip.t-blue { background: #003399; color: #fff; }
.tier-chip.t-silver { background: linear-gradient(120deg, #D7DADD, #AEB3B9); color: #15171A; }
.tier-chip.t-black { background: #0E0F11; color: #E9E9EA; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); }


.tier-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.tier-line .grow { flex: 1; min-width: 0; }
.tier-line .t2 { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 22px; }
@media (max-width: 699px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card .bcard { cursor: default; }
.tier-card.locked .bcard { filter: saturate(.85); opacity: .9; }
.tier-card .perks { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13.5px; }
.tier-card .perks li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.tier-card .perks li span:first-child { color: var(--muted); }
.tier-card .head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.tier-card .head b { font-size: 16px; }


/* ───────── QR ───────── */
.qr-card { display: grid; justify-items: center; gap: 12px; padding: 26px 18px 22px; text-align: center; }
.qr-frame { width: min(260px, 70vw); aspect-ratio: 1; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qr-frame svg, svg.qr { width: 100%; height: 100%; display: block; }
.qr-who b { display: block; font-size: 17px; } .qr-who span { font-size: 13px; color: var(--muted); }
.qr-amt { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; }
.scan-box { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 70vh; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 2px solid rgb(255 255 255 / .85); border-radius: 14px; box-shadow: 0 0 0 999px rgb(0 0 0 / .35); }
.av.sys.g.inv-fine { color: var(--danger); }
.rcpt-foot form .btn { width: 100%; }
.plan-rows { display: grid; gap: 8px; } .plan-row { display: grid; grid-template-columns: 1fr 1fr auto 36px; gap: 8px; align-items: center; } .plan-row .input { height: 42px; }

/* Скрытые суммы: «пыль», как спойлер в Telegram */
.spoil { position: relative; display: inline-block; vertical-align: baseline; }
.spoil > .sp-txt { display: inline-block; transition: opacity .25s ease; }
.spoil > .sp-cv { position: absolute; left: -2px; top: -2px; pointer-events: none; display: none; }
.hide-money .spoil { cursor: pointer; -webkit-user-select: none; user-select: none; }
.hide-money .spoil > .sp-txt { opacity: 0; }
.hide-money .spoil > .sp-cv, .spoil.sp-revealing > .sp-cv { display: block; }
.spoil.sp-revealing > .sp-txt { opacity: 1; transition: none;
  -webkit-clip-path: circle(var(--sp-r, 0px) at var(--sp-x, 50%) var(--sp-y, 50%));
          clip-path: circle(var(--sp-r, 0px) at var(--sp-x, 50%) var(--sp-y, 50%)); }
#bal.spoil { cursor: pointer; }

.eye-btn .eye-x { display: none; }
.hide-money .eye-btn .eye-on { display: none; }
.hide-money .eye-btn .eye-x { display: inline-flex; }
.eye-btn > span { display: inline-flex; }
