/* ============================================================
   СФС — Социально Финансовая Сеть
   Тёмный глубокий зелёный, стекло (glassmorphism), неоновые акценты.
   ============================================================ */

@property --a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg: #04100c;
  --bg-2: #071a14;
  --brown: #0c2a20;
  --brown-2: #11392b;
  --laser: #2bf0a0;
  --laser-hi: #a8ffd8;
  --laser-rgb: 43, 240, 160;
  --text: #eaf7f1;
  --muted: #8fb0a2;
  --faint: #5b7a6d;
  --glass: rgba(14, 48, 37, 0.42);
  --line: rgba(var(--laser-rgb), 0.16);
  --line-soft: rgba(200, 255, 230, 0.09);
  --danger: #ff7d7d;
  --ok: #7dffb8;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", "Golos Text", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(110% 55% at 50% -8%, #0e4a36 0%, rgba(14, 74, 54, 0) 62%),
    radial-gradient(70% 40% at 100% 100%, #07281d 0%, rgba(7, 40, 29, 0) 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--laser);
  outline-offset: 3px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; }
b, strong { font-weight: 500; }

.shell {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px
           calc(env(safe-area-inset-bottom, 0px) + 104px);
}

/* ---------- лазерные кнопки ---------- */
.btn {
  position: relative;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 18px;
  border: 1px solid rgba(var(--laser-rgb), 0.38);
  background: rgba(var(--laser-rgb), 0.05);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 8px rgba(var(--laser-rgb), 0.14),
    0 0 26px rgba(var(--laser-rgb), 0.07),
    inset 0 0 14px rgba(var(--laser-rgb), 0.04);
  transition: transform 0.12s, box-shadow 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.975); }

.btn.primary {
  border-color: rgba(var(--laser-rgb), 0.9);
  background: linear-gradient(180deg, rgba(var(--laser-rgb), 0.22), rgba(var(--laser-rgb), 0.08));
  color: var(--laser-hi);
  box-shadow:
    0 0 14px rgba(var(--laser-rgb), 0.3),
    0 8px 30px rgba(var(--laser-rgb), 0.14),
    inset 0 0 16px rgba(var(--laser-rgb), 0.1);
}

/* бегущий по контуру луч */
.btn.primary::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--a), transparent 0 78%, rgba(210, 255, 236, 0.95) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: sweep 6s linear infinite;
  pointer-events: none;
}
@keyframes sweep { to { --a: 360deg; } }

.btn.small { min-height: 44px; padding: 0 16px; border-radius: 14px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  border-color: var(--line-soft);
  color: var(--muted);
}
.btn[disabled]::before { display: none; }

.link-btn {
  background: none; border: 0; color: var(--muted); min-height: 44px; padding: 0 10px;
  font-weight: 500; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: rgba(var(--laser-rgb), 0.35);
}
.icon-btn {
  width: 48px; height: 48px; border-radius: 14px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(var(--laser-rgb), 0.025);
  box-shadow: 0 0 10px rgba(var(--laser-rgb), 0.1);
}
.icon-btn svg { width: 22px; height: 22px; stroke: var(--laser-hi); fill: none; stroke-width: 1.4; stroke-linecap: round; }

.logout-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.logout-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- карточки ---------- */
.card {
  background: linear-gradient(160deg, rgba(20, 70, 53, 0.45), var(--glass));
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(200, 255, 230, 0.06);
}
.stack { display: grid; gap: 12px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label { color: var(--muted); font-size: 14px; letter-spacing: 0.03em; }
.note { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.meta { color: var(--faint); font-size: 13px; }
h2 { font-size: 18px; margin: 28px 0 14px; letter-spacing: 0; }

/* ---------- шапка кабинета ---------- */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.topbar .mark { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 14px rgba(var(--laser-rgb), 0.35); }
.topbar .who { flex: 1; min-width: 0; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: 0.06em; line-height: 1.1; }
.who-id { color: var(--muted); font-size: 13px; }
.who-id b { color: var(--laser-hi); font-weight: 600; }

/* ---------- баланс ---------- */
.hero { padding: 26px 20px 24px; text-align: center; border-radius: var(--radius-lg); border-color: var(--line);
  box-shadow: 0 0 40px rgba(var(--laser-rgb), 0.06); }
.big {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(48px, 16vw, 78px);
  line-height: 1.1;
  margin: 8px 0 2px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.big.long { font-size: clamp(34px, 11vw, 58px); }
.big .cents { font-size: 0.45em; color: var(--muted); }
.unit { color: var(--laser); font-weight: 600; font-size: 0.34em; letter-spacing: 0.1em; white-space: nowrap; text-shadow: 0 0 12px rgba(var(--laser-rgb), 0.45); }
.growth { display: flex; align-items: center; gap: 14px; margin-top: 18px; text-align: left; }
.growth .note { margin: 0; }
.growth.solo { justify-content: center; }

.ring { width: 64px; height: 64px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: rgba(var(--laser-rgb), 0.12); }
.ring .arc { stroke: var(--laser); stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(var(--laser-rgb), 0.8)); }
.ring .ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1; }
.ring .ring-text small { font-family: var(--font-body); font-size: 10px; color: var(--muted); margin-top: 2px; }
.ring.off .arc { stroke: var(--faint); filter: none; }


.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }


.chip { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid rgba(var(--laser-rgb), 0.45); color: var(--laser-hi); white-space: nowrap; }
.chip.wait { border-color: rgba(var(--laser-rgb), 0.7); box-shadow: 0 0 10px rgba(var(--laser-rgb), 0.25); }
.chip.done { border-color: var(--line-soft); color: var(--muted); box-shadow: none; }
.chip.bad { border-color: rgba(255, 125, 125, 0.5); color: var(--danger); }

.bonus-line { color: var(--laser-hi); font-size: 14px; margin-top: 2px; }
.warn-line { color: var(--danger); font-size: 14px; margin-top: 12px; }
.amount { font-family: var(--font-display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.amount.plus { color: var(--laser-hi); }

.bar { height: 4px; border-radius: 999px; background: rgba(var(--laser-rgb), 0.1); overflow: hidden; margin: 12px 0 8px; }
.bar > i { display: block; height: 100%; background: var(--laser); border-radius: inherit; box-shadow: 0 0 8px rgba(var(--laser-rgb), 0.8); }
.empty { text-align: center; padding: 30px 14px; color: var(--muted); }

/* ---------- валюты ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 4px; border-radius: 16px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-soft); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.seg button { min-height: 46px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-weight: 500; }
.seg button[aria-pressed="true"] { color: var(--laser-hi); font-weight: 600; background: rgba(var(--laser-rgb), 0.07);
  box-shadow: inset 0 0 0 1px rgba(var(--laser-rgb), 0.5), 0 0 12px rgba(var(--laser-rgb), 0.18); }
.cur-switch { margin-bottom: 14px; }

/* ---------- нижняя навигация ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: rgba(4, 16, 12, 0.78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.nav-inner { max-width: 520px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.nav button { min-height: 58px; border: 0; background: none; border-radius: 14px; color: var(--muted); font-weight: 500; font-size: 13px;
  display: grid; justify-items: center; align-content: center; gap: 3px; padding: 4px 0; }
.nav button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav button[aria-current="page"] svg { filter: drop-shadow(0 0 5px rgba(var(--laser-rgb), 0.7)); }
.nav button[aria-current="page"] { color: var(--laser-hi); font-weight: 600;
  background: rgba(var(--laser-rgb), 0.06); box-shadow: inset 0 -2px 0 var(--laser), 0 6px 16px -10px rgba(var(--laser-rgb), 0.8); }

/* ---------- формы ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label, .glow-label {
  color: var(--laser-hi); font-size: 15px; font-weight: 600; letter-spacing: 0.03em;
  text-shadow: 0 0 6px rgba(var(--laser-rgb), 0.85), 0 0 16px rgba(var(--laser-rgb), 0.5);
}
.field input {
  min-height: 56px; padding: 0 16px; border-radius: 16px; width: 100%;
  border: 1px solid rgba(var(--laser-rgb), 0.55); background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 10px rgba(var(--laser-rgb), 0.22), inset 0 0 10px rgba(var(--laser-rgb), 0.06);
  font-weight: 500; font-size: 17px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { outline: none; border-color: var(--laser); box-shadow: 0 0 20px rgba(var(--laser-rgb), 0.5), inset 0 0 10px rgba(var(--laser-rgb), 0.1); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 58px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; padding: 0;
  border: 0; background: none; border-radius: 12px; display: grid; place-items: center; color: var(--laser-hi); }
.pw-eye svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(var(--laser-rgb), 0.55)); }
.pw-eye[aria-pressed="true"] { background: rgba(var(--laser-rgb), 0.1); }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 0 0 10px; }

/* ---------- вход / главная ---------- */
.auth { padding-top: calc(env(safe-area-inset-top, 0px) + 6px); text-align: center; }
.logo-wrap { width: min(78vw, 330px); aspect-ratio: 1; margin: 0 auto; position: relative; }
.logo-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-card { margin: 0 0 22px; padding: 14px 6px 22px; perspective: 900px; }
.hero-float { position: relative; animation: card-float 6s ease-in-out infinite; transform-style: preserve-3d; }
.hero-float img {
  display: block; width: 100%; height: auto;
  /* тонкая зелёная окантовка по контуру + мягкое свечение */
  filter:
    drop-shadow(0 0 0.6px rgba(var(--laser-rgb), 1))
    drop-shadow(0 0 1.5px rgba(var(--laser-rgb), 0.9))
    drop-shadow(0 0 12px rgba(var(--laser-rgb), 0.45))
    drop-shadow(0 16px 24px rgba(0, 0, 0, 0.55));
  animation: card-glow 3.6s ease-in-out infinite;
}
/* блик, бегущий по карточке (обрезан по её форме) */
.hero-float::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(60, 255, 170, 0.6) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0;
  -webkit-mask: url("hero.webp") center / 100% 100% no-repeat; mask: url("hero.webp") center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  animation: card-shine 14s ease-in-out infinite;
}
@keyframes card-float {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  25% { transform: translateY(-7px) rotateX(2deg) rotateY(-2.5deg); }
  50% { transform: translateY(-11px) rotateX(0deg) rotateY(0deg); }
  75% { transform: translateY(-5px) rotateX(-2deg) rotateY(2.5deg); }
}
@keyframes card-glow {
  0%, 100% { filter: drop-shadow(0 0 0.6px rgba(var(--laser-rgb), 1)) drop-shadow(0 0 1.5px rgba(var(--laser-rgb), 0.8)) drop-shadow(0 0 8px rgba(var(--laser-rgb), 0.3)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.55)); }
  50% { filter: drop-shadow(0 0 0.6px rgba(var(--laser-rgb), 1)) drop-shadow(0 0 2px rgba(var(--laser-rgb), 1)) drop-shadow(0 0 18px rgba(var(--laser-rgb), 0.65)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.55)); }
}
@keyframes card-shine {
  0% { background-position: 130% 0; }
  22% { background-position: -30% 0; }
  99.9% { background-position: -30% 0; }
  100% { background-position: 130% 0; }
}
.auth form, .auth .seg { text-align: left; }
.auth .seg { margin-bottom: 18px; }

/* выбор счёта */
.choose { text-align: center; padding-top: 6vh; }
.choose h1 { font-size: 28px; margin: 8px 0 8px; letter-spacing: 0; }
.choose .lead { color: var(--muted); margin: 0 0 26px; }
.choose .options { display: grid; gap: 16px; }
.choose .btn { min-height: 92px; display: grid; gap: 2px; align-content: center; }
.choose .btn b { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: 0.03em; }
.choose .btn span { font-size: 14px; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- реквизиты и сделки ---------- */
.pay { margin-top: 14px; padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--laser-rgb), 0.3); background: rgba(var(--laser-rgb), 0.04); }
.pay-title { font-weight: 600; margin-bottom: 8px; }
.pay-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.pay-row > div:first-child { min-width: 0; }
.pay-value .coin, .pay-title .coin { vertical-align: -0.3em; margin-left: 4px; }
.pay-value { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pay .btn.small { flex: none; min-height: 44px; }
.trade-actions { display: grid; gap: 10px; margin-top: 14px; }
.trade-actions.two { grid-template-columns: 1fr 1fr; }

.stepper { display: grid; grid-template-columns: 60px 1fr 60px; gap: 10px; align-items: center; margin: 18px 0 12px; }
.stepper .btn { padding: 0; font-size: 26px; min-height: 60px; }
.stepper .val { text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 34px; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-soft); background: none; color: var(--muted); }
.chips button[aria-pressed="true"] { border-color: rgba(var(--laser-rgb), 0.8); color: var(--laser-hi); box-shadow: 0 0 10px rgba(var(--laser-rgb), 0.25); }

/* ---------- таблица бонусов ---------- */
.btable { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.9fr); column-gap: 8px; align-items: baseline; }
.btable .th { color: var(--faint); font-size: 12px; letter-spacing: 0.04em; text-align: right; padding-bottom: 6px; }
.btable .th:first-child { text-align: left; }
.btable .c { padding: 4px 0; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.btable .c.l { text-align: left; }
.btable .purchase { color: var(--muted); font-size: 14px; }
.btable .bonus { color: var(--laser-hi); }
.btable .bonus.l small { color: var(--faint); font-size: 12px; }
.btable .sep { grid-column: 1 / -1; height: 1px; background: var(--line-soft); margin: 8px 0; }
.btable .burning .bonus, .btable .burning .num { color: var(--danger); }
.btable .gone { opacity: 0.4; text-decoration: line-through; }
.btable .total { font-family: var(--font-display); font-weight: 700; font-size: 16px; padding-top: 10px; }

/* ---------- нижняя шторка ---------- */
dialog.sheet {
  width: 100%; max-width: 520px; margin: auto auto 0; padding: 22px 18px calc(env(safe-area-inset-bottom, 0px) + 22px);
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(180deg, rgba(10, 38, 29, 0.96), rgba(5, 20, 15, 0.98)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: var(--text); max-height: 92dvh; overflow-y: auto;
  box-shadow: 0 -10px 50px rgba(var(--laser-rgb), 0.08);
}
dialog.sheet::backdrop { background: rgba(0, 8, 5, 0.72); backdrop-filter: blur(3px); }
dialog.sheet[open] { animation: rise 0.22s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet h3 { font-size: 20px; margin: 0 0 6px; letter-spacing: 0; }
.sheet .menu-list { display: grid; gap: 12px; margin-top: 18px; }
.sheet .menu-list .btn { text-align: left; }

/* чат */
dialog.sheet.chat { height: 92dvh; display: flex; flex-direction: column; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); }
dialog.sheet.chat[open] { display: flex; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin: 14px 0; padding: 2px; min-height: 0; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.03); align-self: flex-start; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; border-color: rgba(var(--laser-rgb), 0.4); background: rgba(var(--laser-rgb), 0.06); }
.msg .when { color: var(--faint); font-size: 11px; margin-top: 4px; }
.msg img, .msg video { display: block; max-width: 100%; max-height: 300px; border-radius: 10px; margin-bottom: 6px; background: #000; }
.chat-form { display: grid; grid-template-columns: 1fr 52px; gap: 8px; align-items: center; }
.chat-form input[type="text"] { min-height: 52px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.4); }
.chat-form input[type="text"]:focus { outline: none; border-color: rgba(var(--laser-rgb), 0.8); }
.chat-form .icon-btn { width: 52px; height: 52px; }
.chat-closed { color: var(--muted); text-align: center; font-size: 14px; }

/* ---------- сообщения ---------- */
.msg-btn { position: relative; margin-right: -4px; }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; line-height: 1;
  background: var(--laser); color: #02130c; box-shadow: 0 0 10px rgba(var(--laser-rgb), 0.7);
}
.badge.static { position: static; flex: none; }
.chat-head .icon-btn:first-child:not(:only-child) { margin-right: 4px; }
.conv-list { display: grid; gap: 10px; overflow-y: auto; min-height: 0; padding: 2px; margin-top: 8px; }
.conv-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px;
  border-radius: 18px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.04); color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.conv-row:active { transform: scale(0.985); }
.conv-ava {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--laser-hi);
  border: 1px solid rgba(var(--laser-rgb), 0.5); background: rgba(var(--laser-rgb), 0.08);
  box-shadow: 0 0 12px rgba(var(--laser-rgb), 0.22);
}
.conv-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.conv-id { font-weight: 600; color: var(--laser-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-last { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* окно сообщений — полупрозрачное стекло */
dialog.sheet.glass {
  background: linear-gradient(180deg, rgba(12, 46, 35, 0.72), rgba(5, 20, 15, 0.8));
  backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

/* ---------- уведомление ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 98px); z-index: 50;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 480px); padding: 13px 18px; border-radius: 16px;
  background: rgba(8, 32, 25, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(var(--laser-rgb), 0.6);
  box-shadow: 0 0 20px rgba(var(--laser-rgb), 0.2); transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--danger); box-shadow: 0 0 20px rgba(255, 125, 125, 0.2); }

/* ---------- PWA: установка и нет сети ---------- */
.offline-banner {
  position: sticky; top: 0; z-index: 60;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
  background: #0b2e22; color: var(--laser-hi); border-bottom: 1px solid rgba(var(--laser-rgb), 0.5);
  font-size: 14px; text-align: center;
}
.offline-banner[hidden] { display: none; }
.conn-error { padding-top: 18vh; text-align: center; }
.conn-error .brand { font-size: 32px; }
.conn-error .tagline { color: var(--muted); margin: 8px 0 24px; }

.cur-tag { display: inline-flex; align-items: center; gap: 0.45em; white-space: nowrap; vertical-align: middle; }
.coin { width: 1.45em; height: 1.45em; flex: none; fill: rgba(var(--laser-rgb), 0.1); stroke: var(--laser-hi);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(var(--laser-rgb), 0.6)); }
.coin path { fill: none; }
.coin circle { stroke: var(--laser); }
.coin.usd { fill: rgba(255, 214, 10, 0.1); stroke: #ffe27a; filter: drop-shadow(0 0 4px rgba(255, 190, 0, 0.6)); }
.coin.usd circle { stroke: #ffd60a; }
.sheet h3 .coin { vertical-align: -0.3em; margin-left: 2px; }
.choose .btn b .coin { width: 1.3em; height: 1.3em; }

b.ue { font-weight: 800; }

/* мобильные: без горизонтального скролла */
html, body { max-width: 100%; }
img, video, svg { max-width: 100%; }

/* мобильные: без горизонтального скролла */
html, body { max-width: 100%; }
img, video, svg { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- админка ---------- */
.admin-sheet { max-height: 92vh; overflow-y: auto; }
.ahead-title { margin: 18px 0 6px; font-size: 16px; color: var(--accent, #7dffb4); }
.atiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.atile { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(125,255,180,.16); }
.atile-val { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.atile-lab { font-size: 12px; opacity: .75; margin-top: 2px; }
.abars { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin-top: 10px; overflow-x: auto; }
.abar { flex: 1 0 auto; min-width: 18px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.abar-fill { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #7dffb4, #1fae6a); }
.abar-val { font-size: 9px; opacity: .8; white-space: nowrap; }
.abar-lab { font-size: 10px; opacity: .7; margin-top: 3px; white-space: nowrap; }
.atable { margin-top: 8px; }
.arow { display: flex; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.arow.ahead { font-size: 11px; opacity: .65; border-top: 0; }
.acell { flex: 1; text-align: right; overflow-wrap: anywhere; }
.acell.first { flex: 2; text-align: left; }

/* ---------- отзывы ---------- */
.review-prompt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 0 0 12px;
  padding: 12px 14px; border-radius: 16px; border: 1px solid #ff6b6b; background: rgba(255, 70, 70, .16); color: #ff9a9a;
  font: inherit; font-weight: 700; text-align: left; cursor: pointer; box-shadow: 0 0 18px rgba(255, 70, 70, .25); }
.review-prompt .coin { vertical-align: -0.3em; margin-left: 4px; }
.review-prompt-go { flex: none; padding: 6px 12px; border-radius: 999px; background: #ff4d4d; color: #fff; font-size: 13px; }
.review-text { width: 100%; box-sizing: border-box; padding: 12px; border-radius: 14px; border: 1px solid rgba(125,255,180,.35);
  background: rgba(255,255,255,.06); color: inherit; font: inherit; resize: vertical; }
.ticker { margin-top: 16px; padding: 10px 0 12px; border-radius: 18px; border: 1px solid rgba(125,255,180,.55);
  background: linear-gradient(135deg, rgba(40,255,140,.22), rgba(0,200,255,.14)); box-shadow: 0 0 22px rgba(60,255,160,.35); overflow: hidden; }
.ticker-title { padding: 0 14px 8px; text-align: center; font-size: 14px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #9dffc8; }
.ticker-window { overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; animation: ticker-run 40s linear infinite; }
.ticker-track:hover, .ticker-track:active { animation-play-state: paused; }
.ticker-group { display: inline-block; flex: none; min-width: 100vw; }
.ticker-item { display: inline-block; margin-right: 56px; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.ticker-item b { color: #7dffb4; }
.ticker-item .coin { vertical-align: -0.3em; margin: 0 2px 0 4px; }
@keyframes ticker-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.smileys { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.smiley { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(125,255,180,.25); background: rgba(255,255,255,.06); font-size: 22px; line-height: 1; cursor: pointer; }
.smiley:active { background: rgba(125,255,180,.25); }

/* ---------- история таблицей ---------- */
.lg-card { padding: 12px 10px; }
.lg-scroll { overflow-x: auto; }
.lg { display: grid; grid-template-columns: minmax(64px, 1.25fr) repeat(5, minmax(46px, 1fr)); min-width: 330px; font-size: 13px; }
.lg-h { padding: 4px 4px 8px; font-size: 11px; opacity: .65; text-align: right; border-bottom: 1px solid rgba(125,255,180,.35); }
.lg-h.l, .lg-c.l { text-align: left; }
.lg-c { padding: 8px 4px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.07); overflow-wrap: anywhere; }
.lg-c.tot { font-weight: 800; color: #9dffc8; }
.lg-c.sale { color: #ffd27a; }
.lg-c.gone { opacity: .45; text-decoration: line-through; }
.lg-c.gone.tot { text-decoration: none; font-size: 11px; }
.lg-date { font-weight: 700; }
.lg-kind { font-size: 10px; opacity: .65; }
.lg-sum { border-bottom: 0; border-top: 1px solid rgba(125,255,180,.5); font-weight: 800; padding-top: 10px; }
.lg-h, .lg-c { border-left: 1px solid rgba(125,255,180,.28); }
.lg-h.l, .lg-c.l { border-left: 0; }
.lg-c { border-bottom-color: rgba(125,255,180,.28); }
.lg-sum { border-top: 2px solid rgba(125,255,180,.6); }

/* таблица истории умещается в ширину телефона без прокрутки */
.lg-card { padding: 10px 6px; }
.lg { grid-template-columns: 42px repeat(5, minmax(0, 1fr)); min-width: 0; font-size: 12px; }
.lg-h { padding: 4px 2px 8px; font-size: 10px; }
.lg-c { padding: 8px 2px; white-space: nowrap; overflow-wrap: normal; }
.lg-kind { font-size: 9px; }
.lg-c.gone.tot { font-size: 9px; }
@media (min-width: 420px) { .lg { grid-template-columns: 52px repeat(5, minmax(0, 1fr)); font-size: 13px; } .lg-h { font-size: 11px; } }
.lg-c.buy, .lg-c.buy.tot, .lg-c.buy .lg-kind { color: #6fb8ff; opacity: 1; }
.lg-c.sale, .lg-c.sale.tot, .lg-c.sale .lg-kind { color: #ff6b6b; opacity: 1; }
.lg-c.buy .lg-kind, .lg-c.sale .lg-kind { font-weight: 700; }

/* главная: «Купить УЕ» — синяя, «Продать УЕ» — красная */
.actions .btn:first-child { --laser-rgb: 70, 150, 255; --laser-hi: #b4d8ff; }
.actions .btn:nth-child(2) { --laser-rgb: 255, 80, 80; --laser-hi: #ffb4b4; }

/* таблица истории: всё по центру */
.lg-h, .lg-h.l, .lg-c, .lg-c.l { text-align: center; }
.lg-c { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* подпись под датой переносится на вторую строку, а не вылезает */
.lg { grid-template-columns: 50px repeat(5, minmax(0, 1fr)); }
.lg-kind { white-space: normal; line-height: 1.15; text-align: center; max-width: 100%; }
@media (min-width: 420px) { .lg { grid-template-columns: 62px repeat(5, minmax(0, 1fr)); } }

/* столбец даты подстраивается под самую длинную подпись, чтобы дата и подпись входили целиком */
.lg { grid-template-columns: max-content repeat(5, minmax(0, 1fr)); }
.lg-kind { white-space: nowrap; font-size: 9px; }
.lg-date { white-space: nowrap; }
.lg-c.l, .lg-h.l { padding-left: 3px; padding-right: 3px; }
@media (min-width: 420px) { .lg { grid-template-columns: max-content repeat(5, minmax(0, 1fr)); } }
.lg, .lg-card .lg { grid-template-columns: 44px repeat(5, minmax(0, 1fr)); }
@media (min-width: 420px) { .lg { grid-template-columns: 56px repeat(5, minmax(0, 1fr)); } }

/* дата с годом (12.10.2026) помещается целиком */
.lg, .lg-card .lg { grid-template-columns: 68px repeat(5, minmax(40px, 1fr)); font-size: 11.5px; min-width: 300px; }
.lg-date { font-size: 11px; letter-spacing: -0.01em; }
.lg-c.l, .lg-h.l { padding-left: 2px; padding-right: 2px; }
@media (min-width: 420px) { .lg, .lg-card .lg { grid-template-columns: 78px repeat(5, minmax(0, 1fr)); font-size: 13px; } .lg-date { font-size: 13px; } }

/* шапка: крупное «СФС», по центру — валюта счёта (УЕ с иконкой) */
.topbar { flex-wrap: wrap; }
.topbar .who { flex: 0 0 auto; }
.topbar .brand { font-size: 28px; }
.topbar .cur-slot { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; }
.topbar .cur-slot .seg button { min-height: 40px; padding: 0 12px; }

/* кнопки «Сообщения» и «Меню» всегда рядом справа; два счёта — переключатель второй строкой по центру */
.topbar .top-actions { display: flex; gap: 8px; margin-left: auto; order: 2; flex: none; }
.topbar .cur-slot { order: 1; }
@media (max-width: 560px) { .topbar .cur-slot.two { order: 3; flex: 1 1 100%; } }

/* ---------- правила СФС ---------- */
.rules-box { margin: 0 0 14px; padding: 14px; border-radius: 18px; background: #ffe45c; color: #c40000; border: 2px solid #ff2a2a;
  box-shadow: 0 0 22px rgba(255, 220, 60, .45); }
.rules-title { margin: 0 0 8px; color: #c40000; font-size: 20px; font-weight: 900; text-align: center; letter-spacing: .04em; text-transform: uppercase; }
.rules-text p { margin: 0 0 8px; font-weight: 700; font-size: 14px; line-height: 1.35; }
.rules-text.scrollable { max-height: 230px; overflow-y: auto; padding-right: 6px; }
.rules-hint { margin: 8px 0; font-size: 13px; font-weight: 700; color: #8a0000; }
.rules-agree { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.rules-agree input { width: 26px; height: 26px; accent-color: #c40000; flex: none; }
.rules-agree input:disabled { opacity: .45; }
.rules-box .error { color: #8a0000; }
.rules-box.agreed { background: rgba(40, 220, 130, .18); color: #7dffb4; border-color: #2bf0a0; box-shadow: 0 0 18px rgba(43, 240, 160, .35); }
.rules-agreed { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 20px; font-weight: 900; }
.rules-tick { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: #2bf0a0; color: #04281a; font-size: 18px; }
.rules-box.agreed .link-btn { display: block; margin: 6px auto 0; color: #9dffc8; }
.rules-box.agreed .rules-text { margin-top: 8px; color: #d6ffe9; }
/* пока правила не приняты, всё кроме блока правил закрыто */
.rules-locked .topbar, .rules-locked .nav, .rules-locked .shell > :not(.topbar):not(.rules-box) { pointer-events: none; opacity: .4; }

/* валюта счёта в шапке — крупнее */
.topbar .cur-slot .chip { padding: 6px 16px; font-size: 20px; font-weight: 800; }
.topbar .cur-slot .chip .coin { width: 1.3em; height: 1.3em; }
.rules-box { margin-top: 14px; }

/* подпись над суммой — крупно и ярко */
.hero-label { font-size: 26px; font-weight: 900; letter-spacing: .04em; color: #7dffb4; text-shadow: 0 0 14px rgba(43, 240, 160, .6); }

/* сумма и кружок с днями — в одной строке; между блоками больше воздуха */
.hero-sum { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 16px; }
.hero-sum .ring { width: 58px; height: 58px; }
.actions { margin-top: 24px; }
.ticker { margin-top: 24px; }
.rules-box { margin-top: 0; margin-bottom: 24px; }
.review-prompt { margin-bottom: 20px; }
.rules-box.agreed { padding: 10px 14px; text-align: center; }
.rules-box.agreed .link-btn { margin: 0 auto; font-size: 17px; font-weight: 800; min-height: 44px; }

/* шапка: при одном счёте всё в одну строку, на узких телефонах элементы уменьшаются, а не съезжают */
.topbar:not(.two) { flex-wrap: nowrap; gap: 8px; }
.topbar:not(.two) .cur-slot { min-width: 0; }
.topbar .mark, .topbar .brand, .topbar .cur-slot .chip, .topbar .icon-btn { flex-shrink: 0; }
@media (max-width: 420px) {
  .topbar .mark { width: 40px; height: 40px; }
  .topbar .brand { font-size: 23px; }
  .topbar .cur-slot .chip { padding: 5px 11px; font-size: 17px; }
  .topbar .icon-btn { width: 42px; height: 42px; }
  .topbar .top-actions { gap: 6px; }
  .topbar:not(.two) { gap: 6px; }
}
@media (max-width: 350px) {
  .topbar .brand { font-size: 20px; }
  .topbar .cur-slot .chip { padding: 4px 8px; font-size: 15px; }
  .topbar .icon-btn { width: 38px; height: 38px; }
}

/* сумма строго по центру карточки, кружок с днями — рядом справа от неё */
.hero-sum { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0 10px; }
.hero-sum .big { grid-column: 2; }
.hero-sum .ring { grid-column: 3; justify-self: start; width: 50px; height: 50px; }
.hero { padding-left: 14px; padding-right: 14px; }

/* сумма и кружок с днями — одной группой по центру карточки (сумма чуть левее центра) */
.hero-sum { display: flex; align-items: center; justify-content: center; gap: 12px; }
.hero-sum .big, .hero-sum .ring { grid-column: auto; justify-self: auto; }
.hero-sum .ring { width: 54px; height: 54px; }

/* поставленная галочка согласия внизу правил — убрать нельзя */
.rules-agree.done { justify-content: center; margin-top: 10px; color: #7dffb4; }
.rules-agree.done input { accent-color: #2bf0a0; opacity: 1; width: 28px; height: 28px; }

/* цифры чуть левее, кружок с днями чуть ниже */
.hero-sum .big { position: relative; left: -10px; }
.hero-sum .ring { position: relative; top: 10px; left: -4px; }

/* плавная бегущая строка: слой на видеокарте, без рывка на стыке двух копий */
.ticker-track { will-change: transform; backface-visibility: hidden; }
@keyframes ticker-run { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* бегущую строку двигает скрипт (см. tickerFrame): CSS-анимация и отдельный слой не нужны */
.ticker-track { animation: none !important; will-change: auto; backface-visibility: visible; }

/* сроки обмена и спорные обмены */
.deadline { margin: 8px 0 0; font-size: 14px; }
.dispute .meta { margin-top: 4px; }
.dispute-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dispute-log { margin-top: 10px; padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, .3); max-height: 260px; overflow-y: auto; }
.dispute-msg { margin: 0 0 8px; font-size: 14px; overflow-wrap: anywhere; }

/* «Мои заявки на покупку» в окне «Купить УЕ» */
.my-orders { margin: 4px 0 14px; }
.my-order + .my-order { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(125,255,180,.18); }
.my-order .row { align-items: baseline; gap: 8px; }
.my-order ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.4; }
.my-order li { margin-bottom: 4px; }
.my-order li.act { color: #ffd27a; font-weight: 700; }
.my-order li.ok { color: #7dffb4; }

/* строка «Зарплата» на главной */
.salary-card { margin-top: 22px; text-align: center; border-color: rgba(255, 210, 90, .55); box-shadow: 0 0 18px rgba(255, 200, 60, .2); }
.salary-label { font-size: 20px; font-weight: 900; letter-spacing: .06em; color: #ffd75e; text-shadow: 0 0 12px rgba(255, 200, 60, .5); }
.salary-sum { font-size: 40px; font-weight: 800; margin-top: 4px; }
.salary-btn { margin-top: 14px; --laser-rgb: 255, 200, 60; --laser-hi: #ffe39a; }

.part-note { margin: 6px 0 10px; font-size: 14px; }

/* всплывающее окно «Ждут вашего действия»: сверху экрана на всех страницах */
.action-popup { position: fixed; z-index: 40; left: 8px; right: 8px; top: calc(env(safe-area-inset-top, 0px) + 8px);
  max-width: 560px; margin: 0 auto; padding: 10px; border-radius: 20px;
  background: rgba(6, 26, 20, .97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 2px solid #ffd75e; box-shadow: 0 8px 30px rgba(0, 0, 0, .55), 0 0 22px rgba(255, 210, 90, .35);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - 84px); overflow-y: auto; }
.popup-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.popup-title { font-weight: 800; font-size: 17px; color: #ffe39a; }
.popup-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 8px; padding: 0 6px;
  border-radius: 12px; background: #ff4d4d; color: #fff; font-size: 14px; }
.popup-toggle { min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 215, 94, .6);
  background: rgba(255, 215, 94, .12); color: #ffe39a; font: inherit; font-weight: 700; }
.popup-body { margin-top: 10px; }
.popup-body .card { margin: 0; }
/* пока окно есть, контент страницы сдвинут вниз на высоту свёрнутой полоски */
.has-popup .shell { padding-top: calc(env(safe-area-inset-top, 0px) + 66px); }
