/* ПРИЁМКА · Mini App. Графит и красный акцент. Одна система: слои поверхностей, тонкие линии, крупные цифры, красный — только для главного действия и ключевых значений. */
:root {
  --bg: #0d0e11; --s1: #15171b; --s2: #1d2025; --s3: #272a31;
  --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .12);
  --text: #f3f4f6; --muted: #8d919b; --faint: #5a5e68;
  --accent: #f0454b; --accent-2: #d8323a; --accent-weak: rgba(240, 69, 75, .13);
  --good: #3ecf8e; --warn: #f2b84b; --bad: #f0454b; --info: #8b97b3;
  --r: 20px; --nav-h: 62px;
  --surface: var(--s1); --surface2: var(--s2); --muted2: var(--faint);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; overscroll-behavior-y: contain; }
button, input { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
b, .num, .v, .big { font-variant-numeric: tabular-nums; }
svg { display: block; flex: none; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 110px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* --- шапка --- */
.appbar { position: -webkit-sticky; position: sticky; top: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 10px; padding-top: calc(14px + env(safe-area-inset-top)); background: var(--bg); }
.appbar > div:first-child { min-width: 0; margin-right: 12px; }
.appbar h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.appbar small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar .right { display: flex; align-items: center; flex: none; }
.appbar .right > * + * { margin-left: 10px; }
.ibtn { width: 38px; height: 38px; border: 0; padding: 0; border-radius: 50%; background: var(--s1); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ibtn:active { background: var(--s2); }
.ibtn.spin svg { animation: spin .8s linear infinite; }
.me { display: flex; align-items: center; }
.me span { display: none; }

main { padding: 6px 16px 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; animation: fade .18s ease-out; }
main > * { min-width: 0; }

/* --- базовые блоки --- */
.card { background: var(--s1); border-radius: var(--r); padding: 18px; min-width: 0; }
.card.flush { padding: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .good { color: var(--good); } .bad { color: var(--bad); }
.wrap { overflow-wrap: anywhere; word-break: break-word; }
.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 4px -4px; }
.sec h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.more { color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; }
.back { display: inline-flex; align-items: center; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; padding: 2px 0; }
.back svg { margin-right: 2px; }
.hint { font-size: 13px; color: var(--muted); margin: 0 4px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty svg { margin: 0 auto 10px; color: var(--faint); }
.center { text-align: center; padding: 36px 12px; color: var(--muted); }
.login-card { max-width: 420px; margin: 40px auto; text-align: center; padding: 28px 22px; }
.login-card .glyph { width: 56px; height: 56px; border-radius: 18px; background: var(--s2); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.login-card h2 { margin: 0 0 6px; font-size: 20px; }

/* --- списки: одна поверхность, строки разделены линией --- */
.list { background: var(--s1); border-radius: var(--r); overflow: hidden; }
.item { display: flex; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); min-width: 0; cursor: default; }
.item:first-child { border-top: 0; }
.item[data-open], .item[data-url] { cursor: pointer; }
.item[data-open]:active, .item[data-url]:active { background: var(--s2); }
.item > * + * { margin-left: 12px; }
.item .grow { flex: 1 1 0; min-width: 0; }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .d { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.item .end { flex: none; text-align: right; white-space: nowrap; max-width: 46%; }
.item .end .amt { font-weight: 650; }
.item .end .d { margin-top: 3px; }
.item .chev { color: var(--faint); margin-left: 8px; }
.dotc { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--faint)); }
.ico { width: 38px; height: 38px; border-radius: 12px; background: var(--s2); color: var(--muted); display: flex; align-items: center; justify-content: center; flex: none; }
.ico.red { background: var(--accent-weak); color: var(--accent); }
.ico.green { background: rgba(62, 207, 142, .12); color: var(--good); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--s2); white-space: nowrap; }
.badge.done { color: var(--good); background: rgba(62, 207, 142, .12); } .badge.cancelled, .badge.expired { color: var(--bad); background: var(--accent-weak); } .badge.active { color: var(--info); background: rgba(139, 151, 179, .14); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px 16px; }
.kv > :nth-child(odd) { color: var(--muted); }
.kv > :nth-child(even) { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.secret { font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.copy { color: var(--accent); font-weight: 600; cursor: pointer; }

/* --- баланс --- */
.balance { position: relative; overflow: hidden; border-radius: 24px; padding: 18px 18px 12px; background: var(--s1); border: 1px solid var(--line); }
.balance::before { content: ""; position: absolute; left: -40px; top: -90px; width: 260px; height: 220px; background: radial-gradient(closest-side, rgba(240, 69, 75, .16), rgba(240, 69, 75, 0)); pointer-events: none; }
.balance > * { position: relative; }
.balance .lbl { color: var(--muted); font-size: 14px; }
.balance .bal-top { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.balance .bal-top .sub { font-size: 13px; }
.balance .big { font-size: 44px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; margin: 4px 0 6px; }
.balance .sub { display: flex; align-items: center; color: var(--muted); font-size: 14px; }
.balance .sub > * + * { margin-left: 10px; }
.balance .spark { margin: 4px -4px 0; }
.delta { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 12.5px; font-weight: 650; }
.delta.up { color: var(--good); background: rgba(62, 207, 142, .12); } .delta.down { color: var(--bad); background: var(--accent-weak); }
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 20px; background: var(--s1); border: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; left: -40px; top: -90px; width: 260px; height: 220px; background: radial-gradient(closest-side, rgba(240, 69, 75, .16), rgba(240, 69, 75, 0)); }
.hero > * { position: relative; }
.hero .lbl { color: var(--muted); font-size: 14px; }
.hero .big { font-size: 46px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin: 4px 0 6px; }
.hero .row { display: flex; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.hero .mini { flex: 1 1 0; min-width: 0; }
.hero .mini b { display: block; font-size: 17px; }
.hero .mini span { font-size: 12.5px; color: var(--muted); }

/* --- сводная полоса: значок, цифра, подпись --- */
.strip { display: flex; background: var(--s1); border-radius: var(--r); padding: 2px 0; }
.strip > div { flex: 1 1 0; min-width: 0; padding: 14px 4px 13px; text-align: center; border-left: 1px solid var(--line); }
.strip > div:first-child { border-left: 0; }
.strip .si { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; margin: 0 auto 9px; background: var(--s2); color: var(--muted); }
.strip .si.g { color: var(--good); background: rgba(62, 207, 142, .12); } .strip .si.r { color: var(--accent); background: var(--accent-weak); }
.strip b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.strip b em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 1px; }
.strip span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.pips { display: flex; justify-content: center; margin-top: 7px; }
.pips u { width: 12px; height: 3px; border-radius: 3px; background: var(--s3); margin: 0 2px; text-decoration: none; }
.pips u.on { background: var(--accent); }

/* --- контрагенты онлайн --- */
.live { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 0 2px; }
.live.on { background: var(--good); box-shadow: 0 0 0 4px rgba(62, 207, 142, .16); }
.live.off { background: var(--faint); box-shadow: 0 0 0 4px rgba(255, 255, 255, .05); }
.cnt { font-size: 26px; letter-spacing: -.02em; }
.opline { display: flex; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--faint); }
.opc { margin-right: 14px; }
.opc.on { color: var(--text); } .opc b { color: var(--good); font-weight: 650; }

/* --- действия --- */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; border: 0; border-radius: 15px; padding: 12px 18px; font-weight: 650; font-size: 16px; cursor: pointer; color: #fff; background: var(--accent); transition: transform .12s, background .12s; text-align: center; }
.btn:active { transform: scale(.985); background: var(--accent-2); }
.btn svg { margin-right: 8px; stroke-width: 2.1; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.alt { background: var(--s2); color: var(--text); } .btn.alt:active { background: var(--s3); }
.btn.xl { min-height: 60px; font-size: 18px; border-radius: 18px; }
.btn.xl.start { min-height: 54px; font-size: 17px; border-radius: 16px; }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 12px; width: auto; }
.btn.danger-text { color: var(--bad); }
.btn.block { width: 100%; }
.btn small { font-size: 12px; font-weight: 600; opacity: .85; margin-left: 10px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair .btn { min-height: 48px; font-size: 15px; }
.actions { display: grid; gap: 10px; }
input { width: 100%; background: var(--s2); border: 1.5px solid transparent; border-radius: 14px; padding: 14px 16px; outline: none; -webkit-appearance: none; font-size: 17px; transition: border-color .15s; }
input:focus { border-color: var(--accent); }
input::placeholder { color: var(--faint); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 2px 7px; }
.codein { font-size: 32px; font-weight: 700; letter-spacing: .5em; text-align: center; margin-top: 14px; padding: 16px 8px 16px calc(8px + .5em); font-variant-numeric: tabular-nums; }

/* --- переключатели --- */
.seg { display: flex; padding: 3px; background: var(--s1); border-radius: 13px; }
.seg button { flex: 1 1 0; min-width: 0; border: 0; background: none; padding: 9px 6px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--s3); color: var(--text); }
.chartcard .seg { background: var(--s2); margin-bottom: 14px; }
.chartcard .seg button.on { background: var(--s3); }

/* --- выбор из вариантов: строки с переключателем, не карточки --- */
.opts { background: var(--s1); border-radius: var(--r); overflow: hidden; }
.opt { display: flex; align-items: center; padding: 15px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.opt:first-child { border-top: 0; }
.opt:active { background: var(--s2); }
.opt > * + * { margin-left: 12px; }
.opt .grow { flex: 1 1 0; min-width: 0; }
.opt .nm { font-weight: 650; font-size: 16px; }
.opt .sb { color: var(--muted); font-size: 13px; }
.opt .pr { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); flex: none; position: relative; }
.opt.on .radio { border-color: var(--accent); }
.opt.on .radio::after { content: ""; position: absolute; left: 4px; top: 4px; right: 4px; bottom: 4px; border-radius: 50%; background: var(--accent); }
.ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.op { border: 1.5px solid transparent; background: var(--s1); border-radius: 14px; padding: 14px 8px; font-weight: 650; font-size: 15px; cursor: pointer; text-align: center; color: var(--text); }
.op.on { border-color: var(--accent); background: var(--accent-weak); }
.op[disabled] { opacity: .4; }
.op small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 2px; }
.op.zero { color: var(--muted); } .op.zero small { color: var(--faint); }
.opt .sb.warnt { color: var(--warn); }

/* --- предупреждения --- */
.alerts { display: grid; gap: 8px; }
.alert { display: flex; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--s1); font-size: 14px; border-left: 3px solid var(--warn); }
.alert svg { margin-right: 10px; color: var(--warn); }
.alert.info { border-left-color: var(--info); } .alert.info svg { color: var(--info); }

/* --- заявка --- */
.salehead { padding: 16px 18px 14px; }
.salehead .top { display: flex; align-items: center; justify-content: space-between; }
.salehead .nm { font-weight: 700; font-size: 17px; }
.salehead .pr { font-weight: 700; font-size: 17px; }
.steps { display: flex; margin-top: 16px; }
.steps .st { flex: 1 1 0; min-width: 0; padding-right: 4px; font-size: 11px; color: var(--faint); }
.steps .st:last-child { padding-right: 0; }
.steps .st::before { content: ""; display: block; height: 3px; border-radius: 3px; background: var(--s3); margin-bottom: 7px; }
.steps .st.on { color: var(--muted); } .steps .st.on::before { background: var(--accent); }
.steps .st i { display: none; }
.wait { text-align: center; padding: 30px 20px 26px; }
.wait .gl { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 16px; background: var(--s2); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.wait .gl.green { background: rgba(62, 207, 142, .12); color: var(--good); }
.wait .wt { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.wait .big-plus { font-size: 44px; font-weight: 700; letter-spacing: -.03em; color: var(--good); margin: 4px 0 6px; }
.indet { height: 3px; border-radius: 3px; background: var(--s3); overflow: hidden; margin: 20px auto 0; max-width: 220px; }
.indet::after { content: ""; display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--accent); animation: slide 1.3s ease-in-out infinite; }
details.simcard { background: var(--s1); border: 1px solid var(--line2); border-radius: var(--r); padding: 14px 16px; }
details.simcard summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.simcard summary::-webkit-details-marker { display: none; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); background: rgba(242, 184, 75, .12); padding: 2px 7px; border-radius: 6px; }

/* --- графики --- */
.chart { position: relative; touch-action: pan-y; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .tip { position: absolute; top: -4px; transform: translateX(-50%); pointer-events: none; background: var(--s3); border: 1px solid var(--line2); color: var(--text); border-radius: 9px; padding: 5px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 2; }
.chart .tip.show { opacity: 1; }
.chartcard { padding: 18px 16px 12px; }
.chartcard .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; }
.chartcard .head b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.donut-wrap { display: flex; align-items: center; }
.donut { position: relative; width: 116px; height: 116px; flex: none; border-radius: 50%; margin-right: 22px; }
.donut::after { content: ""; position: absolute; top: 13px; right: 13px; bottom: 13px; left: 13px; border-radius: 50%; background: var(--s1); }
.donut b { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 22px; line-height: 1.1; text-align: center; }
.donut b small { font-size: 11px; font-weight: 500; color: var(--muted); }
.legend { flex: 1 1 0; min-width: 0; font-size: 14px; }
.legend div { display: flex; align-items: center; margin: 9px 0; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 9px; flex: none; }
.legend span { margin-left: auto; padding-left: 8px; font-weight: 650; color: var(--text); }
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; height: 76px; }
.hours i { background: var(--s3); border-radius: 3px; min-height: 3px; }
.hours i.hot { background: var(--accent); }
.hours-l { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-top: 6px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; margin: 14px 0; font-size: 14.5px; }
.bar:first-child { margin-top: 0; } .bar:last-child { margin-bottom: 0; }
.bar .tr { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: var(--s3); overflow: hidden; }
.bar .tr i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }

/* --- реферальная карточка (одна ставка для всех) --- */
.level { position: relative; overflow: hidden; border-radius: 24px; padding: 20px; background: var(--s1); border: 1px solid var(--line); }
.level::before { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 220px; background: radial-gradient(closest-side, rgba(240, 69, 75, .17), rgba(240, 69, 75, 0)); }
.level > * { position: relative; }
.level .top { display: flex; align-items: center; justify-content: space-between; }
.level .cap { color: var(--muted); font-size: 13px; }
.level .badge-ic { width: 46px; height: 46px; border-radius: 15px; background: var(--accent-weak); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.level .rate { font-size: 52px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; margin-top: 2px; }
.level .next { margin-top: 8px; font-size: 14px; color: var(--muted); max-width: 30em; }
.level .trio { display: flex; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.level .trio > div { flex: 1 1 0; min-width: 0; padding-left: 14px; border-left: 1px solid var(--line); }
.level .trio > div:first-child { padding-left: 0; border-left: 0; }
.level .trio b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.level .trio span { font-size: 12px; color: var(--muted); }
.linkrow { display: flex; align-items: center; background: var(--s1); border-radius: 15px; padding: 6px 6px 6px 16px; }
.linkrow .lk { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 14px; }
.linkrow .ibtn { background: var(--s2); color: var(--text); width: 42px; height: 42px; border-radius: 11px; }

/* --- нижнее меню: плавающий остров --- */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 9; width: calc(100% - 28px); max-width: 440px; height: 66px; padding: 6px; border-radius: 28px; display: flex; background: rgba(24, 26, 31, .96); border: 1px solid var(--line2); box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .nav { background: rgba(24, 26, 31, .78); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); } }
.nav button { flex: 1 1 0; min-width: 0; border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600; cursor: pointer; padding: 0; border-radius: 22px; transition: background .15s, color .15s; }
.nav button + button { margin-left: 2px; }
.nav button svg { margin-bottom: 3px; }
.nav button.on { color: var(--accent); }
.nav button:active { transform: scale(.96); }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); z-index: 60; width: max-content; max-width: 90vw; padding: 12px 18px; border-radius: 14px; background: var(--s3); border: 1px solid var(--line2); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(240, 69, 75, .5); }
.sk { background: var(--s1); border-radius: 22px; animation: shimmer 1.3s ease-in-out infinite alternate; }

@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes shimmer { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 359px) { .balance .big, .hero .big { font-size: 38px; } .strip b { font-size: 17px; } }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--s2); border: 1px solid var(--line2); color: var(--text); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.list.empty { padding: 34px 16px; }
.list.empty div { margin-top: 2px; }

/* --- плашка контрагентов: заголовок и сервисы, которые принимают --- */
.plaque { background: var(--s1); border-radius: 18px; padding: 14px 16px; }
.plaque .pl-top { display: flex; align-items: center; }
.plaque .pl-t { flex: 1 1 0; font-weight: 600; margin-left: 10px; }
.plaque .pl-n { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.plaque .pl-bot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.plaque .pl-sub { color: var(--muted); font-size: 13px; }
.plaque .pl-chips { display: flex; }
.svcchip { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 4px 10px 4px 8px; border-radius: 99px; background: var(--s2); color: var(--faint); margin-left: 6px; }
.svcchip .dotc { width: 7px; height: 7px; margin-right: 6px; opacity: .45; }
.svcchip.on { color: var(--text); } .svcchip.on .dotc { opacity: 1; }
.alert.info { border-left-color: var(--info); }

/* --- анимация графиков: шторка слева направо, точка на конце, столбики с пружиной, полоски вытягиваются --- */
.endpt { opacity: 0; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) var(--d, 1s) forwards; transform-box: fill-box; transform-origin: center; }
.endring { opacity: .45; transform-box: fill-box; transform-origin: center; animation: ring 1.6s ease-out calc(var(--d, 1s) + .3s) 2; }
.bk { transform-box: fill-box; transform-origin: bottom; animation: rise .75s cubic-bezier(.34, 1.45, .5, 1) both; animation-delay: calc(var(--k, 0) * 65ms); }
.bv { opacity: 0; animation: fadein .4s ease both; animation-delay: calc(var(--k, 0) * 65ms + .5s); animation-fill-mode: forwards; }
.hours i { transform-origin: bottom; animation: grow .7s cubic-bezier(.3, .7, .2, 1) both; animation-delay: calc(var(--k, 0) * 18ms); }
.bar .tr i { transform-origin: left; animation: wgrow .8s cubic-bezier(.3, .7, .2, 1) both; }
.chart-empty { position: absolute; left: 0; right: 0; top: 40%; text-align: center; color: var(--muted); font-size: 13px; pointer-events: none; }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes ring { from { transform: scale(1); opacity: .45; } to { transform: scale(3.4); opacity: 0; } }
@keyframes rise { from { transform: scaleY(0); } }
@keyframes fadein { to { opacity: 1; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes wgrow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .endpt, .bv { opacity: 1; } .endring { display: none; } }

/* --- выбор аккаунта: слева Синий, справа Фиолетовый; недоступный выглядит выключенным --- */
.svcsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svct { position: relative; background: var(--s1); border: 2px solid transparent; border-radius: var(--r); padding: 16px 14px 14px; cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.svct:active { background: var(--s2); }
.svct.on { border-color: var(--accent); background: var(--s2); }
.svct .nmrow { display: flex; align-items: center; }
.svct .nm { font-weight: 650; font-size: 16px; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svct .pr { font-size: 32px; font-weight: 700; letter-spacing: -.03em; margin: 10px 0 4px; }
.svct .st { font-size: 13px; color: var(--good); font-weight: 600; }
.svct .st.bad { color: var(--faint); }
.svct .why { font-size: 12px; color: var(--faint); margin-top: 3px; line-height: 1.3; }
.svct.off { cursor: not-allowed; background: transparent; border: 2px solid var(--line); }
.svct.off:active { background: transparent; }
.svct.off .nm, .svct.off .pr { color: var(--faint); }
.svct.off .dotc { opacity: .35; }

/* способы вывода: те же две половины, что и у аккаунтов */
.svcsplit.one { grid-template-columns: 1fr; }
.svct.meth .mi { width: 30px; height: 30px; border-radius: 10px; background: var(--s3); color: var(--text); display: flex; align-items: center; justify-content: center; flex: none; }
.svct.meth.on .mi { background: var(--accent-weak); color: var(--accent); }
.svct.meth .st { margin-top: 12px; }
.svct.meth.off .mi { background: transparent; color: var(--faint); }

/* --- заявка в работе на главной, нажимаемая ячейка «В работе» --- */
.livebar { display: flex; align-items: center; background: var(--s1); border-radius: 18px; padding: 13px 14px; border: 1px solid rgba(240, 69, 75, .35); cursor: pointer; }
.livebar:active { background: var(--s2); }
.livebar .lb-ic { width: 40px; height: 40px; border-radius: 13px; background: var(--accent-weak); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; margin-right: 12px; }
.livebar .grow { flex: 1 1 0; min-width: 0; }
.livebar .lb-t { font-weight: 650; }
.livebar .lb-d { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.livebar .chev { color: var(--faint); margin-left: 8px; }
.strip .tap { cursor: pointer; border-radius: 14px; }
.strip .tap:active { background: var(--s2); }

/* --- значок-счётчик на вкладке --- */
.nav .ni { position: relative; display: block; }
.nav .nb { position: absolute; top: -5px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; line-height: 17px; text-align: center; border: 2px solid rgba(24, 26, 31, 1); box-sizing: content-box; }

/* --- этапы заявки: номера на линии --- */
.steps { display: flex; align-items: flex-start; margin-top: 18px; }
.steps .st { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; padding: 0; font-size: 11px; color: var(--faint); }
.steps .st::before { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--s3); display: block; margin: 0; border-radius: 0; }
.steps .st:first-child::before { display: none; }
.steps .st.done::before, .steps .st.cur::before { background: var(--accent); }
.steps .st i { display: flex; position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--s3); color: var(--faint); font-style: normal; font-weight: 700; font-size: 11.5px; margin-bottom: 7px; }
.steps .st.done i { background: var(--accent); color: #fff; }
.steps .st.cur i { background: var(--s1); color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-weak); }
.steps .st.cur { color: var(--text); font-weight: 650; } .steps .st.done { color: var(--muted); }
.steps .st span { text-align: center; line-height: 1.2; }

/* --- форма сдачи --- */
.form .fh { display: flex; align-items: center; }
.form .fi { width: 42px; height: 42px; border-radius: 14px; background: var(--accent-weak); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; margin-right: 12px; }
.fld { position: relative; }
.fld input { padding-right: 46px; }
.fld .ok { position: absolute; right: 14px; top: 50%; margin-top: -9px; color: var(--good); opacity: 0; transition: opacity .15s; pointer-events: none; }
.fld.valid .ok { opacity: 1; }
.fld.valid input { border-color: rgba(62, 207, 142, .45); }
input { scroll-margin-top: 96px; scroll-margin-bottom: 120px; }
.linkbtn { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 14.5px; padding: 12px; cursor: pointer; text-align: center; width: 100%; }
.linkbtn:active { color: var(--bad); }

/* --- клавиатура открыта: меню-остров прячется, внизу запас, чтобы поле можно было поднять над клавиатурой --- */
body.kb .nav { opacity: 0; pointer-events: none; transform: translate(-50%, 24px); }
body.kb #app { padding-bottom: 46vh; }
.nav { transition: opacity .15s, transform .2s; }

/* --- меню: «таблетка» переезжает на выбранную вкладку --- */
.nav .pill { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 5); border-radius: 22px; background: var(--accent-weak); transition: transform .38s cubic-bezier(.3, 1.25, .4, 1), opacity .2s; pointer-events: none; will-change: transform; }
.nav button { position: relative; z-index: 1; background: none; }
.nav button + button { margin-left: 0; }
.nav button.on svg { animation: tabpop .38s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tabpop { 0% { transform: scale(.8); } 100% { transform: scale(1); } }

/* --- переключение экранов --- */
main.out-r { opacity: 0; transform: translateX(-22px); transition: opacity .13s ease-in, transform .13s ease-in; }
main.out-l { opacity: 0; transform: translateX(22px); transition: opacity .13s ease-in, transform .13s ease-in; }
main.in-r { animation: inR .36s cubic-bezier(.22, 1, .36, 1) both; }
main.in-l { animation: inL .36s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes inR { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes inL { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nav .pill { transition: none; } }

/* --- пустые «Заявки в работе» --- */
.emptycta { background: var(--s1); border-radius: var(--r); padding: 30px 20px 24px; text-align: center; }
.emptycta .ec-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--s2); color: var(--muted); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.emptycta .ec-t { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.emptycta .ec-d { color: var(--muted); font-size: 14px; margin-top: 4px; }
.emptycta .btn { max-width: 300px; margin: 20px auto 0; }

/* ======================= Контрагент ======================= */
/* шторка снизу (выбор роли, причина отмены) */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(5, 7, 10, .62); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.sheet { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 16px 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line2); animation: sheetUp .28s cubic-bezier(.22, 1, .36, 1); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line2); margin: 0 auto 14px; }
.sheet .sh-t { margin: 4px 4px 4px; font-size: 20px; letter-spacing: -.01em; }
.sheet .sh-d { margin: 0 4px 14px; color: var(--muted); font-size: 14px; }
.sheet .opts { background: var(--s1); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } }
.me { cursor: pointer; }

/* статус контрагента */
.seg.status button { display: flex; align-items: center; justify-content: center; }
.sdot { width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: var(--faint); }
.sdot.online { background: var(--good); } .sdot.away { background: var(--warn); } .sdot.offline { background: var(--faint); }

/* строка заявки в пуле: цена и кнопка «Принять» */
.item .btn.acc { margin-left: 12px; min-height: 40px; padding: 8px 16px; flex: none; }
.item .end .amt { font-size: 16px; }

/* копирование номера / кода */
.copies { margin-top: 14px; }
.copyrow { display: flex; align-items: center; justify-content: space-between; background: var(--s2); border-radius: 14px; padding: 12px 12px 12px 16px; margin-top: 8px; }
.copyrow .bigval { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.copyrow .ibtn { background: var(--s3); color: var(--text); }
.codecard { text-align: center; }
.bigcode { font-size: 46px; font-weight: 700; letter-spacing: .14em; margin: 8px 0 14px; padding-left: .14em; font-variant-numeric: tabular-nums; }

/* пополнение */
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.presets .op { padding: 14px 8px; font-size: 16px; }

/* переключатели сервисов в настройках: включено / выключено */
.svct.tog.off { border: 2px solid var(--line); background: var(--s1); }
.svct.tog.on { border-color: var(--accent); background: var(--s2); }
.svct.tog.off .nm { color: var(--muted); }
