/* v2 (11.11.2026): the redesign's look (mockups/cabinet-v2, approved by Антон) over the old cabinet's styles.
   The light palette of the mockup (light by default - core.js), and on a computer the left menu of the mockup instead of
   the old one (app.js renderSide): the sections and «Бонусы», «Ручная настройка» as tiles, the tokens and the plan, the
   support, the profile. Below 960 px the phone's tabs stay as before. */

:root[data-theme="light"] {
  --bg: #f3f5fb;
  --surface: #ffffff;
  --surface-2: #eef2fb;
  --surface-3: #e6ebf7;
  --line: #e1e6f2;
  --line-strong: #cfd7ea;
  --text: #0b1230;
  --text-2: #3b4566;
  --muted: #5f6987;
  --accent: #2f6bff;
  --accent-hover: #1f55d6;
  --accent-soft: #e6eeff;
  --accent-text: #1f55d6;
  --grid: #e6ebf7;
}
:root[data-theme="light"][data-module="sales"] { --accent: #7c3aed; --accent-hover: #6d28d9; --accent-soft: #efe6ff; --accent-text: #6d28d9; }
:root { --bonus: #7c3aed; --v2-side: 276px; }
:root[data-theme="dark"] { --bonus: #c99bff; }

.v2-side { display: none; }

@media (min-width: 960px) {
  /* the old left menu (the header and the tabs turned sideways, web.css) gives way to the new one */
  html.is-web.in-workspace body { padding-left: var(--v2-side); }
  html.is-web.in-workspace .appbar,
  html.is-web.in-workspace .tabbar,
  html.is-web.in-workspace .token-bar { display: none !important; }

  html.is-web.in-workspace .v2-side {
    --sg: 10px;
    --nh: 42px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: var(--v2-side);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--sg);
    padding: 16px 14px 14px;
    background: var(--surface);
    border-right: 1px solid var(--line);
  }
}
.v2-side > * { flex-shrink: 0; }
/* the empty height is shared between the blocks (Антон, 11.11: «пропасть» → a little more room between all items) */
.v2-side .s-gap { flex: 1 1 0; min-height: 0; max-height: var(--gmax, 14px); margin: calc(var(--sg) / -2) 0; }
.v2-side .ic { width: 19px; height: 19px; flex: none; }

.s-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0.01em; }
.s-brand i { font-style: normal; color: #2433c4; }
:root[data-theme="dark"] .s-brand i { color: #8db0ff; }

/* the product: one button, the products' list under it */
.s-prod { position: relative; }
.s-pbtn { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 9px 10px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.s-pbtn:disabled { cursor: default; }
.s-pbtn > span:not(.product-logo) { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.s-pbtn small { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.s-pbtn b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-pbtn .product-logo { width: 28px; height: 28px; }
/* the products' logos one colour, as in the old cabinet's menu (polish.css) */
.v2-side .product-logo { flex: none; display: grid; place-items: center; background: var(--surface-3); }
.v2-side .product-logo svg { width: 72%; height: 72%; }
.v2-side .product-logo [fill="#fff"] { fill: var(--text); }
.v2-side .product-logo [stroke="#fff"] { stroke: var(--text); }
.s-pbtn .ic { width: 16px; height: 16px; color: var(--muted); }
.s-pmenu { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-md); }
.s-pmenu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.s-pmenu button span:not(.product-logo) { flex: 1; }
.s-pmenu button .product-logo { width: 22px; height: 22px; }
.s-pmenu button .ic { width: 15px; height: 15px; color: var(--muted); }
.s-pmenu button:hover { background: var(--surface-2); color: var(--text); }
.s-pmenu button.is-active { color: var(--text); font-weight: 600; }

/* the sections */
.s-nav { display: flex; flex-direction: column; gap: 2px; flex: 1 0 auto; justify-content: space-between; max-height: calc(var(--n, 4) * var(--nh) + (var(--n, 4) - 1) * 10px); }
.s-link { display: flex; align-items: center; gap: 11px; width: 100%; min-height: var(--nh); padding: 10px 12px; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.s-link:hover { background: var(--surface-2); color: var(--text); }
.s-link.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%); }
.s-link.is-bonus, .s-link.is-bonus:hover { color: var(--bonus); }
.s-link.is-bonus:hover { background: color-mix(in srgb, var(--bonus) 7%, transparent); }

/* «Ручная настройка»: tiles in a dashed frame */
.s-tools { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px dashed var(--line-strong); }
.s-tools-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.s-tools-head .ic { width: 16px; height: 16px; color: var(--text-2); }
.s-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.s-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 46px; padding: 7px 4px; border: 0; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 12.5px; line-height: 1.2; text-align: center; cursor: pointer; }
.s-tools-grid.n2 .s-tool { min-height: 84px; }
.s-tool .ic { width: 18px; height: 18px; }
.s-tool:hover { color: var(--text); background: var(--accent-soft); }
.s-tool.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%); }

/* the tokens and the plan in one block */
.s-wallet { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.s-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.s-tokens { justify-content: flex-start; }
.s-tokens b { font-size: 15px; }
.s-ring { width: 46px; height: 46px; flex: none; }
.s-ring-bg { stroke: var(--line); }
.s-ring-fg { stroke: var(--accent); stroke-linecap: butt; }
.s-ring-fg.is-low { stroke: var(--warning); }
.s-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.s-btns .btn { width: 100%; }
/* «Без лимита» (25.11.2026): no ring, the spend next to the name, only «Расход» */
.s-tokens.is-free { flex-wrap: wrap; gap: 2px 10px; min-height: 28px; }
.s-tokens small { font-size: 12.5px; color: var(--text-2); }
.s-btns.is-one { grid-template-columns: 1fr; }
.s-plan { display: flex; flex-direction: column; gap: 4px; }
.s-tokens + .s-btns + .s-plan { padding-top: 10px; border-top: 1px solid var(--line); }
.s-plan b { font-size: 14px; }
.s-plan small { font-size: 12.5px; color: var(--text-2); }
.s-plan .text-link { padding: 2px 0; font-size: 13.5px; }

/* the support: a card with the button as its bottom, full width */
.s-help { display: flex; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); cursor: pointer; }
.s-help:hover { border-color: var(--line-strong); }
.s-help-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; line-height: 1.3; }
.s-help-head b { display: block; font-size: 14.5px; }
.s-help-head small { display: block; font-size: 12.5px; color: var(--muted); }
.s-help-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.s-help-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; border: 0; background: var(--accent-soft); color: var(--accent-text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.s-help-btn .ic { width: 16px; height: 16px; }
.s-help:hover .s-help-btn { background: color-mix(in srgb, var(--accent) 22%, transparent); }
/* «Обучение» (27.11.2026): a quiet line under «Поддержка», the sheet with the video and the steps */
.s-learn { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 14px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.s-learn .ic { width: 15px; height: 15px; }
.s-learn:hover { color: var(--text); }
.learn-sheet .video-box { margin-top: 8px; }
.learn-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.learn-head { margin: 20px 0 0; font-size: 15px; }

/* the profile at the very bottom */
.s-bottom { margin-top: auto; display: flex; align-items: center; gap: 6px; }
.s-me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.s-me:hover { background: var(--surface-2); }
.s-me > span:last-child { min-width: 0; display: grid; line-height: 1.25; }
.s-me b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-me small { font-size: 12.5px; color: var(--muted); }
.s-ava { width: 32px; height: 32px; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 13px; }
.s-theme { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.s-theme:hover { border-color: var(--accent); color: var(--text); }

/* a low laptop screen (a Mac, ~800 px high): the menu tighter, all of it fits without scrolling */
@media (min-width: 960px) and (max-height: 900px) {
  html.is-web.in-workspace .v2-side { --sg: 6px; --nh: 34px; padding: 10px 12px 8px; }
  .s-link { padding: 6px 12px; }
  .s-pbtn { min-height: 46px; padding: 5px 10px; }
  .s-wallet { padding: 9px 10px; gap: 6px; }
  .s-tokens + .s-btns + .s-plan { padding-top: 8px; }
  .s-help-head { padding: 6px 12px; }
  .s-help-ic { width: 34px; height: 34px; }
  .s-help-btn { height: 36px; }
  .s-tools { padding: 9px; gap: 6px; }
  .s-tool { min-height: 40px; padding: 5px 4px; }
  .s-tools-grid.n2 .s-tool { min-height: 54px; }
  .s-me { min-height: 40px; }
  .s-theme { width: 40px; height: 40px; }
}

/* the product logo as in the mockup: a dark circle with a white mark */
.v2-side .s-pbtn .product-logo { border-radius: 50%; background: var(--text); }
.v2-side .s-pbtn .product-logo [fill="#fff"] { fill: var(--surface); }
.v2-side .s-pbtn .product-logo [stroke="#fff"] { stroke: var(--surface); }

/* ---------- the head of a page: the title, under it the product and the day, the status on the right (the mockup head) ---------- */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.view-head-main { min-width: 0; display: grid; gap: 4px; }
.view-sub { margin: 0; color: var(--muted); font-size: 14.5px; }
.view-sub:empty { display: none; }
.view-sub::first-letter { text-transform: uppercase; }
.view-head .appbar-status { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--success);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.view-head .appbar-status.hidden { display: none; }
html.is-web.in-workspace .view-head .appbar-status { order: 0; flex-basis: auto; justify-content: flex-start; margin-bottom: 4px; }  /* web.css put it over the menu */
.view-head .appbar-status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.view-head .appbar-status.is-off { color: var(--warning); }
.view-head .appbar-status .status-short { display: none !important; }
.view-head .appbar-status .status-text { display: inline !important; }  /* the phone had only «ИИ» in the header; here there is room */

/* ---------- the dashboard (the mockup leadDash) ---------- */
.d-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.d-span2 > .chat-stats { height: 100%; }
.d-span2 { grid-column: span 2; min-width: 0; }
.d-span2 > .card { margin: 0; }
.d-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.d-card { background: var(--surface); border: 1px solid var(--line); padding: 20px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.d-card h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.d-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.d-card-head .text-link { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; }
.d-card-head .text-link .ic { width: 15px; height: 15px; }
.d-text2 { color: var(--text-2); }
.d-muted { color: var(--muted); font-size: 13.5px; }
.d-acc { color: var(--accent-text); }
.d-warn { color: var(--warning); font-weight: 600; }
.d-mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.d-hero { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); align-self: stretch; }
.d-hero-grid { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 22px 36px; height: 100%; }
.d-hero-text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 10px; max-width: 470px; }
.d-big { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.d-hero-text p { margin: 0; }
.d-bars { flex: 1 1 230px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 140px; }
.d-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.d-bar .v { font-size: 12.5px; color: var(--text-2); }
.d-bar .l { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.d-bar i { display: block; width: 100%; background: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.d-bar.is-today i { background: var(--accent); }
.d-bar.is-today .v { color: var(--text); font-weight: 700; }

.d-tokens { align-self: stretch; }
.d-tokens p { margin: 0; }
.d-tok-top { display: flex; align-items: center; gap: 16px; }
.d-tok-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 15px; }
.d-ring { position: relative; flex: none; }
.d-ring svg { display: block; }
.d-ring-bg { stroke: var(--line); }
.d-ring-fg { stroke: var(--accent); }
.d-ring-fg.is-low { stroke: var(--warning); }
.d-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.d-ring-num b { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.d-ring-num span { font-size: 12px; color: var(--muted); }
.d-forecast { display: flex; align-items: center; gap: 10px; padding: 11px 12px; font-size: 14px; font-weight: 600; background: var(--surface-2); }
.d-forecast .ic { width: 18px; height: 18px; flex: none; }
.d-forecast.is-low { background: var(--warning-soft); color: var(--warning); }
.d-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.d-btns .btn { flex: 1 1 auto; }

.d-list { display: flex; flex-direction: column; }
.d-mini { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.d-mini:first-child { border-top: 0; padding-top: 0; }
.d-mini .avatar { flex: none; }
.d-mini .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.d-mini .t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-mini .t b .d-muted { font-weight: 400; }
.d-mini .t > span { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-when { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.d-seg { display: inline-flex; padding: 3px; background: var(--surface-2); }
.d-seg button { height: 30px; padding: 0 11px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.d-seg button.is-active { background: var(--surface); color: var(--accent-text); box-shadow: 0 1px 2px rgba(10, 20, 60, 0.08); }
.d-frow { display: flex; flex-direction: column; gap: 6px; padding: 5px 0; width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
button.d-frow { cursor: pointer; }
.d-frow .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.d-frow .top span { color: var(--text-2); }
.d-frow .top b { display: flex; align-items: center; gap: 2px; }
.d-frow .top .ic { width: 15px; height: 15px; color: var(--muted); }
button.d-frow:hover .top span { color: var(--text); }
.d-track { height: 6px; background: var(--line); overflow: hidden; }
.d-track i { display: block; height: 100%; background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.d-track i.is-base { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.d-track i.is-accent { background: var(--accent); }

.d-srows { display: flex; flex-direction: column; }
.d-srow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 14px; color: inherit; text-align: left; }
.d-srow:first-child { border-top: 0; padding-top: 0; }
.d-srow span { color: var(--text-2); }
.d-srow b { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
button.d-srow { cursor: pointer; }
button.d-srow:hover span { color: var(--text); }

.d-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.d-tile { padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.d-tile .lbl { font-size: 12px; color: var(--text-2); }
.d-tile .val { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.d-tile .sub { font-size: 12px; color: var(--muted); }

/* narrower screens: two columns, then one */
@media (max-width: 1100px) {
  .d-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .d-grid { grid-template-columns: minmax(0, 1fr); }
  .d-span2 { grid-column: auto; }
  .d-big { font-size: 26px; }
  .d-card { padding: 16px; }
}

/* ---------- «Аналитика» (the mockup leadAnalytics) ---------- */
.a-top { display: flex; justify-content: flex-start; }
.a-banner { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--accent-soft); color: var(--text); }
.a-banner .ic { flex: none; width: 40px; height: 40px; padding: 9px; background: var(--surface); color: var(--accent-text); }
.a-banner h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.a-banner p { margin: 0; color: var(--text-2); }
.a-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.a-kpi { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.a-kpi.is-accent { border-color: var(--accent); }
.a-kpi .lbl { font-size: 12.5px; color: var(--text-2); }
.a-kpi .val { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.15; }
.a-kpi .sub { font-size: 12px; color: var(--muted); }
.a-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.a-grid.is-one { grid-template-columns: minmax(0, 1fr); }
.a-funnel { display: flex; flex-direction: column; gap: 12px; }
.a-fstep { display: grid; grid-template-columns: 150px minmax(0, 1fr) 48px; gap: 12px; align-items: center; font-size: 14px; }
.a-fstep > span:first-child { color: var(--text-2); }
.a-ftrack { height: 30px; background: var(--surface-2); }
.a-fbar { height: 30px; display: flex; align-items: center; padding: 0 10px; font-weight: 700; font-size: 13px; min-width: 44px; white-space: nowrap; }
.a-fbar.is-base { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--text); }
.a-fbar.is-mid { background: color-mix(in srgb, var(--accent) 55%, var(--surface)); color: #fff; }
.a-fbar.is-accent { background: var(--accent); color: #fff; }
.a-fstep .conv { font-size: 12.5px; color: var(--muted); text-align: right; }
.a-more { display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; font-size: 13.5px; font-weight: 600; margin-top: auto; }
.a-more .ic { width: 15px; height: 15px; }
.a-bars { display: grid; gap: 6px; align-items: end; height: 180px; }
.a-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.a-col .v { font-size: 12.5px; color: var(--text-2); }
.a-col .l { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.a-bar { display: block; width: 100%; max-width: 56px; background: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.a-col.is-last .a-bar { background: var(--accent); }
.a-col.is-last .v { color: var(--text); font-weight: 700; }
.a-table { overflow-x: auto; border: 1px solid var(--line); }
.a-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.a-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.a-table tr:last-child td { border-bottom: 0; }
.a-table tr.is-current td { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
/* ---------- AI-сейлз dashboard (the mockup salesDash) ---------- */
.d-bars-wrap { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.s-hero-bars { height: 140px; }
.s-stackbar { width: 100%; max-width: 48px; display: flex; flex-direction: column-reverse; }
.s-stackbar i { display: block; width: 100%; }
.s-stackbar .rest, .a-legend .rest { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.s-stackbar .lead, .a-legend .lead { background: var(--accent); }
.a-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.a-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.s-limit { display: flex; align-items: baseline; gap: 8px; }
.s-limit b { font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.s-limit span { color: var(--muted); }
.d-track i.is-warn { background: var(--warning); }
.d-card .list { margin: 0; }
.d-card .list-item { border-radius: 0; }

/* ---------- every other screen (sources, settings, scenario, knowledge, reminders, dialogs, bonuses, profile) in the
   mockup look: the same layouts and functions, only the controls restyled (the mockup: plain buttons and fields with a
   hairline, the brand bevel only on what is selected, labels in the text font, not in mono capitals) ---------- */
.btn:not(.btn-icon), .btn-sm:not(.btn-icon) { clip-path: none; font-family: var(--font-sans); font-weight: 600; font-size: 14px; letter-spacing: 0; border-radius: 0; }
.btn-sm:not(.btn-icon) { font-size: 13.5px; }
.btn:not(.btn-primary):not(.btn-ghost):not(.btn-icon) { background: var(--surface); border: 1px solid var(--line-strong); box-shadow: none; color: var(--text); }
.btn:not(.btn-primary):not(.btn-ghost):not(.btn-icon):hover { background: var(--surface); border-color: var(--accent); }
:root[data-theme="dark"] .btn:not(.btn-primary):not(.btn-ghost):not(.btn-icon) { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { color: var(--text-2); }
.card { border: 1px solid var(--line); background: var(--surface); box-shadow: none; }
.input, .select, .textarea, .tag-editor, .ws-form textarea { border-radius: 0 !important; border: 1px solid var(--line-strong); background: var(--surface); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.field-label { font-family: var(--font-sans); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--text-2); }
.kpi-label { font-family: var(--font-sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--text-2); }
.badge { font-family: var(--font-sans); font-size: 11.5px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.seg { background: var(--surface-2); border: 0; padding: 3px; border-radius: 0; }
.seg button { border-radius: 0; font-family: var(--font-sans); font-weight: 600; color: var(--muted); }
.seg button.is-active { background: var(--surface); color: var(--accent-text); box-shadow: 0 1px 2px rgba(10, 20, 60, 0.08); }
:root[data-theme="dark"] .seg button.is-active { background: var(--surface-3); }
.sub-tabs { border-bottom: 1px solid var(--line); gap: 4px; background: none; padding: 0; }
.sub-tabs button { border-radius: 0; background: none !important; border-bottom: 2px solid transparent; font-weight: 600; color: var(--muted); box-shadow: none !important; }
.sub-tabs button.is-active { color: var(--accent-text); border-bottom-color: var(--accent); }
.list-item { border-radius: 0; }
.avatar { border-radius: 0; }
.kpi { border-radius: 0; box-shadow: none; }
.kpi.is-accent { background: var(--surface); border: 1px solid var(--accent); clip-path: none; color: var(--text); }
.kpi.is-accent .kpi-label, .kpi.is-accent .kpi-value, .kpi.is-accent .kpi-sub { color: inherit; }
:root[data-module="sales"] .kpi.is-accent { background: var(--surface); }
.modal, .guide-sheet { border-radius: 0; }

/* ---------- «Ещё» on the phone (the mockup sheet) ---------- */
.v2-more .sheet-body { display: flex; flex-direction: column; gap: 14px; }
.m-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.m-head .ic { width: 16px; height: 16px; color: var(--text-2); }
.m-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px; border: 1px dashed var(--line-strong); }
.m-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 8px 4px; border: 0; background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.m-tool .ic { width: 20px; height: 20px; }
.m-list { display: flex; flex-direction: column; }
.m-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.m-item:first-child { border-top: 0; }
.m-item > .ic { width: 20px; height: 20px; color: var(--text-2); flex: none; }
.m-item > span { flex: 1; display: grid; line-height: 1.3; }
.m-item small { font-size: 12.5px; color: var(--muted); }
.m-item .m-chev { width: 16px; height: 16px; color: var(--muted); }
.m-item[data-more="referrals"] > .ic, .m-item[data-more="referrals"] > span { color: var(--bonus); }

/* ---------- the marks of the leads: «Заявки», the CRM board, the lead window, «ждут оценки» ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.fchip { height: 36px; padding: 0 13px; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fchip:hover { border-color: var(--accent); }
.fchip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%); }
.fchip .cnt { font-weight: 700; opacity: 0.8; }
.l-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.l-tools p { margin: 0; }
.l-chips { flex: 1 1 auto; min-width: 0; }
.l-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.a-top { align-items: center; gap: 8px; flex-wrap: wrap; }
.cur-pick { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 4px 0 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); }
.cur-pick .ic { width: 15px; height: 15px; }
.cur-pick select { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); padding: 0 4px; cursor: pointer; }
.l-search .input { height: 44px; }
.l-review { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--accent); background: var(--surface); }
.l-review > span { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 320px; color: var(--text-2); }
.l-review > span .ic { width: 20px; height: 20px; color: var(--accent-text); flex: none; margin-top: 1px; }
.l-review b { color: var(--text); }
.l-card { padding: 4px 20px; }
.l-list { display: flex; flex-direction: column; }
.l-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.l-row:first-child { border-top: 0; }
.l-row .avatar { flex: none; }
.l-row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.l-row .t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-row .t b .d-muted { font-weight: 400; }
.l-row .t > span { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.l-row:hover .t b { color: var(--accent-text); }
.l-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.l-msgs { display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; font-weight: 600; }
.l-msgs .ic { width: 15px; height: 15px; }
.m-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.m-chip.is-new { background: var(--accent-soft); color: var(--accent-text); }
.m-chip.is-not_qual { color: var(--muted); }
.m-chip.is-qual { color: var(--text); }
.m-chip.is-sale { background: var(--accent); color: #fff; }

.c-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.c-col { background: var(--surface-2); border: 1px solid var(--line); min-height: 200px; display: flex; flex-direction: column; }
.c-col.is-over { border-color: var(--accent); background: var(--accent-soft); }
.c-head { display: flex; align-items: baseline; gap: 8px; padding: 12px 12px 8px; }
.c-head b { font-size: 14px; }
.c-head .cnt { font-weight: 700; color: var(--accent-text); }
.c-head .d-muted { margin-left: auto; font-size: 12.5px; }
.c-cards { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 10px; max-height: 70vh; overflow-y: auto; }
.c-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.c-card:hover { border-color: var(--accent); }
.c-card.is-dragging { opacity: 0.5; }
.c-card b { font-size: 13.5px; }
.c-text { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
.c-empty { padding: 6px 4px; }

.lead-sheet .sheet-body { display: flex; flex-direction: column; gap: 14px; }
.ls-head { display: flex; align-items: center; gap: 12px; }
.ls-head > div { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.ls-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; background: var(--surface-2); font-size: 14.5px; line-height: 1.5; }
.ls-group { display: flex; flex-direction: column; gap: 6px; }
.ls-label { font-size: 13px; color: var(--text-2); }
.ls-sale { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ls-sale .input-icon { flex: 1 1 140px; }
.ls-sale .input { height: 36px; padding-left: 26px; }
.ls-cur { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }

.d-eval { border-color: var(--accent); }
.d-eval.is-done { border-color: var(--line); }
.d-eval-row { display: flex; gap: 14px; align-items: flex-start; }
.d-eval-row p { margin: 4px 0 0; }
.d-eval-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--accent); color: #fff; }
.d-eval-ic .ic { width: 22px; height: 22px; }
.d-eval.is-done .d-eval-ic { background: var(--surface-2); color: var(--text-2); }
.d-roi { font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
.d-card > p.d-text2 { margin: 0; }
button.a-kpi { text-align: left; font: inherit; color: inherit; cursor: pointer; border-color: var(--accent); }
button.a-kpi .sub { color: var(--accent-text); font-weight: 600; }

/* ---------- «Достижения» (the mockup) ---------- */
.d-card h3 .ic { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
.ach-top { display: flex; flex-direction: column; gap: 12px; }
.ach-top p { margin: 0; }
.ach-meter, .ach-bar { display: block; height: 6px; background: var(--line); overflow: hidden; }
.ach-meter i, .ach-bar i { display: block; height: 100%; background: var(--accent); }
.ach-cat { display: flex; flex-direction: column; gap: 10px; }
.ach-cat h3 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.ach-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--muted); }
.ach-ic .ic { width: 20px; height: 20px; }
.ach.is-done .ach-ic { background: var(--accent); border-color: var(--accent); color: #fff; }
.ach-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; line-height: 1.3; }
.ach-t b { font-size: 14px; }
.ach:not(.is-done) .ach-t b { color: var(--text-2); }
.ach-t > span:not(.ach-bar) { font-size: 13px; color: var(--muted); }
.ach-t small { font-size: 12px; color: var(--muted); }
.ach-got { color: var(--accent-text) !important; font-weight: 600; }
.ach-next { display: flex; flex-direction: column; gap: 6px; }
#view:has(.ach-top) { display: flex; flex-direction: column; gap: 16px; }
/* «Бонусы» inside the cabinet: the page head and the menu are there - no «Назад» and no second title */
.v2-bonus .referral-toolbar, .v2-bonus .referral-hero h2 { display: none; }

/* ---------- «С ветками по ответу» in a script step (the constructor of the mockup) ---------- */
.sc-branches { gap: 8px; }
.sc-br-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px dashed var(--line-strong); background: var(--surface-2); }
.sc-br { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 230px) auto; gap: 8px; align-items: center; }
.sc-br-if { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.sc-br-arrow { color: var(--muted); }
.sc-br .input, .sc-br .select { height: 40px; }
@media (max-width: 760px) {
  .sc-br { grid-template-columns: minmax(0, 1fr) auto; }
  .sc-br-if, .sc-br-arrow { display: none; }
  .sc-br .select { grid-column: 1; }
}

#view:has(.a-banner) { display: flex; flex-direction: column; gap: 16px; }
#view:has(.l-tools) { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 760px) {
  .l-row { flex-wrap: wrap; }
  .l-side { flex-direction: row; width: 100%; justify-content: space-between; padding-left: 48px; }
  .l-card { padding: 4px 14px; }
  .c-board { grid-template-columns: repeat(4, minmax(240px, 82vw)); }
}
#view:has(.a-banner) > .card { margin: 0; }
@media (max-width: 760px) {
  .a-grid { grid-template-columns: minmax(0, 1fr); }
  .a-fstep { grid-template-columns: 110px minmax(0, 1fr) 40px; font-size: 13px; }
  .a-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 12.11.2026: the fresh answers are slow (a weak network) - the screen shows the last ones, «обновляется» in grey */
.view-sub.is-updating::after { content: " · обновляется…"; }

/* 12.11.2026 (developer, screenshots from the mini-app) */
/* «Осталось настроить»: the links are text, no frame (the buttons' border rule above was stronger) */
.setup-card .callout .btn:not(.btn-icon) { border: 0 !important; background: none !important; padding: 0 !important; height: auto; min-height: 0; }
/* the words' editor: its count and hint were stuck to the frame */
.tag-editor { padding: 12px 14px; }
/* «Поиск · Настройки ИИ · Аккаунт» were run together */
.sub-tabs { gap: 20px; }
/* «102 заявки ждут оценки»: the text in one column next to the icon, not a word a line */
.l-review > span { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
/* the messages with keywords at the top of «Заявки» */
.l-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: -4px; }
.l-more { margin: 10px 16px 14px; width: calc(100% - 32px); }
/* the status: in the header on a phone and in the mini-app, short; under the title on a computer */
.appbar-end .appbar-mini { display: inline-flex; align-items: center; gap: 6px; height: auto; padding: 0 2px; border: 0; border-radius: 0; background: none;
  color: var(--success); font: 600 11px/1 var(--font-mono, ui-monospace, monospace); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.appbar-end .appbar-mini.is-off { color: var(--warning); }
.appbar-end .appbar-mini.hidden { display: none; }
.appbar-end .appbar-mini .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.view-head .appbar-status { display: none !important; }
@media (min-width: 960px) {
  html.is-web.in-workspace .view-head .appbar-status:not(.hidden) { display: inline-flex !important; }
  html.is-web.in-workspace .appbar-mini { display: none !important; }
}

/* 12.11.2026: CRM on a phone - the columns as tabs, one column's cards as a plain list (no sideways scrolling) */
.c-tabs { display: none; }
@media (max-width: 759px) {
  .c-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .c-tabs .fchip { flex-direction: column; justify-content: center; gap: 2px; height: auto; min-height: 48px; padding: 6px 2px; line-height: 1.15;
    white-space: nowrap; font-size: 12.5px; text-align: center; clip-path: none; }
  .c-tabs .fchip .cnt { font-size: 15px; }
  .c-board { display: block; overflow: visible; padding-bottom: 0; }
  .c-col { display: none; min-height: 0; }
  .c-col.is-active { display: flex; }
  .c-cards { max-height: none; overflow: visible; }
  .c-hint-desk { display: none; }
}
@media (min-width: 760px) { .c-hint-phone { display: none; } }

/* 12.11.2026: AI-сейлз «Сценарий ИИ» - the four ways of the mockup and «Конструктор» (the flow of steps and branches) */
.sc-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.sc-mode { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; line-height: 1.35; color: var(--text); cursor: pointer; }
.sc-mode:hover:not(:disabled) { border-color: var(--line-strong); }
.sc-mode:disabled { cursor: default; opacity: .7; }
.sc-mode b { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; font-size: 14.5px; }
.sc-mode b .ic { width: 16px; height: 16px; }
.sc-mode > span { font-size: 12.5px; color: var(--muted); }
.sc-mode.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sc-mode.is-active b { color: var(--accent-text); }
.sc-new { margin-left: auto; font: 600 10px var(--font-mono, ui-monospace, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
@media (max-width: 759px) { .sc-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .sc-mode { padding: 12px; } }
.scb-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1180px) { .scb-layout { grid-template-columns: minmax(0, 1fr) 300px; } .scb-test { position: sticky; top: 16px; } }
.scb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.scb-head b { font-size: 16px; }
.scb-head span { font-size: 12.5px; color: var(--muted); }
.scb-layout > *, .scb-card > *, .scb-flow, .scb-step { min-width: 0; }  /* the branches scroll sideways inside, the page does not */
.scb-flow { display: flex; flex-direction: column; align-items: stretch; }
.scb-step { display: flex; flex-direction: column; align-items: stretch; }
.scb-node { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.scb-node.is-q { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.scb-node-head { display: flex; align-items: center; gap: 10px; }
.scb-num { width: 26px; height: 26px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 13px; }
.scb-node.is-q .scb-num { background: var(--accent); color: #fff; }
.scb-title { flex: 1; min-width: 0; border: 0 !important; background: none !important; padding: 2px 0; font: 700 14px var(--font-sans); color: var(--text); }
.scb-title:focus { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }
.scb-say { width: 100%; resize: vertical; padding: 8px 10px; font-family: var(--font-sans); border: 0 !important; background: var(--surface-2) !important; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.scb-say:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.scb-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.scb-meta .ic { width: 13px; height: 13px; }
.scb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.scb-kind button { height: 30px; padding: 0 10px; font-size: 12.5px; }
.scb-v { align-self: center; flex: none; width: 2px; height: 16px; background: var(--line-strong); }
.scb-ask { align-self: center; padding: 3px 10px; border: 1px dashed var(--line-strong); font: 600 10.5px var(--font-mono, ui-monospace, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.scb-branches { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(150px, 1fr)); gap: 12px; padding-top: 16px; overflow-x: auto; }
.scb-branches::before { content: ""; position: absolute; top: 0; height: 2px; background: var(--line-strong); left: calc((100% - (var(--n) - 1) * 12px) / (2 * var(--n))); right: calc((100% - (var(--n) - 1) * 12px) / (2 * var(--n))); }
.scb-branch { position: relative; display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.scb-branch::before { content: ""; position: absolute; top: -16px; left: 50%; width: 2px; height: 16px; margin-left: -1px; background: var(--line-strong); }
.scb-cond { align-self: center; display: inline-flex; align-items: center; max-width: 100%; background: var(--accent-soft); }
.scb-cond input { width: 120px; min-width: 0; padding: 5px 4px 5px 10px; border: 0; background: none; font: 700 12.5px var(--font-sans); color: var(--accent-text); text-align: center; }
.scb-cond input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.scb-x { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.scb-x .ic { width: 13px; height: 13px; }
.scb-then { height: 34px; font-size: 12.5px; padding: 0 8px; }
.scb-add-br { align-self: center; display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 5px 10px; border: 1px dashed var(--line-strong); background: none; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.scb-add-br:hover { border-color: var(--accent); color: var(--accent-text); }
.scb-add-br .ic { width: 14px; height: 14px; }
@media (max-width: 759px) { .scb-branches { grid-template-columns: repeat(var(--n), minmax(140px, 1fr)); } .scb-cond input { width: 96px; } }

/* 12.11.2026: the mockup's tabs - a screen's sections underlined in one row, a tab's inner sections as small pills */
.v2-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.v2-tabs::-webkit-scrollbar { display: none; }
.v2-tabs button { flex: none; height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none;
  font: 600 14px var(--font-sans); color: var(--muted); white-space: nowrap; cursor: pointer; border-radius: 0; }
.v2-tabs button:hover { color: var(--text); }
.v2-tabs button.is-active { color: var(--accent-text); border-bottom-color: var(--accent); }
.seg.v2-pills { display: inline-flex; width: auto; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.seg.v2-pills button { flex: none; height: 32px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
@media (max-width: 759px) { .v2-tabs button { padding: 0 11px; font-size: 13.5px; } }

/* 12.11.2026: AI-сейлз «Диалоги» as in the mockup - chips with counts, the list and the open dialog side by side, «Чем закончилось?» */
.dl-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.dl-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.dl-chips::-webkit-scrollbar { display: none; }
.dl-chips .fchip { flex: none; }
.dl-split { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.dl-split > * { min-width: 0; }
.dl-pane { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 32px); overflow-y: auto; }
.dl-pane .chat { max-height: 420px; overflow-y: auto; }
.dl-list .list-item.is-active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.dl-out { display: flex; flex-direction: column; gap: 10px; }
.dl-out-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.dl-out-head b { font-size: 15px; }
.dl-out-head .d-muted { font-size: 12.5px; }
.dl-out-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dl-out-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 72px; padding: 10px 6px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-2); font: 600 13px var(--font-sans); cursor: pointer; }
.dl-out-btn .ic { width: 20px; height: 20px; }
.dl-out-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-text); }
.dl-out-btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }
.dl-out-btn:disabled { cursor: default; opacity: .7; }
.dl-out-sale { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 759px) { .dl-out-sale { grid-template-columns: minmax(0, 1fr); } }

/* 12.11.2026: the messages with keywords as in the mockup - the avatar at the top, the chips; switches in the section's colour */
.msg-filter.l-chips { margin: 4px 0 6px; }
.list-item[data-msg] > .row { align-items: flex-start; }
.list-item[data-msg] .avatar { margin-top: 2px; }
.switch input:checked + .switch-track { background: var(--accent); }

/* 12.11.2026: the screens before the workspace in the new look - square corners as the rest of the cabinet */
.web-auth, .screen-card, .web-support, .guide-sheet, .modal, .web-profile .modal { border-radius: 0 !important; }
@media (min-width: 960px) { html.is-web .guide-sheet { border-radius: 0 !important; } }

/* 12.11.2026: the first run - «Как всё будет» under the sign-in, as in the mockup */
.first-steps { display: grid; gap: 10px; margin-top: 8px; padding: 16px; border: 1px solid var(--line); background: var(--surface); }
.first-steps > b { font-size: 15px; }
.first-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.first-steps li { display: flex; align-items: flex-start; gap: 10px; }
.first-steps li .n { width: 26px; height: 26px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 13px; }
.first-steps li.is-now .n { background: var(--accent); color: #fff; }
.first-steps li > span:last-child { display: grid; gap: 2px; }
.first-steps li small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.first-steps p { margin: 0; }

/* 12.11.2026: CRM on a computer - the four columns fit a 1280 px screen with the left menu (Продажа was cut off) */
@media (min-width: 760px) { .c-board { grid-template-columns: repeat(4, minmax(170px, 1fr)); } }
.c-cards { overflow-x: hidden; }
.c-foot { flex-wrap: wrap; row-gap: 4px; }

/* 12.11.2026: «Мои соцсети» - the networks list square as the rest of the cabinet */
.net-row { border-radius: 0; }
/* «Напоминания»: «Отправить через» square too */
.push-when, .push-when .input, .push-when .select { border-radius: 0; }

/* 12.11.2026: the product menu - the open products and «Подключить ещё» (the mockup); its sheet */
.s-pmenu .p-more, .module-menu .p-more { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; color: var(--accent-text); font-weight: 600; }
.s-pmenu .p-more .ic, .module-menu .p-more .ic { color: var(--accent-text); }
.v2-connect .c-head h3 { margin: 0 0 4px; }
.v2-connect .c-head p { margin: 0; }
.v2-connect .c-head, .v2-connect .c-head h3 { display: block; }
.v2-connect .m-item > .product-logo { width: 28px; height: 28px; flex: none; display: grid; place-items: center; background: var(--surface-3); }
.v2-connect .m-item > .product-logo svg { width: 72%; height: 72%; }
.v2-connect .product-logo [fill="#fff"] { fill: var(--text); }
.v2-connect .product-logo [stroke="#fff"] { stroke: var(--text); }
.v2-connect .c-code-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.v2-connect .c-code-link .ic { width: 15px; height: 15px; }

/* 12.11.2026 (developer: «что-то закрывает чуть-чуть зелёный круг»): the status without its plate (under the title, in the
   phone's header) keeps no notch and no clipping - they cut the dot's light ring on the left */
.view-head .appbar-status, .appbar-end .appbar-mini { clip-path: none; overflow: visible; }
.view-head .appbar-status .dot, .appbar-end .appbar-mini .dot { flex: none; margin-left: 3px; }
.appbar-end .appbar-mini { gap: 9px; }

/* 12.11.2026 (developer: «не будем дублированный значок делать»): the banner's icon square is the span - the svg inside has the
   same «.ic» and drew a second square over it */
.a-banner > .ic { display: grid; place-items: center; }
.a-banner > .ic > .ic { width: 22px; height: 22px; padding: 0; background: none; }

/* the red counter of new messages on «Поддержка» (12.11.2026, developer: as in the mockup) - the sidebar card, the phone's
   header button and the other tab of the chat */
.s-help-ic, .appbar-support { position: relative; overflow: visible; }
.ubadge { position: absolute; top: -6px; right: -9px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ef4444;
  border: 2px solid var(--surface); color: #fff; font: 700 11px/16px var(--font-sans); text-align: center; pointer-events: none; }
.appbar-support .ubadge { top: -7px; right: -7px; }
.ws-tabs .ubadge { position: static; display: inline-block; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border: 0; line-height: 18px; }

/* the link of a notice («Включить →», «Добавить аккаунты →»): a thin frame of the buttons stayed around the text (12.11.2026,
   the check of every screen after the switch) - a link has none */
.callout .btn:not(.btn-icon) { border: 0 !important; min-height: 0; }
/* «Сколько стоит результат»: the third tile alone on its row takes the whole row - half a row broke «Заявок с начала пакета»
   into three lines (12.11.2026) */
.d-tiles > .d-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* many weeks on a phone («3 месяца», 12.11.2026): «18 се…» under the bars and «42 / 9» in two lines - every second column
   from the last one is signed, whole */
@media (max-width: 600px) {
  .a-bars.is-dense { gap: 3px; }
  .a-bars.is-dense .a-col .l, .a-bars.is-dense .a-col .v { overflow: visible; text-overflow: clip; white-space: nowrap; max-width: none; }
  .a-bars.is-dense .a-col:nth-last-child(even) .l, .a-bars.is-dense .a-col:nth-last-child(even) .v { visibility: hidden; }
}
/* «По месяцам» on a phone: 12 px wider than its frame, a scrollbar under four short columns (12.11.2026) */
@media (max-width: 600px) {
  .a-table th, .a-table td { padding: 10px 9px; }
}

/* 14.11.2026: the files of a reminder and «Темп сообщений» of a script (sales.js) - their parts open by the hidden attribute */
.file-pick[hidden], [data-pace-fields][hidden], [data-pace-off][hidden] { display: none; }
.push-attach { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 13px; }
.push-attach .ic { width: 14px; height: 14px; }

/* «Общие чаты» in «Чаты» of Лидоген (15.11.2026) */
.shared-chats-note { margin: -4px 6px 10px; }

/* «Начать настройку» in the setter's chat (16.11.2026) */
.ws-start { display: grid; gap: 6px; margin: 14px 0 4px; }
.ws-start .ws-note { margin: 0; text-align: center; }

/* «i» next to a short hint (16.11.2026): the rest of it opens under the line */
.pace-sum { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; }
.pace-sum > .field-hint { margin-top: 0; }
.pace-sum .info-more { flex-basis: 100%; margin-top: 4px; }
.info-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer; }
.info-btn .ic { width: 16px; height: 16px; }
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--accent-text); }

/* ---------- Окно оплаты тарифа (20.11.2026, Платега): почта для чека и сумма в рублях (способ - на странице Платеги),
   за 3 и 6 месяцев полная цена зачёркнута; пока без платёжки - заглушка ---------- */
.buy-modal { position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; }
.buy-modal h3 { padding-right: 36px; }
.buy-modal .buy-close { position: absolute; top: 12px; right: 12px; }
.buy-modal .buy-label { display: block; margin: 16px 0 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.buy-modal .input { width: 100%; }
.buy-modal .input.is-invalid { border-color: var(--danger); }
.buy-modal .buy-hint { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.buy-modal .buy-hint.is-error { color: var(--danger); }
.buy-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.buy-total span { color: var(--text-2); font-size: 14px; }
.buy-total b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.buy-total .buy-sum { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.buy-total .buy-sum s { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.buy-modal .buy-pay { margin-top: 12px; height: 48px; }
.buy-modal .buy-note { margin: 0 0 10px; text-align: center; }
.buy-modal .buy-manager { margin-top: 12px; }
.buy-modal .buy-consent { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
.buy-consent .text-link { padding: 0; font-size: inherit; }
.buy-summary { margin: 14px 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px; line-height: 1.5; }
.buy-modal .buy-back { display: block; margin: 12px auto 0; }
/* 23.11.2026 (Антон: «крупно 299$ / 24.900 р, а внизу мелко в месяц»): the roubles big under the dollars */
.tariff-card .tariff-price.tariff-rub { margin-top: 0; padding-top: 3px; font-size: 17px; white-space: nowrap; }
html.is-web .tariff-card .tariff-price.tariff-rub { margin-top: 0; font-size: 24px; }
@media (max-width: 350px) { .tariff-card .tariff-price.tariff-rub { font-size: 14px; } }
/* the payment window with the payment on (20.11.2026): the token packs (the method's choice is on Platega's page) */
.buy-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr); gap: 8px; }
.buy-packs .buy-method { display: grid; place-items: center; padding: 10px 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; text-align: center; cursor: pointer; }
.buy-packs .buy-method b { font-size: 14.5px; }
.buy-packs .buy-method.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.buy-modal .buy-count { height: 100%; min-height: 42px; text-align: center; }
@media (max-width: 380px) { .buy-packs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .buy-modal .buy-count { grid-column: 1 / -1; } }
