/* VOICE work tool, calm and dense, same family as teysee.com
   IDEA a seller's desk: frosted panels over a softly glowing wall, nothing louder than the next order
   PICTURE the order card: product tile, buyer data you can copy, three replies, one green button
   COLOUR night #08090f + blue/violet glow; day #eef0f6; one blue accent, green for done, amber for to-do
   TYPE Inter 700/800 tight for titles, Inter 400–600 for text, mono for buyer data
   LAYOUT sidebar 232px + content; home: KPI strip, then two columns (orders | messages); phone: tab bar at the bottom */
:root {
  color-scheme: dark;
  --bg: #08090f;
  --wall: radial-gradient(80% 50% at 50% -12%, rgba(64,96,255,.32), transparent 70%), radial-gradient(45% 40% at 100% 0%, rgba(150,90,255,.16), transparent 70%), radial-gradient(40% 35% at 0% 100%, rgba(40,140,255,.08), transparent 70%);
  --panel: rgba(22,24,36,.66); --panel-solid: #12141f; --sunken: rgba(255,255,255,.035); --raise: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.13);
  --text: #eef0f8; --muted: #959cb2; --faint: #5f6680;
  --accent: #4f95ff; --accent-2: #2f74ff; --accent-soft: rgba(79,149,255,.14); --accent-line: rgba(79,149,255,.35);
  --ok: #3ccf8e; --ok-2: #17a86b; --ok-soft: rgba(60,207,142,.13);
  --warn: #f4bb4f; --warn-soft: rgba(244,187,79,.13);
  --err: #ff6b7d; --err-soft: rgba(255,107,125,.13);
  --mute-soft: rgba(255,255,255,.07);
  --theirs: rgba(255,255,255,.065);
  --sh: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -24px rgba(0,0,0,.9);
  --sh-pop: 0 24px 60px -20px rgba(0,0,0,.85), 0 0 0 1px var(--line-2);
  --blur: blur(20px) saturate(1.6);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --spring: cubic-bezier(.34, 1.4, .64, 1);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; height: 100%; }
body { color: var(--text); font: 14.5px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--wall); pointer-events: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.pad { padding: 16px; }
.err { color: var(--err); min-height: 1.2em; margin: 0; font-size: 13.5px; }
code { background: var(--raise); padding: 1px 6px; border-radius: 6px; font: 12.5px var(--mono); }
a { color: var(--accent); }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
i[data-i] { display: contents; font-style: normal; }

/* поверхности */
.panel, .side, .ocard, .kpis, .auth-card { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--raise); cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none; color: var(--text);
  transition: transform .2s var(--spring), background .15s, border-color .15s; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: scale(.96); }
.btn .i { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 4px 12px -6px var(--accent-2); }
.btn.ok { background: linear-gradient(180deg, #3fd08f, var(--ok-2)); border-color: transparent; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 3px 10px -6px var(--ok-2); }
.btn.ghost { background: transparent; }
.btn.small { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.block { width: 100%; height: 42px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none; border: 0; background: none; border-radius: 999px; cursor: pointer; color: var(--muted);
  text-decoration: none; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--raise); color: var(--text); }
.icon-btn.boxed { border: 1px solid var(--line-2); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .i { width: 16px; height: 16px; }
.icon-btn.done { color: var(--ok); }
.link { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 0; }
.link:hover { color: var(--accent); }
.link .i { width: 15px; height: 15px; }

/* поля */
input, textarea, select { width: 100%; border: 1px solid var(--line-2); background: var(--sunken); border-radius: 12px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; line-height: 1.45; }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238891a7' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.search { position: relative; display: block; margin: 0; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search input { padding-left: 36px; border-radius: 999px; height: 38px; margin: 0; }
label { display: block; margin: 14px 0; color: var(--muted); font-size: 13px; font-weight: 500; }
label > input, label > textarea, label > select { margin-top: 6px; color: var(--text); font-size: 14.5px; font-weight: 400; }
.switch { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s var(--spring); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* сегменты (фильтры, тема) */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-solid); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 0 0 1px var(--line); }
.seg button .i { width: 15px; height: 15px; }
.filters { margin-bottom: 16px; }

/* вход */
.auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.auth-card { border-radius: 24px; padding: 32px 28px 24px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.auth-card h1 { margin: 6px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.auth-card p { margin: 0 0 6px; }
.logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(160deg, #6fb2ff, var(--accent-2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px -8px var(--accent-2); }
.logo.lg { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto; }
.logo.lg .i { width: 26px; height: 26px; }

/* каркас */
.app { height: 100dvh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.side { margin: 12px 0 12px 12px; border-radius: 22px; padding: 14px 10px; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; }
.brand b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border: 0; background: none; border-radius: 12px; color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.nav button:hover { background: var(--raise); color: var(--text); }
.nav button.active { background: var(--accent-soft); color: var(--text); }
.nav button.active .i { color: var(--accent); }
.nav .badge { margin-left: auto; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--err); color: #fff; font-size: 11px; font-weight: 700; }
.side-foot { margin-top: auto; }
.side-foot .seg { width: 100%; display: flex; }
.side-foot .seg button { flex: 1; justify-content: center; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.banner { margin: 12px 12px 0; padding: 7px 8px 7px 14px; border-radius: 12px; font-size: 13px; display: flex; align-items: center; gap: 10px;
  color: var(--muted); background: var(--sunken); border: 1px solid var(--line); }
.banner::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; }
.banner span { flex: 1; }
.banner.bad { color: var(--err); background: var(--err-soft); }
.banner.bad::before { background: var(--err); }
.banner .x { border: 0; background: none; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 6px; }
.view { flex: 1; min-height: 0; }

/* страницы */
.page { overflow-y: auto; padding: 24px clamp(16px, 2.6vw, 36px) 40px; }
.page:not(.wide) > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.page-head { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.page-head h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.page-head .search { flex: 0 1 280px; }
.page-head select { width: auto; height: 38px; border-radius: 999px; }
.save-state { color: var(--ok); font-size: 13px; font-weight: 600; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.sec-head h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--raise); color: var(--muted); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.more { margin: 16px auto 0; display: flex; }
.empty { color: var(--muted); padding: 28px 16px; border-radius: 18px; text-align: center; border: 1px dashed var(--line-2); font-size: 13.5px; }
.empty b { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 2px; }

/* KPI-полоса */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 20px; margin-bottom: 24px; overflow: hidden; }
.kpi { padding: 16px 18px; border: 0; border-left: 1px solid var(--line); text-align: left; background: none; color: inherit; font: inherit; transition: background .15s; }
.kpi:first-child { border-left: 0; }
button.kpi { cursor: pointer; }
button.kpi:hover { background: var(--raise); }
.kpi span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--faint)); }
.kpi b { display: block; margin-top: 6px; font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.kpi.warn { --dot: var(--warn); } .kpi.info { --dot: var(--accent); } .kpi.good { --dot: var(--ok); }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

/* карточка заказа / чата */
.ocard { border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.oc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.oc-main { flex: 1; min-width: 0; }
.oc-title { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.oc-price { font-weight: 800; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oc-foot { display: flex; align-items: center; gap: 4px; margin-top: auto; }
.oc-foot .grow { flex: 1; }
.thumb { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; object-fit: cover; color: #fff; font-weight: 800; font-size: 16px;
  background: linear-gradient(155deg, hsl(var(--h, 215) 78% 62%), hsl(var(--h, 215) 72% 40%)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; position: relative;
  background: linear-gradient(155deg, hsl(var(--h, 225) 55% 60%), hsl(var(--h, 225) 50% 38%)); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel-solid); }
.status { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.st-PAID { background: var(--warn-soft); color: var(--warn); }
.st-PENDING { background: var(--mute-soft); color: var(--muted); }
.st-SENT { background: var(--accent-soft); color: var(--accent); }
.st-CONFIRMED, .st-CONFIRMED_AUTOMATICALLY { background: var(--ok-soft); color: var(--ok); }
.st-ROLLED_BACK { background: var(--err-soft); color: var(--err); }
.time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.meta-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.meta-row .time { margin-left: auto; }

/* данные покупателя */
.data { border-radius: 14px; background: var(--sunken); border: 1px solid var(--line); overflow: hidden; }
.data-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'l b' 'v b'; align-items: center; column-gap: 8px; row-gap: 1px; padding: 7px 6px 7px 12px; }
.data-row + .data-row { border-top: 1px solid var(--line); }
.data-row .fl { grid-area: l; color: var(--faint); font-size: 11.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-row .fv { grid-area: v; font: 500 13.5px/1.35 var(--mono); overflow-wrap: anywhere; }
.data-row .icon-btn { grid-area: b; }
.data-empty { color: var(--faint); font-size: 12.5px; padding: 9px 12px; }
.quote { margin: 0; padding: 2px 0 2px 11px; border-left: 2px solid var(--accent-line); color: var(--muted); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.last-msg { margin: 0; padding: 9px 12px; border-radius: 14px 14px 14px 5px; background: var(--theirs); border: 1px solid var(--line); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* готовые ответы */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rbtn { height: 29px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--raise);
  font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--text);
  transition: transform .2s var(--spring), border-color .15s, background .15s; }
.rbtn:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.rbtn:active { transform: scale(.95); }
.rbtn.item { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.rbtn.more-btn { background: none; color: var(--muted); border-style: dashed; }
.rbtn.sent { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.rbtn .i { width: 14px; height: 14px; }

/* чаты */
.chats-view { display: grid; grid-template-columns: 320px minmax(0, 1fr) 340px; gap: 12px; padding: 12px; }
.chats-view .panel { border-radius: 22px; min-height: 0; min-width: 0; }
.chat-list { display: flex; flex-direction: column; overflow: hidden; }
.list-head { padding: 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.list-head .seg { margin: 0; }
.chat-items { overflow-y: auto; flex: 1; padding: 6px; }
.chat-item { display: flex; gap: 11px; padding: 9px 10px; border-radius: 14px; cursor: pointer; transition: background .15s; }
.chat-item:hover { background: var(--raise); }
.chat-item.active { background: var(--accent-soft); }
.ci-main { flex: 1; min-width: 0; }
.ci-top { display: flex; align-items: baseline; gap: 8px; }
.ci-name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-last { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.chat-item.unread .ci-last { color: var(--text); font-weight: 500; }
.ci-bottom { display: flex; align-items: center; gap: 6px; margin-top: 5px; min-width: 0; }
.ci-bottom .status { flex: 0 1 auto; min-width: 0; height: 20px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 20px; }
.ci-bottom .status::before { display: inline-block; vertical-align: 1px; margin-right: 6px; }
.ci-unread { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }

.conv { display: flex; flex-direction: column; overflow: hidden; }
.conv-head { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.conv-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.conv-title .avatar { width: 34px; height: 34px; font-size: 13px; }
.conv-title > div { min-width: 0; }
.conv-title b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-title small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-title small.on { color: var(--ok); }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { position: relative; max-width: min(540px, 78%); padding: 7px 12px 7px; border-radius: 18px; background: var(--theirs); border: 1px solid var(--line); overflow-wrap: anywhere; margin-top: 2px; line-height: 1.42; }
.msg .txt::after { content: ""; display: inline-block; width: var(--meta-w, 40px); }
.msg:not(.mine) { --meta-w: 58px; }
.msg.has-img .txt:empty::after { display: none; }
.msg .txt { white-space: pre-wrap; }
.msg.mine { align-self: flex-end; background: var(--mine, var(--accent-2)); color: #fff; border-color: transparent; border-bottom-right-radius: 6px; }
.msg.auto { --meta-w: 64px; }
.msg + .msg.mine, .msg.mine + .msg:not(.mine) { margin-top: 6px; }
.msg:not(.mine) { border-bottom-left-radius: 6px; }
.msg .meta { position: absolute; right: 10px; bottom: 5px; display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--faint); line-height: 1; }
.msg.has-img .meta { position: static; justify-content: flex-end; margin-top: 4px; }
.msg.mine .meta { color: rgba(255,255,255,.72); }
.msg .pin { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; opacity: .7; display: inline-grid; }
.msg .pin:hover { opacity: 1; color: var(--accent); }
.msg .pin .i { width: 13px; height: 13px; }
.msg img { max-width: 240px; max-height: 240px; border-radius: 12px; display: block; margin-top: 4px; }
.sys { align-self: center; margin: 6px 0; padding: 4px 11px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
.day { align-self: center; margin: 10px 0 4px; color: var(--faint); font-size: 12px; font-weight: 600; }
.composer { border-top: 1px solid var(--line); padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
.ready-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.ready-chips:empty { display: none; }
.ready-chips .rbtn { flex: none; }
.compose-row { display: flex; align-items: flex-end; gap: 8px; }
.compose-row textarea { resize: none; min-height: 42px; max-height: 160px; border-radius: 21px; padding: 10px 16px; }
.compose-row .icon-btn { height: 42px; width: 42px; margin: 0; }
@media (min-width: 761px) { .ready-chips { flex-wrap: wrap; overflow: visible; } }
.send { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff;
  background: linear-gradient(180deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 16px -8px var(--accent-2); transition: transform .2s var(--spring); }
.send:active { transform: scale(.92); }
.send:disabled { opacity: .5; }
.send .i { width: 18px; height: 18px; margin-left: -2px; }

.order { overflow-y: auto; }
.drawer-head { display: none; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.order-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.order-body .ocard { box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--sunken); }
.order-body .ocard.past { opacity: .65; }
.side-label { color: var(--muted); font-size: 12.5px; font-weight: 600; margin: 0 0 6px; }
.note { min-height: 84px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv span:nth-child(odd) { color: var(--muted); }
.drawer-btn, .mob-only { display: none; }
.conn { display: inline-flex; align-items: center; gap: 7px; }
.conn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.conn.ok::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.conn.bad { color: var(--err); } .conn.bad::before { background: var(--err); }
.order .oc-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.banner .long { } @media (max-width: 760px) { .banner .long { display: none; } }

/* товары */
.item-stats { display: flex; gap: 16px; color: var(--muted); font-size: 12.5px; }
.item-stats span { display: inline-flex; align-items: center; gap: 5px; }
.item-stats .i { width: 14px; height: 14px; }
.item-stats b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.rule-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.rule-tag .i { width: 14px; height: 14px; }

/* редактор ответов */
.hint-row { color: var(--muted); font-size: 13px; margin: -6px 0 16px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.block { border-radius: 22px; padding: 18px; margin-bottom: 16px; }
.block-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.block-head > div { flex: 1; min-width: 0; }
.block h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.qrow { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.qrow:first-child { border-top: 0; }
.rule { border: 1px solid var(--line); background: var(--sunken); border-radius: 16px; padding: 14px; margin-top: 12px; }
.rule-head { display: flex; align-items: center; gap: 10px; }
.rule-head b { flex: 1; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-head .switch { margin: 0; font-size: 13px; color: var(--muted); }
.rule .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rule h4 { margin: 14px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rule label { margin: 10px 0 0; }
details { color: var(--muted); font-size: 13.5px; margin: 6px 0 4px; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
details ol { padding-left: 20px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 14px;
  max-width: calc(100% - 32px); padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--panel-solid); box-shadow: var(--sh-pop); font-size: 13.5px; font-weight: 500;
  animation: pop .3s var(--spring); }
.toast.bad { color: var(--err); }
.toast button { border: 0; background: var(--raise); color: var(--accent); font-weight: 700; border-radius: 999px; padding: 5px 11px; cursor: pointer; }
@media (min-width: 761px) { .toast { left: auto; right: 28px; transform: none; animation-name: pop-d; } }
@keyframes pop-d { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* до 1400px: заказ в чате — выдвижная панель */
@media (max-width: 1400px) {
  .chats-view { grid-template-columns: 300px minmax(0, 1fr); }
  .order { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(380px, calc(100% - 24px)); z-index: 40; background: var(--panel-solid); box-shadow: var(--sh-pop);
    transform: translateX(calc(100% + 24px)); transition: transform .3s var(--spring); }
  .chats-view[data-mobile="order"] .order { transform: none; }
  .drawer-btn, .drawer-head { display: flex; }
}
@media (max-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }

/* телефон */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0; padding: 5px; border-radius: 22px; flex-direction: row;
    background: var(--panel-solid); box-shadow: var(--sh-pop); }
  .brand, .side-foot { display: none; }
  .nav { flex-direction: row; width: 100%; gap: 0; }
  .nav button { flex: 1; flex-direction: column; justify-content: center; gap: 3px; height: 52px; padding: 0; font-size: 10.5px; position: relative; border-radius: 16px; }
  .nav button .i { width: 21px; height: 21px; }
  .nav .badge { position: absolute; top: 3px; left: calc(50% + 4px); margin: 0; min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }
  .main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  body.in-conv .side { display: none; }
  body.in-conv .main { padding-bottom: 0; }
  body.in-conv .banner { display: none; }
  .banner { margin: 10px 10px 0; }
  .page { padding: 18px 14px 24px; }
  .page-head h2 { font-size: 26px; }
  .page-head .search { flex: 1 1 100%; }
  .page-head select { flex: 1; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpi { padding: 13px 14px; }
  .kpi b { font-size: 24px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .chats-view { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .chats-view .chat-list, .chats-view .conv { grid-area: 1 / 1; }
  .chats-view[data-mobile="list"] .conv { display: none; }
  .chats-view:not([data-mobile="list"]) .chat-list { display: none; }
  .mob-only { display: inline-grid; }
  .order { inset: 0; width: auto; border-radius: 0; }
  .msg { max-width: 86%; }
  .qrow, .rule .grid2 { grid-template-columns: minmax(0, 1fr); }
  textarea, input, select { font-size: 16px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.in-conv .toast { bottom: calc(130px + env(safe-area-inset-bottom)); }
}

/* пустой чат и загрузка */
.conv.idle .composer, .conv.idle .drawer-btn, .conv.idle .conv-head { display: none; }
.conv-empty { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); font-size: 13.5px; max-width: 280px; }
.conv-empty .logo { margin-bottom: 8px; opacity: .9; }
.conv-empty b { color: var(--text); font-size: 15px; }
.skel { border-radius: 20px; height: 168px; background: linear-gradient(100deg, var(--raise) 30%, var(--sunken) 50%, var(--raise) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; border: 1px solid var(--line); }
.skel.row { height: 64px; border-radius: 14px; margin: 6px 8px; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (hover: hover) { .msg .pin { opacity: 0; } .msg:hover .pin { opacity: .7; } }

/* ================= ЖИДКОЕ СТЕКЛО =================
   стеклу нужно, что преломлять: под всем лежит мягкий «живой» цветной фон,
   поверх — полупрозрачные слои с размытием, светлым бликом по краю и внутренним свечением */
:root {
  --glass: linear-gradient(165deg, rgba(255,255,255,.085), rgba(255,255,255,.025) 45%, rgba(255,255,255,.04));
  --glass-strong: linear-gradient(165deg, rgba(40,44,64,.78), rgba(22,24,38,.72));
  --glass-blur: blur(26px) saturate(1.9) brightness(1.04);
  --rim: linear-gradient(155deg, rgba(255,255,255,.42), rgba(255,255,255,.08) 22%, rgba(255,255,255,0) 48%, rgba(255,255,255,.05) 72%, rgba(255,255,255,.2));
  --glass-sh: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(255,255,255,.03), inset 0 0 24px rgba(255,255,255,.025), 0 22px 50px -26px rgba(0,0,0,.9);
  --chip: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  --chip-sh: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 8px -4px rgba(0,0,0,.6);
  --blob-1: rgba(58,98,255,.42); --blob-2: rgba(150,80,255,.3); --blob-3: rgba(0,190,200,.2); --blob-4: rgba(255,90,170,.16);
  --theirs: linear-gradient(170deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
}
/* живой фон: четыре больших цветных пятна медленно плавают */
body::after { content: ""; position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(28% 32% at 22% 18%, var(--blob-1), transparent 70%),
    radial-gradient(26% 30% at 82% 14%, var(--blob-2), transparent 70%),
    radial-gradient(30% 30% at 72% 82%, var(--blob-3), transparent 70%),
    radial-gradient(24% 26% at 16% 86%, var(--blob-4), transparent 70%);
  filter: blur(40px); animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(3%, -2%, 0) rotate(8deg) scale(1.06); }
  100% { transform: translate3d(-3%, 3%, 0) rotate(-6deg) scale(1.02); }
}

/* стеклянные поверхности */
.panel, .side, .ocard, .kpis, .auth-card, .banner, .toast {
  position: relative; background: var(--glass); border: 0; box-shadow: var(--glass-sh);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); isolation: isolate; }
.panel::before, .side::before, .ocard::before, .kpis::before, .auth-card::before, .banner::before, .toast::before,
.btn::before, .rbtn::before, .seg button.on::before, .nav button.active::before, .send::before, .icon-btn.boxed::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: var(--rim);
  -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); }
/* у баннера точка-статус была на ::before — переносим её на текст */
.banner::before { width: auto; height: auto; background: var(--rim); border-radius: inherit; }
#bannerText::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-right: 10px; vertical-align: 1px; box-shadow: 0 0 10px var(--warn); }
.banner.bad #bannerText::before { background: var(--err); box-shadow: 0 0 10px var(--err); }
.toast { position: fixed; background: var(--glass-strong); }
.ocard { transition: transform .35s var(--spring), box-shadow .25s; }
@media (hover: hover) { .cards .ocard:hover, .stack .ocard:hover { transform: translateY(-2px); } }
.order-body .ocard { background: var(--glass); box-shadow: var(--chip-sh); }

/* кнопки как капли стекла */
.btn, .rbtn, .icon-btn.boxed { position: relative; background: var(--chip); border: 0; box-shadow: var(--chip-sh); }
.btn.ghost { background: var(--chip); }
.btn:hover, .rbtn:hover { filter: brightness(1.08); border: 0; }
.rbtn.item { background: linear-gradient(180deg, rgba(79,149,255,.3), rgba(79,149,255,.12)); color: var(--accent); }
.rbtn.more-btn { background: transparent; box-shadow: none; outline: 1px dashed var(--line-2); outline-offset: -1px; }
.rbtn.more-btn::before { display: none; }
.rbtn.sent { background: var(--ok-soft); }
.btn.primary, .btn.ok, .send { position: relative; overflow: hidden; }
.btn.primary::after, .btn.ok::after, .send::after { content: ""; position: absolute; left: 6%; right: 6%; top: 1px; height: 48%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0)); pointer-events: none; }
.btn.primary::before, .btn.ok::before, .send::before { background: linear-gradient(155deg, rgba(255,255,255,.6), rgba(255,255,255,0) 45%, rgba(255,255,255,.25)); }
.send { box-shadow: 0 6px 18px -6px var(--accent-2), inset 0 -2px 6px rgba(0,0,0,.15); }

/* меню: активный пункт — стеклянная линза */
.nav button { position: relative; transition: background .2s, color .2s, transform .3s var(--spring); }
.nav button:active { transform: scale(.96); }
.nav button.active { background: var(--chip); box-shadow: var(--chip-sh); color: var(--text); }
.nav button.active .i { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-soft)); }

/* переключатели-сегменты: стеклянный бегунок */
.seg { background: rgba(127,127,127,.08); border: 0; box-shadow: inset 0 1px 2px rgba(0,0,0,.18), inset 0 0 0 1px var(--line); }
.seg button { position: relative; }
.seg button.on { background: var(--chip); box-shadow: var(--chip-sh); }

/* тумблер как в iOS: стеклянный кружок */
.switch span { background: rgba(127,127,127,.25); box-shadow: inset 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.switch span::after { background: linear-gradient(180deg, #fff, #eef1f8); box-shadow: 0 2px 6px rgba(0,0,0,.3), inset 0 -1px 1px rgba(0,0,0,.06); }

/* поля ввода: «утопленное» стекло */
input, textarea, select { background: rgba(127,127,127,.07); border-color: var(--line); box-shadow: inset 0 1px 2px rgba(0,0,0,.12); }
input:focus, textarea:focus, select:focus { background: rgba(127,127,127,.04); }

/* чаты */
.chat-item { position: relative; }
.chat-item.active { background: var(--chip); box-shadow: var(--chip-sh); }
.msg:not(.mine) { background: var(--theirs); border: 0; box-shadow: var(--chip-sh); }
.msg.mine { background: linear-gradient(170deg, #5aa2ff, var(--accent-2)); box-shadow: 0 6px 16px -10px var(--accent-2), inset 0 1px 0 rgba(255,255,255,.35); }
.sys { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.data { background: rgba(127,127,127,.06); border-color: var(--line); }
.kpi:hover { background: rgba(255,255,255,.04); }
.logo { box-shadow: 0 8px 20px -8px var(--accent-2), inset 0 1px 0 rgba(255,255,255,.5); }

/* выдвижная панель заказа и нижнее меню на телефоне — плотное стекло */
@media (max-width: 1400px) { .order { position: fixed; background: var(--glass-strong); -webkit-backdrop-filter: blur(34px) saturate(1.8); backdrop-filter: blur(34px) saturate(1.8); } }
@media (max-width: 760px) {
  .side { position: fixed; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(2); backdrop-filter: blur(30px) saturate(2);
    box-shadow: var(--glass-sh), 0 12px 30px -10px rgba(0,0,0,.45); border-radius: 26px; }
  .nav button { border-radius: 20px; }
  body::after { filter: blur(30px); }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
/* браузеры без размытия: делаем панели плотнее, чтобы текст читался */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel, .side, .ocard, .kpis, .auth-card, .toast { background: var(--panel-solid); }
}

/* ================= новые элементы ================= */
/* поиск в боковом меню */
.side-search { position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(127,127,127,.08); box-shadow: inset 0 0 0 1px var(--line); color: var(--faint); font-size: 13.5px; text-align: left; }
.side-search span { flex: 1; }
.side-search:hover { color: var(--muted); background: rgba(127,127,127,.12); }
kbd { font: 600 10.5px/1 var(--font); padding: 3px 5px; border-radius: 6px; background: var(--raise); box-shadow: inset 0 -1px 0 var(--line-2), 0 0 0 1px var(--line); color: var(--muted); }

/* карточка аккаунта внизу меню */
.side-foot { display: flex; flex-direction: column; gap: 10px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 14px; background: none; cursor: pointer; text-align: left; color: inherit; min-width: 0; }
.me-card:hover { background: rgba(127,127,127,.08); }
.me-card .avatar { width: 34px; height: 34px; font-size: 13px; }
.me-card div { min-width: 0; display: grid; }
.me-card b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card small { font-size: 11.5px; color: var(--muted); gap: 6px; }
.me-card small::before { width: 6px; height: 6px; }

/* таймер ожидания заказа */
.wait { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.wait .i { width: 13px; height: 13px; }
.wait.soon { color: var(--warn); }
.wait.late { color: var(--err); padding: 2px 8px; border-radius: 999px; background: var(--err-soft); }
.meta-row { display: flex; align-items: center; gap: 8px; }
.meta-row .time { margin-left: auto; }
.kpi b small { display: block; margin: 6px 0 0; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.kpi.late b small { color: var(--err); font-weight: 600; }
.kpi.good b small { display: inline; margin-left: 6px; }

/* «Скопировать всё» под данными */
.copy-all { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 7px; border: 0; border-top: 1px solid var(--line); background: none;
  color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.copy-all:hover { background: var(--accent-soft); }
.copy-all .i { width: 14px; height: 14px; }

/* появление карточек и новый заказ */
.enter { animation: rise .45s var(--spring) both; }
.stack > .enter:nth-child(2), .cards > .enter:nth-child(2) { animation-delay: .04s; }
.stack > .enter:nth-child(3), .cards > .enter:nth-child(3) { animation-delay: .08s; }
.stack > .enter:nth-child(4), .cards > .enter:nth-child(4) { animation-delay: .12s; }
.cards > .enter:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.ocard.is-new { box-shadow: var(--glass-sh), 0 0 0 2px var(--accent-line); animation: rise .45s var(--spring) both, glow 1.6s ease-in-out 3; }
@keyframes glow { 50% { box-shadow: var(--glass-sh), 0 0 0 2px var(--accent), 0 0 28px -4px var(--accent); } }
.badge.bump { animation: bump .5s var(--spring); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* черновик в списке чатов */
.draft { color: var(--err); font-weight: 600; }

/* кнопка «вниз» в чате */
.conv { position: relative; }
.to-bottom { position: absolute; right: 16px; bottom: 150px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--glass-strong); color: var(--text); box-shadow: var(--chip-sh), 0 8px 20px -8px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: rise .3s var(--spring); }
.to-bottom b { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10.5px; display: grid; place-items: center; }

/* покупатель: «постоянный» */
.regular { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px 1px 6px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 11.5px; }
.regular .i { width: 12px; height: 12px; }

/* график продаж */
.chart-panel { margin-top: 24px; border-radius: 24px; padding: 18px 20px 14px; }
.chart-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chart-head > div:first-child { flex: 1; min-width: 0; }
.chart-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.hero b { font-size: 30px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.hero span { color: var(--muted); font-size: 13px; }
.bars { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; height: 170px; padding-top: 18px; }
.max-line { position: absolute; left: 0; right: 0; top: 18px; border-top: 1px dashed var(--line-2); pointer-events: none; }
.max-line span { position: absolute; right: 0; top: -17px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; outline: none; cursor: default; }
.bar span { width: min(70%, 26px); height: calc(var(--h) * (100% - 30px)); min-height: 2px; border-radius: 4px 4px 0 0;
  background: color-mix(in srgb, var(--accent) 55%, transparent); transition: height .5s var(--spring), background .15s; }
.bar.today span { background: var(--accent); }
.bar:hover span, .bar:focus-visible span { background: var(--accent); }
.bar em { font-style: normal; font-size: 11px; color: var(--muted); line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; height: 24px; }
.bar em i { display: block; font-style: normal; color: var(--faint); font-size: 10px; }
.bar.wknd em i { color: var(--muted); }
.bar.today em { color: var(--text); font-weight: 700; }
.bar::after { content: attr(data-tip); position: absolute; bottom: calc(100% - 8px); left: 50%; transform: translate(-50%, 4px); white-space: pre; z-index: 5; pointer-events: none;
  padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.4; text-align: center; color: var(--text);
  background: var(--panel-solid); box-shadow: var(--sh-pop); opacity: 0; transition: opacity .15s, transform .15s; }
.bar:hover::after, .bar:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.bar:first-child::after, .bar:nth-child(2)::after { left: 0; transform: translate(0, 4px); }
.bar:last-child::after { left: auto; right: 0; transform: translate(0, 4px); }
.bar:first-child:hover::after, .bar:nth-child(2):hover::after, .bar:last-child:hover::after { transform: none; }

/* быстрый поиск */
.palette { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  background: rgba(5,6,12,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.pal-box { position: relative; width: min(600px, 100%); max-height: 70vh; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--glass-strong); box-shadow: var(--glass-sh), var(--sh-pop); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); animation: rise .25s var(--spring); }
.pal-box .search { margin: 12px; }
.pal-box .search input { height: 46px; font-size: 16px; padding-left: 40px; }
.pal-list { overflow-y: auto; padding: 0 8px 8px; }
.pal-group { padding: 10px 10px 4px; color: var(--faint); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pal-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: inherit; text-align: left; cursor: pointer; }
.pal-item.sel { background: var(--chip); box-shadow: var(--chip-sh); }
.pal-item .avatar, .pal-item .thumb { width: 34px; height: 34px; font-size: 13px; border-radius: 10px; }
.pal-item .avatar { border-radius: 50%; }
.pal-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--raise); color: var(--muted); flex: none; }
.pal-main { flex: 1; min-width: 0; display: grid; }
.pal-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .status { flex: none; max-width: 45%; }
.pal-empty { padding: 28px; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.pal-foot kbd { margin-right: 3px; }

@media (max-width: 760px) {
  .side-search { display: none; }
  .chart-panel { padding: 16px 14px 12px; }
  .bars { height: 150px; }
  .bar em i { display: none; }
  .bar:nth-child(odd):not(.today) em { visibility: hidden; }
  .palette { padding-top: 10px; }
  .pal-foot { display: none; }
  .to-bottom { bottom: 140px; }
}
.kpi { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
@media (max-width: 760px) {
  .side-foot { display: none; }
  .order { background: var(--panel-solid); }
}
.meta-row { flex-wrap: wrap; row-gap: 6px; }

/* ================= товары, топ ================= */

input[type="time"] { color-scheme: dark; }

/* товары: крупные картинки и метрики */
.item-card { gap: 14px; }
.ic-top { display: flex; gap: 14px; align-items: center; min-width: 0; }
.thumb.lg { width: 64px; height: 64px; border-radius: 16px; font-size: 22px; box-shadow: 0 8px 20px -10px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.08); }
.clamp2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.oc-sub .off { color: var(--warn); }
.ic-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 14px; background: rgba(127,127,127,.06); box-shadow: inset 0 0 0 1px var(--line); }
.ic-stats > div { padding: 9px 10px; min-width: 0; }
.ic-stats > div + div { border-left: 1px solid var(--line); }
.ic-stats b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic-stats span { color: var(--faint); font-size: 11.5px; }
.ic-stats .low b { color: var(--err); }
.ic-stats .high b { color: var(--ok); }
.ic-flag { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--err-soft); color: var(--err); font-size: 12.5px; font-weight: 500; }
.ic-flag .i { width: 15px; height: 15px; margin-top: 1px; }

/* лучшие товары рядом с графиком */
.chart-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: stretch; }
.top-items { border-left: 1px solid var(--line); padding-left: 24px; display: flex; flex-direction: column; }
.top-items .side-label { margin-bottom: 10px; }
.top-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-width: 0; }
.top-row .thumb { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
.tr-main { flex: 1; min-width: 0; }
.tr-main b { display: block; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-bar { height: 4px; border-radius: 4px; background: rgba(127,127,127,.12); margin-top: 6px; overflow: hidden; }
.tr-bar span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.tr-val { text-align: right; font-weight: 700; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tr-val small { display: block; color: var(--faint); font-weight: 500; font-size: 11px; }
@media (max-width: 1100px) { .chart-body { grid-template-columns: minmax(0, 1fr); } .top-items { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; } }
@media (max-width: 760px) {
  .ic-stats b { font-size: 14px; }
}

/* ================= редактор ответов по товарам ================= */
.rule-head .thumb { width: 44px; height: 44px; }
.rule-ic { background: var(--chip); box-shadow: var(--chip-sh); color: var(--accent); }
.rule-ic .i { width: 20px; height: 20px; }
.rh-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rh-main b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-main small { color: var(--muted); font-size: 12.5px; }
.rule.off { opacity: .55; }
.rule .qrow:first-of-type { margin-top: 10px; }
.qrow textarea { resize: vertical; min-height: 60px; }
.q-tools { display: flex; flex-direction: column; gap: 4px; }
.rule input:disabled { opacity: .45; }

/* ================= готовые ответы в чате ================= */
.ready-chips { display: block; overflow: visible; padding-bottom: 10px; position: relative; }
.ready-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.rtabs { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.rtabs:empty { display: none; }
.rtab { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; transition: color .15s, background .15s; }
.rtab:hover { color: var(--text); background: rgba(255,255,255,.04); }
.rtab .i { width: 15px; height: 15px; }
.rtab b { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.07); color: var(--muted); font-variant-numeric: tabular-nums; }
.rtab.on { color: var(--text); background: var(--chip); box-shadow: var(--chip-sh); }
.rtab.on b { background: var(--accent-soft); color: var(--accent); }
.rtab.on .i { color: var(--accent); }
.seg.tiny { padding: 2px; flex: none; }
.seg.tiny button { padding: 4px 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; }
.seg.tiny button .i { width: 13px; height: 13px; }
.r-toggle .i { transition: transform .25s var(--spring); }
.ready.collapsed .r-toggle .i { transform: rotate(180deg); }
.ready.collapsed .ready-chips { display: none; }
.ready.collapsed .ready-head { margin-bottom: 10px; }

.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-height: 142px; overflow-y: auto; scrollbar-width: thin; padding: 1px; }
.rcard { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; text-align: left;
  padding: 8px 10px 8px 12px; border: 0; border-radius: 13px; cursor: pointer; font: inherit; color: var(--text);
  background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--line); transition: background .15s, box-shadow .15s, transform .15s var(--spring); }
.rcard:hover { background: rgba(79,149,255,.08); box-shadow: inset 0 0 0 1px var(--accent-line); }
.rcard:active { transform: scale(.98); }
.rcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rcard.item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); opacity: .8; }
.rc-title { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-text { grid-column: 1 / -1; font-size: 12px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard kbd { font: 600 10.5px/1 inherit; color: var(--faint); padding: 3px 5px; border-radius: 5px; background: rgba(255,255,255,.06); box-shadow: inset 0 -1px 0 rgba(0,0,0,.3); }
.rcard.sent { background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok); }
.rcard.sent .rc-title::after { content: " · отправлено"; color: var(--ok); font-weight: 600; }
.rcard.add { grid-template-columns: auto minmax(0, 1fr); color: var(--muted); background: transparent; box-shadow: none; outline: 1px dashed var(--line-2); outline-offset: -1px; }
.rcard.add:hover { color: var(--accent); outline-color: var(--accent-line); background: rgba(79,149,255,.05); }
.rcard.add .i { width: 18px; height: 18px; }
.rcard.add span { font-size: 13px; font-weight: 600; display: grid; }
.rcard.add small { font-size: 11.5px; font-weight: 500; color: var(--faint); }
.r-empty { font-size: 12.5px; color: var(--faint); margin: 0 0 8px 2px; }
.ready-preview { position: absolute; left: 0; right: 0; bottom: calc(100% + 52px); z-index: 5; padding: 12px 14px; border-radius: 16px; white-space: pre-wrap;
  font-size: 13px; line-height: 1.45; max-height: 260px; overflow: auto; pointer-events: none;
  background: var(--panel-solid); box-shadow: 0 18px 40px -16px rgba(0,0,0,.8), inset 0 0 0 1px var(--line-2); }
.ready-preview b { display: block; font-size: 12px; color: var(--accent); margin-bottom: 4px; }
.ready-preview small { display: block; margin-top: 8px; color: var(--faint); font-size: 11.5px; }
.ready-add { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(79,149,255,.06); box-shadow: inset 0 0 0 1px var(--accent-line); }
.ready-add input, .ready-add textarea { margin: 0; }
.ready-add textarea { resize: vertical; min-height: 84px; }
.ra-top { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.ra-top .i { width: 16px; height: 16px; color: var(--accent); flex: none; }
.ra-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ra-foot { display: flex; align-items: center; gap: 8px; }
.ra-foot small { color: var(--muted); font-size: 12px; min-width: 0; }
@media (max-width: 760px) {
  .ready-head { gap: 6px; }
  .rtab { padding: 0 10px; font-size: 12.5px; }
  .seg.tiny button { padding: 5px 8px; }
  .seg.tiny button span { display: none; }
  .rgrid { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 66%;
    max-height: none; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .rcard { scroll-snap-align: start; padding: 9px 10px 9px 12px; }
  .rcard kbd { display: none; }
  .ready-add { max-height: 46vh; overflow-y: auto; }
  .ra-foot { flex-wrap: wrap; }
  .ra-foot small { flex-basis: 100%; }
}
.rcard { height: 54px; }
.rgrid { max-height: 176px; }
@media (max-width: 760px) { .rcard { height: 58px; } }

/* ================= спокойный фон и мягкое стекло ================= */
:root {
  --bg: #0a0c11;
  --wall: radial-gradient(70% 45% at 50% -10%, rgba(79,149,255,.10), transparent 70%);
  --glass: linear-gradient(180deg, rgba(26,29,38,.86), rgba(20,22,30,.84));
  --glass-strong: rgba(22,25,33,.96);
  --glass-blur: blur(12px) saturate(1.15);
  --rim: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04) 40%, rgba(255,255,255,.04));
  --glass-sh: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 36px -24px rgba(0,0,0,.85);
  --chip: rgba(255,255,255,.06);
  --chip-sh: inset 0 0 0 1px rgba(255,255,255,.07);
  --theirs: rgba(255,255,255,.06);
}
/* вместо цветных пятен — еле заметная сетка точек с затуханием к краям */
body::after { inset: 0; filter: none; animation: none; transform: none;
  background: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1.2px) 0 0 / 22px 22px;
  -webkit-mask: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 85%);
          mask: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 85%); }
.rbtn.item { background: var(--accent-soft); }
@media (max-width: 1400px) { .order { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); } }
@media (max-width: 760px) {
  body::after { filter: none; }
  .side { background: rgba(20,22,30,.9); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); }
}


/* ================= движение ================= */
:root { --ease: cubic-bezier(.22, 1, .36, 1); }
/* вкладка въезжает, карточки появляются по очереди */
.view-in:not(#tab-chats) > * { animation: view-in .45s var(--ease) both; }
#tab-chats.view-in > * { animation: fade-in .35s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }
.view-in > :nth-child(2) { animation-delay: .04s; } .view-in > :nth-child(3) { animation-delay: .08s; } .view-in > :nth-child(n+4) { animation-delay: .12s; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
.view-in :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > * { animation: card-in .5s var(--ease) both; animation-delay: calc(.08s + min(var(--i, 12), 12) * 40ms); }
#homeStats > * { animation-duration: .5s; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(1) { --i: 0; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(2) { --i: 1; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(3) { --i: 2; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(4) { --i: 3; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(5) { --i: 4; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(6) { --i: 5; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(7) { --i: 6; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(8) { --i: 7; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(9) { --i: 8; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(10) { --i: 9; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(11) { --i: 10; }
:is(.view-in, .stagger) :is(#homeStats, .stack, .cards, #itemsGrid, #rulesList, #chatItems, #quickList) > :nth-child(12) { --i: 11; }

/* бегунок активного пункта меню */
.nav { position: relative; }
.nav-ind { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 12px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(79,149,255,.16), rgba(79,149,255,.08)); box-shadow: inset 0 0 0 1px rgba(79,149,255,.22);
  transition: transform .45s var(--spring), width .3s var(--ease), height .3s var(--ease), opacity .2s; }
.nav-ind.no-anim { transition: none; }
.nav button { z-index: 1; }
.nav button.active { background: transparent !important; box-shadow: none !important; }
.nav button.active::before { display: none; }
.nav button .i { transition: transform .35s var(--spring), color .2s; }
.nav button.active .i { transform: scale(1.08); }
.nav button:hover .i { transform: translateY(-1px); }
@media (max-width: 760px) { .nav-ind { border-radius: 16px; } }

/* подсветка под курсором */
@media (hover: hover) {
  .ocard, .kpi, .rcard, .chat-item, .panel.block { --mx: -999px; --my: -999px; }
  .ocard:hover, .panel.block:hover { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(79,149,255,.07), transparent 45%), var(--glass); }
  button.kpi:hover { background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255,255,255,.06), transparent 60%); }
  .rcard:hover { background: radial-gradient(200px circle at var(--mx) var(--my), rgba(79,149,255,.16), rgba(79,149,255,.05) 70%); }
  .chat-item:hover:not(.active) { background: radial-gradient(300px circle at var(--mx) var(--my), rgba(255,255,255,.05), transparent 60%); }
  .ocard { transition: transform .35s var(--spring), box-shadow .25s; }
  .ocard:hover { box-shadow: var(--glass-sh), 0 0 0 1px rgba(79,149,255,.18), 0 20px 40px -24px rgba(0,0,0,.9); }
}

/* KPI: цветная подложка и мягкое свечение точки */
.kpi { position: relative; background-image: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--dot, transparent) 9%, transparent), transparent 60%); }
.kpi span::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, transparent) 18%, transparent); }
.kpi.warn span::before { animation: dot-pulse 2.4s ease-in-out infinite; }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--dot) 0%, transparent), 0 0 10px var(--dot); } }

/* «Оплачен — нужно выполнить»: точка мягко пульсирует */
.st-PAID::before { animation: dot-pulse-w 2s ease-in-out infinite; }
@keyframes dot-pulse-w { 50% { box-shadow: 0 0 0 4px rgba(244,187,79,0), 0 0 8px var(--warn); opacity: .7; } }

/* график: столбики вырастают */
.bar span { transform-origin: bottom; animation: bar-up .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); transition: filter .15s, transform .25s var(--spring); }
.bar:hover span { filter: brightness(1.25); transform: scaleX(1.08); }
@keyframes bar-up { from { transform: scaleY(0); } }

/* сообщения */
.msg.pop-in { animation: msg-in .38s var(--spring) both; }
.msg.mine.pop-in { transform-origin: bottom right; } .msg.pop-in:not(.mine) { transform-origin: bottom left; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.94); } }
.msg.mine { background: linear-gradient(180deg, #4f95ff, #2f6fef); box-shadow: 0 6px 18px -10px rgba(47,116,255,.9); border: 0; }

/* готовые ответы: по очереди при открытии чата и смене вкладки */
.rcard { animation: card-in .35s var(--ease) both; animation-delay: calc(min(var(--i, 0), 10) * 25ms); }
.rcard.add { animation-delay: .2s; }
.rtab { transition: color .15s, background .25s var(--ease), box-shadow .25s; }
.rtab b { transition: background .2s, color .2s; }

/* кнопки: отклик на нажатие */
.btn, .rbtn, .icon-btn, .send, .kpi, .rtab, .seg button { transition: transform .25s var(--spring), filter .15s, background .2s, color .2s, box-shadow .2s; }
.btn:active, .rbtn:active, .icon-btn:active, .rtab:active, .seg button:active { transform: scale(.95); }
.send:not(:disabled):hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 10px 22px -8px var(--accent-2); }
.send .i { transition: transform .3s var(--spring); }
.send:not(:disabled):hover .i { transform: translate(1px, -1px) rotate(-8deg); }
.btn.ok, .btn.done, .btn.success { position: relative; overflow: hidden; }

/* скелетоны и пустые состояния мягче */
.empty { animation: card-in .5s var(--ease) both; }

/* бейджи слегка «дышат», если есть новое */
.nav .badge:not(.hidden) { animation: badge-in .4s var(--spring) both; }
@keyframes badge-in { from { transform: scale(0); } }

/* переключение вкладки ответов в чате — плавное появление поля */
.ready-add { animation: card-in .3s var(--ease) both; }


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

/* вход по коду */
.tfa-qr{width:200px;max-width:100%;margin:8px 0;padding:10px;background:#fff;border-radius:14px}
.tfa-qr svg{display:block;width:100%;height:auto}
#tfa code{font-family:ui-monospace,monospace;letter-spacing:.04em;user-select:all}

/* возврат: спокойная кнопка, краснеет только после первого нажатия */
.btn.refund { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn.refund:hover { background: var(--err-soft); }
.btn.refund.armed { background: var(--err); color: #fff; border-color: transparent; animation: refundPulse 1s ease-in-out infinite; }
@keyframes refundPulse { 50% { box-shadow: 0 0 0 4px var(--err-soft); } }
@media (prefers-reduced-motion: reduce) { .btn.refund.armed { animation: none; } }
