/* ════════════════════ Sales Hub · v9 (2026-10-28) ════════════════════
   Полная переделка: светлый нейтральный каркас, белые карточки без лишних рамок,
   один акцентный цвет (зелёный бренда), Inter с ровными цифрами. Меню светлое,
   в шапке — название страницы и общие фильтры «площадка × бренд» (app.js: GF).
   На телефоне меню выдвигается по кнопке. Имена классов прежние — виды не менялись. */

:root {
  --paper:      #f5f6f8;
  --card:       #ffffff;
  --ink:        #101828;
  --ink-2:      #344054;
  --muted:      #667085;
  --faint:      #98a2b3;
  --line:       #e4e7ec;
  --line-soft:  #f0f2f5;
  --hover:      #f9fafb;

  --accent:      #1f7a4d;
  --accent-ink:  #14603a;
  --accent-soft: #eaf5ee;
  --accent-line: #b9dcc7;
  --amber-line:  #fedf89;

  --side-bg:    #ffffff;
  --side-line:  #eaecf0;
  --side-text:  #344054;
  --side-dim:   #98a2b3;

  --red:        #d92d20;
  --red-bg:     #fef3f2;
  --amber:      #b54708;
  --amber-bg:   #fffaeb;
  --good:       #067647;
  --good-bg:    #ecfdf3;
  --blue:       #175cd3;
  --blue-bg:    #eff8ff;
  --violet:     #6941c6;
  --violet-bg:  #f4f3ff;
  --gray-bg:    #f2f4f7;

  --r: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.12);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side-w: 236px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }
body { font-family: var(--font); background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.45;
       -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
b, strong { font-weight: 600; }
button, input, select, textarea { font-family: inherit; }

/* ════════ каркас ════════ */
#app { display: flex; min-height: 100vh; }

.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30;
  background: var(--side-bg); border-right: 1px solid var(--side-line);
  display: flex; flex-direction: column; padding: 16px 12px 14px; overflow-y: auto;
}
.side-logo {
  display: flex; align-items: center; gap: 10px; color: var(--ink);
  font-size: 15px; font-weight: 700; letter-spacing: -.01em; padding: 4px 8px 16px;
}
.side-logo span { color: var(--accent); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; background: var(--accent);
  display: grid; place-items: center; color: #fff !important; font-size: 13px; font-weight: 700;
}
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--side-dim); padding: 16px 10px 6px;
}
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; position: relative;
  font-size: 13.5px; font-weight: 500; color: var(--side-text);
  padding: 7px 10px; border-radius: 8px; transition: background .12s, color .12s;
}
.nav-btn svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--faint); pointer-events: none; }
.nav-btn:hover { background: var(--gray-bg); color: var(--ink); }
.nav-btn.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-btn.active svg { color: var(--accent); }
.side-foot {
  margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--side-line);
  font-size: 12px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px;
}
.side-fresh { color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.side-fresh .dot { width: 7px; height: 7px; border-radius: 50%; background: #17b26a; margin-top: 6px; flex-shrink: 0; }
.side-fresh .dot.old { background: #f79009; }
.side-fresh small { display: block; color: var(--muted); font-size: 11.5px; }
.side-user { color: var(--muted); font-size: 12px; }

.main { flex: 1; margin-left: var(--side-w); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; min-height: 60px; flex-wrap: wrap; row-gap: 0;
  display: flex; align-items: center; gap: 12px; padding: 10px 28px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar.scrolled { box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 36px; height: 36px;
              cursor: pointer; color: var(--ink-2); place-items: center; flex-shrink: 0; }
.nav-toggle svg { width: 18px; height: 18px; }
.crumbs { flex: 0 1 auto; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--muted); font-weight: 500; text-decoration: none; } .crumbs a:hover { color: var(--accent); text-decoration: none; }
.crumbs b { color: var(--ink); font-weight: 600; } .crumb-sep { margin: 0 6px; color: var(--faint); }
.crumbs { flex: 1 1 auto; }
/* общие фильтры — второй строкой шапки на всю ширину: не сжимают «где я» и поиск */
.gfilters { order: 10; flex: 1 0 100%; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
            margin: 10px -28px -10px; padding: 8px 28px; border-top: 1px solid var(--line-soft); background: var(--hover); }
.gfilters:empty { display: none; }
.gfilters::before { content: attr(data-label); font-size: 12px; color: var(--muted); margin-right: 4px; }
.lang-seg { flex-shrink: 0; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
                  width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.hdr-search {
  width: 230px; background: var(--card); border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 8px 12px 8px 33px; font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.hdr-search::placeholder { color: var(--faint); }
.hdr-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.wrap { max-width: 1440px; padding: 24px 28px 72px; }

/* ════════ заголовки ════════ */
.sec-head { margin-bottom: 20px; }
.sec-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25;
               display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec-head .sec-desc { font-size: 13px; color: var(--muted); margin-top: 4px; max-width: 860px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-bottom: 8px; }
.tip {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--faint); font-size: 10px; font-weight: 600;
  cursor: help; vertical-align: 1px; margin-left: 4px; font-style: normal;
}
.tip:hover { color: var(--accent); border-color: var(--accent); }

.subsec { margin: 32px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; row-gap: 6px; }
.subsec h3 { font-size: 15px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.subsec h3 .cnt { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--gray-bg); border-radius: 999px; padding: 1px 8px; }
.subsec .sec-desc { font-size: 13px; color: var(--muted); }
.subsec .sub-act { margin-left: auto; font-size: 13px; }
.subsec .sub-act .seg { flex-wrap: wrap; }
.subsec.first { margin-top: 0; }

/* ════════ плитки-показатели ════════ */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; min-width: 0;
}
.kpi.click { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.kpi.click:hover { border-color: var(--accent-line); box-shadow: 0 4px 12px rgba(16,24,40,.06); }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 4px; }
.kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; line-height: 1.15;
             font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.kpi-note b { color: var(--ink-2); }
.kpi.alert .kpi-value { color: var(--red); }
.kpi.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kpi-go { color: var(--faint); margin-left: auto; font-weight: 400; } .kpi.click:hover .kpi-go { color: var(--accent); }

/* ════════ карточки-сигналы ════════ */
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.acard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow); min-width: 0;
}
.acard.click { cursor: pointer; transition: border-color .12s; }
.acard.click:hover { border-color: var(--accent-line); }
.acard .a-body { flex: 1; min-width: 0; }
.acard .a-head { font-size: 13.5px; line-height: 1.45; }
.acard .a-title { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acard .a-note { font-size: 12px; color: var(--muted); margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.acard .a-val { font-size: 13px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ════════ карточки брендов и ниш ════════ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.bcard, .ncard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; cursor: pointer; transition: border-color .12s, box-shadow .12s; box-shadow: var(--shadow);
}
.bcard:hover, .ncard:hover { border-color: var(--accent-line); box-shadow: 0 4px 12px rgba(16,24,40,.06); }
.bcard-top { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff; }
.bcard-name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.bcard-name small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.bcard-num, .ncard-num { font-size: 24px; font-weight: 600; margin-top: 12px; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bcard-num span, .ncard-num span { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.bcard-sub, .ncard-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.bstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.bstat { background: var(--hover); border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 9px; min-width: 0; }
.bstat b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.bstat span { font-size: 11px; color: var(--muted); white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.bstat.warn b { color: var(--amber); }
.bcard-week { font-size: 12.5px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-soft); color: var(--ink-2);
              display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.bcard-week .quiet { color: var(--muted); }
.bcard-oos { font-size: 12.5px; color: var(--amber); margin-top: 4px; font-weight: 500; }
.ncard-name { font-weight: 600; font-size: 14.5px; }
.ncard-name span { color: var(--muted); font-weight: 400; }
.sharebar { height: 6px; background: var(--gray-bg); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.sharebar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; min-width: 2px; }
.ncard-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.ncard-foot b { color: var(--ink-2); }

/* ════════ бейджи и теги ════════ */
.st {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1.5; vertical-align: 1px;
}
.st-crit { background: var(--red-bg);   color: var(--red); }
.st-warn { background: var(--amber-bg); color: var(--amber); }
.st-wait { background: var(--gray-bg);  color: var(--ink-2); }
.st-good { background: var(--good-bg);  color: var(--good); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
       background: var(--gray-bg); color: var(--ink-2); white-space: nowrap; letter-spacing: .01em; }
.tag.niche { background: var(--accent-soft); color: var(--accent-ink); }
.tag.own   { background: var(--red-bg); color: var(--red); }

/* ════════ фильтры и кнопки ════════ */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filterbar.sticky { position: sticky; top: 61px; z-index: 10; background: var(--paper); padding: 8px 0 10px; margin: -8px 0 8px; }
.filter-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.chip-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-size: 13px; font-weight: 500; border-radius: 8px; padding: 6px 12px; line-height: 1.35;
  cursor: pointer; transition: background .12s, border-color .12s, color .12s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.chip-btn:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.chip-btn.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); font-weight: 600; }
.chip-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip-btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.chip-btn .n { font-size: 12px; color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip-btn.active .n { color: var(--accent-ink); }
.chip-btn:disabled { opacity: .45; cursor: default; }
.seg { display: inline-flex; background: var(--gray-bg); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg .chip-btn { border: none; background: none; padding: 5px 11px; color: var(--muted); }
.seg .chip-btn:hover { color: var(--ink); background: none; }
.seg .chip-btn.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.1); }
.inp, .sl-month {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; font-size: 13px;
  outline: none; background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.inp:focus, .sl-month:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp-search { width: 240px; }
.spacer { flex: 1; }
.row-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ════════ таблицы ════════ */
.table-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--hover);
  border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; line-height: 1.3; vertical-align: bottom;
}
th:hover { color: var(--ink); }
th .sort-arrow { color: var(--accent); margin-left: 3px; font-size: 9px; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr.rowlink, tbody tr.click { cursor: pointer; }
tbody tr:hover td { background: var(--hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tsub { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.pos { color: var(--good); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
a { color: var(--accent-ink); font-weight: 500; text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
td a { color: var(--ink); font-weight: 500; }
td a:hover { color: var(--accent-ink); }
.muted { color: var(--muted); }
.empty { color: var(--muted); font-size: 13.5px; padding: 28px 20px; text-align: center; }
.empty.ok { color: var(--good); }
.loading { color: var(--muted); font-size: 13.5px; padding: 48px 4px; display: flex; align-items: center; gap: 10px; }
.loading::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent);
                   animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════ лента событий ════════ */
.feed-day { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 24px 2px 8px; display: flex; gap: 8px; align-items: baseline; }
.feed-day span { font-size: 12px; color: var(--muted); font-weight: 400; }
.feed-day:first-child { margin-top: 0; }
.feed { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line-soft); cursor: pointer; transition: background .12s; }
.item:first-child { border-top: none; }
.item:hover { background: var(--hover); }
.item.plain { cursor: default; } .item.plain:hover { background: none; }
.item-body { flex: 1; min-width: 0; font-size: 13.5px; }
.item-title { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.item-note { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.item-side { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.item-side .v { font-size: 13.5px; font-weight: 600; }
.item-side .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.item-dot.red { background: var(--red); } .item-dot.amber { background: #f79009; } .item-dot.green { background: #17b26a; } .item-dot.gray { background: var(--faint); }
.evi { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; font-size: 12px; font-weight: 600;
       background: var(--gray-bg); color: var(--ink-2); }
.evi svg { width: 15px; height: 15px; }
.evi.down { background: var(--red-bg); color: var(--red); } .evi.up { background: var(--amber-bg); color: var(--amber); }
.evi.oos { background: var(--good-bg); color: var(--good); } .evi.coupon { background: var(--violet-bg); color: var(--violet); }
.evi.launch { background: var(--blue-bg); color: var(--blue); } .evi.own { background: var(--red); color: #fff; }
.item.sev-crit { box-shadow: inset 3px 0 0 var(--red); } .item.sev-warn { box-shadow: inset 3px 0 0 #f79009; }

.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.cols2 > div { min-width: 0; }
.cols2 > div > .subsec:first-child { margin-top: 32px; }
@media (max-width: 1100px) { .cols2 { grid-template-columns: 1fr; gap: 0; } }

.more-btn {
  display: inline-flex; align-items: center; gap: 6px; margin: 12px 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; color: var(--ink-2); cursor: pointer;
  font-size: 13px; font-weight: 500; transition: all .12s; text-decoration: none;
}
.more-btn:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.more-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.more-btn.primary:hover { background: var(--accent-ink); color: #fff; }

/* ════════ модалка ════════ */
.modal-back { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 50; display: flex; align-items: flex-start;
              justify-content: center; padding: 40px 16px; overflow-y: auto; backdrop-filter: blur(2px); }
.modal { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 980px; padding: 26px 28px; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; border: 1px solid var(--line); background: var(--card);
               border-radius: 8px; width: 32px; height: 32px; font-size: 14px; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--ink); background: var(--hover); }
.modal h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; padding-right: 44px; line-height: 1.35; }
.modal .m-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }
.modal .m-label { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 24px 0 10px; }
.modal .kpi, .modal .table-panel, .modal .sl-split { box-shadow: none; }
details.m-more { margin-top: 24px; }
details.m-more summary { cursor: pointer; font-size: 13.5px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
details.m-more summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
details.m-more[open] summary::before { transform: rotate(90deg); }
details.m-more summary::-webkit-details-marker { display: none; }
details.m-more > .mtbl { margin-top: 10px; }

.stale-bar { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 0 0 12px; padding: 10px 14px;
             border: 1px solid var(--amber-line); border-radius: 10px; background: var(--amber-bg); color: var(--amber); font-size: 13px; }
.stale-bar b { font-weight: 600; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 4px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.fact .f-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.fact .f-value { font-size: 18px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.fact .f-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mtbl { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mtbl th { cursor: default; }
.bullets { margin: 0; padding: 12px 16px 12px 32px; }
.bullets li { font-size: 13.5px; margin: 4px 0; }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
@media (max-width: 700px) { .charts { grid-template-columns: 1fr; } }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.chart-card h4 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }

/* ════════ логин ════════ */
#login { display: flex; height: 100vh; align-items: center; justify-content: center; flex-direction: column; gap: 16px; background: var(--paper); }
#login .logo-big { font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
#login .logo-big span { color: var(--accent); }
#login p { color: var(--muted); font-size: 13.5px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
              padding: 40px 48px; display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* ════════ узкий экран: меню выдвигается ════════ */
.nav-scrim { display: none; }
@media (max-width: 960px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(16,24,40,.35); z-index: 25; }
  .nav-toggle { display: grid; }
  .main { margin-left: 0; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .gfilters { margin: 10px -16px -10px; padding: 8px 16px; }
  .hdr-search { width: 170px; }
  .wrap { padding: 18px 16px 56px; }
  .filterbar.sticky { position: static; }
  .acards { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 22px; }
  .tbl-wrap table { min-width: 680px; }
  .item-side .s { display: none; }
}
@media (max-width: 560px) {
  .search-box { display: none; }
  .crumbs { flex: 1; }
}

/* ── Разбор: шаги, выбор конкурентов ── */
.steps { display: flex; align-items: center; gap: 0; margin: 0 0 18px; flex-wrap: wrap;
         background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 5px; width: fit-content; max-width: 100%; }
.step { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 8px;
        font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
          font-size: 11px; font-weight: 800; background: var(--gray-bg); color: var(--muted); }
.step.done { color: var(--ink-2); cursor: pointer; }
.step.done:hover { background: var(--hover); color: var(--accent-ink); }
.step.done i { background: var(--accent-soft); color: var(--accent); }
.step.now { background: var(--accent-soft); color: var(--accent-ink); }
.step.now i { background: var(--accent); color: #fff; }
.step .val { color: var(--ink); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.step-sep { color: #c4c8ba; padding: 0 2px; }
.an-go { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.an-go .more-btn[disabled] { opacity: .45; cursor: default; }
.an-bar {
  position: sticky; bottom: 16px; z-index: 12; margin-top: 16px;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px;
  background: var(--ink); color: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(15,25,18,.25);
  font-size: 13px; font-weight: 600;
}
.an-bar .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 3px; vertical-align: -1px; }
.an-bar .more-btn { margin: 0 0 0 auto; }
.chart-card.wide { margin-bottom: 20px; height: 340px; }
.chart-card.wide canvas { max-height: 300px; }
td .up   { color: var(--good); font-weight: 700; }
td .down { color: var(--red);  font-weight: 700; }
.f-note .up, .bcard-sub .up, .kpi-note .up, .item-side .up     { color: var(--good); font-weight: 700; }
.f-note .down, .bcard-sub .down, .kpi-note .down, .item-side .down { color: var(--red);  font-weight: 700; }
.mark-key { font-size: 11.5px; color: var(--muted); margin: -12px 0 20px 2px; letter-spacing: .01em; }
td .neu, .f-note .neu { color: var(--ink); font-weight: 700; }
/* Рынок: продажи брендов — легенда на 19 линий занимает место, график выше обычного */
.chart-card.wide.mb-card { height: 420px; }
.chart-card.wide.mb-card canvas { max-height: 390px; }
.mb-brands { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 12px; }
.mb-presets { display: inline-flex; gap: 6px; padding-right: 8px; margin-right: 2px; border-right: 1px solid var(--line); }
.mb-chip { padding: 4px 10px; font-size: 12px; }
.mb-chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mb-chip.off { opacity: .45; text-decoration: line-through; }
.mb-chip.off i { background: var(--line) !important; }

/* ════════ Рост ════════ */
.gr-funnel { padding: 14px 18px; display: grid; gap: 10px; }
.gr-fun { display: grid; grid-template-columns: 130px 1fr 52px; gap: 12px; align-items: center; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.gr-fun b { font-size: 18px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.gr-bar { height: 14px; background: var(--gray-bg); border-radius: 4px; overflow: hidden; }
.gr-bar i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.gr-spark { display: block; }
.gr-copy { margin: 0; padding: 5px 11px; white-space: nowrap; }
.gr-nw { white-space: nowrap; }

/* ── Продажи (P&L) ── */
.sl-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.sl-gaps { font-size: 12.5px; color: var(--muted); margin: -4px 0 12px; }
.sl-kpis { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
.sl-chart-box { height: 260px; padding: 12px 14px; margin: 14px 0 6px; }
.sl-chart-box.sl-chart-pct { height: 170px; margin-top: 0; }
.sl-pnl .tbl td:first-child { white-space: nowrap; }
.sl-pnl .sl-total td { font-weight: 700; border-top: 1px solid var(--line); }
.sl-pnl th.sl-cur, .sl-pnl td.sl-cur { background: var(--accent-soft); }
.sl-up { color: var(--good); font-weight: 600; }
.sl-down { color: var(--red); font-weight: 600; }
.sl-bar .seg { flex-wrap: wrap; }
.sl-pnl, .sl-split { overflow-x: auto; }
.sl-pnl td:first-child, .sl-pnl th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; }
.sl-now { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sl-daily { padding: 10px 14px 6px; margin: 10px 0 18px; }
.sl-daily-cap { margin-top: 2px; }
.sl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 900px) { .sl-two { grid-template-columns: 1fr; } }
.sl-sep { border-left: 1px solid var(--line); }
.mk-title { min-width: 280px; max-width: 340px; }
table.hm td.hm-cell { min-width: 74px; font-variant-numeric: tabular-nums; }
.tbl-wrap td.num, .sl-split td.num { white-space: nowrap; }
.sl-anom { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 14px; }
.pl-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; margin-bottom: 12px; }
.pl-form .inp { padding: 6px 10px; }
.pl-note { max-width: 520px; white-space: normal; }
.ai-box { padding: 0; }
.ai-chat { max-height: 560px; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 860px; padding: 10px 14px; border-radius: 10px; line-height: 1.55; }
.ai-user { align-self: flex-end; background: var(--accent-soft); white-space: pre-wrap; }
.ai-bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }
.ai-bot p { margin: 0 0 6px; } .ai-bot ul, .ai-bot ol { margin: 4px 0 8px 18px; padding: 0; } .ai-bot h4 { margin: 8px 0 4px; }
.ai-err { border-color: var(--red); color: var(--red); }
.ai-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ai-input textarea { flex: 1; resize: vertical; font: inherit; }

/* ── Структура (2026-10-28): строка «где я», вкладки страниц, главная ── */
.page-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 18px; }
.page-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; font: inherit; font-size: 14px;
            color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.page-tab:hover { color: var(--ink); } .page-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.home-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 16px; margin: 6px 0 14px; align-items: start; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }
.home-att { padding: 4px 16px 10px; }
.att-row { display: flex; gap: 8px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.att-row:last-child { border-bottom: 0; } .att-row:hover { color: var(--accent); } .att-go { margin-left: auto; color: var(--muted); }
.home-links { margin-top: 6px; } .home-links a { text-decoration: none; }
.sl-links { margin: 14px 0 4px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 14px; }
.sl-links a { color: var(--accent); text-decoration: none; }

/* колонка с названием (товар, задача, запрос) — не уже, чем нужно для двух строк названия */
td.name-col, th.name-col { min-width: 240px; max-width: 400px; }

/* изменения к прошлому периоду — бейджи, а не голый текст */
.sl-up, .sl-down { display: inline-block; padding: 0 7px; border-radius: 999px; font-weight: 600; font-size: 12px; line-height: 1.6; }
.sl-up { background: var(--good-bg); color: var(--good); }
.sl-down { background: var(--red-bg); color: var(--red); }
td .sl-up, td .sl-down { font-size: 12.5px; }
@media (max-width: 960px) {
  .kpis, .sl-kpis, .sl-now { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 14px; }
}
/* заголовок раздела внутри карточки — с отступами карточки */
.table-panel > .subsec.first, .sl-split > .subsec.first { padding: 14px 16px 6px; margin: 0; }
.sl-dates { display: inline-flex; align-items: center; gap: 6px; }

/* План действий: массовые действия над рекомендациями */
.pl-cb { width: 32px; padding-right: 0 !important; }
.pl-cb input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.pl-bulk { display: none; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line, #e5e7eb);
           background: color-mix(in srgb, var(--accent) 7%, transparent); position: sticky; top: 0; z-index: 2; }
.pl-bulk.on { display: flex; }
.pl-bulk b { margin-right: 4px; }
.ai-act { margin-top: 6px; display: flex; justify-content: flex-end; }
.ai-act .chip-btn { font-size: 12px; padding: 3px 10px; }
.mp-plan { margin-top: 6px; } .mp-plan .chip-btn { font-size: 12px; padding: 3px 10px; }
.ai-week { padding: 12px; margin-bottom: 8px; } .ai-week .ai-msg { max-width: none; border: 0; padding: 4px 6px; }
.rv-q { font-style: italic; margin-top: 2px; }

/* Таблица шире карточки (2026-10-28): тень у края, где есть что прокрутить, — иначе обрезанная колонка выглядит
   поломкой. Чистый CSS: «local» слои едут с содержимым и закрывают тень, когда край достигнут. */
.tbl-wrap, .sl-split, .sl-pnl {
  background:
    linear-gradient(to right, var(--card) 40%, transparent) left center / 36px 100% no-repeat local,
    linear-gradient(to left, var(--card) 40%, transparent) right center / 36px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(16, 24, 40, .22), transparent) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(16, 24, 40, .22), transparent) right center / 14px 100% no-repeat scroll,
    var(--card);
}
@media (max-width: 640px) {
  /* на телефоне название товара не сжимается в столбик по слову — цифры уходят вбок, прокрутка */
  .tbl-wrap td:first-child:not(.num):not(.pl-cb), .sl-split td:first-child:not(.num):not(.pl-cb),
  .tbl-wrap td.name-col, .sl-split td.name-col { min-width: 170px; }
  td.name-col, th.name-col { min-width: 190px; }
  td, th { padding-left: 10px; padding-right: 10px; }
}
th.num { white-space: normal; }
th .sort-ind, th .arrow { white-space: nowrap; }
.sl-split th, .sl-pnl th, table.hm th { white-space: nowrap; }
#fresh { cursor: pointer; }

/* Пользователи (2026-10-29) */
.u-perms { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.u-perm { white-space: nowrap; font-size: 12.5px; cursor: pointer; }
.u-perm.own { font-weight: 600; color: var(--accent, #1f7a4d); }


/* ════════════════════ v10 (2026-10-29): тема, скелеты, быстрый переход, таблицы, телефон ════════════════════ */
/* Тёмная тема: те же переменные — виды не меняются. Выбор: системная / светлая / тёмная (ui.js, кнопка в шапке). */
/* ════════ карточки parent ASIN (Товары → Экономика, 2026-11-05) ════════ */
.pc-bar { gap: 10px; flex-wrap: wrap; }
.pc-search { flex: 1 1 260px; min-width: 0; max-width: 420px; height: 34px; padding: 0 12px; border: 1px solid var(--line);
             border-radius: 8px; font-size: 13.5px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
         padding: 16px 18px 12px; display: flex; flex-direction: column; min-width: 0; }
.pc-head { display: flex; gap: 12px; align-items: flex-start; }
.pc-img { width: 56px; height: 56px; border-radius: 8px; object-fit: contain; flex-shrink: 0; background: #fff; border: 1px solid var(--line-soft); }
.pc-noimg { background: var(--gray-bg); }
.pc-name { min-width: 0; flex: 1; }
.pc-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600;
            font-size: 14px; line-height: 1.35; color: var(--ink); }
a.pc-title { color: var(--accent-ink); }
.pc-tags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.pc-id { font-size: 11.5px; color: var(--muted); background: var(--gray-bg); border-radius: 6px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.pc-big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; padding: 12px 0; border-top: 1px solid var(--line-soft);
          border-bottom: 1px solid var(--line-soft); text-align: center; }
.pc-big > div > span { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.pc-big b { display: block; font-size: 21px; font-weight: 600; letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.pc-big b.neg { color: var(--red); }
.pc-big small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pc-rows { display: flex; flex-direction: column; }
.pc-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.pc-row:last-child { border-bottom: 0; }
.pc-row span { color: var(--ink-2); }
.pc-row b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-kids { margin-top: 6px; font-size: 12.5px; }
.pc-kids summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.pc-kid { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px dashed var(--line-soft); }
.pc-kid b { font-weight: 500; font-variant-numeric: tabular-nums; }
.pc-more { margin-top: auto; padding-top: 10px; background: none; border: 0; border-top: 1px solid var(--line-soft); color: var(--accent-ink);
           font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.pc-kids + .pc-more, .pc-rows + .pc-more { margin-top: 8px; }
.pc-more .n { color: var(--muted); font-weight: 500; }
.pc-more:hover { text-decoration: underline; }
.pc-foot { display: flex; justify-content: center; margin-top: 14px; }
.pc-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 14px 0 12px; }
.pc-kpis .kpi-value { font-size: 22px; }
.pc-strip { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--line-soft); }
.pc-tr { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pc-tr i { width: 4px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.pc-tr img { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: #fff; flex-shrink: 0; }
tr.click:hover td { background: var(--hover); }
@media (max-width: 560px) { .pcards { grid-template-columns: 1fr; } .pc-search { max-width: none; } }

/* ════════ Sales & Profit (1 в 1 с Sellerise, 2026-11-06) ════════ */
.sp-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line);
          padding-bottom: 10px; margin-bottom: 18px; }
.sp-h { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 2px; }
.sp-periods { display: flex; gap: 22px; flex-wrap: wrap; }
.sp-periods button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 0; font-size: 14px; color: var(--muted); cursor: pointer; }
.sp-periods button.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }
.sp-kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 18px; }
.sp-kpi { position: relative; }
.sp-kpi .kpi-label { text-transform: uppercase; font-size: 11.5px; letter-spacing: .06em; }
.sp-ico { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--faint); }
.sp-q, .sp-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-size: 10px; font-style: normal; font-weight: 600;
               vertical-align: 2px; margin-left: 3px; cursor: help; }
.sp-q { border: 1px solid var(--faint); color: var(--faint); }
.sp-i { border: 1.5px solid var(--blue); color: var(--blue); cursor: pointer; }
.sp-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.sp-search { flex: 1 1 260px; max-width: 470px; height: 42px; }
.sp-sel { height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; background: var(--card); }
.sp-sel.sp-sm { height: 32px; font-size: 12.5px; }
.sp-btn { height: 42px; width: 46px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 18px; cursor: pointer; color: var(--ink-2); }
.sp-drop { position: relative; }
.sp-menu { display: none; position: absolute; top: 46px; left: 0; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
           box-shadow: var(--shadow-lg); min-width: 240px; padding: 6px; }
.sp-drop.open .sp-menu { display: block; }
.sp-menu a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--ink); font-size: 13px; }
.sp-menu a:hover { background: var(--hover); text-decoration: none; }
.sp-views { display: flex; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.sp-views button { width: 50px; height: 42px; border: 0; border-right: 1px solid var(--line); background: none; font-size: 17px; color: var(--ink-2); cursor: pointer; }
.sp-views button:last-child { border-right: 0; }
.sp-views button.active { background: var(--blue); color: #fff; }
.sp-card .pc-big b { font-size: 20px; }
.sp-card .pc-row a { color: var(--blue); }
.sp-panel { margin-bottom: 16px; }
.sp-phead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sp-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp-scroll { overflow-x: auto; }
.sp-tbl { min-width: 100%; white-space: nowrap; }
.sp-tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.sp-tot td { font-weight: 600; border-top: 2px solid var(--line); }
.sp-totc { font-weight: 600; }
.sp-cmp { font-size: 11px; margin-top: 2px; }
.sp-prod { display: flex; align-items: center; gap: 10px; min-width: 300px; white-space: normal; }
.sp-prod img, .sp-noimg { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #fff; flex-shrink: 0; }
.sp-noimg { display: block; background: var(--gray-bg); }
.sp-exp { width: 18px; flex-shrink: 0; background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; }
.sp-kid td { background: var(--hover); font-size: 12.5px; }
.sp-pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.sp-pager button { background: none; border: 0; padding: 6px 10px; color: var(--muted); cursor: pointer; font-size: 13px; }
.sp-pager button.active { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); }
.sp-pager button:disabled { opacity: .4; cursor: default; }
.sp-dots { color: var(--faint); padding: 0 6px; }
.sp-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.sp-switch input { display: none; }
.sp-switch i { width: 34px; height: 19px; border-radius: 10px; background: var(--line); position: relative; transition: background .15s; }
.sp-switch i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: left .15s; }
.sp-switch input:checked + i { background: var(--blue); }
.sp-switch input:checked + i::after { left: 17px; }
.sp-chart { padding: 12px 16px; }
.sp-detail { margin-top: 12px; } .sp-detail td { padding: 8px 10px; }
.sp-colgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 12px; }
.sp-colgrid h4 { font-size: 12px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.sp-colgrid label { display: block; font-size: 13px; padding: 3px 0; cursor: pointer; }
@media (max-width: 700px) { .sp-views { margin-left: 0; } .sp-views button { width: 42px; } .sp-search { max-width: none; } }

/* ════════ страница товара (1 в 1 с Sellerise /asin/…) ════════ */
.spi-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.spi-head img, .spi-head .sp-noimg { width: 84px; height: 84px; object-fit: contain; border-radius: 10px; background: #fff; flex-shrink: 0; }
.spi-head h2 { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.spi-ids { font-size: 12px; color: var(--muted); letter-spacing: .03em; margin-bottom: 4px; }
.spi-ids a { color: var(--muted); text-decoration: underline; }
.spi-nav { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.spi-tabs { display: flex; gap: 24px; flex-wrap: wrap; }
.spi-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 0; font-size: 15px; color: var(--muted); cursor: pointer; }
.spi-tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }
.spi-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); vertical-align: 2px; }
.spi-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; margin-bottom: 16px; }
.spi-bar { flex: 1 1 300px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.spi-bar-l { display: flex; justify-content: space-between; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.spi-bar-l em { color: var(--faint); font-style: normal; }
.spi-bar-t { display: flex; gap: 3px; height: 4px; margin: 6px 0; }
.spi-bar-t i { border-radius: 2px; }
.spi-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.spi-blk { padding: 6px 18px 10px; }
.spi-strip { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.spi-strip > div > span { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.spi-strip > div > b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.spi-pad { padding: 14px 18px; }
.spi-mapwrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.spi-top .tsub { margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.spi-topr { display: grid; grid-template-columns: 30px 1fr 70px; gap: 8px; align-items: center; font-size: 12.5px; padding: 4px 0; }
.spi-topr i { height: 4px; background: var(--line-soft); border-radius: 2px; position: relative; }
.spi-topr em { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-radius: 2px; }
.spi-topr span { text-align: right; font-variant-numeric: tabular-nums; }
.us-map { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 10px; max-width: 640px; }
.us-t { aspect-ratio: 1; border-radius: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; line-height: 1.1; }
.us-t b { font-weight: 600; } .us-t span { font-size: 9px; opacity: .85; font-variant-numeric: tabular-nums; }
.spi-day td { background: var(--hover); font-size: 12.5px; }
@media (max-width: 760px) { .spi-mapwrap { grid-template-columns: 1fr; } .spi-head h2 { font-size: 17px; } .spi-head img { width: 60px; height: 60px; } }

/* ════════ Dashboard Pro (1 в 1 с Sellerise, 2026-11-06) ════════ */
.ds-hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ds-hero h2 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.ds-live { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; margin-bottom: 16px; }
.ds-livechart { padding: 14px 18px; }
.ds-lhead { display: flex; gap: 40px; margin-bottom: 8px; }
.ds-lhead b { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-dim { color: var(--muted); }
.ds-side { padding: 8px 18px; display: flex; flex-direction: column; justify-content: center; }
.ds-ctrl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ds-tile { padding: 14px 18px; display: flex; flex-direction: column; min-height: 230px; }
.ds-th { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ds-vals { display: flex; gap: 28px; margin-top: 10px; }
.ds-vals b { display: block; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-spark { height: 70px; margin-top: 10px; }
.ds-multi { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.ds-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 12.5px; text-align: right; }
.ds-edit { max-height: 60vh; overflow: auto; margin-top: 10px; }
.ds-erow { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.ds-erow .chip-btn { padding: 2px 8px; }
@media (max-width: 900px) { .ds-live { grid-template-columns: 1fr; } }

/* ════════ P&L · ABC · Payouts (1 в 1 с Sellerise) ════════ */
.abc-g { display: inline-block; min-width: 70px; text-align: center; border-radius: 6px; padding: 2px 0; font-weight: 600; font-size: 12.5px; }
.abc-a { background: var(--good-bg); color: var(--good); } .abc-b { background: var(--amber-bg); color: var(--amber); } .abc-c { background: var(--red-bg); color: var(--red); }

/* ════════ Inventory · Heatmap · PPC · S&S · SQP (1 в 1 с Sellerise) ════════ */
.hm td { font-size: 12px; } .hm-2nd { font-size: 10.5px; opacity: .7; margin-top: 1px; } .hm-1 { background: #f8d7d7; color: #9b1c1c; } .hm-2 { background: #fbe7e0; color: #9a3412; }
.hm-3 { background: #fdf3c4; color: #854d0e; } .hm-4 { background: #d9f2e3; color: #166534; } .hm-5 { background: #b5e6c8; color: #14532d; }
.hm-legend { display: inline-flex; gap: 3px; } .hm-legend i { width: 18px; height: 14px; border-radius: 3px; display: inline-block; }
.op-sorted { color: var(--accent-ink); }
.ds-two { grid-template-columns: 1fr 1fr; }
.op-sqp-top { display: grid; grid-template-columns: 240px 1fr; gap: 14px; margin-bottom: 16px; align-items: stretch; }
.op-sqp-top .sp-kpis { margin-bottom: 0; grid-template-columns: repeat(3, 1fr); }
.op-gauge { display: flex; flex-direction: column; justify-content: center; }
.op-gauge-v { font-size: 34px; font-weight: 600; margin: 10px 0 6px; }
.op-bar { height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; } .op-bar i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.op-funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 16px 18px; }
.op-stage b { display: block; font-size: 22px; font-weight: 600; margin: 4px 0; }
.op-stage .op-bar { margin-top: 8px; }
.op-vs { display: flex; gap: 30px; flex-wrap: wrap; padding: 10px 18px 16px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 900px) { .op-sqp-top, .op-funnel { grid-template-columns: 1fr; } .op-sqp-top .sp-kpis { grid-template-columns: 1fr 1fr; } .ds-two { grid-template-columns: 1fr; } }

/* ════════ Smart Alerts · Reviews · Reimbursements · Global (1 в 1 с Sellerise) ════════ */
.al-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.al-c .kpi-label { font-size: 11px; letter-spacing: .05em; } .al-c.warning .kpi-value { color: var(--red); }
.al-list { padding: 4px 18px 10px; }
.al-ev { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.al-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--blue); } .al-dot.warning { background: var(--red); }
.al-w { color: var(--red); font-weight: 600; } .al-l { color: var(--blue); font-weight: 600; }
.al-stars { position: relative; color: var(--line); letter-spacing: 1px; }
.al-stars::before { content: '★★★★★'; position: absolute; left: 0; top: 0; width: var(--r); overflow: hidden; color: #f2b632; }

.sp-card { position: relative; }
.sp-pin { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 17px; color: var(--faint); cursor: pointer; }
.sp-pin.on { color: #f2b632; } .sp-pinned { border-color: #f2d58a; }
.sp-alerts { position: absolute; top: 76px; left: 14px; display: flex; gap: 6px; z-index: 2; }
.sp-alert { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--gray-bg); color: var(--muted); border: 1px solid var(--line); }
.sp-alert.w { background: var(--red-bg); color: var(--red); border-color: transparent; }
.sp-imgw { position: relative; } .sp-copy { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--card); font-size: 11px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.sp-imgw:hover .sp-copy { opacity: 1; }

:root[data-theme="dark"] {
  --paper: #0d1117; --card: #161b22; --ink: #e6edf3; --ink-2: #c9d1d9; --muted: #8b949e; --faint: #6e7681;
  --line: #30363d; --line-soft: #21262d; --hover: #1c2129;
  --accent: #3fb37f; --accent-ink: #6fd3a2; --accent-soft: #12261c; --accent-line: #2d6a4c;
  --side-bg: #0f141a; --side-line: #21262d; --side-text: #c9d1d9; --side-dim: #6e7681;
  --red: #f47067; --red-bg: #2d1515; --amber: #e0a14a; --amber-bg: #2a1f0f; --amber-line: #6b4e1f;
  --good: #57c58c; --good-bg: #10261a; --blue: #6cb6ff; --blue-bg: #11243b; --violet: #b392f0; --violet-bg: #231b38;
  --gray-bg: #1c2129; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 40px rgba(0,0,0,.55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #0d1117; --card: #161b22; --ink: #e6edf3; --ink-2: #c9d1d9; --muted: #8b949e; --faint: #6e7681;
    --line: #30363d; --line-soft: #21262d; --hover: #1c2129;
    --accent: #3fb37f; --accent-ink: #6fd3a2; --accent-soft: #12261c; --accent-line: #2d6a4c;
    --side-bg: #0f141a; --side-line: #21262d; --side-text: #c9d1d9; --side-dim: #6e7681;
    --red: #f47067; --red-bg: #2d1515; --amber: #e0a14a; --amber-bg: #2a1f0f; --amber-line: #6b4e1f;
    --good: #57c58c; --good-bg: #10261a; --blue: #6cb6ff; --blue-bg: #11243b; --violet: #b392f0; --violet-bg: #231b38;
    --gray-bg: #1c2129; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 40px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
body { background: var(--paper); color: var(--ink); transition: background-color .2s; }
.topbar { background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
input, select, textarea { background: var(--card); color: var(--ink); border-color: var(--line); }
.modal { background: var(--card); color: var(--ink); }

/* полировка: ровные цифры, мягкое появление страницы, видимый фокус с клавиатуры */
.num, td.num, .kpi-value, .f-value { font-variant-numeric: tabular-nums; }
@keyframes sh-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
/* переход: прежняя страница приглушена, пока грузится новая (app.js render) — без белого кадра */
#content.swapping { opacity: .45; pointer-events: none; transition: opacity .15s .1s; }
body.busy::after { content: ''; position: fixed; top: 0; left: 0; height: 2px; z-index: 200; background: var(--accent);
                   animation: sh-bar 1.6s ease-in-out infinite; }
@keyframes sh-bar { 0% { left: 0; width: 0; } 50% { left: 15%; width: 55%; } 100% { left: 100%; width: 0; } }
.skel-msg { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; flex-wrap: wrap; }
.skel-msg .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.skel-slow { display: none; flex-basis: 100%; font-size: 12.5px; color: var(--faint); padding-left: 24px; }
.loading.slow .skel-slow { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.kpi, .table-panel, .acard, .bcard, .ncard { transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi.click:hover, .bcard:hover, .ncard:hover { transform: translateY(-1px); }
.nav-btn { transition: background-color .12s, color .12s; position: relative; }
.nav-btn.active::before { content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .sk, body.busy::after { animation: none !important; } * { transition: none !important; } }

/* скелет загрузки: форма страницы видна сразу */
.loading.skel { display: block; padding: 4px 0; color: transparent; }
.loading.skel::before { display: none; }
.sk { background: linear-gradient(90deg, var(--line-soft) 0%, var(--hover) 40%, var(--line-soft) 80%); background-size: 300% 100%;
      animation: sh-shimmer 1.3s ease-in-out infinite; border-radius: 10px; }
@keyframes sh-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-h { height: 26px; width: 260px; margin-bottom: 22px; }
.sk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.sk-kpi { height: 104px; border-radius: var(--r); }
.sk-panel { background: var(--card); animation: none; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.sk-line { height: 14px; margin: 14px 0; }
.sk-line:nth-child(3n) { width: 72%; } .sk-line:nth-child(3n+1) { width: 88%; }

/* таблицы: заголовок держится при прокрутке длинной таблицы */
.tbl-wrap { max-height: min(74vh, 960px); overflow: auto; overscroll-behavior: contain; }
.tbl-wrap thead th { position: sticky; top: 0; z-index: 2; background: var(--card); box-shadow: inset 0 -1px 0 var(--line); }
.mtbl .tbl-wrap { max-height: none; }

/* кнопки шапки: тема и подсказка быстрого перехода */
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
            cursor: pointer; font-size: 15px; line-height: 1; flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.search-box { position: relative; }
.search-box .kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.kbd { font: 500 11px/1 var(--font); color: var(--faint); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; background: var(--card); }
.hdr-search { cursor: pointer; }

.jump-btn { display: none; font-size: 17px; }
/* быстрый переход (Ctrl/⌘ K) */
.jump-back { position: fixed; inset: 0; z-index: 100; background: rgba(13,17,23,.45); backdrop-filter: blur(2px);
             display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: sh-in .12s ease-out; }
.jump { width: 100%; max-width: 560px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.jump input { width: 100%; border: none; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 16px; outline: none; background: var(--card); color: var(--ink); }
.jump-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.jump-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.jump-item.sel, .jump-item:hover { background: var(--accent-soft); color: var(--accent-ink); }
.jump-hint { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jump-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.jump-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jump-side { color: var(--muted); font-size: 12px; white-space: nowrap; align-self: center; font-variant-numeric: tabular-nums; }
.jump-group { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); padding: 10px 12px 4px; }
.jump { max-width: 640px; }
.jump-empty { padding: 18px; color: var(--muted); text-align: center; }
.jump-foot { border-top: 1px solid var(--line); padding: 7px 14px; font-size: 11.5px; color: var(--faint); }

/* телефон: фильтры и вкладки — одной строкой с прокруткой, а не стопкой на пол-экрана */
@media (max-width: 760px) {
  .gfilters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .gfilters::-webkit-scrollbar, .page-tabs::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
  .gfilters::before { display: none; }
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg .chip-btn { white-space: nowrap; }
  .page-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .page-tab { white-space: nowrap; flex-shrink: 0; }
  .search-box .kbd { display: none; }
  .jump-btn { display: inline-block; }
  .sk-h { width: 60%; }
  .tbl-wrap { max-height: 70vh; }
}

/* ════════ Сигналы, подписки, где и когда, воронка (2026-11-03) ════════ */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red);
             color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-badge[hidden] { display: none; }
.sg-kind { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; font-weight: 500; white-space: nowrap; }
td.sg-what { max-width: 440px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.sg-msg + .sg-msg, .sg-diff + .sg-diff { margin-top: 4px; }
.sg-msg .tag { margin-right: 4px; }
.sg-act { margin-top: 8px; }
.sg-act .chip-btn { padding: 3px 10px; font-size: 12px; }

.geo-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; margin: 14px 0 4px; }
.geo-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 16px; box-shadow: var(--shadow); min-width: 0; }
.geo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; min-height: 32px; }
.geo-head b { font-size: 14px; font-weight: 600; }
.geo-head .tsub { margin-left: auto; }
.geo-map { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.geo-tile { aspect-ratio: 1; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center;
            font-size: 11px; color: var(--ink); cursor: default; min-width: 0; transition: transform .1s; }
.geo-tile:hover { transform: scale(1.08); box-shadow: var(--shadow-lg); position: relative; z-index: 1; }
.geo-tile b { font-size: 11.5px; font-weight: 600; line-height: 1.1; }
.geo-tile span { font-size: 10px; opacity: .8; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }
.geo-tile.dk { color: #fff; }
.hm-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.hm-h { font-size: 10.5px; color: var(--faint); text-align: left; white-space: nowrap; overflow: visible; height: 14px; }
.hm-d { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.hm-c { aspect-ratio: 1; border-radius: 4px; min-height: 12px; }
.fn-kpis .kpi-value { color: var(--ink); }
.fn-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.fn-row:first-of-type { border-top: 0; }
.fn-l { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.fn-bars { display: grid; gap: 5px; }
.fn-bar { position: relative; height: 22px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.fn-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 6px; }
.fn-bar span.ours { background: var(--accent); }
.fn-bar span.mkt { background: color-mix(in srgb, var(--faint) 55%, var(--card)); }
.fn-bar em { position: relative; font-style: normal; font-size: 12px; font-weight: 600; padding: 0 8px; line-height: 22px; color: var(--ink);
             font-variant-numeric: tabular-nums; text-shadow: 0 0 3px var(--card); }
.fn-lad { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fn-lad i { color: var(--faint); font-style: normal; }
.fn-lad .weak { color: var(--amber); font-weight: 600; background: var(--amber-bg); border-radius: 5px; padding: 0 4px; }
@media (max-width: 1100px) { .geo-wrap { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .geo-map { gap: 2px; } .geo-tile { border-radius: 4px; } .geo-tile span { display: none; } .geo-tile b { font-size: 9.5px; }
  .hm-grid { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 1px; } .hm-h { font-size: 8.5px; }
  .fn-row { grid-template-columns: 1fr; gap: 6px; }
}
td.nowrap, th.nowrap { white-space: nowrap; }
.hm-sub { font-size: 12px; color: var(--muted); font-weight: 500; margin: 18px 0 8px; }
.hm-bars { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; height: 64px; align-items: end; }
.hm-bar { height: 100%; display: flex; align-items: flex-end; }
.hm-bar i { display: block; width: 100%; background: color-mix(in srgb, var(--accent) 70%, var(--card)); border-radius: 3px 3px 0 0; }
.hm-bar:hover i { background: var(--accent); }
.hm-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hm-days div { background: var(--hover); border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 4px; text-align: center; min-width: 0; }
.hm-days b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.hm-days span { font-size: 11.5px; color: var(--muted); }
@media (max-width: 640px) { .hm-bars { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 1px; } }
@media (max-width: 640px) { .hm-days { gap: 3px; } .hm-days b { font-size: 11.5px; } .hm-days div { padding: 6px 2px; } }
/* ручные расходы: форма в одну-две строки */
.co-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 12px; align-items: end;
           background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.co-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 500; min-width: 0; }
.co-form label.wide { grid-column: span 2; }
.co-form input, .co-form select { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--card); border: 1px solid var(--line);
                                   border-radius: 8px; padding: 7px 10px; min-width: 0; width: 100%; }
.co-form input:focus, .co-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.co-form .chip-btn.primary { justify-content: center; padding: 8px 14px; }
@media (max-width: 640px) { .co-form label.wide { grid-column: auto; } }

/* Товары → «Почему» (why.js, 2026-11-04): кто вырос / кто упал — две колонки, на узком экране одна */
.wh-movers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.wh-mv { padding: 12px 14px; }
.wh-mv-h { font-weight: 600; margin-bottom: 6px; }
.wh-mv-r { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-soft); }
.wh-mv-r:first-of-type { border-top: 0; }
.wh-mv-r .num { text-align: right; white-space: nowrap; }
@media (max-width: 900px) { .wh-movers { grid-template-columns: 1fr; } }
/* Сигналы: мини-график продаж у спайка */
.sg-spark { display: inline-block; vertical-align: middle; margin-left: 6px; }
.login-denied { color: var(--red); font-size: 13px; margin-top: 14px; }
.login-core { color: var(--muted); font-size: 13px; margin-top: 12px; }
@media (max-width: 560px) { .sp-kpi .kpi-value { font-size: 19px; } .sp-ico { display: none; } }

/* Global Overview — плитки периодов (09.11, как у Sellerise) */
.gt-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin: 4px 0 10px; }
.gt-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.gt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.gt-tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.gt-tile.fc { border-color: var(--accent-line); background: var(--accent-soft); }
.gt-h { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.gt-h .tsub { margin-left: auto; }
.gt-fc { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--accent-ink); border: 1px solid var(--accent-line); border-radius: 4px; padding: 0 4px; cursor: help; }
.gt-r { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-2); }
.gt-v { text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.gt-p { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.gt-d.up { color: var(--good); } .gt-d.dn { color: var(--red); }
.gt-cust { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.gt-cg { display: flex; flex-direction: column; gap: 4px; min-width: 200px; font-size: 13px; }
.gt-cg label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.gt-cb { width: 100%; display: flex; gap: 8px; justify-content: flex-end; }
/* Smart Alerts — настройка по товару (09.11) */
.al-cfg td { background: var(--line-soft); }
.al-cfg-in { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px; }
.al-cfg-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; font-size: 13px; }
.al-cfg-g label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
/* Sales & Profit — окно колонок: перетаскивание и булавки (09.11) */
.sp-pick { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.sp-pick-r { border-left: 1px solid var(--line); padding-left: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 70vh; }
.sp-pick-h { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.sp-pick-list { list-style: none; margin: 0; padding: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.sp-pick-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: grab; font-size: 13px; }
.sp-pick-list li.over { border-color: var(--accent); background: var(--accent-soft); }
.sp-pick-i { color: var(--muted); font-size: 11px; width: 18px; }
.sp-grip { color: var(--muted); letter-spacing: -2px; }
.sp-pick-l { flex: 1; }
.sp-cpin, .sp-pick-x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13px; padding: 0 2px; }
.sp-cpin.on { color: var(--accent-ink); font-weight: 700; }
.sp-stick { position: sticky; z-index: 1; background: var(--card); }
thead .sp-stick { z-index: 3; }
@media (max-width: 760px) { .sp-pick { grid-template-columns: 1fr; } .sp-pick-r { border-left: 0; padding-left: 0; } }
.fns-manual td { color: var(--muted); font-style: italic; border-top: 1px dashed var(--line); }
.abc-c2 { background: var(--line-soft); color: var(--muted); }
/* SQP — статусы запросов (09.11, как у Sellerise) */
.op-st { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.op-st.new { background: var(--accent-soft); color: var(--accent-ink); } .op-st.maintained { background: var(--line-soft); color: var(--ink-2); }
.op-st.gained { background: var(--good-bg); color: var(--good); } .op-st.lost, .op-st.absent { background: var(--red-bg); color: var(--red); }
.al-cfg .gt-cb { justify-content: flex-start; margin-top: 8px; }   /* таблица шире панели — кнопки справа уезжали за край (09.11) */
