/* Pohuy Agency web panel — UI 2 (11.11, second pass): «night shift control room».
   Ink-violet layered surfaces, reel-magenta → amber accent for actions, cyan for «работает сейчас»,
   heavy Inter Display numerals for the numbers that matter. Loaded last: overrides + new hx-* classes.
   Animations only on transform/opacity; no backdrop-filter except the top bar. */

:root {
  --font: "Segoe UI Variable Text", "Segoe UI", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Segoe UI Variable Display", "Segoe UI", "Inter", system-ui, sans-serif;
  --font-num: "Inter Display Logo", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  --radius-lg: 16px;

  --bg: #090812;
  --bg-glow: none;
  --surface: #110f1d;
  --surface-2: #171527;
  --surface-3: #201d33;
  --hover: #1b1930;
  --border: #252238;
  --border-strong: #353150;
  --text: #e9e7f3;
  --text-strong: #ffffff;
  --text-muted: #a5a1bd;
  --text-faint: #6f6a8c;

  --accent: #ff3f86;
  --accent-2: #ff9a3c;
  --accent-fg: #ffffff;
  --accent-hover: #ff5c98;
  --accent-soft: rgba(255, 63, 134, 0.12);
  --accent-text: #ff8db7;
  --focus: rgba(255, 110, 165, 0.6);
  --grad: linear-gradient(100deg, #ff3f86 0%, #ff6a5c 55%, #ff9a3c 100%);

  --live: #2fe0d0;
  --live-soft: rgba(47, 224, 208, 0.12);
  --ok: #46e08f;
  --ok-soft: rgba(70, 224, 143, 0.12);
  --warn: #ffb547;
  --warn-soft: rgba(255, 181, 71, 0.13);
  --danger: #ff5470;
  --danger-soft: rgba(255, 84, 112, 0.13);
  --info: #2fe0d0;
  --info-soft: rgba(47, 224, 208, 0.11);
  --violet: #a48bff;

  --header-bg: rgba(12, 10, 24, 0.72);
  --overlay: rgba(6, 5, 14, 0.7);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px -12px rgba(0, 0, 0, 0.7);
  --lift: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 4px rgba(0, 0, 0, 0.5), 0 22px 40px -18px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html, body { overflow-x: hidden; max-width: 100%; }
body { background: var(--bg); background-attachment: scroll; font-size: 14px; letter-spacing: .005em; }
/* the atmosphere: two big soft glows, painted once on a fixed layer (no repaint on scroll) */
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%);
}
h1, h2, h3 { font-family: var(--font-head); }
.page-title { font-family: var(--font-head); font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(255, 63, 134, 0.35); }
* { scrollbar-color: var(--border-strong) transparent; scrollbar-width: thin; }

/* ---------- Top bar: glass, gradient hairline, no overlap ---------- */
.topbar { background: var(--header-bg); border-bottom: 0; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 63, 134, .55) 20%, rgba(255, 154, 60, .45) 50%, rgba(47, 224, 208, .35) 80%, transparent); }
.topbar-in { height: 60px; gap: 20px; min-width: 0; }
.brand { flex: none; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 6px 22px rgba(255, 63, 134, .35); }
.brand-mark .pa { font-size: 16.4px; }
.brand-text b { font-family: var(--font-head); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.tabs { min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; gap: 2px; align-items: center; height: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; color: var(--text-muted); transition: color .15s, background-color .15s; }
.tab::before { display: none; }
.tab:hover { color: var(--text-strong); background: rgba(255, 255, 255, 0.045); }
.tab.active { color: var(--text-strong); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.tab.active::after { left: 14px; right: 14px; bottom: -12px; height: 2px; background: var(--grad); }
.topbar-right { flex: none; }
.conn { background: rgba(255, 255, 255, 0.03); border-color: var(--border); }
@media (max-width: 1060px) { .brand-text { display: none; } .topbar-in { gap: 12px; padding: 0 16px; } .tab { padding: 0 10px; } }

/* ---------- Layout ---------- */
.main { padding-top: 22px; }
.tabpane { gap: 18px; min-width: 0; }
.tabpane > * { min-width: 0; }
.card { background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0) 120px), var(--surface); border-color: var(--border); box-shadow: var(--card-shadow); }
.card-head { border-bottom-color: var(--border); }
.card-head h2 { font-size: 15px; font-weight: 650; }

/* toolbar: title left, actions wrap instead of running off the page */
.toolbar { gap: 10px 14px; align-items: center; }
.toolbar > .muted.small { color: var(--text-faint); }
.toolbar-end { flex-wrap: wrap; justify-content: flex-end; min-width: 0; gap: 8px; }
.toolbar-end > * { flex: none; }
.ac-ws { display: inline-flex; align-items: stretch; gap: 0; height: 36px; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, 0.02); }
.ac-ws > * { border: 0 !important; border-radius: 0 !important; height: auto !important; box-shadow: none !important; }
.ac-ws > * + * { border-left: 1px solid var(--border-strong) !important; }
.ac-ws .ac-ws-chip { padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.ac-ws .btn-ghost { background: transparent; }
#tab-accounts > .toolbar .toolbar-end { gap: 6px; }
#tab-accounts > .toolbar .toolbar-end .btn { padding: 0 10px; gap: 6px; font-size: 12.5px; }
#tab-accounts > .toolbar .toolbar-end .btn-sm { padding: 0 9px; }
#tab-accounts .segmented button { padding: 0 11px; }
.ac-ws-chip { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1600px) {
  #tab-accounts > .toolbar .toolbar-end { flex-basis: 100%; margin-left: 0; justify-content: flex-start; }
  #tab-accounts > .toolbar .toolbar-end #ac-publish-open { margin-left: auto; }
}
@media (max-width: 900px) {
  #tab-accounts > .toolbar .toolbar-end #ac-publish-open { margin-left: 0; }
}

/* buttons */
.btn { border-radius: 10px; border-color: var(--border-strong); background: var(--surface-2); transition: background-color .15s, border-color .15s, color .15s, box-shadow .2s, transform .1s; }
.btn:hover { background: var(--surface-3); border-color: #45406a; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-ghost { background: rgba(255, 255, 255, 0.02); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-primary { background: var(--grad); border: 0; color: #fff; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 20px -6px rgba(255, 63, 134, 0.6); }
.btn-primary:hover { background: var(--grad); color: #fff; filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 26px -6px rgba(255, 63, 134, 0.75); }
.btn-primary svg { stroke-width: 2.1; }
.segmented { background: rgba(255, 255, 255, 0.025); border-color: var(--border-strong); border-radius: 11px; }
.segmented button { border-radius: 8px; }
.segmented button.active { background: var(--surface-3); box-shadow: inset 0 0 0 1px #45406a, 0 2px 6px rgba(0, 0, 0, .4); }

/* pills */
.pill { border-radius: 999px; font-weight: 550; }
.pill-info { color: var(--live); background: var(--live-soft); box-shadow: inset 0 0 0 1px rgba(47, 224, 208, .25); }
.pill-ghost { border-color: var(--border-strong); }
.link { color: var(--accent-text); }
.note-box { border: 1px solid rgba(255, 181, 71, .22); border-radius: 12px; }

/* ---------- Live strip ---------- */
.lv-bar { margin: -4px 0 8px; }
.lv-bar-in { border-radius: 16px; border-color: var(--border); min-height: 52px; padding: 7px 7px 7px 16px;
  background: linear-gradient(90deg, rgba(47, 224, 208, 0.07), rgba(47, 224, 208, 0) 45%), var(--surface); }
.lv-now-l { color: var(--text); font-weight: 600; font-size: 12.5px; }
.lv-live.on i { background: var(--live); animation-name: hx-ring-live; }
.lv-chip { height: 30px; border-color: var(--border-strong); background: var(--surface-2); }
.lv-chip.lv-run { border-color: rgba(47, 224, 208, .38); background: rgba(47, 224, 208, .08); }
.lv-chip.lv-run i, .lv-act.lv-run .lv-dot { background: var(--live); animation-name: hx-ring-live; }
.lv-chip.lv-run .lv-chip-t, .lv-act.lv-run .lv-text { color: var(--live); }
.lv-prog::after { background: linear-gradient(90deg, var(--live), var(--violet)); }
.lv-nextpub { border-radius: 12px; height: 38px; background: rgba(255, 255, 255, 0.025); }
.lv-nextpub svg { color: var(--accent-2); }
.lv-np-cd { font-family: var(--font-num); font-weight: 900; font-size: 15px; letter-spacing: .01em; color: #fff; min-width: 96px; }
.conn.ok i, .lv-live.on i { animation-name: hx-ring-live; }
.conn.ok i { background: var(--live); box-shadow: none; }

/* ---------- Stat tiles everywhere (Телефоны, Расходы …) ---------- */
.stat { border-radius: 16px; }
.stat-value { font-family: var(--font-num); font-weight: 900; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.stat-value small { font-family: var(--font); font-weight: 500; }

/* ---------- Hero numbers (Аккаунты) ---------- */
.stats.ac-stats.hx-stats { grid-template-columns: 1.55fr repeat(4, minmax(0, 1fr)); gap: 12px; }
.hx-stats .stat {
  position: relative; overflow: hidden; padding: 16px 18px 14px; gap: 4px; border-radius: 16px; min-height: 132px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 70%), var(--surface);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
}
.hx-stats .stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 550; }
.hx-stats .stat-value { font-family: var(--font-num); font-weight: 900; font-size: 34px; line-height: 1.02; letter-spacing: -0.005em; color: #fff; font-variant-numeric: tabular-nums; margin-top: 2px; }
.hx-stats .stat-sub { font-size: 12px; color: var(--text-faint); }
.hx-stats .stat-sub .up { color: var(--ok); font-weight: 650; }
.hx-stats .stat-sub .down { color: var(--danger); font-weight: 650; }
.hx-stats .stat.hx-hero { padding: 18px 22px 16px;
  background: radial-gradient(420px 200px at 0% 0%, rgba(255, 63, 134, 0.22), transparent 70%),
              radial-gradient(360px 200px at 100% 100%, rgba(255, 154, 60, 0.13), transparent 70%), var(--surface);
  border-color: rgba(255, 63, 134, 0.28); }
.hx-stats .stat.hx-hero .stat-value { font-size: 52px; background: linear-gradient(100deg, #fff 30%, #ffd1e2 70%, #ffc89c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-stats .stat.hx-hero .stat-label { color: #ffc1d8; }
.hx-health { stroke: none; }
.hx-bars { fill: none; }
.hx-bars { display: block; width: 100%; height: 30px; margin-top: auto; padding-top: 6px; overflow: visible; }
.hx-bars line { stroke: rgba(255, 255, 255, 0.16); stroke-width: 6px; stroke-linecap: round; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: bottom; animation: hx-grow .7s var(--ease) both; }
.hx-bars line.top { stroke: rgba(255, 255, 255, 0.6); }
.hx-hero .hx-bars line { stroke: rgba(255, 128, 170, 0.32); stroke-width: 8px; }
.hx-hero .hx-bars line.top { stroke: #ff8db7; }
.hx-bars.hx-v line { stroke: rgba(164, 139, 255, 0.3); }
.hx-bars.hx-v line.top { stroke: #b9a6ff; }
.hx-bars.hx-r line { stroke: rgba(255, 154, 60, 0.3); }
.hx-bars.hx-r line.top { stroke: #ffb36e; }
.hx-health { display: block; width: 100%; height: 8px; margin-top: auto; border-radius: 4px; overflow: hidden; }
.hx-health .ok { fill: var(--ok); } .hx-health .bad { fill: var(--danger); } .hx-health .warn { fill: var(--warn); } .hx-health .unk { fill: #3a3656; }
.hx-hero .hx-bars { height: 46px; }
.hx-legend { display: flex; gap: 2px 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }
.hx-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }
.hx-legend .ok { background: var(--ok); } .hx-legend .bad { background: var(--danger); } .hx-legend .warn { background: var(--warn); } .hx-legend .unk { background: #3a3656; }
.hx-stats .stat.hx-jobs.on { border-color: rgba(47, 224, 208, .35); background: radial-gradient(300px 160px at 100% 0%, rgba(47, 224, 208, 0.14), transparent 70%), var(--surface); }
.hx-stats .stat.hx-jobs.on .stat-value { color: var(--live); }
.hx-orbit { position: absolute; right: 16px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--live); animation: hx-ring-live 2s ease-out infinite; }
.ac-tasks-link { margin: -4px 0 0; color: var(--text-faint); }
@media (max-width: 1280px) {
  .stats.ac-stats.hx-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hx-stats .stat.hx-hero { grid-column: span 4; min-height: 0; }
  .hx-stats .stat-value { font-size: 30px; }
}
@media (max-width: 700px) {
  .stats.ac-stats.hx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hx-stats .stat.hx-hero { grid-column: span 2; }
  .hx-stats .stat { min-height: 0; padding: 13px 14px 12px; }
  .hx-stats .stat-value { font-size: 26px; }
  .hx-stats .stat.hx-hero .stat-value { font-size: 42px; }
  .hx-stats .stat-label, .hx-stats .stat-sub { white-space: normal; }
}

/* skeletons while the first /api/accounts answer is on its way */
#ac-root:empty { min-height: 420px; border-radius: 16px; position: relative;
  background:
    linear-gradient(var(--surface), var(--surface)) 0 0 / 100% 132px no-repeat,
    linear-gradient(var(--surface), var(--surface)) 0 152px / calc(33.333% - 11px) 268px no-repeat,
    linear-gradient(var(--surface), var(--surface)) 50% 152px / calc(33.333% - 11px) 268px no-repeat,
    linear-gradient(var(--surface), var(--surface)) 100% 152px / calc(33.333% - 11px) 268px no-repeat; }
#ac-root:empty::after, #tasks-acc:empty::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.045) 50%, transparent 70%);
  animation: hx-shimmer 1.4s linear infinite; }
#tasks-acc:empty { min-height: 160px; position: relative; border-radius: 16px; background: var(--surface); }

/* ---------- Account cards ---------- */
.ac-hrow { gap: 14px; padding: 4px 2px 12px; margin: -4px -2px 0; align-items: stretch; scroll-padding-left: 2px; }
.ac-hrow::-webkit-scrollbar { height: 6px; }
.ac-hrow::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.ac-card.hx-card { padding: 16px; gap: 12px; border-radius: 18px; transition: transform .22s var(--ease), box-shadow .22s, border-color .2s; }
.ac-card.hx-card:hover { transform: translateY(-3px); box-shadow: var(--lift); border-color: var(--border-strong); }
.ac-card.hx-card.lv-busy-card { border-color: rgba(47, 224, 208, 0.42);
  background: radial-gradient(380px 160px at 0% 0%, rgba(47, 224, 208, 0.10), transparent 70%), var(--surface);
  box-shadow: var(--card-shadow), 0 0 0 1px rgba(47, 224, 208, 0.10), 0 16px 40px -18px rgba(47, 224, 208, 0.35); }
.hx-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.hx-who { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hx-who b { font-family: var(--font-head); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-who .small { color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-who .hx-on { color: var(--ok); }
.hx-num { font-variant-numeric: tabular-nums; }
.hx-pills { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hx-pills .pill { white-space: nowrap; }

/* avatar with a status ring: green ok, red restricted, amber review, cyan spinning while the phone works */
.hx-ring { position: relative; width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.hx-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ring, #3a3656); }
.hx-ring::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--surface); }
.hx-ring .ac-ava.lv-ava.sm { position: relative; z-index: 1; width: 40px; height: 40px; font-size: 16px; box-shadow: none; font-family: var(--font-num); font-weight: 900; }
.hx-ring.r-ok { --ring: conic-gradient(from 210deg, #46e08f, #2fe0d0, #46e08f); }
.hx-ring.r-bad { --ring: conic-gradient(from 210deg, #ff5470, #ff9a3c, #ff5470); }
.hx-ring.r-warn { --ring: conic-gradient(from 210deg, #ffb547, #ffe08a, #ffb547); }
.hx-ring.busy::before { --ring: conic-gradient(from 0deg, rgba(47, 224, 208, 0) 0deg, #2fe0d0 300deg, #fff 360deg); animation: hx-spin 1.6s linear infinite; }
.hx-ring.busy { filter: drop-shadow(0 0 10px rgba(47, 224, 208, 0.35)); }

/* the three numbers */
.ac-card .ac-nums.hx-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border); }
.ac-card .ac-nums.hx-nums > div { background: none; border: 0; border-radius: 0; padding: 10px 12px; gap: 3px; }
.ac-card .ac-nums.hx-nums > div + div { border-left: 1px solid var(--border); }
.ac-card .hx-nums .ac-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 5px; font-family: var(--font-num); font-weight: 900; font-size: 21px; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; letter-spacing: 0; min-width: 0; }
.ac-card .hx-nums .ac-l { font-size: 11.5px; color: var(--text-faint); }
.ac-card .hx-nums .ac-delta { display: inline-block; font-family: var(--font); font-size: 11px; font-weight: 700; margin-left: 0; padding: 1px 5px; border-radius: 6px; align-self: center; }
.ac-card .hx-nums .ac-delta.up { background: var(--ok-soft); }
.ac-card .hx-nums .ac-delta.down { background: var(--danger-soft); }

/* live block on a card */
.ac-card .lv-card { border-radius: 12px; background: rgba(255, 255, 255, 0.022); border-color: var(--border); padding: 9px 12px; }
.ac-card.lv-busy-card .lv-card { background: rgba(47, 224, 208, 0.06); border-color: rgba(47, 224, 208, 0.25); }
.lv-next b { font-family: var(--font-num); font-weight: 900; letter-spacing: .01em; }

/* restriction / reach details: one line, open to read */
.hx-rx { border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); font-size: 12.5px; }
.hx-rx > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; color: var(--text-muted); min-width: 0; }
.hx-rx > summary::-webkit-details-marker { display: none; }
.hx-rx > summary .hx-rx-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-rx > summary b { color: var(--text); font-weight: 650; }
.hx-rx > summary svg { width: 14px; height: 14px; color: var(--text-faint); transition: transform .2s var(--ease); }
.hx-rx[open] > summary svg { transform: rotate(180deg); }
.hx-rx > summary:hover { color: var(--text); }
.hx-rx p { margin: 0; padding: 0 12px 10px 27px; color: var(--text-muted); line-height: 1.5; overflow-wrap: anywhere; animation: hx-drop .2s var(--ease); }
.hx-rx .hx-rx-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--text-faint); }
.hx-rx.bad { border-color: rgba(255, 84, 112, 0.28); background: rgba(255, 84, 112, 0.06); }
.hx-rx.bad .hx-rx-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.hx-rx.bad > summary b { color: #ff8a9c; }
.hx-rx.warn { border-color: rgba(255, 181, 71, 0.28); background: rgba(255, 181, 71, 0.05); }
.hx-rx.warn .hx-rx-dot { background: var(--warn); }
.hx-rx.warn > summary b { color: var(--warn); }
.hx-rx.ok .hx-rx-dot { background: var(--ok); }
.ac-card .ac-err { border-radius: 10px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* reel thumbnails */
.ac-cap.hx-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 -4px; color: var(--text-faint); font-size: 12px; }
.ac-cap.hx-cap b { color: var(--text); font-weight: 650; font-family: var(--font-head); font-size: 13px; }
.ac-thumbs { gap: 6px; }
.ac-tile { border-radius: 10px; border-color: rgba(255, 255, 255, 0.06); background: var(--surface-3); isolation: isolate; }
.ac-tile:not(.empty) img { transition: transform .35s var(--ease); }
.ac-tile:not(.empty):hover img { transform: scale(1.07); }
.ac-tile:not(.empty)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 4, 12, 0.82)); }
.ac-tile:not(.empty):hover { border-color: rgba(255, 141, 183, 0.55); }
.ac-views { z-index: 2; left: 7px; bottom: 6px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: none; }
.ac-tile.empty { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0 6px, transparent 6px 12px); border-color: var(--border); }

/* footer: when checked + actions, pinned to the bottom so the row of cards lines up */
.ac-card .ac-foot.hx-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hx-foot .muted.small { color: var(--text-faint); font-size: 11.5px; }
.hx-foot .ac-actions { display: inline-flex; gap: 6px; }
.hx-foot .btn-sm { height: 30px; border-radius: 9px; }
.hx-foot [data-publish] { border-color: rgba(255, 63, 134, 0.45); color: #ffc1d8; background: rgba(255, 63, 134, 0.08); }
.hx-foot [data-publish]:hover { background: rgba(255, 63, 134, 0.16); color: #fff; }

/* ---------- «Залетевшие рилсы», tasks, feed ---------- */
.ac-viral .card-head h2, .ac-tasks-h { font-family: var(--font-head); }
.ac-viral .ac-vacc { padding-left: 16px; padding-right: 16px; }
.ac-viral .ac-vnone { padding: 0 16px 14px; }
.ac-vhead b { font-family: var(--font-head); font-size: 14px; }
.ac-vrow { transition: background-color .15s; border-radius: 10px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.ac-vrow:hover { background: rgba(255, 255, 255, 0.025); }
.ac-vnum b { font-family: var(--font-num); font-weight: 900; font-size: 16px; color: #fff; }
.ac-vthumb { border-radius: 8px; overflow: hidden; }
.ac-tasks-h { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.ac-job { transition: background-color .15s; }
.ac-job:hover { background: rgba(255, 255, 255, 0.02); }
.ac-job-ch { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-family: var(--font-num); font-weight: 900; font-size: 12px; }
.ac-bar { accent-color: var(--live); }
progress.ac-bar { -webkit-appearance: none; appearance: none; height: 4px; border: 0; border-radius: 4px; background: var(--surface-3); overflow: hidden; width: 100%; }
progress.ac-bar::-webkit-progress-bar { background: var(--surface-3); border-radius: 4px; }
progress.ac-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--live), var(--violet)); border-radius: 4px; transition: width .6s var(--ease); }
progress.ac-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--live), var(--violet)); }
.task-card { border-radius: 16px; transition: transform .22s var(--ease), box-shadow .22s, border-color .2s; }
.task-card:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: var(--border-strong); }
.task-title { font-size: 15px; font-weight: 700; }
.lv-feed { border-radius: 16px; }
.lv-ev { transition: background-color .15s; }
.lv-ev:hover { background: rgba(255, 255, 255, 0.022); }
.lv-ic { border-radius: 9px; }
.lv-info .lv-ic { background: var(--live-soft); color: var(--live); }
.lv-seg { border-radius: 10px; }
.lv-seg button.on { background: var(--surface-3); box-shadow: inset 0 0 0 1px #45406a; }
@keyframes lv-flash { 0% { background: rgba(47, 224, 208, 0.14); } 100% { background: transparent; } }

/* dialogs and menus inherit the tokens; a touch more depth */
.menu { border-radius: 12px; box-shadow: var(--shadow); }

/* ---------- Mobile ---------- */
@media (max-width: 700px) {
  .topbar-in { height: 54px; }
  .page-title { font-size: 22px; }
  .toolbar-end { justify-content: flex-start; margin-left: 0; flex-basis: 100%; }
  .toolbar-end .btn { height: 34px; padding: 0 11px; }
  #tab-accounts .ac-ws { flex-wrap: wrap; height: auto; width: 100%; }
  #tab-accounts .ac-ws > * { flex: 1 1 auto; min-height: 34px; justify-content: center; }
  #tab-accounts .ac-ws .ac-ws-chip { flex-basis: 100%; max-width: none; border-bottom: 1px solid var(--border-strong) !important; }
  #tab-accounts .ac-ws .ac-ws-chip + * { border-left: 0 !important; }
  .ac-hrow { grid-auto-columns: 86%; }
  .ac-card.hx-card:hover { transform: none; }
  .hx-ring { width: 46px; height: 46px; grid-row: span 2; }
  .ac-card .hx-nums .ac-n { font-size: 18px; }
  .ac-card .ac-nums.hx-nums > div { padding: 9px 10px; }
  .hx-top { grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; }
  .hx-pills { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
  .hx-ring .ac-ava.lv-ava.sm { width: 37px; height: 37px; }
  .bottombar { background: rgba(12, 10, 24, 0.86); border-top-color: var(--border); }
  .bottombar button.active svg { color: var(--accent); }
}

/* ---------- Motion ---------- */
@keyframes hx-ring-live { 0% { box-shadow: 0 0 0 0 rgba(47, 224, 208, .6); } 70% { box-shadow: 0 0 0 8px rgba(47, 224, 208, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 224, 208, 0); } }
@keyframes hx-spin { to { transform: rotate(360deg); } }
@keyframes hx-grow { from { transform: scaleY(0); opacity: 0; } }
@keyframes hx-drop { from { opacity: 0; transform: translateY(-4px); } }
@keyframes hx-shimmer { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
#ac-root:empty, #tasks-acc:empty { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .hx-ring.busy::before, .hx-bars line { animation: none !important; }
}

/* 14.11: link in the highlight (hourly browser check) */
.hx-link { margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); font-size: 12px; color: var(--text-muted); display: block; }
.hx-link > i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); margin-right: 7px; vertical-align: middle; }
.hx-link.ok > i { background: #22c55e; }
.hx-link.warn > i { background: #f59e0b; }
.hx-link.bad { border-color: rgba(239, 68, 68, 0.45); color: var(--text); }
.hx-link.bad > i { background: #ef4444; }
.hx-link-banner { margin-bottom: 12px; }

/* 16.11: originals for re-uploads (Reels Taker) */
.ac-rsrc .ac-rs-accs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ac-rs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; cursor: pointer; }
.ac-rs-chip.on { border-color: var(--text-muted); }
.ac-rs-row { cursor: pointer; }
.ac-rs-row input { margin-right: 8px; }
.ac-rs-foot { display: flex; gap: 12px; align-items: center; margin-top: 12px; position: sticky; bottom: 0; }
.ac-rs-ok .ac-rs-dot, .ac-rs-bad .ac-rs-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.ac-rs-ok .ac-rs-dot { background: #22c55e; }
.ac-rs-bad .ac-rs-dot { background: #ef4444; }

/* 16.11: expenses inside the «Телефоны» tab */
.phones-expenses { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.phones-exp-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
