/* Swiss+ — стили интерфейса.
   Цвета, шрифт и скругления приходят из настроек «Дизайн» (переменные --bg, --accent, --blue …). */

:root { --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; --tabbar-h: 64px; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.txt-link { color: var(--blue); font-weight: 500; }
.label { font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pos { color: var(--green); } .neg { color: var(--danger); }

/* ───────── каркас ───────── */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top);
}
.topbar-inner { max-width: 1120px; margin: 0 auto; height: 56px; display: flex; align-items: center; gap: 24px; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 19px; letter-spacing: -0.035em; }
.brand img { height: 28px; width: auto; }
.brand .plus { color: var(--danger); font-weight: 500; margin-left: 1px; }
.topnav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.topnav a { padding: 7px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; }
.topnav a:hover { color: var(--ink); }
.topnav a.active { color: var(--ink); background: transparent; box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.top-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; font-size: 12px; font-weight: 600; }
.lang a { padding: 3px 9px; border-radius: 999px; color: var(--muted); }
.lang a.on { background: var(--ink); color: var(--bg); }

main.page { max-width: 580px; margin: 0 auto; padding: 24px 20px 48px; }
main.page.wide { max-width: 1120px; }
.tabbar { display: none; }

@media (max-width: 760px) {
  .topnav { display: none; }
  .topbar-inner { height: 52px; gap: 12px; }
  main.page { padding: 18px 16px calc(var(--tabbar-h) + 32px + 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) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10.5px; font-weight: 500; color: var(--muted); }
  .tabbar a.active { color: var(--ink); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a > svg, .tabbar a.cta .ic { height: 30px; }
  .tabbar a > svg { width: 22px; }
  .tabbar a.cta .ic { width: 42px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
  .tabbar a.cta .ic svg { width: 20px; height: 20px; }
  .tabbar a.cta.active { color: var(--ink); }
}

/* ───────── заголовки ───────── */

.page-head { margin: 8px 0 22px; }
.page-head h1 { font-size: 34px; line-height: 1.05; font-weight: 700; letter-spacing: -0.045em; margin: 0; }
@media (max-width: 760px) { .page-head h1 { font-size: 30px; } }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.section-head h2 { font-size: 12px; font-weight: 650; margin: 0; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.section-head a { font-size: 13.5px; color: var(--blue); font-weight: 500; }

/* ───────── карта счёта ───────── */

.acct {
  background: var(--card); color: var(--card-ink); border-radius: var(--radius-card);
  padding: 20px 22px 18px; display: grid; gap: 26px; position: relative; overflow: hidden;
  background-size: cover; background-position: center;
}
.acct.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .15), rgb(0 0 0 / .55)); }
.acct.has-img { color: #fff; --card-muted: rgb(255 255 255 / .75); }
.acct > * { position: relative; }
.acct { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--card-ink) 12%, transparent); }
.acct { --card-muted: color-mix(in srgb, var(--card-ink) 60%, var(--card)); }
.acct-top { display: flex; justify-content: space-between; align-items: flex-start; }
.acct-top .who { font-size: 14px; font-weight: 550; }
.acct-top .cur-name { font-size: 12.5px; color: var(--card-muted); margin-top: 2px; }
.acct .mark { font-weight: 650; font-size: 16px; letter-spacing: -0.035em; }
.acct .mark span { color: var(--danger); }
.acct-balance .label { color: var(--card-muted); }
.acct-balance .amount { font-size: 40px; line-height: 1.05; font-weight: 500; letter-spacing: -0.04em; margin-top: 6px; }
.acct-balance .amount .cc { font-size: 17px; font-weight: 500; color: var(--card-muted); letter-spacing: 0; margin-left: 6px; }
.acct-foot { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--card-muted); letter-spacing: 0.04em; }
.acct .stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; display: flex; }
.acct .stripe span { flex: 1; } .acct .stripe span:first-child { background: var(--blue); } .acct .stripe span:last-child { background: var(--accent); }
.acct.flash .amount { animation: pulse 1.2s ease; }
@keyframes pulse { 0% { color: var(--green); } 100% { color: inherit; } }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.actions .btn { padding: 0 10px; }

.rates-line {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; color: var(--ink-2);
}
.rates-line b { color: var(--ink); font-weight: 600; }
.rates-line .rl-more { margin-left: auto; color: var(--blue); font-weight: 700; font-size: 16px; }

/* ───────── кнопки и формы ───────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, filter .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover, .btn.dark:hover, .btn.blue:hover { filter: brightness(1.08); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.blue { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: var(--radius-sm); }
.btn.xs { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .label-row { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.label-row { display: flex; justify-content: space-between; gap: 10px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: -2px; }
.input, select.input, textarea.input {
  width: 100%; height: 48px; padding: 0 14px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.input-affix { position: relative; }
.input-affix .input { padding-right: 64px; }
.input-affix .affix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; font-size: 14px; }
.input.big { height: 64px; font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; cursor: pointer; }
.check + .check { border-top: 1px solid var(--line); }
.check input { position: absolute; opacity: 0; }
.check .sw { flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; margin-top: 1px; }
.check .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s; }
.check input:checked + .sw { background: var(--blue); }
.check input:checked + .sw::after { transform: translateX(18px); }
.check input:focus-visible + .sw { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 30%, transparent); }
.check b { display: block; font-weight: 600; }
.check small { display: block; color: var(--muted); font-size: 13px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 18px; }

.alert { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; overflow-wrap: anywhere; }
.alert.err { background: var(--err-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert.ok { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; border-left: 3px solid; white-space: pre-line; }
.banner.info { background: var(--blue-soft); border-color: var(--blue); }
.banner.warn { background: var(--warn-bg); border-color: var(--warn); }
.banner.ok { background: var(--green-bg); border-color: var(--green); }
.banner.danger { background: var(--err-bg); border-color: var(--danger); color: var(--danger); }

/* ───────── списки операций ───────── */

.tx-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tx { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx .t-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .t-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .t-amt { text-align: right; font-weight: 600; font-size: 14.5px; }
.tx .t-amt.in { color: var(--green); }
.tx .t-extra { font-size: 12px; color: var(--muted); font-weight: 400; }
.tx.struck .t-amt { text-decoration: line-through; opacity: .6; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }

.av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink); font-weight: 650; font-size: 14px; border: 1px solid var(--line); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sys { border-radius: var(--radius-sm); background: var(--ink); color: var(--bg); font-size: 18px; font-weight: 500; }
.av.lg { width: 76px; height: 76px; font-size: 26px; }
.av.sm { width: 32px; height: 32px; font-size: 12px; }

.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-strong);
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.tag.red { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.tag.green { border-color: color-mix(in srgb, var(--green) 40%, transparent); color: var(--green); }
.tag.blue { border-color: color-mix(in srgb, var(--blue) 40%, transparent); color: var(--blue); background: var(--blue-soft); }

/* ───────── запросы ───────── */

.req { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px; align-items: center; }
.req + .req { border-top: 1px solid var(--line); }
.req .r-title { font-weight: 600; }
.req .r-sub { font-size: 13px; color: var(--muted); }
.req .r-actions { grid-column: 2; display: flex; gap: 8px; margin-top: 2px; }
.req.in { border-left: 3px solid var(--blue); }

/* ───────── перевод ───────── */

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; background: var(--surface-2); border-radius: var(--radius); margin-bottom: 20px; border: 1px solid var(--line); }
.seg a { text-align: center; padding: 9px; border-radius: calc(var(--radius) - 3px); font-weight: 600; font-size: 14px; color: var(--muted); }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }

.people { display: grid; gap: 8px; }
.person { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.person input { position: absolute; opacity: 0; pointer-events: none; }
.person .p-name { font-weight: 600; }
.person .p-sub { font-size: 12.5px; color: var(--muted); }
.payee-out:empty { display: none; }
.payee-out { margin-top: 10px; }
.payee-card { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px;
  border: 1px solid var(--blue); border-radius: 14px; box-shadow: 0 0 0 1px var(--blue); animation: payeeIn .25s ease both; }
.payee-card .p-name { font-weight: 600; }
.payee-card .p-sub { font-size: 12.5px; color: var(--muted); }
.payee-ok { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.payee-ok svg { width: 14px; height: 14px; }
.payee-miss { font-size: 13px; color: var(--down, #e5484d); padding: 2px 2px; animation: payeeIn .2s ease both; }
.payee-field.busy #dest { background-image: linear-gradient(90deg, transparent, rgb(80 140 255 / .18), transparent);
  background-size: 200% 100%; animation: payeeScan 1s linear infinite; }
.payee-field .hint { margin-top: 8px; }
@keyframes payeeIn { from { opacity: 0; transform: translateY(4px); } }
@keyframes payeeScan { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.person .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.person:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.person:has(input:checked) .tick { background: var(--blue); border-color: var(--blue); }
.person:has(input:checked) .tick::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

.fx { display: grid; gap: 4px; padding: 14px 16px; margin: 4px 0 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--blue); }
.fx .fx-amt { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.fx .fx-rate { font-size: 13px; color: var(--ink-2); }

.summary { list-style: none; margin: 0; padding: 0; }
.summary li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px; }
.summary li + li { border-top: 1px solid var(--line); }
.summary .k { color: var(--muted); }
.summary .v { font-weight: 600; text-align: right; }
.summary .v.big { font-size: 20px; letter-spacing: -0.02em; }
.stack { display: grid; gap: 10px; margin-top: 18px; }

/* ───────── курсы и графики ───────── */

.period { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.period a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--muted); }
.period a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rate-card { padding: 16px 16px 12px; }
.rate-card + .rate-card { border-top: 1px solid var(--line); }
.rate-card .rc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rate-card .rc-val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.rate-card .rc-sub { font-size: 12.5px; color: var(--muted); }
.chart { width: 100%; height: 150px; display: block; margin-top: 8px; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.chart-box { position: relative; }
.spark { width: 110px; height: 32px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-grid > div { padding: 14px 16px; }
.stat-grid > div + div { border-left: 1px solid var(--line); }
.stat-grid .v { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; margin-top: 4px; }
.bar-row { padding: 10px 0; }
.bar-row + .bar-row { border-top: 1px solid var(--line); }
.bar-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.bar-top span:first-child { font-weight: 550; }
.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; }

/* ───────── вход ───────── */

.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--card); color: var(--card-ink); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .brand { font-size: 22px; }
.auth-art .claim { font-size: 44px; line-height: 1.06; font-weight: 500; letter-spacing: -0.045em; max-width: 12ch; }
.auth-art .claim span { color: var(--accent); }
.auth-art .claim em { font-style: normal; color: var(--blue); }
.auth-art .cur-row { display: flex; gap: 22px; font-family: var(--mono); font-size: 12.5px; opacity: .7; letter-spacing: 0.06em; }
.auth-art .grid-lines { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(to right, color-mix(in srgb, var(--card-ink) 8%, transparent) 1px, transparent 1px); background-size: 25% 100%; }
.auth-art .orb { position: absolute; right: -120px; top: 22%; width: 360px; height: 360px; border-radius: 50%; background: var(--blue); opacity: .9; }
.auth-art .orb2 { position: absolute; right: 60px; top: calc(22% + 240px); width: 120px; height: 120px; border-radius: 50%; background: var(--accent); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.auth-form .inner { width: 100%; max-width: 360px; }
.auth-form h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; margin: 0 0 6px; }
.auth-form .sub { color: var(--muted); margin: 0 0 26px; font-size: 14.5px; }
.auth-form .foot { margin-top: 28px; font-size: 12.5px; color: var(--muted); }
.auth-form .lang { position: absolute; top: calc(20px + env(safe-area-inset-top)); right: 20px; }
.auth-mobile-brand { display: none; }
.auth-mobile-bar { display: none; }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form { place-items: start center; padding-top: calc(72px + env(safe-area-inset-top)); }
  .auth-mobile-brand { display: flex; margin-bottom: 40px; font-size: 24px; }
  .auth-mobile-bar { display: flex; height: 4px; width: 64px; margin: -28px 0 36px; border-radius: 2px; overflow: hidden; }
  .auth-mobile-bar span { flex: 1; } .auth-mobile-bar span:first-child { background: var(--blue); } .auth-mobile-bar span:last-child { background: var(--accent); }
}

/* ───────── профиль ───────── */

.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.profile-head h1 { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -0.03em; }
.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 12px; }
.kv li + li { border-top: 1px solid var(--line); }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 500; text-align: right; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.choice { display: flex; gap: 6px; flex-wrap: wrap; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: inline-block; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 550; }
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* ───────── админка ───────── */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat { padding: 16px 18px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .v { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; margin-top: 4px; }
.status-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.t tr:first-child td { border-top: 0; }
table.t td.r, table.t th.r { text-align: right; }
table.t tr.link { cursor: pointer; }
table.t tr.link:hover td { background: var(--surface-2); }
table.t tr.struck td.amt { text-decoration: line-through; opacity: .55; }
.who-cell { display: flex; align-items: center; gap: 10px; }
.who-cell .n { font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.admin-user-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.admin-user-head .bal { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; }
.rate-row { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr; gap: 12px; align-items: center; padding: 14px 18px; }
.rate-row + .rate-row { border-top: 1px solid var(--line); }
.logo-preview { width: 110px; height: 110px; border: 1px dashed var(--line-strong); border-radius: var(--radius); display: grid; place-items: center; background: var(--bg); flex: none; overflow: hidden; }
.logo-preview img { max-width: 84px; max-height: 84px; }

.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.preset { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: pointer; text-align: left; padding: 0; }
.preset.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.preset .sw { height: 64px; display: grid; grid-template-columns: 2fr 1fr 1fr; }
.preset .sw i { display: block; }
.preset .pn { padding: 8px 10px; font-size: 13px; font-weight: 600; }
.colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type=color] { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 2px; background: var(--surface); cursor: pointer; flex: none; }
.color-field span { font-size: 13.5px; }
.icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.icon-opt { cursor: pointer; text-align: center; font-size: 12.5px; }
.icon-opt input { position: absolute; opacity: 0; }
.icon-opt .ic { width: 76px; height: 76px; margin: 0 auto 8px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.icon-opt .ic img { width: 100%; height: 100%; object-fit: cover; }
.icon-opt input:checked ~ .ic { box-shadow: 0 0 0 3px var(--blue); }
.icon-opt input:checked ~ div { color: var(--blue); font-weight: 600; }
.phone-preview { width: 220px; border-radius: 30px; border: 8px solid #111; background: var(--bg); padding: 14px 12px; flex: none; }
.cur-preview { font-family: var(--mono); font-size: 13px; }

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat { border-left: 0 !important; border-top: 1px solid var(--line); }
  .stats .stat:nth-child(-n+2) { border-top: 0; }
  .stats .stat:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  table.t td, table.t th { padding: 10px 12px; }
  .rate-row { grid-template-columns: 1.5fr 1fr; }
  .rate-row > :first-child { grid-column: 1 / -1; }
  .stat-grid .v { font-size: 15px; }
  .actions .btn { font-size: 14px; gap: 6px; }
}

/* ───────── уведомление ───────── */

.toast {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); z-index: 50;
  transform: translate(-50%, calc(-100% - 60px)); opacity: 0; visibility: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .2s, visibility .35s;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 500; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgb(0 0 0 / .18);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.err-page { text-align: center; padding: 60px 0; }
.err-page .code { font-size: 64px; font-weight: 650; letter-spacing: -0.05em; }

/* ───────── вход: цифровая Земля ───────── */

.space {
  position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; color: #EAF1FB;
  background: radial-gradient(120% 90% at 70% 45%, #0B1B33 0%, #060B16 45%, #03050A 100%);
  --ink: #EAF1FB; --muted: #93A4BD; --line: rgb(255 255 255 / .12); --line-strong: rgb(255 255 255 / .18);
  --surface: rgb(255 255 255 / .06); --ink-2: #C6D3E6; --blue-soft: rgb(90 150 230 / .15);
  --err-bg: rgb(229 57 53 / .15); --green-bg: rgb(79 191 133 / .15); --warn-bg: rgb(242 184 75 / .12);
  color-scheme: dark;
}
.space-bg { position: absolute; inset: 0; z-index: 0; }
.globe-canvas { position: absolute; inset: 0; display: block; opacity: 0; transform: scale(.95);
  transition: opacity 1.6s ease, transform 1.8s cubic-bezier(.2,.8,.2,1); }
.ready > .globe-canvas { opacity: 1; transform: none; }
.space-glow { position: absolute; inset: auto -10% -40% -10%; height: 60%; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 100%, rgb(213 43 30 / .10), transparent 70%); }
.space-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center;
  padding: calc(22px + env(safe-area-inset-top)) clamp(20px, 5vw, 56px) 0; }
.space-top .brand { font-size: 22px; color: #fff; }
.space .lang { border-color: rgb(255 255 255 / .2); }
.space .lang a { color: #93A4BD; }
.space .lang a.on { background: #fff; color: #03050A; }

.glass {
  position: relative; z-index: 2; width: min(400px, calc(100% - 32px));
  margin-left: clamp(20px, 8vw, 120px); top: 50vh; transform: translateY(-50%);
  padding: 32px 30px 26px; border-radius: 22px;
  background: linear-gradient(160deg, rgb(255 255 255 / .10), rgb(255 255 255 / .03));
  border: 1px solid rgb(255 255 255 / .14);
  box-shadow: 0 30px 80px rgb(0 0 0 / .45), inset 0 1px 0 rgb(255 255 255 / .12);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
}
.glass h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.035em; margin: 0 0 6px; color: #fff; }
.glass .sub { color: var(--muted); margin: 0 0 24px; font-size: 14.5px; }
.glass .field > label { color: #C6D3E6; }
.glass .input { background: rgb(4 10 22 / .55); border-color: rgb(255 255 255 / .16); color: #fff; }
.glass .input:focus { border-color: #5AA9E6; box-shadow: 0 0 0 3px rgb(90 169 230 / .25); }
.glass .btn.primary { margin-top: 8px; height: 50px; background: #FFFFFF; border-color: #FFFFFF; color: #0A0B0D; box-shadow: 0 10px 30px rgb(90 169 230 / .25); }
.glass .alert.err { color: #FF8A80; }
.support-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: #9CC6F2; font-size: 14px; font-weight: 550; }
.support-link svg { width: 18px; height: 18px; }
.space-foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; text-align: center; font-size: 12.5px; color: #6F809A;
  padding: 0 20px calc(18px + env(safe-area-inset-bottom)); letter-spacing: .01em; }

/* плавное появление */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes riseCard { from { opacity: 0; transform: translateY(calc(-50% + 18px)); } to { opacity: 1; transform: translateY(-50%); } }
.space-top { animation: rise .8s .1s both cubic-bezier(.2,.8,.2,1); }
.glass { animation: riseCard .9s .25s both cubic-bezier(.2,.8,.2,1); }
.glass > * { animation: rise .7s both cubic-bezier(.2,.8,.2,1); }
.glass > :nth-child(1) { animation-delay: .45s; } .glass > :nth-child(2) { animation-delay: .52s; }
.glass > :nth-child(3) { animation-delay: .6s; } .glass > :nth-child(4) { animation-delay: .66s; }
.glass > :nth-child(5) { animation-delay: .72s; } .glass > :nth-child(6) { animation-delay: .78s; }
.space-foot { animation: rise .8s .9s both; }
@media (prefers-reduced-motion: reduce) { .space *, .glass { animation: none !important; } .globe-canvas { transition: none; } }

@media (max-width: 760px) {
  .space { display: flex; flex-direction: column; }
  .space-top { position: relative; }
  .glass { position: relative; top: auto; transform: none; margin: max(29vh, 240px) auto 18px; padding: 24px 20px 20px; animation-name: rise; }
  .glass h1 { font-size: 22px; }
  .glass .sub { margin-bottom: 18px; font-size: 14px; }
  .space-foot { position: relative; margin-top: auto; font-size: 11.5px; }
}

/* ───────── чат поддержки ───────── */

.top-chat { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2); }
.top-chat svg { width: 21px; height: 21px; }
.top-chat.active, .top-chat:hover { color: var(--blue); background: var(--blue-soft); }
.top-chat .dot { position: absolute; top: 1px; right: 0; min-width: 10px; height: 10px; padding: 0 3px; border-radius: 999px;
  background: var(--danger); border: 2px solid var(--bg); color: #fff; font-size: 9px; font-weight: 700; line-height: 6px; text-align: center; box-sizing: content-box; }
.top-chat .dot:not(:empty) { height: 14px; line-height: 14px; min-width: 14px; top: -3px; right: -4px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; }
.tab-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; display: grid; place-items: center; }

.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.chat-agent { display: flex; align-items: center; gap: 12px; }
.chat-agent .av.sys { background: var(--blue); color: #fff; }
.chat-agent .av.sys svg { width: 20px; height: 20px; }
.chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  height: calc(100dvh - 250px); min-height: 380px; overflow: hidden; }
@media (max-width: 760px) { .chat { min-height: 320px; height: calc(100dvh - 236px - env(safe-area-inset-bottom) - env(safe-area-inset-top)); } }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain;
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 140px); }
.chat-empty { margin: auto; color: var(--muted); font-size: 14px; text-align: center; max-width: 30ch; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble { max-width: min(78%, 460px); padding: 8px 12px 6px; border-radius: 16px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine .bubble { background: var(--blue); color: var(--on-blue); border-bottom-right-radius: 5px; }
.msg.theirs .bubble { background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.from-bot .bubble { background: var(--blue-soft); border-color: transparent; }
.bubble .who { font-size: 11.5px; font-weight: 700; color: var(--blue); margin-bottom: 2px; white-space: normal; }
.msg.from-bot .who::before { content: "⚡ "; }
.bubble img { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; margin: 2px 0 4px; }
.bubble .meta { font-size: 11px; opacity: .65; text-align: right; margin-top: 2px; white-space: normal; }
.bubble .meta.read { opacity: .9; }
.chat-typing { padding: 4px 16px 6px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.chat-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .2s; } .chat-typing span:nth-child(3) { animation-delay: .4s; margin-right: 6px; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-attach { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.chat-attach:hover { color: var(--blue); background: var(--blue-soft); }
.chat-attach svg { width: 22px; height: 22px; }
.chat-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chat-input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 21px; padding: 4px 6px 4px 14px; }
.chat-input:focus-within { border-color: var(--blue); }
.chat-input textarea { width: 100%; border: 0; outline: 0; background: transparent; resize: none; font-size: 16px; line-height: 1.35; padding: 7px 0; max-height: 140px; display: block; }
.chat-preview { position: relative; display: inline-block; margin: 6px 0 2px; }
.chat-preview img { height: 64px; border-radius: 8px; }
.chat-preview button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; line-height: 1; }
.chat-send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; }
.chat-send svg { width: 20px; height: 20px; }
.chat-error { padding: 8px 14px; font-size: 13px; color: var(--danger); background: var(--err-bg); }
.thread-row.unread .t-title { font-weight: 750; }
.thread-row .t-amt { display: grid; justify-items: end; gap: 4px; }

.guest-wrap { min-height: 100dvh; display: flex; flex-direction: column; }
.guest-top { display: flex; justify-content: space-between; align-items: center; padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  border-bottom: 1px solid var(--line); max-width: 580px; margin: 0 auto; width: 100%; }
.guest-top .brand { font-size: 20px; }
.guest-wrap main.page { flex: 1; width: 100%; padding-bottom: 24px; }
.guest-wrap .chat { height: calc(100dvh - 240px); }
.guest-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 20px calc(16px + env(safe-area-inset-bottom)); }

/* ───────── карта счёта с цифровой Землёй ───────── */

.acct.has-globe {
  --card-muted: rgb(214 230 250 / .7);
  color: #F2F7FF; min-height: 250px; isolation: isolate;
  background: radial-gradient(120% 140% at 85% 50%, #0E2340 0%, #07101F 45%, #04070F 100%);
  box-shadow: inset 0 0 0 1px rgb(127 227 240 / .14), 0 18px 40px -18px rgb(10 30 70 / .55);
}
.acct.has-globe .acct-globe { position: absolute; inset: 0; z-index: -2; }
.acct.has-globe::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgb(4 7 15 / .85) 0%, rgb(4 7 15 / .35) 40%, rgb(4 7 15 / 0) 60%); }
.acct.has-globe .acct-balance .amount { text-shadow: 0 2px 20px rgb(0 0 0 / .5); }
.acct.has-globe .mark { text-shadow: 0 1px 10px rgb(0 0 0 / .6); }
.acct.has-globe .acct-foot { color: rgb(190 215 245 / .7); }
.acct.has-globe .acct-top, .acct.has-globe .acct-balance, .acct.has-globe .acct-foot { position: relative; z-index: 1; }
@media (max-width: 760px) { .acct.has-globe { min-height: 240px; } }

/* ───────── аккаунт заблокирован ───────── */
.blocked-page { text-align: left; padding-top: 48px; }
.blocked-page h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.035em; margin: 18px 0 10px; }
.blocked-page p { color: var(--ink-2); font-size: 16px; line-height: 1.55; margin: 0 0 26px; }
.blocked-mark { width: 64px; height: 64px; display: grid; place-items: center; border: 2px solid var(--danger); color: var(--danger); border-radius: var(--radius-sm); }
.blocked-mark svg { width: 34px; height: 34px; }

/* ───────── карта счёта: звёзды как на флаге ЕС ───────── */
.acct.has-stars {
  background: radial-gradient(130% 120% at 10% 0%, color-mix(in srgb, var(--card) 80%, white) 0%, var(--card) 45%, color-mix(in srgb, var(--card) 82%, black) 100%);
  color: var(--card-ink); min-height: 230px; --card-muted: rgb(255 255 255 / .72);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
}
.acct.has-stars::after {   /* лёгкий глянец, как на пластике */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / .07) 45%, transparent 60%);
}
.acct.has-stars .mark span, .acct.has-img .mark span { color: inherit; }
.eu-stars { position: absolute; right: 18px; top: 50%; width: 150px; height: 150px; transform: translateY(-50%); pointer-events: none; }
.eu-stars .st { transform-box: fill-box; transform-origin: center; animation: glint 11s ease-in-out infinite; animation-delay: var(--d); }
@keyframes glint {
  0%, 90%, 100% { opacity: .93; filter: none; }
  94% { opacity: 1; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px rgb(255 255 255 / .7)); }
}
@media (prefers-reduced-motion: reduce) { .eu-stars .st { animation: none; } }
@media (max-width: 760px) { .eu-stars { width: 128px; height: 128px; right: 10px; } }
.acct.has-stars .acct-balance, .acct.has-stars .acct-top > div:first-child { max-width: 62%; }

/* ── выбор языка (выпадающее меню) ── */
.lang-dd { position: relative; display: inline-block; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 9px; border-radius: 980px; cursor: pointer;
  font: 650 12.5px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", sans-serif; letter-spacing: .04em; color: #E6EEFF;
  background: rgb(30 60 140 / .32); border: 1px solid rgb(130 175 255 / .24);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgb(180 210 255 / .16); transition: background-color .2s, border-color .2s; }
.lang-btn:hover, .lang-dd.open .lang-btn { background: rgb(40 80 180 / .42); border-color: rgb(150 190 255 / .4); }
.lang-btn svg { width: 16px; height: 16px; flex: none; }
.lang-btn .dd-chev { width: 14px; height: 14px; opacity: .7; transition: transform .25s; }
.lang-dd.open .dd-chev { transform: rotate(180deg); }
.lang-menu { position: absolute; z-index: 120; right: 0; top: calc(100% + 8px); min-width: 196px; padding: 6px; border-radius: 16px; text-align: left;
  background: rgb(10 24 64 / .97); border: 1px solid rgb(130 175 255 / .22); color: #F2F6FF;
  -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
  box-shadow: inset 0 1px 0 rgb(180 210 255 / .16), 0 24px 50px -16px rgb(0 0 0 / .8);
  opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top right; transition: opacity .16s ease, transform .22s cubic-bezier(.2,.8,.2,1); }
.lang-dd.up .lang-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; transform-origin: bottom left; transform: translateY(6px) scale(.97); }
.lang-dd.open .lang-menu { opacity: 1; transform: none; }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; color: inherit; text-decoration: none; }
.lang-menu a:hover { background: rgb(120 170 255 / .14); }
.lang-menu b { flex: 1; font-weight: 550; font-size: 14.5px; text-align: left; }
.lang-menu span { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: #8EA3CF; }
.lang-menu .ok { width: 16px; height: 16px; color: #7FB0FF; opacity: 0; }
.lang-menu a.on .ok { opacity: 1; }
.lang-menu a.on b { font-weight: 700; }
.lang-dd.flip .lang-menu { top: auto; bottom: calc(100% + 8px); transform-origin: bottom right; transform: translateY(6px) scale(.97); }
.lang-dd.flip.open .lang-menu { transform: none; }
html[lang="ko"] body { word-break: keep-all; overflow-wrap: anywhere; }

/* профиль: телефон, пополнить/вывести */
.kv li#phone .v { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.kv li.kv-link { padding: 0; }
.kv li.kv-link a { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 16px; color: inherit; text-decoration: none; transition: background-color .2s ease; }
.kv li.kv-link a:hover { background: var(--surface-2, rgb(255 255 255 / .05)); }
.kv li.kv-link .k { color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 10px; }
.kv li.kv-link .k svg { width: 18px; height: 18px; color: var(--blue); }
.kv li.kv-link .chev { color: var(--muted); font-size: 20px; line-height: 1; }
.phone-form { margin-top: 10px; }
.phone-rm { margin-top: 8px; text-align: right; }
.phone-rm button { background: none; border: 0; cursor: pointer; color: var(--muted); }

/* пополнение и вывод */
.cash-form .kind-pick input:disabled + span { opacity: .45; }
.cash-fx { margin: 4px 0 18px; }
.cash-pay { margin-bottom: 4px; text-align: center; }
.cash-phone { font-size: 26px; font-weight: 700; letter-spacing: .01em; margin: 6px 0 4px; cursor: copy; }
.cash-note { margin: 2px 0 0; }
.cash-row { grid-template-columns: 40px 1fr auto; }
.cash-st { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tag.st-pending { border-color: color-mix(in srgb, var(--warn, #F2B84B) 45%, transparent); color: var(--warn, #F2B84B); }
.tag.st-done { border-color: color-mix(in srgb, var(--green) 40%, transparent); color: var(--green); }
.tag.st-rejected { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.tag.st-cancelled { color: var(--muted); }
.cash-q { display: grid; gap: 12px; margin-bottom: 8px; }
.cash-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.cash-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px; margin: 14px 0; }
.cash-dl div { min-width: 0; }
.cash-dl dt { font-size: 12px; color: var(--muted); }
.cash-dl dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.cash-act { display: grid; gap: 10px; }
.cash-act .row { display: flex; gap: 8px; flex-wrap: wrap; }
.phone-q .ph-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.phone-q .ph-act .input { height: 30px; width: 150px; font-size: 13px; }
button.txt-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* отрицательный баланс */
.hero-bal.neg, .hero-bal.neg .money, .bal.neg, .neg-amt { color: var(--danger, #FF5A5F) !important; }
.neg-banner { display: flex; gap: 10px; align-items: flex-start; }
.neg-banner > svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* вход: кнопка «Назад» */
.space-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.back-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 5px; border-radius: 980px;
  color: #fff; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; text-decoration: none;
  background: linear-gradient(160deg, rgb(255 255 255 / .14), rgb(255 255 255 / .04));
  border: 1px solid rgb(255 255 255 / .16); box-shadow: 0 8px 26px rgb(0 0 0 / .35), inset 0 1px 0 rgb(255 255 255 / .14);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  transition: background-color .2s, border-color .2s, transform .15s, box-shadow .2s; -webkit-tap-highlight-color: transparent; }
.back-pill .bp-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(255 255 255 / .12); transition: transform .25s cubic-bezier(.2,.8,.2,1), background-color .2s; }
.back-pill .bp-ic svg { width: 18px; height: 18px; }
.back-pill:hover { border-color: rgb(140 185 255 / .45); box-shadow: 0 10px 30px rgb(40 90 200 / .35), inset 0 1px 0 rgb(255 255 255 / .18); }
.back-pill:hover .bp-ic { transform: translateX(-3px); background: rgb(255 255 255 / .2); }
.back-pill:active { transform: scale(.96); }
.back-pill:focus-visible { outline: 2px solid #5AA9E6; outline-offset: 3px; }
@media (max-width: 760px) {
  .space-left { gap: 12px; }
  .back-pill { height: 38px; padding-right: 14px; font-size: 14px; }
  .back-pill .bp-ic { width: 28px; height: 28px; }
  .space-top .brand { font-size: 19px; }
}
@media (max-width: 360px) { .back-pill .bp-t { display: none; } .back-pill { padding: 0 4px; } }
