/* YM Pilot v4 — система дизайна по образцу Madgicx Workspace, на наш лад.
   Холодный светлый фон, белые карточки, тёмно-синее меню, один акцент (фирменный оранжевый YM), цифры с дельтой и линией. */
:root {
  --bg: #f5f5f4; --surface: #ffffff; --surface-2: #f2f2f1; --line: #e6e6e4;
  --ink: #1c1c1f; --ink-2: #454545; --ink-3: #8a8a8a;
  --accent: #e10f1a; --accent-2: #ff3a40; --accent-soft: #fdeceb;
  --btn: #1c1c1f; --btn-ink: #fff;
  --good: #12924f; --good-soft: #e7f5ed; --warn: #b8760c; --warn-soft: #fbf2e0; --bad: #e10f1a; --bad-soft: #fdeceb;
  --info: #3d3d3d; --info-soft: #efefee;
  --side: #1c1c1f; --side-2: #1d1d1d; --side-ink: #a6a6a6;
  --radius: 14px; --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --font: "Onest", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #1c1c1f; --surface: #151515; --surface-2: #1d1d1d; --line: #2a2a2a; --ink: #f4f4f3; --ink-2: #c2c2c0; --ink-3: #858583;
  --accent-soft: #3a1214; --btn: #f4f4f3; --btn-ink: #1c1c1f; --side: #141416; --side-2: #1d1d1d;
  --good-soft: #10291d; --warn-soft: #2e230d; --bad-soft: #3a1214; --info-soft: #222;
}
html, body { font-size: 14px; letter-spacing: -.005em; }
.btn { border-radius: 10px; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(225, 15, 26, .28); }
.card { border-radius: var(--radius); }

/* ── Меню слева ── */
.ws-shell .side { padding: 18px 12px; gap: 4px; }
.ws-shell .brand { padding: 2px 10px 12px; }
.ws-shell .brand .logo { background: var(--accent); }
.ws-shell .ws-pick, .ws-shell #wsPick { display: none; }
.ws-proj { margin: 0 0 10px; position: relative; }
.ws-proj summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #222b45; border-radius: 12px; cursor: pointer; color: #fff; }
.ws-proj summary::-webkit-details-marker { display: none; }
.ws-proj summary b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13.5px; }
.ws-pi { width: 24px; height: 24px; border-radius: 7px; background: #fff; color: var(--side); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.ws-pc { font-size: 10px; color: var(--side-ink); letter-spacing: -2px; writing-mode: vertical-lr; }
.ws-pl { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: #121a30; border: 1px solid #222b45; border-radius: 12px; padding: 6px; max-height: 60vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.ws-pl a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none !important; font-size: 13px; }
.ws-pl a:hover, .ws-pl a.on { background: var(--side-2); color: #fff; }
.ws-pl svg { width: 16px; height: 16px; }
.ws-nav a { padding: 10px 12px; font-size: 14px; font-weight: 500; border-radius: 10px; }
.ws-nav a.on { background: var(--side-2); color: #fff; font-weight: 600; }
.ws-nav svg { width: 19px; height: 19px; }
.ws-pct { font-size: 11px; color: var(--side-ink); }
.ws-shell .nav-h { margin-top: 14px; }
.ws-shell .ws-acc a { padding: 7px 12px; font-size: 13px; }

/* ── Шапка экрана ── */
.top { background: var(--bg); border-bottom: 0; padding: 22px 32px 6px; position: static; }
.top .crumbs h1 { font-size: 30px; font-weight: 750; letter-spacing: -.035em; line-height: 1.15; }
.top .crumbs .sub { font-size: 12.5px; margin-top: 4px; }
.content { padding: 14px 32px 120px; max-width: 1480px; }
.ws-seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.ws-seg a { padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-decoration: none !important; }
.ws-seg a.on { background: var(--surface-2); color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.08); }

/* ── Карточки ── */
.ws-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.ws-card.ws-flat { padding: 6px; }
.ws-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ws-card-h h3 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ws-card-h h3 span:not(.ws-n) { font-weight: 500; font-size: 13px; color: var(--ink-3); }
.ws-card-h h3 svg { width: 18px; height: 18px; color: var(--accent); }
.ws-link { font-size: 13px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 10px; text-decoration: none !important; }
.ws-link:hover { background: var(--surface-2); }
.ws-n { background: var(--bad-soft); color: var(--bad); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.ws-note { font-size: 12px; color: var(--ink-3); margin: 10px 2px 0; }
.ws-empty { padding: 30px 10px; text-align: center; color: var(--ink-3); }

/* здоровье */
.ws-health { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px; margin-bottom: 14px; font-size: 13.5px; }
.ws-health i { --c: var(--bad); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800;
  background: radial-gradient(closest-side, var(--surface) 72%, transparent 74%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); }
.ws-health.good i { --c: var(--good); } .ws-health.warn i { --c: var(--warn); }
.ws-health em { font-style: normal; font-weight: 600; color: var(--bad); } .ws-health.good em { color: var(--good); } .ws-health.warn em { color: var(--warn); }
.ws-health a { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }

/* KPI */
.ws-legend { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.ws-legend i { width: 16px; height: 0; border-top: 2px solid var(--ink-2); display: inline-block; margin-left: 8px; }
.ws-legend i.p { border-top: 2px dashed var(--ink-3); }
.ws-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ws-kpi { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 8px; display: grid; gap: 2px; transition: border-color .15s, box-shadow .15s; }
.ws-kpi:hover { border-color: #c9d3e2; box-shadow: 0 6px 20px rgba(15,23,42,.06); }
.ws-kpi-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ws-kpi-h small { font-weight: 500; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.ws-kpi > b { font-size: 28px; font-weight: 750; letter-spacing: -.03em; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; }
.wd { font-size: 12.5px; font-weight: 600; } .wd.up { color: var(--good); } .wd.down { color: var(--bad); } .wd.none { color: var(--ink-3); }
.wsp { width: 100%; height: 56px; display: block; margin-top: 8px; overflow: visible; }
.wsp-l { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wsp-p { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; opacity: .8; }
.wsp-a { fill: url(#none); fill: var(--surface-2); opacity: .9; }
.wsp-d { fill: var(--ink-2); }
.wsp-0 { stroke: var(--line); stroke-width: 2; }

/* две колонки: ИИ и «требует внимания» */
.ws-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ws-agent { border: 1.5px solid #c9d6f5; background: linear-gradient(180deg, #fbfcff, var(--surface)); }
:root[data-theme="dark"] .ws-agent { border-color: #2c3d66; background: var(--surface); }
.ws-agent h2 { font-size: 20px; margin: -4px 0 12px; }
.ws-ask { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; }
.ws-ask textarea { border: 0; background: transparent; resize: none; outline: none; font-size: 14px; min-height: 44px; }
.ws-ask .btn { justify-self: end; }
.ws-q-h { font-size: 12.5px; color: var(--ink-3); margin: 16px 0 8px; font-weight: 600; }
.ws-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-quick a { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; color: var(--ink); text-decoration: none !important; background: var(--surface); transition: border-color .15s, transform .15s; }
.ws-quick a:hover { border-color: var(--accent); transform: translateY(-1px); }
.ws-quick span svg { width: 18px; height: 18px; color: var(--ink-2); }
.ws-quick b { font-size: 14px; margin-top: 6px; } .ws-quick small { color: var(--ink-3); font-size: 12px; }
.ws-quick em { position: absolute; top: 12px; right: 12px; color: var(--ink-3); } .ws-quick em svg { width: 15px; height: 15px; }
.ws-att-l { display: grid; gap: 10px; max-height: 470px; overflow: auto; padding-right: 2px; }
.ws-al { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.ws-al-t { display: grid; gap: 3px; } .ws-al-t b { font-size: 15px; }
.ws-sev { font-size: 11.5px; font-weight: 700; width: max-content; padding: 1px 8px; border-radius: 99px; }
.ws-sev.high { background: var(--bad-soft); color: var(--bad); } .ws-sev.mid { background: var(--warn-soft); color: var(--warn); } .ws-sev.low { background: var(--good-soft); color: var(--good); }
.ws-al-n { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.ws-al-n b { color: var(--ink); font-size: 13.5px; } .ws-al-n span:last-child b { color: var(--good); } .ws-al-n svg { width: 14px; height: 14px; }
.ws-al p { margin: 0; color: var(--ink-2); font-size: 13px; }
.ws-al-go { justify-self: start; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 13px; padding: 0; cursor: pointer; }

/* таблица кампаний */
.ws-tw { overflow-x: auto; }
.ws-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.ws-t th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ws-t th.r, .ws-t td.r { text-align: right; }
.ws-t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ws-t tbody tr { cursor: pointer; transition: background .12s; } .ws-t tbody tr:hover td { background: var(--surface-2); }
.ws-t tr:last-child td { border-bottom: 0; }
.ws-cn { max-width: 340px; } .ws-cn b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ws-cn small { color: var(--ink-3); font-size: 12px; }
.ws-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.ws-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); opacity: .5; }  /* статус, не тумблер: ставит на паузу кнопка в конце строки */
.ws-st.on { color: var(--ink); } .ws-st.on::before { background: #12a150; opacity: 1; }
.ws-cell { min-width: 112px; } .ws-cell b { display: block; font-variant-numeric: tabular-nums; font-weight: 600; }
.ws-cell .wd { display: block; font-size: 11.5px; }
.ws-cell .wsp { height: 22px; margin-top: 3px; } .ws-cell .wsp-l { stroke-width: 1.6; stroke: var(--ink-3); }
.ws-t tr.detail td { background: var(--surface-2); cursor: default; padding: 16px 18px; }

/* таблетки метрик */
.ws-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ws-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 11px; font-size: 13px; font-weight: 600; }
.ws-pill a { color: var(--ink-3); text-decoration: none !important; font-size: 15px; line-height: 1; }
select.ws-pill.add { color: var(--accent); cursor: pointer; appearance: none; border-style: dashed; }

/* сетка креативов */
.ws-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ws-sort { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.ws-sort select { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 10px; font-weight: 600; color: var(--ink); }
.ws-ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.ws-ad { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; box-shadow: var(--shadow); }
.ws-ad:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,23,42,.10); }
.ws-ad.off .ws-ad-m img { filter: grayscale(.6); opacity: .75; }
.ws-ad-m { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; }
.ws-ad-m img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-ad-ph { display: grid; place-items: center; height: 100%; font-size: 44px; }
.ws-ad-t, .ws-ad-p { position: absolute; left: 10px; bottom: 10px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--ink); backdrop-filter: blur(6px); }
.ws-ad-t.good { color: var(--good); } .ws-ad-t.bad { color: var(--bad); } .ws-ad-t.warn { color: var(--warn); } .ws-ad-t.info { color: var(--info); }
.ws-ad-p { left: auto; right: 10px; top: 10px; bottom: auto; background: rgba(15,23,42,.75); color: #fff; }
.ws-ad-b { padding: 12px 14px 14px; }
.ws-ad-b > b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-ad-b > small { display: block; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.ws-ad-g { display: grid; gap: 4px; }
.ws-ad-g div { display: flex; justify-content: space-between; font-size: 12.5px; } .ws-ad-g span { color: var(--ink-3); }
.ws-ad-g b { font-variant-numeric: tabular-nums; } .ws-ad-g .good b { color: var(--good); } .ws-ad-g .bad b { color: var(--bad); }

/* строка «спросить ИИ» */
.ws-ai { position: fixed; bottom: 18px; left: calc(50% + 126px); transform: translateX(-50%); width: min(560px, calc(100vw - 300px)); z-index: 40;
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 14px; box-shadow: 0 12px 40px rgba(15,23,42,.14); }
.ws-ai-i svg { width: 18px; height: 18px; color: var(--accent); }
.ws-ai input { flex: 1; border: 0; outline: none; background: transparent; font-size: 14px; min-width: 0; }
.ws-ai button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ws-ai button svg { width: 16px; height: 16px; }

@media (max-width: 1100px) { .ws-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ws-two { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .top { padding: 14px 16px 4px; } .content { padding: 10px 16px 110px; }
  .top .crumbs h1 { font-size: 24px; }
  .ws-ai { left: 50%; width: calc(100vw - 32px); }
  .ws-quick { grid-template-columns: 1fr; }
  .ws-ads { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* меню тёмное на всех страницах (calm.css делал его светлым) */
.side { border-right: 0; }
.brand, .me .who, :root[data-theme="dark"] .brand { color: #fff; }
.brand small, .ws-pick .k, .me .who span, .nav-h { color: #7f8aa3; }
.ws-pick { background: #121a30; border-color: #222b45; color: #fff; }
.nav a:hover, .proj a:hover, .nav a.on, .proj a.on { background: var(--side-2); color: #fff; }
.side .me { border-top-color: #1c2440; }
.side .icon-btn { color: var(--side-ink); }
.tabs { background: var(--bg); }
.tabs a.on { background: var(--ink); color: var(--surface); }
body:has(.ws-ai) .cw-fab { display: none; }
.ws-cn { max-width: 280px; }
.ws-t td:last-child { white-space: nowrap; }

/* ── Фирменный вид YM Agency: чёрный · белый · красный (31.10, владелец: «не 1в1, свой стиль») ── */
.brand .logo, .ws-shell .brand .logo { background: var(--accent); border-radius: 8px; font-weight: 900; font-size: 13px; color: #fff; letter-spacing: -.04em; }
.brand { font-weight: 800; letter-spacing: -.02em; }
.ws-proj summary, .ws-pl { border-color: #262626; } .ws-pl { background: #141414; }
.ws-pi { border-radius: 6px; background: var(--accent); color: #fff; }
.nav a.on, .ws-nav a.on { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 var(--accent); border-radius: 4px 10px 10px 4px; }
.nav a.on svg, .ws-nav a.on svg { color: var(--accent); opacity: 1; }
.ws-nav .cnt, .nav .cnt { background: var(--accent); color: #fff; }
.top .crumbs h1 { font-weight: 800; letter-spacing: -.04em; }
.top .crumbs h1::after { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--accent); margin-left: 6px; vertical-align: .55em; }

.ws-card, .ws-ad { border-radius: 16px; }
.ws-card-h h3 { text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; font-weight: 800; }
.ws-card-h h3 span:not(.ws-n) { text-transform: none; letter-spacing: 0; }
.ws-seg a.on { background: var(--ink); color: #fff; box-shadow: none; }
.ws-kpi { border-radius: 12px; }
.ws-kpi-h span { text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; font-weight: 700; }
.ws-kpi:first-child { background: var(--ink); border-color: var(--ink); color: #fff; }
.ws-kpi:first-child .ws-kpi-h span, .ws-kpi:first-child .ws-kpi-h small { color: #a6a6a6; }
.ws-kpi:first-child .wsp-l { stroke: #fff; } .ws-kpi:first-child .wsp-p { stroke: #6b6b6b; } .ws-kpi:first-child .wsp-a { fill: #1d1d1d; }
.wsp-l { stroke: var(--ink); } .wsp-d { fill: var(--accent); }
.ws-legend i { border-top-color: var(--ink); }
.wd.down { color: var(--accent); }

.ws-agent { background: var(--ink); border: 0; color: #fff; }
:root[data-theme="dark"] .ws-agent { background: #1a1a1a; }
.ws-agent .ws-card-h h3 { color: #fff; } .ws-agent .ws-card-h h3 svg { color: var(--accent); }
.ws-agent h2 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.ws-agent .ws-ask { background: #1a1a1a; border-color: #2c2c2c; } .ws-agent .ws-ask textarea { color: #fff; } .ws-agent .ws-ask textarea::placeholder { color: #8a8a8a; }
.ws-agent .ws-q-h { color: #8a8a8a; }
.ws-agent .ws-quick a { background: #141414; border-color: #2a2a2a; color: #fff; }
.ws-agent .ws-quick a:hover { border-color: var(--accent); }
.ws-agent .ws-quick span svg { color: var(--accent); } .ws-agent .ws-quick small { color: #8a8a8a; }

.ws-al { border-left: 3px solid var(--line); border-radius: 6px 12px 12px 6px; }
.ws-al:has(.ws-sev.high) { border-left-color: var(--accent); } .ws-al:has(.ws-sev.mid) { border-left-color: var(--warn); } .ws-al:has(.ws-sev.low) { border-left-color: var(--good); }
.ws-n { background: var(--accent); color: #fff; }

.ws-pill { border-radius: 8px; } select.ws-pill.add { color: var(--accent); border-color: var(--accent); }
.ws-ad-t { border-radius: 6px; } .ws-ad-p { background: rgba(0,0,0,.8); }
.ws-ai { border-radius: 14px; border: 1.5px solid var(--ink); }
.ws-ai button { background: var(--accent); }
.ws-health i { border-radius: 50%; }
.ws-link { border-radius: 8px; }

/* клиентский экран и общие блоки — в фирменные цвета */
:root { --msg-bg: #f2f2f1; --msg-me: #1c1c1f; --msg-line: #e6e6e4; --msg-ink: #e10f1a; }
:root[data-theme="dark"] { --msg-me: #e10f1a; --msg-bg: #1d1d1d; --msg-line: #2a2a2a; --msg-ink: #ff5a60; }
.msgr .cs-av, .cw .msg-av, .msg-av { background: var(--accent) !important; }
.calm-hero, .calm-hero.good { background: radial-gradient(90% 130% at 100% 0%, rgba(225,15,26,.45), transparent 55%), #1c1c1f; box-shadow: 0 20px 50px -24px rgba(0,0,0,.6); }
.calm-hero.good { background: radial-gradient(90% 130% at 100% 0%, rgba(18,146,79,.4), transparent 55%), #1c1c1f; }
.calm-hero h1 em, .calm-hero .hl { color: var(--accent-2); }
.calm-todo, .calm-todo.big { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, var(--accent), #1c1c1f) border-box; }
.calm-ico, [data-theme=dark] .calm-ico, .set-rules > summary span { background: var(--accent-soft); }
.calm-yes { background: var(--accent); box-shadow: 0 8px 20px -10px rgba(225,15,26,.7); }
.calm-tiles > div::after, .calm-tiles > div.t1::after, .calm-tiles > div.t2::after { background: none; }
.an-kpi::before { background: var(--accent); }
.bl-spend, [data-theme=dark] .bl-spend { background: var(--accent-soft); }
.t-meta i, .t-crm i, .t-mode i, .t-rules i { background: var(--ink); }
.cs-tabs a.on { background: var(--ink); color: #fff; }
.st-bg { background: radial-gradient(90% 70% at 100% 0%, #e10f1a, transparent 60%), #1c1c1f; }
.st[data-bg="g2"] .st-bg { background: radial-gradient(90% 70% at 0% 100%, #e10f1a, transparent 60%), #111; }
.st[data-bg="g3"] .st-bg { background: #1c1c1f; }
.st[data-bg="g4"] .st-bg { background: linear-gradient(160deg, #e10f1a, #7a0710); }
.st[data-bg="g5"] .st-bg { background: radial-gradient(80% 60% at 50% 100%, #e10f1a, transparent 65%), #1c1c1f; }

/* ══ «Плитки» — выбор владельца 31.10 (образец web/mock/v3.html): чёрная полоса сверху, светлый фон, белые плитки 26px ══ */
:root { --bg: #ececea; --surface-2: #f4f4f3; --line: #e4e4e2; }
:root[data-theme="dark"] { --bg: #1c1c1f; }
.ws-shell { display: block; }
.ws-shell .side { position: fixed; right: 0; left: auto; top: 0; width: 290px; height: 100vh; z-index: 150; transform: translateX(100%); transition: transform .22s; }
.ws-shell .side.open { transform: none; box-shadow: -20px 0 60px rgba(0,0,0,.35); }
.ws-shell .side.open + .side-bg { display: block; position: fixed; inset: 0; background: rgba(10,10,10,.45); z-index: 140; }
.ws-shell .burger { display: none !important; }
.tb { display: flex; align-items: center; gap: 18px; padding: 12px 28px; background: #1c1c1f; color: #fff; position: sticky; top: 0; z-index: 60; }
.tb-logo { display: flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: -.03em; font-size: 17px; color: #fff; text-decoration: none !important; flex: none; }
.tb-logo i { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; font-style: normal; font-size: 12px; }
.tb-nav { display: flex; gap: 2px; background: #1a1a1a; padding: 4px; border-radius: 14px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tb-nav::-webkit-scrollbar { display: none; }
.tb-nav a { color: #9a9a9a; text-decoration: none !important; padding: 8px 13px; border-radius: 10px; font-weight: 600; font-size: 13.5px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.tb-nav a.on { background: #fff; color: #1c1c1f; } .tb-nav a:hover:not(.on) { color: #fff; }
.tb-nav .cnt { background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 0 6px; line-height: 17px; }
.tb-nav small { font-size: 10.5px; color: var(--accent-2); font-weight: 700; }
.tb-proj { margin-left: auto; position: relative; flex: none; }
.tb-proj summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 13px; color: #9a9a9a; }
.tb-proj summary::-webkit-details-marker { display: none; }
.tb-proj summary b { color: #fff; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-proj .ws-pl { left: auto; right: 0; width: 260px; }
.tb-av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); border: 0; color: #fff; font-weight: 800; cursor: pointer; flex: none; }

.ws-shell .top { padding: 26px 28px 4px; max-width: 1416px; margin: 0 auto; width: 100%; align-items: flex-end; }
.ws-shell .top .crumbs h1 { font-size: 40px; font-weight: 900; letter-spacing: -.05em; line-height: 1.02; }
.ws-shell .top .crumbs h1::after { display: none; }
.ws-shell .top .crumbs .sub { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.ws-shell .content { padding: 16px 28px 120px; max-width: 1416px; margin: 0 auto; width: 100%; }
.ws-seg { background: var(--surface); border: 0; border-radius: 14px; padding: 4px; }
.ws-seg a { padding: 8px 15px; border-radius: 10px; font-weight: 700; }

/* все карточки кабинета — плитками */
.ws-card, .ws-ad, .card, .ws-health { border: 0; border-radius: 26px; box-shadow: none; }
.ws-card { padding: 22px 24px; }
.ws-kpi { border-radius: 18px; }
.ws-ad { border-radius: 22px; }
.ws-ad:hover, .ws-card:hover { box-shadow: 0 18px 40px -18px rgba(0,0,0,.25); }
.ws-card-h h3 { text-transform: none; letter-spacing: -.01em; font-size: 15px; font-weight: 800; }
.ws-link { border: 0; background: var(--surface-2); border-radius: 99px; }
.ws-ai { left: 50%; width: min(560px, calc(100vw - 32px)); border-radius: 18px; border: 2px solid var(--ink); }

/* главная-плитки */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); gap: 14px; }
.bento .t { background: var(--surface); border-radius: 26px; padding: 20px 22px; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; min-width: 0; }
.bento .t:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.25); }
.bento .lb { font-size: 13px; font-weight: 700; color: var(--ink-3); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bento .more { color: var(--ink); font-weight: 700; text-decoration: none !important; }
.bento .big { font-size: 54px; font-weight: 900; letter-spacing: -.055em; line-height: 1; font-variant-numeric: tabular-nums; }
.bento .big.red { color: var(--accent); }
.bento .d { font-weight: 700; font-size: 13px; } .bento .up { color: var(--good); } .bento .dn { color: var(--accent); }
.bento .money { grid-column: span 5; grid-row: span 3; background: #1c1c1f; color: #fff; display: flex; flex-direction: column; }
.money .lb { color: #888; } .money .big { font-size: 76px; margin: 20px 0 8px; } .money .sub { color: #aaa; font-size: 15px; }
.money .split { margin-top: auto; padding-top: 18px; } .money .bar { display: flex; min-height: 54px; border-radius: 16px; overflow: hidden; background: #1c1c1c; }
.money .bar i { background: var(--accent); display: flex; align-items: center; padding-left: 14px; font-style: normal; font-weight: 800; font-size: 14px; width: var(--w); white-space: nowrap; }
.money .bar s { text-decoration: none; display: flex; align-items: center; padding: 0 14px; color: #888; font-weight: 700; font-size: 13px; margin-left: auto; }
.money .k { display: flex; justify-content: space-between; color: #888; font-size: 12.5px; margin-top: 8px; }
.bento .alarm { grid-column: span 4; grid-row: span 3; background: var(--accent); color: #fff; display: flex; flex-direction: column; }
.alarm.grow { background: var(--good); } .alarm.calm { background: var(--surface); color: var(--ink); }
.alarm .lb { color: rgba(255,255,255,.75); } .alarm.calm .lb { color: var(--ink-3); }
.alarm h2 { font-size: 30px; font-weight: 900; letter-spacing: -.04em; line-height: 1.05; margin: 16px 0 10px; color: inherit; }
.alarm p { margin: 0; color: rgba(255,255,255,.85); } .alarm.calm p { color: var(--ink-2); }
.alarm .ft { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.alarm .ft span { background: rgba(255,255,255,.16); padding: 8px 12px; border-radius: 12px; font-weight: 700; font-size: 13px; }
.alarm .go { margin-left: auto; background: #fff; color: var(--accent); border: 0; border-radius: 14px; padding: 12px 18px; font: 800 14px var(--font); cursor: pointer; text-decoration: none !important; }
.alarm.grow .go { color: var(--good); }
.bento .cpl { grid-column: span 3; grid-row: span 2; } .cpl .big { margin-top: 14px; }
.cpl .gauge { margin-top: 16px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--good) 0 25%, #ffc94d 25% 50%, var(--accent) 50%); position: relative; }
.cpl .gauge.plain { background: var(--surface-2); }
.cpl .gauge b { position: absolute; top: -5px; width: 4px; height: 20px; background: var(--ink); border-radius: 2px; }
.cpl small { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 11.5px; margin-top: 7px; }
.bento .leads { grid-column: span 3; display: flex; align-items: center; gap: 14px; } .leads .big { font-size: 40px; margin: 2px 0; }
.leads .d .wd { font-size: 12px; } .leads svg { margin-left: auto; }
.bento .ads { grid-column: span 7; grid-row: span 2; }
.ads .row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ads .ad { border-radius: 16px; background: var(--surface-2); padding: 8px; cursor: pointer; min-width: 0; transition: transform .15s; } .ads .ad:hover { transform: translateY(-2px); }
.ads .m { height: 112px; border-radius: 12px; background: #1c1c1f; display: grid; place-items: center; font-size: 30px; position: relative; overflow: hidden; }
.ads .m img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ads .m em { position: absolute; left: 6px; top: 6px; font-style: normal; font-size: 10.5px; font-weight: 800; background: #fff; color: #1c1c1f; padding: 2px 7px; border-radius: 6px; max-width: calc(100% - 12px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ads .ad.best { background: var(--accent); color: #fff; } .ads .ad.best span { color: #ffe1e2; }
.ads .ad b { display: block; font-size: 12.5px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ads .ad span { font-size: 12px; color: var(--ink-2); }
.bento .ai { grid-column: span 5; grid-row: span 2; background: linear-gradient(135deg, var(--surface), var(--surface) 60%, var(--accent-soft)); box-shadow: inset 0 0 0 2px var(--ink); }
.ai h2 { margin: 10px 0 12px; font-size: 24px; letter-spacing: -.035em; font-weight: 900; }
.ai form { display: flex; background: var(--surface-2); border-radius: 14px; padding: 6px; }
.ai input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 10px; font: inherit; outline: none; color: var(--ink); }
.ai button { border: 0; background: var(--ink); color: var(--surface); border-radius: 10px; padding: 0 16px; font: 800 15px var(--font); cursor: pointer; }
.ai .ch { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ai .ch a { font-size: 12.5px; color: var(--ink); text-decoration: none !important; background: var(--surface); border: 1px solid var(--line); padding: 5px 10px; border-radius: 99px; } .ai .ch a:hover { border-color: var(--accent); }
.bento .camps { grid-column: span 7; grid-row: span 2; }
.ci { display: grid; grid-template-columns: minmax(0, 1fr) 70px 56px 80px; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink); text-decoration: none !important; }
.ci.h { border-top: 0; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); padding-bottom: 4px; }
.ci b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; } .ci span { text-align: right; font-variant-numeric: tabular-nums; } .ci span.red { color: var(--accent); font-weight: 700; }
.ci .st { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; margin-right: 8px; } .ci .st.off { background: #ccc; }
a.ci:hover b { color: var(--accent); }
.bento .next { grid-column: span 5; grid-row: span 2; }
.nx { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); } .nx:first-of-type { margin-top: 8px; }
.nx i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; background: #ffc94d; color: #1c1c1f; display: grid; place-items: center; font-weight: 900; font-size: 13px; flex: none; }
.nx.bad i { background: var(--accent); color: #fff; } .nx.good i { background: var(--good); color: #fff; }
.nx div { flex: 1; min-width: 0; } .nx b { display: block; } .nx span { color: var(--ink-2); font-size: 13px; }
.nx a { color: var(--ink-3); } .nx a svg { width: 18px; height: 18px; } .nx a:hover { color: var(--accent); }
body:has(.bento) .ws-ai, body:has(.bento) .cw-fab { display: none; }

/* ══ 06.11: Айя наверху главной («большая часть работы через ИИ-таргетолога»), автопилот показывает, что сделал сам ══ */
.aya-hero { --g-hot: linear-gradient(120deg, #ff7a3d 0%, #e2552b 30%, #e2457a 65%, #8b5cf6 100%);
  position: relative; overflow: hidden; border-radius: 28px; padding: 22px 24px 18px; margin-bottom: 14px; color: #fff; background: var(--g-hot);
  box-shadow: 0 24px 50px -30px rgba(226, 69, 122, .7); }
.aya-hero::before { content: ""; position: absolute; width: 340px; height: 340px; right: -90px; top: -170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.32), transparent 65%); pointer-events: none; }
.ah-top { display: flex; align-items: center; gap: 14px; position: relative; }
.ah-av { width: 48px; height: 48px; border-radius: 16px; background: rgba(255,255,255,.22); display: grid; place-items: center; font-weight: 900; font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); flex: none; }
.ah-t { flex: 1; min-width: 0; } .ah-t b { display: block; font-size: 20px; font-weight: 900; letter-spacing: -.03em; }
.ah-t span { display: block; color: rgba(255,255,255,.88); font-size: 14px; margin-top: 2px; }
.ah-mode { flex: none; background: rgba(255,255,255,.18); color: #fff; padding: 7px 12px; border-radius: 99px; font-weight: 800; font-size: 12.5px;
  text-decoration: none !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); white-space: nowrap; }
.ah-mode.on { background: #fff; color: #c2410c; }
.aya-hero form { position: relative; display: flex; gap: 6px; margin-top: 16px; background: #fff; border-radius: 18px; padding: 6px; box-shadow: 0 12px 30px -16px rgba(0,0,0,.35); }
.aya-hero input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 14px; font: 500 15.5px var(--font); outline: none; color: #1d1d21; }
.aya-hero input::placeholder { color: #8a8990; }
.aya-hero form button { border: 0; background: #1d1d21; color: #fff; border-radius: 13px; padding: 0 18px; font: 800 14.5px var(--font); cursor: pointer; white-space: nowrap; }
.aya-hero form button:hover { background: #33333a; }
.aya-hero .ch { position: relative; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.aya-hero .ch a { font-size: 13px; font-weight: 700; color: #fff; text-decoration: none !important; background: rgba(255,255,255,.16); padding: 7px 12px; border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); transition: background .15s; }
.aya-hero .ch a:hover { background: rgba(255,255,255,.3); }
:root[data-theme="dark"] .aya-hero form { background: #232327; } :root[data-theme="dark"] .aya-hero input { color: #f2f1ed; }
.bento .camps { grid-column: span 12; }
.bento .robot { grid-column: span 4; grid-row: span 3; display: flex; flex-direction: column; box-shadow: inset 0 0 0 2px var(--good); }
.robot h2 { font-size: 26px; font-weight: 900; letter-spacing: -.035em; line-height: 1.1; margin: 12px 0 6px; }
.rb { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.rb i { font-style: normal; width: 28px; height: 28px; border-radius: 9px; background: var(--good-soft, #e7f7ee); display: grid; place-items: center; font-size: 14px; flex: none; }
.rb div { min-width: 0; } .rb b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.rb span { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rb.soon i { background: #fff1c2; } .rb.watch i { background: var(--surface-2); } .rb.watch span { -webkit-line-clamp: 4; }
.bento .next.hot { box-shadow: inset 0 0 0 2px var(--accent); }
@media (max-width: 1180px) { .bento .robot { grid-column: span 6; } }
@media (max-width: 860px) {
  .aya-hero { padding: 18px 16px 14px; border-radius: 22px; } .ah-top { flex-wrap: wrap; } .ah-mode { order: 3; }
  .ah-t b { font-size: 18px; } .aya-hero form button { padding: 0 14px; }
}

@media (max-width: 1180px) {
  .bento .money, .bento .alarm { grid-column: span 6; }
  .bento .cpl, .bento .leads { grid-column: span 6; grid-row: span 1; }
  .bento .ads, .bento .ai, .bento .camps, .bento .next { grid-column: span 12; }
}
@media (max-width: 860px) {
  .tb { padding: 10px 16px; gap: 10px; flex-wrap: wrap; } .tb-nav { order: 3; width: 100%; } .tb-proj summary small { display: none; }
  .ws-shell .top { padding: 18px 16px 4px; } .ws-shell .top .crumbs h1 { font-size: 30px; } .ws-shell .content { padding: 12px 16px 110px; }
  .bento .t { grid-column: span 12 !important; grid-row: auto !important; }
  .money .big { font-size: 56px; } .ads .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ══ Мягче (владелец 31.10: «чёрный агрессивно, а помягче»): шапка светлая, вместо чистого чёрного — графит ══ */
:root { --deep: #2b2b31; --ink: #1d1d21; --side: #232328; --side-2: #33333a; --btn: #2b2b31; }
:root[data-theme="dark"] { --deep: #2f2f36; --ink: #f4f4f3; }
.tb { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.tb-logo { color: var(--ink); }
.tb-nav { background: var(--surface-2); }
.tb-nav a { color: var(--ink-3); } .tb-nav a:hover:not(.on) { color: var(--ink); }
.tb-nav a.on { background: var(--deep); color: #fff; box-shadow: 0 4px 12px -6px rgba(0,0,0,.35); }
.tb-proj summary { color: var(--ink-3); } .tb-proj summary b { color: var(--ink); }
.tb-proj .ws-pl { background: var(--surface); border-color: var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.14); }
.tb-proj .ws-pl a { color: var(--ink-2); } .tb-proj .ws-pl a:hover, .tb-proj .ws-pl a.on { background: var(--surface-2); color: var(--ink); }
.ws-seg a.on { background: var(--deep); }
.bento .money { background: linear-gradient(155deg, #3a3a41, #26262b 70%); }
.money .bar { background: rgba(255,255,255,.08); } .money .lb, .money .k { color: #a5a5ad; } .money .sub { color: #c4c4ca; }
.bento .alarm:not(.grow):not(.calm) { background: linear-gradient(150deg, #f2474e, #dc1a24); }
.bento .ai { box-shadow: inset 0 0 0 1.5px var(--line); background: linear-gradient(135deg, var(--surface), var(--surface) 55%, #fdeff0); }
.ai button { background: var(--deep); color: #fff; }
.ads .m { background: var(--deep); }
.ws-ai { border: 1.5px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.12); }
.ws-kpi:first-child { background: var(--deep); border-color: var(--deep); }
.ws-agent { background: var(--deep); }

/* экран клиента — та же раскладка плитками */
.cs-top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 28px; }
.cs-brand .logo { border-radius: 9px; }
.cs-tabs { background: var(--surface-2); padding: 4px; border-radius: 14px; gap: 2px; }
.cs-tabs a { padding: 8px 14px; color: var(--ink-3); font-size: 13.5px; }
.cs-tabs a:hover { background: none; color: var(--ink); }
.cs-tabs a.on { background: var(--deep); color: #fff; box-shadow: 0 4px 12px -6px rgba(0,0,0,.35); }
.cs-tabs a.on svg { color: #fff; }
.cs-proj { border: 0; border-radius: 12px; }
.cs-main { max-width: 1416px; padding: 26px 28px 80px; }
.cs-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cs-hd h1 { font-size: 40px; font-weight: 900; letter-spacing: -.05em; line-height: 1.02; margin: 0; }
.cs-hd p { margin: 6px 0 0; color: var(--ink-2); max-width: 760px; }
.cs-hd-r { display: flex; gap: 10px; align-items: center; }
.cs-main .card, .cs-status, .cs-main details.card { border: 0; border-radius: 26px; box-shadow: none; }
.cs-main .bento + * { margin-top: 18px; }
.nx em { font-style: normal; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
/* «до шага / после» под действием автопилота: цифры той же кампании до и после шага (владелец 05.11) */
.ba { margin-top: 8px; padding: 8px 11px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 3px; }
.ba span, .nx .ba span { display: block; color: var(--ink-2); font-size: 12.5px; line-height: 1.35; }
.ba u { text-decoration: none; display: inline-block; min-width: 64px; color: var(--ink-3); font-weight: 700; }
.ba strong { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.ba.good strong { color: var(--good); } .ba.bad strong { color: var(--accent); } .ba.warn strong { color: #b7791f; }
.leads .lf { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.nx video, .ads .m video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .cs-top { padding: 10px 16px; } .cs-main { padding: 18px 16px 80px; } .cs-hd h1 { font-size: 30px; }
}

/* превью креатива целиком (сторис не режем) + значок видео/карусели */
.wt-bg { position: absolute; inset: -12px; width: calc(100% + 24px) !important; height: calc(100% + 24px) !important; object-fit: cover; filter: blur(14px) brightness(.75); opacity: .9; }
.wt { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: contain !important; }
.wt-k { position: absolute; right: 6px; bottom: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; background: rgba(20,20,24,.72); color: #fff; display: grid; place-items: center; font-size: 11px; backdrop-filter: blur(4px); }
.wt-k.carousel { border-radius: 7px; font-size: 13px; }
.ads .m, .ws-ad-m, .an-th { position: relative; overflow: hidden; }
.ads .m em, .ws-ad-t, .ws-ad-p { z-index: 2; }
.an-th { width: 46px; height: 58px; border-radius: 9px; background: var(--deep); flex: none; }
.an-th .wt-k { width: 18px; height: 18px; font-size: 8px; right: 3px; bottom: 3px; }
.an-ad > .an-th img { max-width: none; }

/* сквозная: период и сортировка */
.cr-h { flex-wrap: wrap; } .cr-sub { margin: -6px 0 12px; }
.cr-range { font-weight: 700; } .cr-range span { color: var(--ink-3); margin-left: 4px; }
.an-cr th.cr-s { cursor: pointer; user-select: none; white-space: nowrap; } .an-cr th.cr-s i { font-style: normal; color: var(--ink-3); margin-left: 4px; font-size: 11px; }
.an-cr th.cr-s.on { color: var(--ink); } .an-cr th.cr-s.on i { color: var(--accent); }
.an-cr th.cr-s:hover { color: var(--ink); }
.wdp { position: absolute; z-index: 300; display: flex; background: var(--surface); border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.18), 0 0 0 1px var(--line); overflow: hidden; max-width: calc(100vw - 24px); }
.wdp-p { display: flex; flex-direction: column; padding: 10px; gap: 2px; border-right: 1px solid var(--line); min-width: 170px; }
.wdp-p button { text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 10px; font: 600 13.5px var(--font); color: var(--ink-2); cursor: pointer; }
.wdp-p button:hover { background: var(--surface-2); } .wdp-p button.on { background: var(--deep); color: #fff; }
.wdp-c { padding: 14px 16px 12px; position: relative; }
.wdp-nav { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.wdp-nav button { pointer-events: auto; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 18px; cursor: pointer; color: var(--ink); }
.wdp-ms { display: flex; gap: 22px; }
.wdp-m b { display: block; text-align: center; font-size: 14px; text-transform: capitalize; margin: 4px 0 10px; }
.wdp-w, .wdp-g { display: grid; grid-template-columns: repeat(7, 36px); }
.wdp-w span { text-align: center; font-size: 11px; color: var(--ink-3); padding-bottom: 4px; }
.wdp-g button { height: 34px; border: 0; background: none; font: 600 13px var(--font); color: var(--ink); cursor: pointer; border-radius: 10px; }
.wdp-g button:hover:not(:disabled) { background: var(--surface-2); }
.wdp-g button.in { background: var(--accent-soft); border-radius: 0; }
.wdp-g button.end { background: var(--deep); color: #fff; }
.wdp-g button.now { box-shadow: inset 0 0 0 1.5px var(--accent); }
.wdp-g button:disabled { color: var(--ink-3); opacity: .4; cursor: default; }
.wdp-f { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.wdp-f span { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 760px) {
  .wdp { flex-direction: column; left: 12px !important; right: 12px; }
  .wdp-p { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); } .wdp-p button { padding: 6px 10px; font-size: 12.5px; }
  .wdp-ms > .wdp-m:first-child { display: none; } .wdp-w, .wdp-g { grid-template-columns: repeat(7, 1fr); }
}
.ads .m { height: 170px; }

/* доска форматов: формат → лента и сторис, клик — крупно */
.fmb { display: grid; gap: 14px; }
.fm { background: var(--surface); border-radius: 26px; padding: 18px 20px; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s; }
.fm.like { box-shadow: inset 0 0 0 2px var(--good); } .fm.dis { opacity: .55; }
.fm-h { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.fm-h b { font-size: 19px; font-weight: 850; letter-spacing: -.02em; }
.fm-kind { margin-left: 8px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); padding: 2px 8px; border-radius: 99px; vertical-align: 2px; }
.fm-h p { margin: 4px 0 2px; color: var(--ink-2); font-size: 13.5px; max-width: 720px; } .fm-h small { color: var(--ink-3); font-size: 12px; }
.fm-v { display: flex; gap: 6px; flex: none; }
.fm-v button { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--surface-2); font-size: 20px; cursor: pointer; transition: transform .12s, background .12s; }
.fm-v button:hover { transform: scale(1.06); }
.fm.like .fm-v .lk { background: var(--good); } .fm.dis .fm-v .dk { background: var(--deep); }
.fm-r { margin-top: 12px; }
.fm-pl { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.fm-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.fm-r:has(.stories) .fm-g { max-width: 420px; }
.fm-t { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--deep); aspect-ratio: 4 / 5; }
.fm-t.stories { aspect-ratio: 9 / 16; }
.fm-t img, .fm-t video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.fm-t:hover img, .fm-t:hover video { transform: scale(1.04); }
.fm-b { position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 800; color: #fff; background: rgba(20,20,24,.72); padding: 3px 7px; border-radius: 7px; backdrop-filter: blur(4px); }
.fm-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.88); color: #111; display: grid; place-items: center; font-style: normal; font-size: 14px; padding-left: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.fm-t.carousel::after { content: ""; position: absolute; right: -6px; top: 8px; bottom: 8px; width: 12px; border-radius: 8px; background: rgba(255,255,255,.35); }
.fml { position: fixed; inset: 0; z-index: 500; background: rgba(12,12,14,.96); display: flex; align-items: center; justify-content: center; }
.fml-top { z-index: 3; } .fml-top b { white-space: nowrap; }
.fml-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: #fff; }
.fml-top span { color: #a5a5ad; font-size: 13px; } .fml-x { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 16px; cursor: pointer; }
.fml-a { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; cursor: pointer; z-index: 2; }
.fml-a.l { left: 16px; } .fml-a.r { right: 16px; }
.fml-s { max-height: calc(100vh - 110px); display: flex; flex-direction: column; align-items: center; }
.fml-s img, .fml-s video { max-height: calc(100vh - 110px); max-width: min(92vw, 720px); border-radius: 16px; display: block; }
.fml-s.stories img, .fml-s.stories video { max-width: min(92vw, calc((100vh - 110px) * 9 / 16)); }
.fml-c { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; width: min(92vw, 560px); border-radius: 16px; scrollbar-width: none; }
.fml-c::-webkit-scrollbar { display: none; }
.fml-c img { flex: 0 0 100%; width: 100%; max-width: none; scroll-snap-align: center; border-radius: 0; max-height: calc(100vh - 170px); object-fit: contain; }
.fml-d { display: flex; gap: 6px; margin-top: 10px; } .fml-d i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); } .fml-d i.on { background: #fff; }
.fml-hint { color: #a5a5ad; font-size: 12.5px; margin: 6px 0 0; }
@media (max-width: 760px) {
  .fm { padding: 14px; border-radius: 22px; } .fm-h b { font-size: 17px; } .fm-v button { width: 42px; height: 42px; }
  .fm-g, .fm-r:has(.stories) .fm-g { max-width: none; gap: 6px; }
  .fml-a { width: 40px; height: 40px; bottom: 18px; top: auto; transform: none; } .fml-a.l { left: calc(50% - 50px); } .fml-a.r { right: calc(50% - 50px); }
}


/* ── Колокольчик и уведомления ── */
.bell { position: relative; }
.bell .n { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font: 700 10px/16px Inter, sans-serif; font-style: normal; text-align: center; }
.tb .bell { color: var(--ink); }
.bell-pop { position: fixed; top: 64px; right: 16px; width: min(380px, calc(100vw - 24px)); background: #fff; border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.16); z-index: 200; overflow: hidden; }
.bp-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.bp-h button { background: none; border: 0; color: var(--muted); cursor: pointer; }
.bp-l { max-height: 60vh; overflow: auto; }
.bp-i { display: flex; gap: 10px; padding: 11px 16px; text-decoration: none !important; color: inherit; border-bottom: 1px solid var(--line); align-items: flex-start; }
.bp-i:last-child { border-bottom: 0; }
.bp-i.new { background: #fff6f6; }
.bp-i > span { font-size: 18px; flex: none; }
.bp-i b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.bp-i small { color: var(--muted); font-size: 12px; }
html[data-theme="dark"] .bell-pop { background: #26262b; } html[data-theme="dark"] .bp-i.new { background: #3a2a2c; }
/* пейвол */
.modal-bg.pw .modal { max-width: 440px; }
/* здоровье платформы */
.hl { display: grid; gap: 8px; }
.hl .it { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.hl .it i { font-style: normal; font-size: 18px; flex: none; }
.hl .it b { display: block; font-size: 14px; }
.hl .it span { font-size: 12.5px; color: var(--muted); display: block; }
.hl .it code { font-size: 11.5px; background: rgba(0,0,0,.05); padding: 1px 6px; border-radius: 6px; }

/* ── Телефон ≤ 480: плитки, шапка, полоса денег ── */
@media (max-width: 480px) {
  .tb { padding: 10px 12px; gap: 10px; }
  .tb-proj summary b { max-width: 110px; }
  .tb-nav a { padding: 7px 10px; font-size: 12.5px; }
  .bento .t .big { font-size: 40px; }
  .money .bar i { white-space: normal; line-height: 1.2; font-size: 12px; }
  .money .bar { flex-wrap: wrap; }
  .camps .ci { grid-template-columns: 1fr 64px 64px; }
  .camps .ci > :nth-child(4) { display: none; }
  .cs-hd { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cs-hd-r { flex-wrap: wrap; width: 100%; }
  .cs-hd h1 { font-size: 26px; }
  .ads .m { height: 140px; }
  .bell-pop { top: 56px; right: 8px; }
  .cs-top { gap: 8px; padding: 8px 10px; }
  .cs-top .cs-proj b { max-width: 90px; }
}

/* тарифы: 5 карточек */
.bl-plans { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.bl-plans .plan { padding: 22px; } .bl-plans .plan h2 { font-size: 22px; margin: 2px 0 6px; }
.bl-plans .plan .price { font-size: 26px; font-weight: 800; letter-spacing: -.03em; } .bl-plans .plan .price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.bl-plans .plan.fit { outline: 2px solid var(--accent); }
.bl-plans .plan .tag { position: absolute; top: -11px; left: 18px; background: var(--deep); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.bl-plans .plan.fit .tag { background: var(--accent); }
.bl-extra { margin: 10px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; flex: 1; }
.bl-plans .plan .btn { margin-top: 14px; width: 100%; }
.bl-trial { background: linear-gradient(140deg, #fff, #f3f3f1); }
.bl-sum { display: flex; align-items: baseline; gap: 10px; } .bl-sum b { font-size: 28px; font-weight: 800; } .bl-sum span { color: var(--muted); font-size: 13px; }

/* ── Запуск: ИИ-статика и сборка кампании ── */
.ln { max-width: 1100px; display: flex; flex-direction: column; gap: 16px; }
.ln-hd h2 { margin: 0 0 8px; font-size: 26px; }
.ln-steps { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.ln-steps li { counter-increment: s; background: #fff; border-radius: 99px; padding: 6px 12px 6px 8px; font-size: 13px; font-weight: 600; }
.ln-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #2b2b31; color: #fff; font-size: 11px; margin-right: 6px; }
.ln-gen { display: flex; gap: 18px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 18px 20px; border-radius: 22px;
  background: linear-gradient(120deg, #2b2b31, #43434c); color: #fff; }
.ln-gen b { display: block; font-size: 16px; margin-bottom: 4px; } .ln-gen span { display: block; font-size: 13px; opacity: .85; max-width: 560px; }
.ln-gen.off { background: #fff; color: inherit; } .ln-gen.run { display: block; }
.ln-genf { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .ln-genf .inp { width: 70px; }
.ln-cnt { display: flex; align-items: center; gap: 8px; font-size: 13px; } .ln-genf select.inp { color: var(--ink); background: var(--surface); }
.ln-chips { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; } .ln-chips label { display: flex; gap: 4px; align-items: center; cursor: pointer; }
.ln-err { color: #ffb4b4 !important; margin-top: 6px; }
.ln-bar { height: 8px; border-radius: 9px; background: rgba(255,255,255,.18); margin: 10px 0; overflow: hidden; } .ln-bar i { display: block; height: 100%; background: #e10f1a; transition: width .4s; }
.ln-card { padding: 20px; } .ln-t { font-weight: 800; font-size: 16px; margin-bottom: 12px; }
.ln-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ln-cr { position: relative; display: block; cursor: pointer; border-radius: 16px; overflow: hidden; background: #f3f3f1; border: 3px solid transparent; }
.ln-cr.on { border-color: #e10f1a; } .ln-cr img, .ln-cr video { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; background: #000; }
.ln-cr img.st { position: absolute; right: 6px; top: 6px; width: 34%; aspect-ratio: 9/16; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.ln-cr b { display: block; font-size: 12.5px; padding: 8px 10px; line-height: 1.3; }
.ln-ck { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; font-weight: 800; color: #e10f1a; }
.ln-dest { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ln-opt { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: #f3f3f1; cursor: pointer; min-width: 160px; }
.ln-opt input { display: none; } .ln-opt:has(input:checked) { background: #2b2b31; color: #fff; } .ln-opt span { font-size: 12.5px; opacity: .75; }
.ln-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 10px; }
.ln-warn { padding: 14px 16px; border-radius: 14px; background: #fff4e5; font-size: 14px; } .ln-warn.sm { font-size: 13px; }
.ln-l { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(0,0,0,.06); flex-wrap: wrap; }
.ln-l > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
[data-theme="dark"] .ln-steps li, [data-theme="dark"] .ln-gen.off { background: #232328; } [data-theme="dark"] .ln-opt, [data-theme="dark"] .ln-cr { background: #2a2a30; }
[data-theme="dark"] .ln-warn { background: #3a2f1f; }
/* библиотека фото клиента (01.11) */
.ln-ph{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin:10px 0}
.ln-phi{position:relative;border-radius:12px;overflow:hidden;background:var(--surface-2);display:flex;flex-direction:column}
.ln-phi img{width:100%;aspect-ratio:4/5;object-fit:cover;display:block}
.ln-phi .ln-kind{border:0;border-top:1px solid rgba(0,0,0,.06);font-size:12px;padding:6px;background:transparent;color:inherit}
.ln-tag{position:absolute;left:6px;top:6px;font-size:11px;font-weight:700;background:rgba(255,255,255,.92);color:#333;border-radius:20px;padding:2px 8px}
.ln-tag.ok{left:auto;right:32px;background:var(--good-soft);color:var(--good)}
.ln-tag+.ln-tag:not(.ok){top:30px}
.ln-del{position:absolute;right:6px;top:6px;width:22px;height:22px;border-radius:50%;border:0;background:rgba(30,30,34,.7);color:#fff;font-size:12px;cursor:pointer;line-height:22px;padding:0}
.ln-chips label.off{opacity:.45}

/* ── Телефон: удобные пальцу кнопки, вкладки с подсказкой прокрутки, компактная «Спросить Айю» ── */
@media (max-width: 720px) {
  .btn.sm, .btn, .seg button, .icon-btn, select.inp, input.inp:not([type=checkbox]):not([type=radio]) { min-height: 40px; }
  .icon-btn, .tb-bell { min-width: 40px; }
  .tb-nav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tb-nav a { padding: 10px 12px; }
  .cw-fab { width: 52px; height: 52px; padding: 0; justify-content: center; right: 12px; bottom: 12px; }
  .cw-fab span:not(.msg-av) { display: none; }
  .ws-shell .content, .content { padding-bottom: 96px; }
  .mode { padding: 12px 14px; }
  .mode:not(.on) p { display: none; }
  .mode h3 { margin: 0; }
  .act { grid-template-columns: 1fr; gap: 10px; }
  .act .btns { justify-content: stretch; } .act .btns .btn { flex: 1; }
  .acc-ban a { margin-left: 0; }
  .card-h { flex-wrap: wrap; gap: 8px; }
  .an-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .an-head .row { flex-wrap: wrap; }
  .hint { width: 18px; height: 18px; }
  .tb-av { width: 40px; height: 40px; }
  .ws-sort select, .cw-chip { min-height: 40px; }
  .ws-ai button { width: 40px; height: 40px; }
}
/* в верхнем меню есть ещё пункты справа */
.tb-nav.more { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.tb-nav.less { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.tb-nav.more.less { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }

/* ══ 06.11: подвкладки раздела (6 разделов вместо 11 пунктов) ══ */
.ws-subs { display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ws-subs::-webkit-scrollbar { display: none; }
.ws-subs a { flex: none; display: flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 99px; background: var(--surface); color: var(--ink-2);
  font-weight: 700; font-size: 14px; text-decoration: none !important; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.ws-subs a:hover:not(.on) { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }
.ws-subs a.on { background: var(--ink); color: var(--surface); box-shadow: none; }
.ws-subs small { font-size: 11px; font-weight: 800; color: var(--accent); } .ws-subs a.on small { color: #ffc6a8; }

/* ══ 06.11: три этапа работы с ИИ, что автопилот делает сам, отложенное защитой ══ */
.stages .mode { position: relative; display: flex; flex-direction: column; background: var(--surface); }
.stages .st-n { font-size: 11.5px; font-weight: 800; color: var(--ink-3); margin-bottom: 4px; }
.stages .mode h3 { font-size: 17px; }
.stages .mode.soon { cursor: default; border-style: dashed; opacity: .85; }
.mode-soon { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-radius: 99px; padding: 3px 9px; align-self: flex-start; }
.st-lock { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.st-lock span.ok { color: var(--good); }
.avto-umeet { margin-bottom: 12px; } .avto-umeet h3 { margin: 0 0 8px; }
.tg-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px;
  background: linear-gradient(120deg, #eef6ff, #f3efff); }
.tg-link h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; } .tg-link p { margin: 0; }
@media (max-width: 640px) { .tg-link { flex-direction: column; align-items: stretch; } }
.avto-umeet ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 18px; }
.avto-umeet li { font-size: 13.5px; color: var(--ink-3); } .avto-umeet li.ok { color: var(--ink); }
.act-later { margin-top: 8px; font-size: 13px; color: var(--ink-2); background: #fff7dc; border-radius: 10px; padding: 7px 10px; }
:root[data-theme="dark"] .act-later { background: var(--warn-soft); }
.tb-lvl { flex: none; border: 0; background: var(--surface-2); color: var(--ink); border-radius: 99px; padding: 7px 12px; font: 700 13px var(--font); cursor: pointer; white-space: nowrap; }
.tb-lvl:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
@media (max-width: 860px) { .tb-lvl { padding: 6px 10px; font-size: 12px; } }
