/* Pohuy Agency web panel — UI 3 (12.11): the look of the Pohuy Agency site (Patreon panel), which the owner likes.
   Tokens copied from that site's source (globals.css / ui.tsx / nav.tsx / feed-list.tsx): Geist + Geist Mono,
   14px body, 14px card radius, 12px segmented box with 9px segments, hairline borders, page title 32px −0.04em.
   Three colours only: violet (accent / «работает»), green (positive numbers), amber + red (problems). Rest = greys.
   Loaded after ui2.css: retokens everything and replaces ui2's magenta/cyan details. */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(geist-cyrext.woff2) format("woff2"); unicode-range: U+460-52F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(geist-cyr.woff2) format("woff2"); unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(geist-latext.woff2) format("woff2"); unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(geist-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(geistmono-cyr.woff2) format("woff2"); unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(geistmono-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: var(--font);
  --font-num: var(--font);
  --mono: "Geist Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --radius: 10px;
  --radius-lg: 14px;

  --bg: #0b0b0f;
  --surface: rgba(12, 12, 16, 0.88);
  --surface-solid: #0e0e13;
  --surface-2: #121218;
  --surface-3: #18181f;
  --hover: #15151b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --divider: rgba(255, 255, 255, 0.06);
  --text: #ededed;
  --text-strong: #ffffff;
  --text-muted: #a1a1a1;
  --text-faint: #8f8f8f;
  --text-dim: #6e6e6e;

  --violet: #8b7cf6;
  --violet-hi: #a397ff;
  --violet-soft: rgba(139, 124, 246, 0.14);
  --violet-line: rgba(139, 124, 246, 0.55);
  --accent: var(--violet);
  --accent-2: var(--violet);
  --accent-fg: #ffffff;
  --accent-hover: var(--violet-hi);
  --accent-soft: var(--violet-soft);
  --accent-text: #b4aaff;
  --focus: rgba(139, 124, 246, 0.7);
  --grad: var(--violet);

  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.11);
  --ok-deep: #10261a;
  --warn: #f5a524;
  --warn-soft: rgba(245, 165, 36, 0.12);
  --danger: #ff5c5c;
  --danger-soft: rgba(255, 92, 92, 0.12);
  --live: var(--violet);
  --live-soft: var(--violet-soft);
  --info: var(--violet-hi);
  --info-soft: var(--violet-soft);

  --header-bg: rgba(11, 11, 15, 0.82);
  --overlay: rgba(5, 5, 8, 0.72);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.65);
  --card-shadow: none;
  --lift: none;
  --chart-sim: #ededed;
  --chart-internet: var(--violet);
  --chart-other: #3a3a3a;
  --chart-grid: rgba(255, 255, 255, 0.06);
}

/* ---------- Background: faint grid + one violet glow behind the page header ---------- */
html { background: var(--bg); }
body { background: transparent; font-family: var(--font); font-size: 14px; line-height: 1.5; letter-spacing: 0; font-feature-settings: "tnum" 1; }
/* 21.11 (user): the default is the dark background with soft colour glows and no grid (as in UI 2);
   the grid became a choice in «⋯» → «Фон панели» */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(255, 63, 134, 0.11), transparent 62%),
    radial-gradient(800px 520px at 100% 0%, rgba(47, 224, 208, 0.07), transparent 60%),
    radial-gradient(1200px 700px at 50% 120%, rgba(164, 139, 255, 0.06), transparent 60%);
}
html[data-bg="grid"] body::before {
  background:
    radial-gradient(760px 420px at 12% -4%, rgba(139, 124, 246, 0.20), rgba(139, 124, 246, 0.06) 45%, transparent 72%),
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, 0.35) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, 0.35) 100%);
}
h1, h2, h3, .page-title { font-family: var(--font); }
::selection { background: rgba(139, 124, 246, 0.35); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.mono, .lv-t, .hx3-meta, .hx3-c, .stat-sub, .ac-upd, time { font-family: var(--mono); font-feature-settings: normal; }

/* ---------- Top bar: brand left, nav centred, violet underline on the active tab ---------- */
.topbar { background: var(--header-bg); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar::after { display: none; }
.topbar-in { height: 64px; gap: 24px; max-width: none; padding: 0 40px; }
.brand { flex: 1 1 0; min-width: max-content; }
.brand-mark { display: none; }
.brand-text { display: block !important; }
.brand-text b { font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-strong); }
.tabs { flex: 0 1 auto; gap: 2px; height: 100%; align-items: stretch; }
.tab { height: auto; padding: 0 12px; border-radius: 0; font-size: 14px; font-weight: 400; color: var(--text-muted); background: none !important; box-shadow: none !important; }
.tab:hover { color: var(--text-strong); }
.tab.active { color: var(--text-strong); box-shadow: inset 0 -2px 0 var(--violet) !important; }
.tab.active::after { display: none; }
.topbar-right { flex: 1 1 0; justify-content: flex-end; gap: 12px; }
.conn { background: none; border: 0; font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.conn.ok i, .lv-live.on i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); color: var(--text); }
.icon-btn:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu { background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 12px; }
@media (max-width: 1180px) { .topbar-in { padding: 0 20px; gap: 14px; } .tab { padding: 0 9px; } .conn span { display: none; } }
@media (max-width: 1060px) { .brand-text { display: none !important; } .brand { flex: none; min-width: 0; } }

/* ---------- Layout + page header ---------- */
.main { max-width: none; padding: 40px 40px 72px; }
.tabpane { gap: 24px; }
.page-title { font-size: 32px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.15; color: var(--text-strong); }
.toolbar > .muted.small { color: var(--text-faint); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: none; }
.card-head { border-bottom: 0; padding: 18px 22px 10px; }
.card-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.note-box { border-radius: 12px; border: 1px solid rgba(245, 165, 36, 0.25); }

/* Аккаунты: title + muted «обновлено» + amber warning; subtitle with the range; period switch on the right */
.ac-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.ac-head-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ac-head-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.ac-upd { font-size: 13px; color: var(--text-muted); font-family: var(--font); }
.ac-warn { font-size: 13px; color: var(--warn); }
.ac-sub { margin: 0; color: var(--text-muted); font-size: 15px; }
.ac-period-box { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ac-period { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.10); background: rgba(10, 10, 14, 0.9); }
.ac-period button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: none; color: var(--text-muted); font-weight: 500; font-size: 14px; }
.ac-period button:hover { color: var(--text-strong); }
.ac-period button.on { background: var(--violet); color: #fff; }
.ac-custom { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px; border-radius: 12px; border: 1px solid var(--border); background: rgba(10, 10, 14, 0.9); animation: hx-drop .18s var(--ease); }
.ac-custom label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-faint); font-size: 13px; }
.ac-custom input[type="date"] { height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: 12.5px; color-scheme: dark; }
.ac-custom input[type="date"]:focus { border-color: var(--violet-line); outline: none; }
.ac-custom .ac-custom-go { height: 34px; background: var(--violet); border-color: var(--violet); color: #fff; font-weight: 500; }
.ac-custom .ac-custom-go:hover { background: var(--violet-hi); border-color: var(--violet-hi); }
#tab-accounts > .ac-toolbar { margin-top: -6px; }
#tab-accounts > .ac-toolbar .toolbar-end { margin-left: 0; flex-basis: 100%; justify-content: flex-start; }
#tab-accounts > .ac-toolbar .toolbar-end #ac-publish-open { margin-left: 0; }

/* ---------- Buttons, pills, segmented ---------- */
.btn { border-radius: 10px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.02); color: var(--text); font-weight: 500; box-shadow: none; }
.btn:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost { background: rgba(255, 255, 255, 0.015); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn-primary { background: var(--violet); border: 1px solid var(--violet); color: #fff; font-weight: 500; box-shadow: none; filter: none; }
.btn-primary:hover { background: var(--violet-hi); border-color: var(--violet-hi); color: #fff; box-shadow: none; filter: none; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.segmented { background: rgba(10, 10, 14, 0.9); border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 12px; padding: 3px; }
.segmented button { border-radius: 9px; color: var(--text-muted); }
.segmented button:hover { color: var(--text-strong); }
.segmented button.active { background: var(--violet); color: #fff; box-shadow: none; }
.pill { border-radius: 999px; font-weight: 500; }
.pill-ok { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.pill-info { background: var(--violet-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px rgba(139, 124, 246, 0.3); }
.pill-ghost { border-color: var(--border-strong); color: var(--text-muted); }
.pill-accent { background: var(--violet-soft); color: var(--accent-text); }
.link { color: var(--accent-text); }
.chip.active, .chip[aria-pressed="true"], .rl-chip[aria-pressed="true"], .rl-chip.on { border-color: var(--violet-line); background: rgba(139, 124, 246, 0.12); color: var(--text-strong); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, select:focus, textarea:focus { border-color: var(--violet-line); }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--violet); }

/* ---------- Stat tiles: centred label, big number, small mono caption ---------- */
.stat { border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
.stat-value { font-family: var(--font); font-weight: 600; letter-spacing: -0.04em; }
.stats.ac-stats.hx3-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hx3-stat { align-items: center; text-align: center; gap: 10px; padding: 22px 22px 20px; min-width: 0; }
.hx3-stat:first-child { border-color: rgba(255, 255, 255, 0.13); box-shadow: 0 0 0 1px rgba(139, 124, 246, 0.06), 0 18px 60px -30px rgba(139, 124, 246, 0.55); }
.hx3-stat .stat-label { font-size: 14px; color: var(--text-muted); justify-content: center; }
.hx3-stat .stat-value { font-size: 32px; line-height: 1.1; color: var(--text-strong); }
.hx3-stat.g .stat-value { color: var(--ok); }
.hx3-stat .stat-sub { font-size: 12px; color: var(--text-faint); letter-spacing: 0.02em; white-space: normal; }
.hx3-stat .stat-sub .bad { color: var(--danger); }
.hx3-stat .stat-sub .warn { color: var(--warn); }
.ac-tasks-link { margin: -8px 0 0; color: var(--text-faint); }

/* ---------- Account cards: no avatar — handle, phone, one pill, two numbers ---------- */
.ac-hrow { gap: 16px; }
.ac-card.hx-card.hx3-card { padding: 18px; gap: 14px; border-radius: 14px; background: var(--surface); border-color: var(--border); }
.ac-card.hx-card.hx3-card:hover { transform: none; box-shadow: none; border-color: rgba(255, 255, 255, 0.18); }
.ac-card.hx-card.lv-busy-card { border-color: var(--violet-line); background: radial-gradient(360px 160px at 0% 0%, rgba(139, 124, 246, 0.12), transparent 70%), var(--surface); box-shadow: none; }
.hx3-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.hx3-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hx3-who b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx3-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx3-on { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.hx3-pill { flex: none; }
.hx3-pill .pill { white-space: nowrap; }
.hx3-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.015); }
.hx3-nums > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 10px 11px; min-width: 0; }
.hx3-nums > div + div { border-left: 1px solid var(--border); }
.hx3-l { font-size: 12.5px; color: var(--text-muted); }
.hx3-n { font-size: 26px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; color: var(--text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx3-n.g { color: var(--ok); }
.hx3-c { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hx3-c.up { color: var(--ok); }
.hx3-c.down { color: var(--danger); }
.ac-card .lv-card { border-radius: 12px; background: rgba(255, 255, 255, 0.015); border-color: var(--border); }
.ac-card.lv-busy-card .lv-card { background: rgba(139, 124, 246, 0.07); border-color: rgba(139, 124, 246, 0.3); }
.hx-rx { border-radius: 12px; border-color: var(--border); background: rgba(255, 255, 255, 0.015); }
.hx-rx.bad { border-color: rgba(255, 92, 92, 0.28); background: rgba(255, 92, 92, 0.05); }
.hx-rx.bad > summary b { color: #ff8a8a; }
.hx-rx.warn { border-color: rgba(245, 165, 36, 0.28); background: rgba(245, 165, 36, 0.05); }
.ac-cap.hx-cap { color: var(--text-faint); font-size: 12px; }
.ac-cap.hx-cap b { font-family: var(--font); font-size: 13px; font-weight: 600; }
.ac-thumbs { gap: 5px; }
.ac-tile { border-radius: 9px; border-color: var(--border); background: var(--surface-3); }
.ac-tile:not(.empty):hover { border-color: var(--violet-line); }
.ac-tile:not(.empty):hover img { transform: none; }
.ac-tile:not(.empty)::after { background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8)); }
.ac-card .ac-foot.hx-foot { border-top-color: var(--divider); }
.hx-foot .muted.small { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.hx-foot [data-publish] { border-color: var(--violet-line); color: #d6d0ff; background: rgba(139, 124, 246, 0.10); }
.hx-foot [data-publish]:hover { background: rgba(139, 124, 246, 0.2); color: #fff; }
.lv-ava { background: var(--surface-3) !important; color: var(--text) !important; box-shadow: inset 0 0 0 1px var(--border-strong) !important; }

/* skeleton while the first answer is on its way: 3 tiles + 3 cards */
#ac-root:empty {
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) 0 0 / calc(33.333% - 11px) 128px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 50% 0 / calc(33.333% - 11px) 128px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 100% 0 / calc(33.333% - 11px) 128px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 0 152px / calc(33.333% - 11px) 268px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 50% 152px / calc(33.333% - 11px) 268px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 100% 152px / calc(33.333% - 11px) 268px no-repeat;
}

/* ---------- Live strip ---------- */
.lv-bar-in { border-radius: 14px; border-color: var(--border); background: var(--surface); }
.lv-chip { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.02); }
.lv-chip.lv-run { border-color: var(--violet-line); background: rgba(139, 124, 246, 0.10); }
.lv-chip.lv-run i, .lv-act.lv-run .lv-dot { background: var(--violet); animation-name: hx3-ring; }
.lv-chip.lv-run .lv-chip-t, .lv-act.lv-run .lv-text { color: var(--accent-text); }
.lv-prog::after { background: var(--violet); }
.lv-nextpub { border-radius: 12px; background: rgba(255, 255, 255, 0.02); }
.lv-nextpub svg { color: var(--violet-hi); }
.lv-np-cd, .lv-next b { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.hx-orbit { background: var(--violet); animation-name: hx3-ring; }
progress.ac-bar::-webkit-progress-value { background: var(--violet); }
progress.ac-bar::-moz-progress-bar { background: var(--violet); }
.ac-bar { accent-color: var(--violet); }

/* ---------- «Последние события» (live feed) like the site's list ---------- */
.lv-feed { border-radius: 14px; background: var(--surface); }
.lv-feed-head { padding: 18px 22px 8px; flex-wrap: wrap; }
.lv-feed-title h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.lv-feed-count { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.lv-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 0; border: 0; background: none; border-radius: 0; }
.lv-seg button { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); background: none; color: var(--text-muted); font-size: 14px; font-weight: 500; }
.lv-seg button:hover { color: var(--text-strong); }
.lv-seg button.on { border-color: var(--violet-line); background: rgba(139, 124, 246, 0.14); color: var(--text-strong); box-shadow: none; }
.lv-list { padding: 4px 22px 8px; max-height: 560px; }
.lv-ev { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; padding: 12px 0; border-top: 1px solid var(--divider); }
.lv-ev + .lv-ev::before { display: none; }
.lv-ev:hover { background: none; }
.lv-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); color: var(--text-muted); }
.lv-ic svg { width: 16px; height: 16px; }
.lv-ok .lv-ic { background: var(--ok-deep); color: var(--ok); }
.lv-bad .lv-ic { background: rgba(255, 92, 92, 0.12); color: var(--danger); }
.lv-warn .lv-ic { background: rgba(245, 165, 36, 0.12); color: var(--warn); }
.lv-info .lv-ic { background: rgba(139, 124, 246, 0.14); color: var(--violet-hi); }
.lv-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lv-h { font-size: 15px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
.lv-h::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-dim); }
.lv-ok .lv-h::before { background: var(--ok); }
.lv-bad .lv-h::before { background: var(--danger); }
.lv-warn .lv-h::before { background: var(--warn); }
.lv-info .lv-h::before { background: var(--violet); }
.lv-h b { font-weight: 500; color: var(--text-strong); }
.lv-s { font-size: 13px; color: var(--text-faint); font-family: var(--mono); }
.lv-t { min-width: 64px; text-align: right; font-size: 12px; color: var(--text-faint); }
.lv-feed-foot { padding: 0 22px 14px; }
@keyframes lv-flash { 0% { background: rgba(139, 124, 246, 0.12); } 100% { background: transparent; } }

/* ---------- Tasks, viral list ---------- */
.task-card { border-radius: 14px; }
.task-card:hover { transform: none; box-shadow: none; border-color: rgba(255, 255, 255, 0.18); }
.ac-vnum b { font-family: var(--font); font-weight: 600; color: var(--ok); }
.ac-job-ch { font-family: var(--mono); font-weight: 500; border-radius: 50%; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) {
  .stats.ac-stats.hx3-stats { gap: 10px; }
  .hx3-stat { padding: 16px 10px; }
  .hx3-stat .stat-value { font-size: 26px; }
}
@media (max-width: 700px) {
  .topbar-in { height: 54px; padding: 0 16px; }
  .brand-text { display: block !important; }
  .brand { flex: 1 1 auto; }
  .main { padding: 20px 16px calc(88px + env(safe-area-inset-bottom)); }
  .tabpane { gap: 16px; }
  .page-title { font-size: 28px; }
  .ac-head { gap: 14px; }
  .ac-period-box { width: 100%; align-items: stretch; }
  .ac-period { width: 100%; }
  .ac-period button { flex: 1 1 0; padding: 0 6px; min-height: 44px; font-size: 13.5px; }
  .ac-custom { justify-content: stretch; }
  .ac-custom label { flex: 1 1 40%; }
  .ac-custom input[type="date"] { flex: 1; min-width: 0; height: 40px; }
  .ac-custom .ac-custom-go { flex: 1 1 100%; height: 40px; }
  .stats.ac-stats.hx3-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stats.ac-stats.hx3-stats .hx3-stat:first-child { grid-column: auto; }
  .hx3-stat { padding: 14px 6px; gap: 6px; }
  .hx3-stat .stat-label { font-size: 12.5px; white-space: normal; line-height: 1.25; }
  .hx3-stat .stat-value { font-size: 20px; }
  .hx3-stat .stat-sub { display: none !important; }
  .hx3-n { font-size: 22px; }
  .lv-feed-head, .lv-list { padding-left: 14px; padding-right: 14px; }
  .lv-ev { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; }
  .lv-ic { width: 34px; height: 34px; }
  .lv-h { font-size: 14px; }
  .lv-seg button { height: 36px; padding: 0 12px; font-size: 13px; }
  .bottombar { background: rgba(11, 11, 15, 0.9); border-top-color: var(--border); }
  .bottombar button.active { color: var(--text-strong); }
  .bottombar button.active svg { color: var(--violet-hi); }
}

@keyframes hx3-ring { 0% { box-shadow: 0 0 0 0 rgba(139, 124, 246, .6); } 70% { box-shadow: 0 0 0 8px rgba(139, 124, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 124, 246, 0); } }
@media (prefers-reduced-motion: reduce) { .ac-custom { animation: none; } }
#tab-accounts > .ac-toolbar .toolbar-end { gap: 6px; }
#tab-accounts > .ac-toolbar .ac-ws-chip { max-width: 260px; }
#tab-accounts > .ac-toolbar #ac-ws-box { order: 9; }
#tab-accounts > .ac-toolbar .toolbar-end .btn { padding: 0 9px; }
/* compact reels strip on cards: 6 per row; «6 рилсов» = one row, «9 рилсов» = two rows (scroll inside for the rest) */
.hx3-card .ac-thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; max-height: calc((100cqw - 25px) / 6 * 16 / 9); }
.hx3-card .ac-thumbs.r3 { max-height: calc(((100cqw - 25px) / 6 * 16 / 9 + 5px) * 2 - 5px); }
.hx3-card .ac-tile { border-radius: 7px; }
.hx3-card .ac-views { left: 4px; bottom: 3px; font-size: 10px; gap: 2px; }
.hx3-card .ac-views svg { width: 9px; height: 9px; }
.hx3-chk { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.ac-vthumb { display: block; flex: none; }
@media (max-width: 700px) { #tab-accounts > .ac-toolbar .ac-ws-chip { max-width: none; } }
@media (max-width: 700px) {
  .hx3-meta { display: block; white-space: normal; }
  .hx3-on { display: inline-block; margin-right: 6px; vertical-align: 1px; }
  .hx3-c { white-space: normal; }
  .hx3-card .ac-views { left: 3px; font-size: 9px; }
  .hx3-card .ac-views svg { display: none; }
}

/* 19.11: long file names / reel codes in «Инциденты» made the card scroll sideways on a phone */
.ac-incidents { overflow-x: hidden; }
.ac-incidents .ac-inc > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.ac-incidents > .ac-inc, .ac-incidents > * > .ac-inc { padding-left: 14px; padding-right: 14px; }
/* 19.11: «Экраны» on a phone — the title, the online/streams line and the buttons were squeezed into one row */
@media (max-width: 600px) {
  #tab-screens .toolbar { flex-wrap: wrap; row-gap: 8px; }
  #tab-screens .scr-head { flex-wrap: wrap; align-items: baseline; column-gap: 10px; min-width: 0; flex: 1 1 100%; }
  #tab-screens .scr-head .muted { white-space: nowrap; }
}

/* 19.11 «Статус контента» */
.ct-card { max-width: 980px; }
.ct-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.ct-sel, .ct-q { background: var(--surface-1, #111); color: inherit; border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; font: inherit; font-size: 13px; }
.ct-q { flex: 1 1 180px; min-width: 0; }
.ct-stats { margin: 4px 0 8px; }
.ct-list { display: flex; flex-direction: column; }
.ct-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--border); cursor: pointer; }
.ct-th img, .ct-nothumb { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: var(--surface-1, #151515); font-size: 11px; color: var(--muted, #888); }
.ct-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ct-top { overflow-wrap: anywhere; }
.ct-file { overflow-wrap: anywhere; }
.ct-views { text-align: right; display: flex; flex-direction: column; }
.ct-st { font-size: 13px; font-weight: 600; }
.ct-st.tone-good { color: #4ade80; } .ct-st.tone-ok { color: var(--text, #ddd); } .ct-st.tone-warn { color: #fbbf24; } .ct-st.tone-bad { color: #f87171; } .ct-st.tone-gray { color: var(--muted, #888); }
.ct-ev { margin-top: 4px; font-size: 12px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.ct-chip b { margin-left: 4px; }
#ct-more { margin: 10px auto; }
@media (max-width: 600px) { .ct-row { grid-template-columns: 48px 1fr auto; } .ct-th img, .ct-nothumb { width: 48px; height: 62px; } }

.ct-ap { font-size: 12.5px; font-weight: 600; }
.ct-ap.tone-good { color: #4ade80; } .ct-ap.tone-warn { color: #fbbf24; } .ct-ap.tone-bad { color: #f87171; } .ct-ap.tone-gray { color: var(--muted, #888); }

/* 21.11 (user): background picker — «⋯» → «Фон панели» (html[data-bg]) */
.bgt-grid { background: radial-gradient(760px 420px at 12% -4%, rgba(139,124,246,.20), rgba(139,124,246,.06) 45%, transparent 72%), linear-gradient(rgba(255,255,255,.032) 1px, transparent 1px) 0 0 / 14px 14px, linear-gradient(90deg, rgba(255,255,255,.032) 1px, transparent 1px) 0 0 / 14px 14px, #0b0b0f; }
html[data-bg="v1"] { --bg: #0b0b0f; --header-bg: rgba(11,11,15,0.82); }
html[data-bg="v1"] body::before { background: none; }
.bgt-v1 { background: #0b0b0f; }
html[data-bg="v2"] { --bg: #0a0814; --header-bg: rgba(10,8,20,0.82); }
html[data-bg="v2"] body::before { background: radial-gradient(900px 600px at 10% -10%, rgba(139,124,246,.30), transparent 65%), radial-gradient(800px 600px at 100% 100%, rgba(255,63,134,.14), transparent 65%); }
.bgt-v2 { background: radial-gradient(900px 600px at 10% -10%, rgba(139,124,246,.30), transparent 65%), radial-gradient(800px 600px at 100% 100%, rgba(255,63,134,.14), transparent 65%), #0a0814; }
html[data-bg="v3"] { --bg: #07090f; --header-bg: rgba(7,9,15,0.82); }
html[data-bg="v3"] body::before { background: radial-gradient(700px 500px at 15% -5%, rgba(139,124,246,.26), transparent 65%), radial-gradient(650px 480px at 90% 5%, rgba(45,212,191,.16), transparent 65%), radial-gradient(900px 600px at 50% 115%, rgba(255,63,134,.14), transparent 65%); }
.bgt-v3 { background: radial-gradient(700px 500px at 15% -5%, rgba(139,124,246,.26), transparent 65%), radial-gradient(650px 480px at 90% 5%, rgba(45,212,191,.16), transparent 65%), radial-gradient(900px 600px at 50% 115%, rgba(255,63,134,.14), transparent 65%), #07090f; }
html[data-bg="v4"] { --bg: #0d0908; --header-bg: rgba(13,9,8,0.82); }
html[data-bg="v4"] body::before { background: radial-gradient(1000px 600px at 80% 110%, rgba(255,120,60,.22), transparent 65%), radial-gradient(800px 520px at 5% 105%, rgba(255,70,130,.16), transparent 65%), radial-gradient(700px 400px at 20% -10%, rgba(139,124,246,.10), transparent 70%); }
.bgt-v4 { background: radial-gradient(1000px 600px at 80% 110%, rgba(255,120,60,.22), transparent 65%), radial-gradient(800px 520px at 5% 105%, rgba(255,70,130,.16), transparent 65%), radial-gradient(700px 400px at 20% -10%, rgba(139,124,246,.10), transparent 70%), #0d0908; }
html[data-bg="v5"] { --bg: #070b16; --header-bg: rgba(7,11,22,0.82); }
html[data-bg="v5"] body::before { background: radial-gradient(900px 520px at 50% -15%, rgba(59,130,246,.24), transparent 65%), linear-gradient(180deg, #0b1430 0%, #070b16 55%); }
.bgt-v5 { background: radial-gradient(900px 520px at 50% -15%, rgba(59,130,246,.24), transparent 65%), linear-gradient(180deg, #0b1430 0%, #070b16 55%), #070b16; }
html[data-bg="v6"] { --bg: #0b0b0f; --header-bg: rgba(11,11,15,0.82); }
html[data-bg="v6"] body::before { background: radial-gradient(760px 420px at 12% -4%, rgba(139,124,246,.18), transparent 70%), radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px) 0 0 / 22px 22px; }
.bgt-v6 { background: radial-gradient(760px 420px at 12% -4%, rgba(139,124,246,.18), transparent 70%), radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px) 0 0 / 8px 8px, #0b0b0f; }
html[data-bg="v7"] { --bg: #121215; --header-bg: rgba(18,18,21,0.82); }
html[data-bg="v7"] body::before { background: radial-gradient(1200px 800px at 50% 0%, rgba(255,255,255,.05), transparent 70%), repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 2px, transparent 2px 8px); }
.bgt-v7 { background: radial-gradient(1200px 800px at 50% 0%, rgba(255,255,255,.05), transparent 70%), repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 2px, transparent 2px 8px), #121215; }
.bgp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 600px) { .bgp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bgp-tile { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.bgp-sw { height: 110px; border-radius: 12px; border: 1px solid var(--border); background-size: cover; }
.bgp-tile.on .bgp-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.bgp-tile span { font-size: 13px; }
html[data-bg]:not([data-bg="grid"]) body::before { -webkit-mask-image: none; mask-image: none; }
.bgt-v0 { background: radial-gradient(120px 80px at 8% -8%, rgba(255,63,134,.35), transparent 62%), radial-gradient(110px 80px at 100% 0%, rgba(47,224,208,.25), transparent 60%), radial-gradient(160px 100px at 50% 120%, rgba(164,139,255,.25), transparent 60%), #0b0b0f; }
/* 22.11 (user): «show password» eye on the login and password-change fields */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 44px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--text-muted); cursor: pointer; border-radius: 8px; }
.pw-eye:hover { color: var(--text-strong); background: var(--hover); }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye .eye-off { display: none; }
.pw-eye.on .eye-on { display: none; }
.pw-eye.on .eye-off { display: block; }
