:root {
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --raised: #F6F7FB;
  --line: #E1E5ED;
  --text: #141A26;
  --muted: #667085;
  --accent: #4B5CF0;
  --accent-ink: #FFFFFF;
  --sun: #0F9F74;
  --shade: #6B6585;
  --amber: #B97A0B;
  --danger: #D2364E;
  --veil: rgba(40, 32, 70, .38);
  --radius-l: 18px;
  --radius-m: 12px;
  --radius-s: 8px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10151F; --surface: #171D2A; --raised: #1E2636; --line: #283245;
    --text: #E9EDF5; --muted: #8C96AB; --accent: #7B8CFF; --accent-ink: #0E1230;
    --sun: #46D6A6; --shade: #8A82A8; --amber: #F0B44C; --danger: #F0697C;
    --veil: rgba(8, 6, 20, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10151F; --surface: #171D2A; --raised: #1E2636; --line: #283245;
  --text: #E9EDF5; --muted: #8C96AB; --accent: #7B8CFF; --accent-ink: #0E1230;
  --sun: #46D6A6; --shade: #8A82A8; --amber: #F0B44C; --danger: #F0697C;
  --veil: rgba(8, 6, 20, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }

/* ------------------------------------------------ каркас */
.app { min-height: 100vh; }
.side { display: none; }
.main { max-width: 760px; margin: 0 auto; padding: 18px 16px calc(96px + var(--safe-b)); }
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tabbar button {
  border: 0; background: none; padding: 6px 0 4px; border-radius: var(--radius-s);
  display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 11.5px; font-weight: 500;
}
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--accent); }

@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 232px 1fr; }
  .side {
    display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh;
    padding: 22px 14px; border-right: 1px solid var(--line); background: var(--surface);
  }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; padding: 0 8px; }
  .brand svg { width: 28px; height: 28px; }
  .side-nav { display: grid; gap: 2px; }
  .side-nav button {
    display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left;
    padding: 10px 10px; border-radius: var(--radius-m); color: var(--muted); font-weight: 500;
  }
  .side-nav button svg { width: 20px; height: 20px; }
  .side-nav button:hover { background: var(--raised); color: var(--text); }
  .side-nav button[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
  .tabbar { display: none; }
  .main { padding: 32px 32px 64px; max-width: 880px; }
}

/* ------------------------------------------------ заголовки */
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.head h1 { font-size: 26px; line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
h2 { font-size: 16px; margin: 26px 0 10px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ------------------------------------------------ кнопки и поля */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 9px 14px; border-radius: var(--radius-m); font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--line)); }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.lg { padding: 14px 18px; font-size: 16px; border-radius: var(--radius-m); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { border: 0; background: none; padding: 8px; border-radius: 10px; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: var(--raised); border-radius: var(--radius-m);
  padding: 11px 13px; outline: none; transition: border-color .15s, background .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); background: var(--surface); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: -6px; margin-bottom: 14px; }
.row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg { display: flex; gap: 4px; background: var(--raised); padding: 4px; border-radius: var(--radius-m); border: 1px solid var(--line); }
.seg button { flex: 1; border: 0; background: none; padding: 8px 6px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------ панель видимости */
.pulse-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 16px; margin-bottom: 14px;
}
.meter { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--raised); gap: 2px; }
.meter i { display: block; height: 100%; min-width: 4px; transition: flex-grow .5s; }
.meter .m-visible { background: var(--sun); }
.meter .m-shadow { background: repeating-linear-gradient(135deg, var(--shade) 0 3px, color-mix(in srgb, var(--shade) 55%, var(--bg)) 3px 6px); }
.meter .m-unclear { background: var(--amber); }
.meter .m-unknown { background: var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 14px; }
.legend button { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.legend b { font-weight: 600; }
.legend span { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.visible { background: var(--sun); }
.dot.shadow { background: var(--shade); }
.dot.unclear { background: var(--amber); }
.dot.unknown { background: var(--line); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 40%, transparent); }
.dot.error { background: var(--danger); }
.pulse-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.pulse-foot strong { color: var(--text); font-weight: 600; }

/* ------------------------------------------------ запуск проверки */
.runner { margin-bottom: 18px; }
.progress {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 12px 14px;
}
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.progress-top b { font-weight: 600; }
.bar { height: 6px; border-radius: 99px; background: var(--raised); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.radar { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.log { margin-top: 10px; max-height: 180px; overflow: auto; font-size: 12.5px; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }
.alert { padding: 12px 14px; border-radius: var(--radius-m); font-size: 14px; margin-bottom: 14px; background: color-mix(in srgb, var(--amber) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.alert.err { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert.info { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ------------------------------------------------ фильтры */
.tools { display: flex; gap: 8px; margin-bottom: 10px; }
.search-box { position: relative; flex: 1; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search-box .input { padding-left: 38px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 99px;
  font-size: 13.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500;
}
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .dot { width: 7px; height: 7px; }

/* ------------------------------------------------ список ботов */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 11px 14px; border: 0; width: 100%; text-align: left; background: none; position: relative;
}
.row + .row { border-top: 1px solid var(--line); }
button.row:hover { background: var(--raised); }
.row.with-check { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.row-date { display: none; }
@media (min-width: 600px) { .row-date { display: inline; } }
.row .check { width: 20px; height: 20px; accent-color: var(--accent); }
.row-main { min-width: 0; display: grid; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.row-sub { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { text-align: right; display: grid; justify-items: end; gap: 4px; }
.row-side .users { font-weight: 600; font-size: 14px; }
.row.is-checking { background: color-mix(in srgb, var(--accent) 7%, transparent); }

.ava {
  width: 44px; height: 44px; border-radius: 50%; flex: none; position: relative; overflow: hidden;
  display: grid; place-items: center; font-weight: 600; font-size: 16px; color: #fff; background: var(--h, #7B8CFF);
}
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava.xl { width: 84px; height: 84px; font-size: 30px; }
.ava.sm { width: 40px; height: 40px; font-size: 15px; }

/* бот в тени — буквально затенён */
.row.is-shadow .ava { filter: grayscale(1) brightness(.85); }
.row.is-shadow .ava::after, .bot-hero.is-shadow .ava::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, var(--veil) 0 2px, transparent 2px 5px);
}
.row.is-shadow .row-title { color: color-mix(in srgb, var(--text) 70%, var(--muted)); }
.bot-hero.is-shadow .ava { filter: grayscale(1) brightness(.85); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.status.visible { color: var(--sun); background: color-mix(in srgb, var(--sun) 13%, transparent); }
.status.shadow { color: var(--shade); background: color-mix(in srgb, var(--shade) 16%, transparent); }
.status.unclear { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.status.unknown { color: var(--muted); background: var(--raised); }
.status.error { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.badge { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: var(--raised); color: var(--muted); flex: none; }
.badge.base { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.verified { width: 15px; height: 15px; color: var(--accent); flex: none; }

.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin: 10px 0 6px; font-size: 17px; }
.empty p { margin: 0 auto 16px; max-width: 34ch; }
.empty svg { width: 46px; height: 46px; color: var(--accent); }

.bulkbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + var(--safe-b)); z-index: 25;
  display: flex; gap: 8px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
@media (min-width: 960px) { .bulkbar { bottom: 24px; } }

/* ------------------------------------------------ карточки/группы */
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; margin-bottom: 14px; }
.group-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; }
.group-row + .group-row { border-top: 1px solid var(--line); }
.group-row .lbl { min-width: 0; }
.lbl b { font-weight: 500; display: block; }
.lbl small { color: var(--muted); font-size: 13px; display: block; }
.group-row .input, .group-row .select { width: auto; max-width: 140px; padding: 8px 10px; }
.group-body { padding: 14px 16px; }

/* ------------------------------------------------ поиск TG */
.tg-results h2 { display: flex; justify-content: space-between; align-items: baseline; }
.tg-results h2 small { font-weight: 400; color: var(--muted); font-size: 13px; }
.pos { width: 24px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.row.res { grid-template-columns: 24px auto minmax(0, 1fr) auto; }
.row.res.mine-hit { background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* ------------------------------------------------ шторка */
.sheet-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-wrap { position: absolute; inset: 0; pointer-events: auto; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgba(6, 8, 16, .45); animation: fade .2s ease; }
.sheet {
  position: relative; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto;
  background: var(--surface); border-radius: calc(var(--radius-l) + 4px) calc(var(--radius-l) + 4px) 0 0; padding: 8px 18px calc(22px + var(--safe-b));
  animation: rise .28s cubic-bezier(.2,.8,.2,1);
}
.sheet .grip { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-head h3 { margin: 0; font-size: 19px; }
@media (min-width: 720px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: calc(var(--radius-l) + 4px); padding-bottom: 22px; }
  .sheet .grip { display: none; }
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.bot-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.bot-hero h3 { margin: 0 0 2px; font-size: 20px; line-height: 1.2; word-break: break-word; }
.bot-hero .sub { color: var(--muted); font-size: 14px; }
.bot-hero .status { margin-top: 8px; }
.ava-pick { position: relative; border: 0; padding: 0; background: none; border-radius: 50%; }
.ava-pick .cam {
  position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; border: 3px solid var(--surface);
}
.ava-pick .cam svg { width: 14px; height: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 0; font-size: 14px; }
.timeline li + li { border-top: 1px dashed var(--line); }
.timeline .dot { transform: translateY(1px); }
.timeline small { color: var(--muted); font-size: 12.5px; }
.timeline .q { color: var(--muted); font-size: 13px; display: block; }

.kw { display: grid; grid-template-columns: 1fr auto 86px; gap: 10px; align-items: center; padding: 9px 0; }
.kw + .kw { border-top: 1px dashed var(--line); }
.kw b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw .now { font-weight: 700; }
.delta { font-size: 12px; font-weight: 600; margin-left: 6px; }
.delta.up { color: var(--sun); } .delta.down { color: var(--danger); }
.spark { width: 86px; height: 26px; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

.steps { display: flex; gap: 6px; margin-bottom: 16px; }
.steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.steps i.on { background: var(--accent); }

/* ------------------------------------------------ вход */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card { width: 100%; max-width: 360px; text-align: center; }
.gate-card > svg { width: 56px; height: 56px; margin-bottom: 8px; }
.gate-card h1 { font-size: 22px; margin: 0 0 6px; }
.gate-card p { color: var(--muted); margin: 0 0 18px; }

/* ------------------------------------------------ тост */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); color: #fff; }
@media (min-width: 960px) { .toast { bottom: 28px; } }

.skeleton { height: 66px; background: linear-gradient(90deg, var(--raised), var(--surface), var(--raised)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton + .skeleton { border-top: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* профиль бота в Telegram */
.tgp-load { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.tgp-ava { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 16px; }
.tgp-ava-text { min-width: 0; display: grid; }
.tgp-ava-btns { display: flex; gap: 6px; }
.tgp-ava-btns .btn { padding: 8px 11px; }
.tgp-ava-text b { font-weight: 500; }
.tgp-ava-text small { color: var(--muted); font-size: 12.5px; }
.field > .fh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.count { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* название и логотип */
.logo { width: 28px; height: 28px; border-radius: var(--radius-s); object-fit: cover; flex: none; display: block; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand span { line-height: 1.2; }
.topbar {
  display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto;
  padding-block: 14px 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  font-weight: 700; font-size: 15px;
}
.topbar .logo { width: 26px; height: 26px; }
.topbar + .main { padding-top: 12px; }
@media (min-width: 960px) { .topbar { display: none; } }
.badge.role { font-size: 12.5px; padding: 4px 9px; border-radius: 99px; }

/* экран входа */
.gate-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 18px; }
.gate-brand .logo { width: 34px; height: 34px; }
.gate-card .gate-brand { margin-bottom: 18px; }

/* копирование */
.copyline { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.copyline code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 14px ui-monospace, "SF Mono", Menlo, monospace; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; }
.copyline.big code { font-size: 20px; text-align: center; font-weight: 600; letter-spacing: .03em; }
.copyline.big { margin: 6px 0 14px; }

/* доступ */
.steps-list { margin: 6px 0 4px; padding-left: 20px; color: var(--text); }
.steps-list li { margin: 4px 0; }
.role-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.group-row.flat { padding: 10px 0 0; }
.row-title .badge { margin-left: 2px; }

/* оформление */
.group-body.bordered { border-top: 1px solid var(--line); }
.lbl small { line-height: 1.35; }
.logo-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.logo-prev .logo { width: 44px; height: 44px; border-radius: var(--radius-m); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  position: relative; width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--sw); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent);
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.swatch.custom { display: grid; place-items: center; border: 1.5px dashed var(--muted); background: var(--sw); overflow: hidden; }
.swatch.custom[aria-pressed="true"] { border-style: solid; border-color: transparent; }
.swatch.custom span { font-size: 18px; color: var(--muted); pointer-events: none; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.font-opt {
  border: 1px solid var(--line); background: var(--raised); border-radius: var(--radius-m); padding: 10px 8px;
  display: grid; justify-items: center; gap: 2px; color: var(--text);
}
.font-opt b { font-size: 22px; font-weight: 600; line-height: 1.1; }
.font-opt span { font-size: 12px; color: var(--muted); }
.font-opt[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }

/* чей бот (у владельца) */
.badge.owner { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.row-title .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tools { flex-wrap: wrap; }
.tools .search-box { flex: 1 1 200px; }
.tools .select { flex: 1 0 auto; }
#flt-owner { flex-basis: 140px; }
