/* Teleport — личный кабинет. Токены наследуются из site.css (тема через data-theme). */

body { height: 100vh; overflow: hidden; }

.cab { display: flex; height: 100vh; }

/* ---------- Сайдбар ---------- */
.side {
  flex: none;
  width: 248px;
  background: var(--band);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
}
.side .brand { padding: 0 10px 22px; }
.side .brand span { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }

.btn-new {
  height: 48px;
  border-radius: 14px;
  margin-bottom: 16px;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 700; font-size: 15px; font-family: inherit;
  border: 0;
  cursor: pointer;
  box-shadow: var(--grad-shadow-sm);
}
.btn-new:hover { filter: brightness(1.06); }

.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--nav-ink);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-list a:hover { color: var(--text); }
.nav-list a.active { background: var(--accent-wash); color: var(--link); font-weight: 700; }
html[data-theme="light"] .nav-list a.active { color: var(--accent); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 3px; }
.user-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex: none;
}
.user-card .who { flex: 1; min-width: 0; }
.user-card .who b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .who span { display: block; font-size: 11.5px; font-weight: 500; color: var(--ok); margin-top: 1px; }
.user-card .who span.no { color: var(--warn); }

/* ---------- Основная колонка ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 76px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  background: var(--band);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.topbar .sub { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex: none; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.page-actions:empty { display: none; }
.btn-head {
  height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  border: 0;
  display: inline-flex;
  align-items: center;
  font-weight: 700; font-size: 13.5px; font-family: inherit;
  cursor: pointer;
  box-shadow: var(--grad-shadow-sm);
  white-space: nowrap;
}
.btn-head:hover { filter: brightness(1.06); }

.search {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dim);
  font-family: inherit;
  min-width: 210px;
}
.search:focus-within { border-color: var(--line-strong); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--text); }
.search input:focus { outline: none; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  color: var(--chip-ink);
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FB6E52;
  border: 2px solid var(--card);
}

.view {
  flex: 1;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
}

/* ---------- Общие карточки ---------- */
.row { display: flex; gap: 18px; }
.row > .card { flex: 1; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-head b { font-size: 15px; font-weight: 700; }
.link { font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.link:hover { text-decoration: underline; }
button.link { background: none; border: 0; padding: 0; font-family: inherit; text-decoration: underline; }
.muted { color: var(--muted); font-size: 13px; font-weight: 500; }
.big { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; }

/* ---------- Главная: состояние перевода ----------
   Экран отвечает на один вопрос, поэтому и колонка одна, по центру: всё
   внимание на заявке, а не на плитках. */
.home {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.home-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 30px 26px;
  border-radius: 22px;
  background: radial-gradient(90% 130% at 50% 0%, var(--warn-ring), rgba(21, 23, 29, 0)), var(--card);
  border: 1px solid var(--line);
}
.home-head.wait { background: radial-gradient(90% 130% at 50% 0%, var(--accent-wash), rgba(21, 23, 29, 0)), var(--card); }
.home-head.ok { background: radial-gradient(90% 130% at 50% 0%, var(--ok-wash), rgba(21, 23, 29, 0)), var(--card); }
.home-sum {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: "Onest", inherit;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.home-sum .to { color: var(--accent-soft); }
html[data-theme="light"] .home-sum .to { color: var(--accent-deep); }
.home-state { font-size: 14.5px; font-weight: 500; color: var(--muted); }
.home-meta { font-size: 12.5px; font-weight: 500; color: var(--dim); }

/* Компактный след шагов: точки с подписью текущего шага. */
.home-steps { display: flex; align-items: flex-start; gap: 6px; padding: 0 4px; }
.hstep { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.hstep i { width: 100%; height: 4px; border-radius: 2px; background: var(--ok); }
.hstep.now i { background: var(--warn); }
.hstep.todo i { background: var(--line-strong); }
.hstep u {
  font-size: 10.5px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  color: var(--dim);
  line-height: 1.3;
}
.hstep.now u { color: var(--warn); }
.hstep.done u { color: var(--muted); }
.home-timer { text-align: center; }
.home .btn-go { margin-top: 0; }
.home .btn-quiet-sm { align-self: center; }

.home-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 40px 26px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
}
.home-empty .ic {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--ok-wash);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.home-empty b { font-size: 19px; font-weight: 700; }
.home-empty p { font-size: 13.5px; line-height: 1.55; font-weight: 500; color: var(--muted); margin: 0; max-width: 340px; }
.home-rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
}
.home-rate span { font-size: 13px; font-weight: 500; color: var(--muted); }
.home-rate b { font-family: "Onest", inherit; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 620px) {
  .hstep u { display: none; }
}

/* ---------- Дашборд ---------- */
.promo {
  flex: 1.5;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #2350cf 0%, #2F6BFF 50%, #38BDF8 130%);
  box-shadow: 0 22px 46px -20px rgba(47, 107, 255, 0.7);
  color: #fff;
  min-width: 0;
}
.promo > * { position: relative; }
.promo .mark { position: absolute; right: -30px; top: -30px; opacity: 0.14; stroke: #fff; }
.promo .kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
.promo .dest { display: flex; align-items: center; gap: 11px; margin-top: 10px; }
.promo .dest b { font-family: "Onest", inherit; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.promo .note { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.85); margin-top: 6px; }
.promo .acts { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.btn-white {
  height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  background: #fff;
  color: #1d3a8a;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700; font-size: 14.5px; font-family: inherit;
  border: 0;
  cursor: pointer;
}
.rate-pill {
  height: 46px;
  padding: 0 16px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rate-pill span { font-size: 10px; font-weight: 600; color: rgba(255, 255, 255, 0.78); }
.rate-pill b { font-family: "Onest", inherit; font-size: 15px; font-weight: 700; }

/* Карточка активной заявки на дашборде. Синяя рамка — когда ход за клиентом:
   это единственное на экране, что требует действия прямо сейчас. */
.deal-now { cursor: pointer; }
.deal-now.mine { border-color: rgba(47, 107, 255, 0.35); box-shadow: 0 0 0 3px var(--accent-wash); }
.deal-now-sum {
  font-family: "Onest", inherit;
  font-size: 22px;
  font-weight: 700;
  margin-top: 14px;
  font-variant-numeric: tabular-nums;
}
.deal-now-sum span { color: var(--dim); font-weight: 500; margin: 0 2px; }
.deal-now .btn-go { height: 46px; margin-top: auto; }

.delta { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ok); }
.bars { margin-top: auto; display: flex; align-items: flex-end; gap: 7px; height: 64px; padding-top: 14px; }
.bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: rgba(56, 189, 248, 0.28); }
.bars i.now { background: linear-gradient(180deg, #38BDF8, #2F6BFF); }

.limit { margin-top: auto; display: flex; flex-direction: column; gap: 9px; padding-top: 14px; }
.limit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.limit-head b { font-family: "Onest", inherit; font-weight: 600; color: var(--text); }
.bar { height: 7px; border-radius: 4px; background: var(--line-strong); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); }

.row-grow { flex: 1; display: flex; gap: 18px; min-height: 0; }
.list-card { flex: 1.6; padding: 0; overflow: hidden; }
.list-card .card-head { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.list-card .card-head b { font-size: 16px; }
.aside-col { flex: 1; display: flex; flex-direction: column; gap: 18px; min-height: 0; }

.tx {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.tx:last-child { border-bottom: 0; }
.tx:hover { background: var(--inset); }
.bank {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex: none;
  background: var(--step-empty);
}
.bank.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 11px; }
img.bank { object-fit: cover; background: var(--inset); }
.tx .who { flex: 1; min-width: 0; }
.tx .who b { display: block; font-size: 14.5px; font-weight: 600; }
.tx .who span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.tx .amount { font-family: "Onest", inherit; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tx .amount.off { color: var(--muted); }
.tx .st { width: 112px; display: flex; justify-content: flex-end; flex: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
}
.pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.go { background: var(--warn-ring); color: var(--warn); }
.pill.ok { background: var(--ok-wash); color: var(--ok); }
.pill.bad { background: rgba(248, 113, 113, 0.12); color: var(--bad); }
/* «wait» — заявка ждёт действия клиента. Отдельный цвет нужен, чтобы такие
   заявки не сливались с теми, что и правда едут сами. */
.pill.wait { background: var(--accent-wash); color: var(--link); }
html[data-theme="light"] .pill.wait { color: var(--accent); }
html[data-theme="light"] .pill.bad { background: rgba(220, 38, 38, 0.1); }

.spark { width: 100%; height: 60px; margin-top: 12px; display: block; }
.spark-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; font-weight: 500; color: var(--dim); }

.people { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 11px; }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; font-size: 13.5px; font-weight: 600; }
.person .who span { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.add-btn {
  margin-top: auto;
  height: 42px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600; font-size: 13px; font-family: inherit;
  color: var(--muted);
  cursor: pointer;
}
.add-btn:hover { color: var(--text); border-color: var(--muted); }

/* ---------- Экран «Новый перевод» ---------- */
.cols { display: flex; gap: 22px; flex: 1; min-height: 0; }
.col-main { flex: 1.6; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.col-side { flex: 1; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.stepper {
  display: flex;
  align-items: center;
  border-radius: 18px;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--line);
}
.stp { display: flex; align-items: center; gap: 11px; flex: none; }
.stp .node {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Onest", inherit;
  font-size: 13px;
  font-weight: 700;
  background: var(--inset);
  border: 1px solid var(--line-strong);
  color: var(--dim);
  flex: none;
}
.stp span { font-size: 14px; font-weight: 500; color: var(--dim); }
.stp.done .node { background: var(--ok-wash); border-color: transparent; color: var(--ok); }
.stp.done span { font-weight: 600; color: var(--chip-ink); }
.stp.now .node { background: var(--grad); border-color: transparent; color: #fff; }
.stp.now span { font-weight: 700; color: var(--text); }
.stp-line { flex: 1; height: 2px; margin: 0 16px; background: var(--line-strong); }
.stp-line.filled { background: linear-gradient(90deg, var(--ok), var(--accent-deep)); }

.field-group {
  position: relative;
  border-radius: 16px;
  background: var(--inset);
  border: 1px solid var(--line-strong);
}
.pick {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  width: 100%;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.pick + .pick { border-top: 1px solid var(--line); }
.pick .txt { flex: 1; min-width: 0; }
.pick .txt span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.pick .txt b { display: block; font-size: 15px; font-weight: 700; margin-top: 3px; }
.swap {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px -6px rgba(47, 107, 255, 0.8);
  cursor: pointer;
  color: #fff;
}

/* Выпадающий список банков с поиском */
.picker-pop {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* было 320px; над списком добавились страны, и на них уходило место
     самого списка — в Турции восемь банков, их видно было три */
  max-height: 420px;
}
.picker-pop[hidden] { display: none; }
.picker-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  flex: none;
}
.picker-pop .picker-search > input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 24px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  padding: 0;
}
.picker-pop .picker-search > input::placeholder { color: var(--dim); }
.picker-search input:focus { outline: none; }
.picker-list {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}
.picker-pop .picker-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  flex: none;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.picker-item:hover { background: var(--inset); }
.picker-item.on { background: var(--accent-wash); }
.picker-pop .picker-item > .bank { width: 34px; height: 34px; border-radius: 10px; font-size: 11px; flex: none; }
.picker-pop .picker-item > .who { flex: 1 1 auto; min-width: 0; display: block; }
.picker-pop .picker-item > .who > b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.picker-pop .picker-item > .who > span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.picker-empty { padding: 18px; text-align: center; font-size: 13.5px; color: var(--dim); }

/* ---------- Гостевой чат ----------
   Гостю открыт один экран, поэтому всё, что ведёт в закрытую часть кабинета,
   прячем. Оставлять кнопки, которые выкидывают на форму входа, — это обещать
   то, чего у человека сейчас нет. */
body.guest .nav-list a:not([data-route="/support"]),
body.guest .btn-new,
body.guest .user-card svg,
body.guest #searchWrap { display: none; }
body.guest .user-card { pointer-events: none; }

.guest-note {
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--accent-wash);
  border: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.guest-note b { font-size: 15px; font-weight: 700; }
.guest-note p { margin: 0; font-size: 13.5px; font-weight: 500; color: var(--muted); line-height: 1.45; }
.guest-note .btn-head { margin-top: 6px; }

/* Страны над списком банков. Восемь стран получения переносятся в две
   строки — это нормально: строка формы от этого не растёт, растёт только
   открытый список. */
.picker-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.cnt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--inset);
  color: var(--muted);
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.cnt-chip:hover { border-color: var(--accent); color: var(--text); }
.cnt-chip.on { background: var(--accent-wash); border-color: var(--accent); color: var(--text); }
/* страна другой стороны: перевода внутри страны нет */
.cnt-chip:disabled { opacity: 0.35; cursor: not-allowed; }
.cnt-chip:disabled:hover { border-color: var(--line-strong); color: var(--muted); }
.sel-item:disabled { opacity: 0.35; cursor: not-allowed; }
.cnt-chip img { width: 18px; height: 13px; border-radius: 3px; object-fit: cover; flex: none; }

/* Флаг страны у суммы. Заменил нарисованные вручную триколор и грузинский
   крест: они годились ровно для одного коридора. */
.flag-img {
  width: 22px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-strong);
  flex: none;
}

.amounts { display: flex; gap: 14px; }
.amount-box {
  flex: 1;
  min-width: 0;
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--inset);
  border: 1px solid var(--line-strong);
}
.amount-box.active { border: 1.5px solid rgba(47, 107, 255, 0.55); }
.amount-box > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.amount-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.amount-line input,
.amount-line output {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  font-family: "Onest", inherit;
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
}
.amount-line input:focus { outline: none; }
.amount-line output { color: var(--accent-soft); }
html[data-theme="light"] .amount-line output { color: var(--accent-deep); }

/* Промокод: поле необязательное, поэтому спокойнее остальных — и подсказка
   под ним меняет цвет по ответу бэкенда, а не «применить/не применить». */
.promo { margin-top: 14px; }
.promo-note { font-size: 12.5px; font-weight: 600; margin-top: 7px; min-height: 16px; }
.promo-note:empty { display: none; }
.promo-note .ok { color: var(--ok); }
.promo-note .bad { color: var(--bad); }
.promo-note .dim { color: var(--dim); font-weight: 500; }

/* На телефоне две суммы рядом не помещаются: в половину экрана не влезают
   30-пиксельные цифры вместе с валютной плашкой. Сумма отправления
   обрезалась («66 000» превращалось в «6»), а сумма получения переносилась
   посреди разряда и наезжала на плашку. Ставим одну под другой. */
@media (max-width: 620px) {
  .amounts { flex-direction: column; }
  .amount-line input,
  .amount-line output { font-size: 26px; }
  /* число не должно разрываться между разрядами — лучше сузить, чем перенести */
  .amount-line output { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.chip-amt {
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--inset);
  border: 1px solid var(--line-strong);
  font-weight: 600; font-size: 13px; font-family: inherit;
  color: var(--chip-ink);
  cursor: pointer;
}
.chip-amt:hover { color: var(--text); }
.chip-amt.on { background: var(--accent-wash); border-color: rgba(47, 107, 255, 0.4); color: var(--link); }
html[data-theme="light"] .chip-amt.on { color: var(--accent); }

.purpose {
  margin-top: 16px;
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--inset);
  border: 1px solid var(--line);
}
.purpose span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.purpose input {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 0;
  background: none;
  padding: 0;
  font-weight: 500; font-size: 14.5px; font-family: inherit;
  color: var(--text);
}
.purpose input:focus { outline: none; }

.kv { display: flex; flex-direction: column; margin-top: 14px; }
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.kv > div b { font-family: "Onest", inherit; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.kv > div b.ok { font-family: inherit; color: var(--ok); }
.kv > div.total { border-bottom: 0; padding: 14px 0 4px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.kv > div.total b { font-size: 19px; font-weight: 700; }

.btn-go {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  margin-top: 16px;
  background: var(--grad);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700; font-size: 15.5px; font-family: inherit;
  cursor: pointer;
  box-shadow: var(--grad-shadow);
}
.btn-go:hover { filter: brightness(1.06); }
.btn-go:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
a.btn-go { text-decoration: none; }   /* оплата через СБП — это ссылка, а не кнопка */
.under { text-align: center; font-size: 12px; font-weight: 500; color: var(--dim); margin-top: 11px; }

.hint { display: flex; flex-direction: row; align-items: flex-start; gap: 13px; padding: 20px; }
.hint .ic {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-soft);
}
html[data-theme="light"] .hint .ic { background: var(--accent-wash); color: var(--accent); }
.hint b { display: block; font-size: 14px; font-weight: 600; }
.hint p { font-size: 13px; line-height: 1.55; font-weight: 500; color: var(--muted); margin: 4px 0 0; }

.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dim);
  flex: none;
}
.back-btn:hover { color: var(--text); }
.secure {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--ok-wash);
  border: 1px solid rgba(52, 211, 153, 0.24);
  font-size: 13px;
  font-weight: 600;
  color: var(--ok);
  flex: none;
}

/* ---------- Экран «История» ---------- */
.filters { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; }
.filter-search {
  flex: 1;
  min-width: 220px;
  height: 44px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  color: var(--muted);
}
.filter-search input { flex: 1; min-width: 0; border: 0; background: none; font-weight: 500; font-size: 14px; font-family: inherit; color: var(--text); }
.filter-search input:focus { outline: none; }
.sel {
  height: 44px;
  padding: 0 15px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500; font-size: 14px; font-family: inherit;
  color: var(--chip-ink);
  cursor: pointer;
  flex: none;
}
.sel:hover { border-color: var(--line-strong); }
.sel.on { background: var(--accent-wash); border-color: rgba(47, 107, 255, 0.4); color: var(--link); font-weight: 600; }
html[data-theme="light"] .sel.on { color: var(--accent); }

/* Фильтры истории: настоящий выпадающий список вместо перебора по клику.
   `picked` — фильтр отличается от «все», чтобы было видно, что выборка сужена. */
.sel-wrap { position: relative; flex: none; }
.sel.picked { background: var(--accent-wash); border-color: rgba(47, 107, 255, 0.4); color: var(--link); font-weight: 600; }
html[data-theme="light"] .sel.picked { color: var(--accent); }
.sel.reset { color: var(--muted); }
.sel-pop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sel-item {
  text-align: left;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 9px;
  border: 0;
  background: none;
  font-weight: 500; font-size: 13.5px; font-family: inherit;
  color: var(--text);
  cursor: pointer;
}
.sel-item:hover { background: var(--inset); }
.sel-item.on { background: var(--accent-wash); color: var(--link); font-weight: 600; }
html[data-theme="light"] .sel-item.on { color: var(--accent); }

.sum-row { display: flex; gap: 14px; flex-wrap: wrap; }
.sum {
  flex: 1;
  min-width: 160px;
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
}
.sum span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.sum b { display: block; font-family: "Onest", inherit; font-size: 23px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.sum b.blue { color: var(--accent-soft); }
html[data-theme="light"] .sum b.blue { color: var(--accent-deep); }
.sum b.green { color: var(--ok); }

.table {
  flex: 1;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.thead {
  display: flex;
  align-items: center;
  padding: 14px 22px;
  background: var(--inset);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  flex: none;
}
.tbody { flex: 1; overflow: auto; min-height: 0; }
.trow {
  display: flex;
  align-items: center;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--inset); }
.c-date { flex: 1.1; }
.c-who { flex: 2; display: flex; align-items: center; gap: 11px; min-width: 0; }
.c-bank { flex: 1.5; font-size: 13.5px; font-weight: 500; color: var(--chip-ink); }
.c-sent, .c-got { flex: 1.3; font-family: "Onest", inherit; font-size: 14px; font-variant-numeric: tabular-nums; }
.c-sent { font-weight: 700; }
.c-got { font-weight: 600; color: var(--accent-soft); }
html[data-theme="light"] .c-got { color: var(--accent-deep); }
.c-st { flex: 1.2; }
.c-arw { width: 34px; display: flex; justify-content: flex-end; flex: none; color: var(--dim); }
.c-date b { display: block; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-date span { display: block; font-size: 12px; font-weight: 500; color: var(--dim); margin-top: 2px; }
.c-who .bank { width: 34px; height: 34px; border-radius: 10px; font-size: 11px; }
.c-who .who { flex: 1; min-width: 0; }
.c-who .who b { display: block; font-size: 13.5px; font-weight: 600; }
.c-who .who span { display: block; font-size: 11.5px; font-weight: 500; color: var(--dim); font-variant-numeric: tabular-nums; }
/* заголовок таблицы использует те же классы колонок — сбрасываем оформление ячеек */
.thead > div { color: var(--muted); font-family: inherit; font-size: 12.5px; font-weight: 600; }

/* ---------- Экран «Детали перевода» ---------- */
.hero-status {
  border-radius: 20px;
  padding: 26px;
  background: radial-gradient(90% 130% at 20% 0%, rgba(251, 191, 36, 0.12), rgba(21, 23, 29, 0)), var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.hero-status.ok { background: radial-gradient(90% 130% at 20% 0%, rgba(52, 211, 153, 0.12), rgba(21, 23, 29, 0)), var(--card); }
.hero-status.bad { background: radial-gradient(90% 130% at 20% 0%, rgba(248, 113, 113, 0.12), rgba(21, 23, 29, 0)), var(--card); }
.hero-status.wait { background: radial-gradient(90% 130% at 20% 0%, rgba(47, 107, 255, 0.14), rgba(21, 23, 29, 0)), var(--card); }
.ring {
  width: 74px;
  height: 74px;
  flex: none;
  border-radius: 50%;
  border: 3px solid var(--warn-ring);
  border-top-color: var(--warn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warn);
}
.hero-status.ok .ring { border-color: var(--ok-wash); border-top-color: var(--ok); color: var(--ok); }
.hero-status.bad .ring { border-color: rgba(248, 113, 113, 0.2); border-top-color: var(--bad); color: var(--bad); }
.hero-status.wait .ring { border-color: var(--accent-wash); border-top-color: var(--accent); color: var(--link); }
html[data-theme="light"] .hero-status.wait .ring { color: var(--accent); }
.hero-status .txt { flex: 1; min-width: 180px; }
.hero-status .txt b { display: block; font-size: 22px; font-weight: 700; }
.hero-status .txt span { display: block; font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 5px; }
.hero-sum { display: flex; align-items: center; gap: 14px; flex: none; }
.hero-sum b { font-family: "Onest", inherit; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-sum b.to { color: var(--accent-soft); }
html[data-theme="light"] .hero-sum b.to { color: var(--accent-deep); }

.flow { display: flex; flex-direction: column; }
.flow-item { display: flex; gap: 15px; }
.flow-rail { display: flex; flex-direction: column; align-items: center; flex: none; }
.flow-rail i { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); flex: none; }
.flow-rail u { width: 2px; flex: 1; min-height: 26px; background: var(--ok); }
.flow-item.now .flow-rail i { background: var(--warn); box-shadow: 0 0 0 5px var(--warn-ring); }
.flow-item.now .flow-rail u { background: var(--line-strong); }
/* Линия к будущим шагам тоже серая — зелёная читалась как «уже пройдено». */
.flow-item.todo .flow-rail u { background: var(--line-strong); }
.flow-item.todo .flow-rail i { background: var(--step-empty); border: 2px solid var(--line-strong); }
.flow-body { padding-bottom: 18px; }
.flow-item:last-child .flow-body { padding-bottom: 0; }
.flow-body b { display: block; font-size: 14.5px; font-weight: 600; }
.flow-body span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.flow-item.now .flow-body span { color: var(--warn); }
.flow-item.todo .flow-body b, .flow-item.todo .flow-body span { color: var(--dim); }

/* ---------- Блок действия по заявке ----------
   Появляется только в состояниях, где ход за клиентом. Синяя рамка —
   единственный акцент такого рода на экране, чтобы взгляд шёл сразу сюда. */
.act-card {
  gap: 14px;
  border-color: rgba(47, 107, 255, 0.35);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.act-top { display: flex; align-items: flex-start; gap: 13px; }
.act-ic {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--link);
  display: flex;
  align-items: center;
  justify-content: center;
}
html[data-theme="light"] .act-ic { color: var(--accent); }
.act-top b { display: block; font-size: 16px; font-weight: 700; }
.act-top p { font-size: 13.5px; line-height: 1.55; font-weight: 500; color: var(--muted); margin: 5px 0 0; }
.act-top p b { display: inline; font-size: inherit; color: var(--text); }
/* Подсказка, а не поле ввода: у полей серая заливка, поэтому здесь синяя
   с полосой слева — иначе особенности направления читаются как пустой input. */
.act-note {
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
}
/* Подсказка-переход: та же карточка, но кликабельная. Раньше «Нужна помощь?»
   обещала чат и никуда не вела — теперь это кнопка, поэтому ей нужен сброс
   кнопочных умолчаний и стрелка, по которой видно, что она ведёт дальше. */
.hint-go {
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  align-items: center;
  transition: border-color 0.15s, background 0.15s;
}
.hint-go:hover { border-color: var(--accent); background: var(--accent-wash); }
.hint-go > div { flex: 1; min-width: 0; }
.hint-arw { flex: none; color: var(--dim); }
.hint-go:hover .hint-arw { color: var(--link); }
html[data-theme="light"] .hint-go:hover .hint-arw { color: var(--accent); }

/* ---------- Карточка ожидания ----------
   Шаг, где ход за системой. Пульсирующая точка показывает, что процесс живой,
   полоса — сколько от отведённого на шаг времени уже прошло (числа настоящие,
   из time_total/time_left), а сноска снимает главный вопрос: надо ли обновлять
   страницу руками. */
.waitc { gap: 13px; padding: 20px 22px; }
.waitc-top { display: flex; align-items: center; gap: 10px; }
.waitc-live {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--warn-ring);
  display: flex;
  align-items: center;
  justify-content: center;
}
.waitc-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: waitpulse 1.8s ease-out infinite; }
@keyframes waitpulse {
  0% { box-shadow: 0 0 0 0 var(--warn-ring); }
  70% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}
@media (prefers-reduced-motion: reduce) { .waitc-live i { animation: none; } }
.waitc-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--warn); }
.waitc-time { margin-left: auto; font-family: "Onest", inherit; font-variant-numeric: tabular-nums; }
.waitc-time b { font-size: 21px; font-weight: 700; }
.waitc-text { font-size: 14px; line-height: 1.55; font-weight: 500; color: var(--text); }
.waitc-text div, .waitc-text p { margin: 0; }
.waitc-text div:empty { display: none; }
.waitc-text b, .waitc-text strong { font-weight: 700; }
.waitc-bar { height: 5px; border-radius: 3px; background: var(--inset); overflow: hidden; }
.waitc-bar i { display: block; height: 100%; border-radius: 3px; background: var(--grad); transition: width 1s linear; }
.waitc-foot { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--dim); }

/* Внутри подсказки приходит вёрстка бэкенда: абзацы, списки, распорки.
   Гасим их собственные отступы, чтобы блок не разъезжался. */
.act-note p, .act-note div { margin: 0; }
.act-note div:empty { display: none; }
.act-note b, .act-note strong { color: var(--text); font-weight: 700; }
.act-note ul, .act-note ol { margin: 6px 0 0; padding-left: 18px; }

.act-fields { display: flex; flex-direction: column; gap: 10px; }
.act-pair { display: flex; gap: 10px; flex-wrap: wrap; }
.act-pair .btn-go { flex: 1; min-width: 200px; margin-top: 0; }
.act-pair .btn-quiet-sm { height: 46px; padding: 0 18px; }
.act-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 1px;
}
.act-timer { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.act-timer b { font-weight: 700; color: var(--warn); font-variant-numeric: tabular-nums; }

/* Реквизиты агента: значение крупно, рядом — копирование одним нажатием. */
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 13px;
  padding: 11px 14px;
  background: var(--inset);
  border: 1px solid var(--line);
}
.req-row span { flex: none; width: 140px; font-size: 12px; font-weight: 500; color: var(--muted); }
.req-row b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; word-break: break-all; font-variant-numeric: tabular-nums; }
.copy {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.copy:hover { color: var(--text); }
.copy.done { color: var(--ok); border-color: var(--ok); }

.file-pick {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 13px;
  padding: 14px;
  border: 1.5px dashed var(--line-strong);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}
.file-pick:hover { border-color: var(--accent); color: var(--text); }
.sbp-qr { width: 190px; height: 190px; align-self: center; border-radius: 14px; background: #fff; padding: 8px; }

@media (max-width: 620px) {
  .req-row { flex-wrap: wrap; }
  .req-row span { width: 100%; }
}

.iban {
  margin-top: 16px;
  border-radius: 13px;
  padding: 13px 15px;
  background: var(--inset);
  border: 1px solid var(--line);
}
.iban span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.iban b { display: block; font-size: 14px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.party { display: flex; align-items: center; gap: 13px; }
.party .bank { width: 46px; height: 46px; border-radius: 14px; font-size: 14px; }
.party .who b { display: block; font-size: 15px; font-weight: 600; }
.party .who span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.btn-quiet-sm {
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 600; font-size: 13.5px; font-family: inherit;
  color: var(--text);
  cursor: pointer;
  flex: none;
}
.btn-quiet-sm:hover { border-color: var(--line-strong); }

@media (max-width: 900px) {
  .thead { display: none; }
  .trow { flex-wrap: wrap; gap: 8px 12px; }
  .c-date, .c-who, .c-bank, .c-sent, .c-got, .c-st { flex: none; }
  .c-who { flex: 1 1 100%; order: -1; }
  .c-bank { display: none; }
}

/* Блок стилей экрана «Получатели» удалён вместе с экраном 05.08.2026. */
.ff {
  display: block;
  border-radius: 13px;
  padding: 12px 15px;
  background: var(--inset);
  border: 1px solid var(--line);
}
.ff.focus { border: 1.5px solid rgba(47, 107, 255, 0.55); }
.ff span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.ff input, .ff .val {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 0;
  background: none;
  padding: 0;
  font-weight: 600; font-size: 14.5px; font-family: inherit;
  color: var(--text);
}
.ff input:focus { outline: none; }
.ff.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- 06 · Курсы валют ---------- */
.rate-hero { font-family: "Onest", inherit; font-size: 40px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.segs { display: flex; gap: 7px; flex-wrap: wrap; }
.seg {
  height: 32px;
  padding: 0 13px;
  border-radius: 9px;
  background: var(--inset);
  border: 1px solid var(--line-strong);
  font-weight: 600; font-size: 12.5px; font-family: inherit;
  color: var(--chip-ink);
  cursor: pointer;
}
.seg.on { background: var(--accent-wash); border-color: rgba(47, 107, 255, 0.4); color: var(--link); }
html[data-theme="light"] .seg.on { color: var(--accent); }
.spark-lg { width: 100%; height: 150px; margin-top: 18px; display: block; }
.r-bank { flex: 2; display: flex; align-items: center; gap: 12px; min-width: 0; }
.r-bank .bank { width: 36px; height: 36px; border-radius: 11px; font-size: 12px; }
.r-bank b { font-size: 14.5px; font-weight: 600; }
.r-pair { flex: 1.2; font-size: 14px; font-weight: 500; color: var(--chip-ink); }
.r-rate { flex: 1.2; font-family: "Onest", inherit; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.r-day, .r-fee { flex: 1.2; font-size: 13.5px; font-weight: 600; }

/* ---------- Избранные направления ----------
   Строка теперь показывает обе стороны перевода, поэтому нужны колонка под
   звезду и стрелка между банками. Вся строка кликабельна — ведёт в форму
   перевода с уже подставленным направлением. */
/* Подбор направления: пара стран + переключатель избранного. */
.dir-filters { margin-bottom: 2px; }
.dir-arw { display: flex; align-items: center; color: var(--dim); flex: none; }
.cnt-label { font-size: 12px; font-weight: 500; color: var(--dim); }
.sel:disabled { opacity: 0.5; cursor: not-allowed; }
.cnt-flag { width: 20px; height: 14px; border-radius: 3px; object-fit: cover; margin-right: 9px; vertical-align: -2px; }
.sel-item { display: flex; align-items: center; }

.rates-table .star-col { flex: none; width: 34px; }
.rates-table .r-arw { flex: none; width: 26px; display: flex; align-items: center; justify-content: center; }
.rates-table .r-bank { flex: 1.6; }
.rates-table .r-rate { display: flex; flex-direction: column; gap: 2px; }
.rates-table .r-rate span { font-family: inherit; font-size: 11.5px; font-weight: 500; color: var(--dim); }
.fav-row { cursor: pointer; }
.star {
  flex: none;
  width: 34px;
  height: 34px;
  margin-left: -6px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: var(--dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, transform 0.15s;
}
.star:hover { color: var(--warn); transform: scale(1.12); }
.star.on { color: var(--warn); }

@media (max-width: 900px) {
  .rates-table .r-day, .rates-table .r-fee { display: none; }
}
.up { color: var(--ok); }
.down { color: var(--bad); }
.flat { color: var(--muted); }

/* ---------- 07 · Верификация ---------- */
.docs { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.doc {
  flex: 1;
  min-width: 190px;
  border-radius: 18px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.doc.todo { border-style: dashed; background: none; cursor: pointer; }
.doc.todo:hover { border-color: var(--muted); }
.doc .ic {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc.ok .ic { background: var(--ok-wash); color: var(--ok); }
.doc.go .ic { background: var(--warn-ring); color: var(--warn); }
.doc.todo .ic { background: var(--line-strong); color: var(--muted); }
.doc b { display: block; font-size: 15px; font-weight: 600; }
.doc p { font-size: 12.5px; line-height: 1.5; font-weight: 500; color: var(--muted); margin: 4px 0 0; }
.doc .state { margin-top: auto; font-size: 12.5px; font-weight: 600; }
.doc.ok .state { color: var(--ok); }
.doc.go .state { color: var(--warn); }
.doc.todo .state { color: var(--muted); }

.bullets { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.bullets div { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--chip-ink); }
.bullets i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ok-wash);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 1px;
}

/* ---------- 08 · Поддержка ---------- */
.chat-wrap { display: flex; gap: 22px; flex: 1; min-height: 0; }
.tickets { flex: 1; padding: 0; overflow: hidden; min-width: 0; }
.tickets .card-head { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.ticket-list { flex: 1; overflow: auto; }
.ticket {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.ticket:hover, .ticket.on { background: var(--inset); }
.ticket-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-top b { font-size: 14px; font-weight: 600; }
.ticket-top span { font-size: 12px; font-weight: 500; color: var(--dim); flex: none; }
.ticket p {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin: 5px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket .unread { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: 6px; }

.chat { flex: 1.6; padding: 0; overflow: hidden; min-width: 0; }

/* Чат без списка обращений — клиент видит один диалог, поэтому карточка
   занимает всю ширину экрана и всю его высоту. */
.chat-solo { flex: 1; min-height: 0; max-width: 860px; width: 100%; }
.chat-empty {
  margin: auto;
  text-align: center;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.chat-empty .ic {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent-wash);
  color: var(--link);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
html[data-theme="light"] .chat-empty .ic { color: var(--accent); }
.chat-empty b { font-size: 15px; font-weight: 700; }
.chat-empty p { font-size: 13px; line-height: 1.55; font-weight: 500; color: var(--muted); margin: 0; }

/* Отправляемое сообщение показываем сразу, приглушённым: так видно, что
   оно ушло, и экран не приходится перерисовывать ради одной строки. */
.msg.pending { opacity: 0.55; }
.msg-img { display: block; max-width: 220px; border-radius: 10px; }
.chat-fail {
  align-self: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bad);
  background: rgba(248, 113, 113, 0.12);
  border-radius: 10px;
  padding: 7px 12px;
}
.chat-clip {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}
.chat-clip:hover { color: var(--link); background: var(--inset); }
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.chat-head .who b { display: block; font-size: 14.5px; font-weight: 600; }
.chat-head .who span { display: block; font-size: 12px; font-weight: 500; color: var(--ok); margin-top: 2px; }
.chat-head .tag {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--chip-ink);
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px;
  flex: none;
}
.chat-body { flex: 1; overflow: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.day { text-align: center; font-size: 12px; font-weight: 600; color: var(--dim); }
.msg { max-width: 76%; border-radius: 16px; padding: 12px 15px; background: var(--inset); border: 1px solid var(--line); }
.msg p { font-size: 14px; line-height: 1.5; font-weight: 500; margin: 0; }
.msg time { display: block; font-size: 11px; font-weight: 500; color: var(--dim); margin-top: 6px; }
.msg.me { align-self: flex-end; background: var(--grad); border-color: transparent; color: #fff; }
.msg.me time { color: rgba(255, 255, 255, 0.75); }
.msg-deal {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.msg-deal .bank { width: 32px; height: 32px; border-radius: 10px; font-size: 10px; }
.msg-deal .who { flex: 1; min-width: 0; }
.msg-deal .who b { display: block; font-size: 13px; font-weight: 600; }
.msg-deal .who span { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.chat-foot { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); flex: none; }
.chat-foot input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border-radius: 12px;
  background: var(--inset);
  border: 1px solid var(--line);
  padding: 0 15px;
  font-weight: 500; font-size: 14px; font-family: inherit;
  color: var(--text);
}
.chat-foot input:focus { outline: none; border-color: var(--line-strong); }
.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--grad);
  border: 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}

/* ---------- 09 · Профиль ---------- */
.prof-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  flex: none;
}
.prof-head .who { flex: 1; min-width: 160px; }
.prof-head .who b { display: block; font-size: 20px; font-weight: 700; }
.prof-head .who span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.prof-head .who .ver { color: var(--ok); font-weight: 600; }

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.set-row:last-child { border-bottom: 0; }
.set-row .t b { display: block; font-size: 14px; font-weight: 600; }
.set-row .t span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.set-row .act { font-size: 13px; font-weight: 600; color: var(--link); cursor: pointer; flex: none; }
html[data-theme="light"] .set-row .act { color: var(--accent); }
/* Тумблеры (.tgl) удалены вместе с выдуманными настройками безопасности и
   уведомлений: соответствующих эндпоинтов у бэкенда нет, а переключатель,
   который запоминает положение и ни на что не влияет, убеждает человека,
   что защита включена. */
.set-row .act {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
}
.set-row .act:hover { text-decoration: underline; }

/* Раскрывающиеся формы профиля: Telegram и смена пароля. */
.set-form { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 14px; }
.set-actions { display: flex; align-items: center; gap: 10px; }
.set-note { font-size: 12.5px; font-weight: 500; line-height: 1.5; margin-top: 2px; }
.set-note:empty { display: none; }
.set-note .ok { color: var(--ok); font-weight: 600; }
.set-note .bad { color: var(--bad); font-weight: 600; }
.set-note .dim { color: var(--dim); }

img.avatar-lg, img.avatar { object-fit: cover; background: var(--inset); }

.danger { color: var(--bad); }

@media (max-width: 1100px) {
  .chat-wrap { flex-direction: column; }
  .tickets, .chat { flex: none; }
  .chat { min-height: 420px; display: flex; flex-direction: column; }
}

/* ---------- Вход в кабинет ---------- */
.auth {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  background: var(--bg);
}
.auth[hidden] { display: none; }

.auth-brand {
  flex: 1.1;
  position: relative;
  overflow: hidden;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(160deg, #2350cf 0%, #2F6BFF 55%, #38BDF8 130%);
}
.auth-brand > * { position: relative; }
.auth-brand .mark { position: absolute; right: -60px; bottom: -40px; opacity: 0.14; stroke: #fff; }
.auth-brand .brand span { color: #fff; }
.auth-brand h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 460px;
  text-wrap: pretty;
}
.auth-brand p { font-size: 16px; line-height: 1.6; font-weight: 500; color: rgba(255, 255, 255, 0.82); margin: 16px 0 0; max-width: 420px; }
.auth-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.auth-stats div b { display: block; font-family: "Onest", inherit; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.auth-stats div span { display: block; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.75); margin-top: 4px; }

.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--band);
  border-left: 1px solid var(--line);
  position: relative;
}
.auth-tools { position: absolute; top: 22px; right: 22px; display: flex; gap: 10px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.auth-card .lead { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin: 8px 0 26px; max-width: none; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.auth-row .act { font-size: 13px; font-weight: 600; color: var(--link); cursor: pointer; background: none; border: 0; font-family: inherit; }
html[data-theme="light"] .auth-row .act { color: var(--accent); }
.auth-err {
  display: none;
  border-radius: 12px;
  padding: 11px 14px;
  background: rgba(248, 113, 113, 0.12);
  color: var(--bad);
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}
.auth-err.on { display: block; }
.auth-foot { font-size: 13px; font-weight: 500; color: var(--dim); margin-top: 22px; text-align: center; }
.auth-foot button { background: none; border: 0; font-weight: 600; font-size: 13px; font-family: inherit; color: var(--link); cursor: pointer; padding: 0; }
html[data-theme="light"] .auth-foot button { color: var(--accent); }

@media (max-width: 900px) {
  .auth-brand { display: none; }
  .auth-panel { border-left: 0; }
}

/* ---------- Служебное ---------- */
.skeleton { color: var(--dim); font-size: 14px; padding: 40px 0; text-align: center; }
.mock-flag {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: 60;
  background: var(--warn-ring);
  color: var(--warn);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

/* ---------- Адаптив ---------- */
.side-toggle { display: none; }

@media (max-width: 1100px) {
  .side {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.5); }
  .side-toggle { display: flex; }
  .row { flex-wrap: wrap; }
  .promo { flex: 1 1 100%; }
  .card { flex: 1 1 240px; }
  .row-grow { flex-direction: column; min-height: 0; }
  .list-card, .aside-col { flex: none; }
}

/* Двухколоночные экраны (перевод, заявка, получатели) на узком экране
   складываются в одну колонку: иначе карточки сжимаются до нечитаемой
   ширины. Кабинет открывают с телефона — ради этого он и делался. */
@media (max-width: 880px) {
  .cols { flex-direction: column; }
  .col-main, .col-side { flex: none !important; }
  .hero-status { padding: 20px; gap: 16px; }
  .hero-status .ring { width: 56px; height: 56px; }
  .hero-status .txt b { font-size: 19px; }
  .hero-sum { flex: 1 1 100%; }
}

@media (max-width: 720px) {
  body { overflow: auto; }
  .cab { height: auto; min-height: 100vh; }
  .topbar { height: auto; padding: 14px 18px; flex-wrap: wrap; }
  .search { display: none; }
  .view { padding: 18px; }
  .card { flex: 1 1 100%; }
  .tx { padding: 14px 16px; flex-wrap: wrap; }
  .tx .st { width: auto; margin-left: auto; }
  .list-card .card-head { padding: 16px; }
}
