/* Aventa brand: palette and type from the brand book, layout echoes shop-aventa.ru */

@font-face { font-family: Roboto; font-weight: 400; font-display: swap; src: url(/static/fonts/roboto-cyrillic-400.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Roboto; font-weight: 500; font-display: swap; src: url(/static/fonts/roboto-cyrillic-500.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Roboto; font-weight: 700; font-display: swap; src: url(/static/fonts/roboto-cyrillic-700.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Roboto; font-weight: 400; font-display: swap; src: url(/static/fonts/roboto-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+20AC, U+20BD, U+2122, U+2190-2193; }
@font-face { font-family: Roboto; font-weight: 500; font-display: swap; src: url(/static/fonts/roboto-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+20AC, U+20BD, U+2122, U+2190-2193; }
@font-face { font-family: Roboto; font-weight: 700; font-display: swap; src: url(/static/fonts/roboto-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+20AC, U+20BD, U+2122, U+2190-2193; }

:root {
  --orange: #F16821;
  --orange-hover: #D9571A;
  --orange-soft: #FDEEE5;
  --ink: #2B2B2C;
  --graphite: #313439;
  --grey: #ACACAC;

  --bg: #FFFFFF;
  --surface: #F4F4F5;
  --surface-2: #EBEBED;
  --line: #E4E4E7;
  --text: #2B2B2C;
  --muted: #707176;
  --icon-bg: #2B2B2C;
  --icon-fg: #FFFFFF;
  --bar-track: #E4E4E7;
  --bar-calm: #ACACAC;
  --never-bg: #E4E4E7;
  --never-fg: #313439;
  --bad-fg: #D9571A;
  --good-fg: #15803D;
  --zone-ok: #DCF1E2;
  --zone-mid: #FFF0BF;
  --plexup-navy: #032F71;
  --plexup-red: #ED1D24;
  --radius: 16px;
  --glass-bg: rgba(255, 255, 255, .72);
  --glass-line: rgba(255, 255, 255, .6);
  --glass-shadow: 0 8px 32px rgba(20, 20, 24, .12);
}

/* Dark theme: follows the system unless the user picked a theme (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --orange-soft: #3A2519;
    --bg: #1C1C1D;
    --surface: #262628;
    --surface-2: #303033;
    --line: #38383C;
    --text: #F2F2F3;
    --muted: #A2A3A8;
    --icon-bg: #3A3B40;
    --bar-track: #38383C;
    --bar-calm: #6E6F74;
    --never-bg: #38383C;
    --never-fg: #E4E4E7;
    --bad-fg: #FF9A62;
    --good-fg: #5BD08A;
    --zone-ok: #1E3A28;
    --zone-mid: #3B3318;
    --plexup-navy: #8FA9E0;
    --glass-bg: rgba(38, 38, 40, .7);
    --glass-line: rgba(255, 255, 255, .08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --orange-soft: #3A2519;
  --bg: #1C1C1D;
  --surface: #262628;
  --surface-2: #303033;
  --line: #38383C;
  --text: #F2F2F3;
  --muted: #A2A3A8;
  --icon-bg: #3A3B40;
  --bar-track: #38383C;
  --bar-calm: #6E6F74;
  --never-bg: #38383C;
  --never-fg: #E4E4E7;
  --bad-fg: #FF9A62;
  --good-fg: #5BD08A;
  --zone-ok: #1E3A28;
  --zone-mid: #3B3318;
  --plexup-navy: #8FA9E0;
  --glass-bg: rgba(38, 38, 40, .7);
  --glass-line: rgba(255, 255, 255, .08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Roboto, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hover); }
h1 { font-size: 30px; line-height: 1.2; font-weight: 500; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 500; margin: 0 0 14px; }
.muted { color: var(--muted); }
.error { color: #C2410C; background: var(--orange-soft); padding: 10px 14px; border-radius: 10px; }
.r { text-align: right; } .c { text-align: center; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- Header ---------- */
.topbar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar { background: var(--glass-bg); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); }
}
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.brand img { height: 24px; width: auto; display: block; }
.brand-sub { font-size: 13px; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.topnav a { color: var(--text); }
.topnav a:hover, .topnav a.active { color: var(--orange); }
.who { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Theme toggle ---------- */
.theme-toggle { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.theme-toggle:hover { background: var(--surface-2); color: var(--orange); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.auth-main { position: relative; }
.auth-main > .theme-toggle { position: absolute; top: 20px; right: 20px; }

/* ---------- Layout ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 32px 16px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lead { color: var(--muted); margin: 8px 0 24px; max-width: 760px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }

/* ---------- Controls ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-height: 44px; }
input:focus, select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
input[type=checkbox] { min-height: 0; width: 18px; height: 18px; accent-color: var(--orange); cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font: inherit; font-weight: 500; background: var(--orange); color: #fff; border: 0; border-radius: 10px; padding: 0 22px; min-height: 44px; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--orange-hover); }
/* a:hover is more specific than .btn: on a phone the tap leaves hover on and the text turned orange on orange */
a.btn:not(.btn-ghost), a.btn:not(.btn-ghost):hover, a.btn:not(.btn-ghost):visited { color: #fff; }
.btn.block { width: 100%; }
.link { font: inherit; background: none; border: 0; color: var(--text); cursor: pointer; padding: 0; }
.link:hover { color: var(--orange); }
.link.danger { color: var(--muted); } .link.danger:hover { color: #C2410C; }
.inline { display: inline; margin: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > label { margin: 0; }
.row input[type=email], .row input[name=name] { flex: 1 1 220px; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-side { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side img { height: 34px; width: auto; align-self: flex-start; position: relative; }
.auth-side h2 { font-size: 34px; line-height: 1.15; font-weight: 500; margin: 0 0 12px; position: relative; }
.auth-side p { color: #B9BABE; margin: 0; max-width: 380px; position: relative; }
.auth-wave { position: absolute; left: -5%; bottom: 26%; width: 110%; color: #36383D; }
.auth-wave path { stroke: currentColor; }
.auth-main { display: grid; place-items: center; padding: 32px 16px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { margin-bottom: 8px; }
.auth-form .muted { margin: 0 0 24px; }
.auth-form label { margin-bottom: 16px; }
.auth-form .back { display: inline-block; margin-top: 20px; color: var(--muted); font-size: 14px; }
.auth-form .back:hover { color: var(--orange); }
.code-input { font-size: 26px; letter-spacing: .4em; text-align: center; font-weight: 500; }
.auth-mobile-logo { display: none; }
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-logo { display: block; height: 22px; margin-bottom: 40px; }
}

/* ---------- Home tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: var(--radius); padding: 24px; color: var(--text); min-height: 190px; transition: background .15s; }
.tile:hover { background: var(--surface-2); color: var(--text); }
.tile:hover .icon-box { background: var(--orange); }
.tile-title { font-size: 20px; font-weight: 500; margin-top: auto; }
.tile .muted { font-size: 14px; }
/* ---------- Home: rearranging tiles ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btn-ghost.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-ghost.small svg { width: 18px; height: 18px; }
.reorder-actions { display: none; gap: 8px; }
.reorder-hint { display: none; margin: 8px 0 0; font-size: 14px; }
.tile-move { display: none; position: absolute; top: 20px; right: 20px; gap: 6px; }
.tile-move button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--bg); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.tile-move button:hover { color: var(--orange); }
.tile-move button[disabled] { opacity: .35; cursor: default; color: var(--text); }
.tile-move svg { width: 20px; height: 20px; }
.reordering [data-reorder-start] { display: none; }
.reordering .reorder-actions { display: flex; }
.reordering + .reorder-hint { display: block; }
.tiles.reordering { position: relative; }
.tiles.reordering .tile { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tiles.reordering .tile:hover .icon-box { background: var(--icon-bg); }
.tiles.reordering .tile-move { display: flex; }
.tiles.reordering .tile-badge { display: none; }
@media (hover: none) { .mouse-only { display: none; } }
@media (max-width: 640px) { .tile-move svg { transform: rotate(90deg); } }
.install-app { margin-top: 24px; }
.install-app > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 16px; }
.install-app > summary::-webkit-details-marker { display: none; }
.install-app > summary > span:last-of-type { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.install-app > summary .muted { font-size: 14px; }
.install-app > summary::after { content: ""; flex: none; margin: -4px 4px 0 0; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.install-app[open] > summary::after { transform: rotate(-135deg); margin-top: 6px; }
.install-title { font-size: 18px; font-weight: 500; }
.install-body { margin-top: 4px; }
.install-body h3 { font-size: 16px; margin: 16px 0 8px; }
.install-body ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.install-body p { margin: 8px 0 0; }
/* Opened from the home-screen icon: the portal is already installed, the guide is not needed. */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) { .install-app { display: none; } }
.standalone .install-app { display: none; }
.inline-icon { width: 18px; height: 18px; vertical-align: -3px; color: var(--orange); }
.icon-box { width: 40px; height: 40px; border-radius: 10px; background: var(--icon-bg); color: var(--icon-fg); display: grid; place-items: center; flex: none; transition: background .15s; }
.icon-box svg { width: 22px; height: 22px; }
.title-row { display: flex; align-items: center; gap: 14px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; }
.kpi span { font-size: 13px; }
.kpi b { font-size: 26px; font-weight: 500; line-height: 1.2; }
.kpi.accent { background: var(--orange); color: #fff; }
.kpi.accent .muted { color: rgba(255,255,255,.85); }

/* ---------- Charts ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 16px; }
.grid2 > * { min-width: 0; }
.grid2 .card { margin-bottom: 0; }
.grid2 + * { margin-top: 16px; }
.bar-row > span:first-child { hyphens: auto; }
.bar-row { display: grid; grid-template-columns: minmax(170px, 1.2fr) 2fr minmax(110px, auto); gap: 12px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.bar { background: var(--bar-track); border-radius: 4px; height: 8px; overflow: hidden; }
.bar > div { background: var(--bar-calm); height: 100%; border-radius: 4px; }
.bar.hot > div { background: var(--orange); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tr.disabled td { opacity: .45; }
.rename input { padding: 4px 8px; min-height: 0; font-size: 13px; width: 170px; margin-left: 10px; background: transparent; border-color: transparent; }
.rename input:hover, .rename input:focus { background: var(--bg); border-color: var(--line); }

/* ---------- Clients ---------- */
.manager { padding: 0; scroll-margin-top: 84px; }
.manager summary { display: flex; gap: 14px; align-items: center; cursor: pointer; flex-wrap: wrap; padding: 20px 24px; list-style: none; }
.manager summary::-webkit-details-marker { display: none; }
.manager summary::after { content: ""; flex: none; margin: -4px 4px 0 auto; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.manager[open] summary::after { transform: rotate(-135deg); margin-top: 6px; }
.manager-body { padding: 0 24px 20px; }
.manager-body h2 { margin-top: 12px; }
.mgr-no { font-weight: 500; font-size: 17px; }
.badge { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.badge.bad { background: var(--orange-soft); color: var(--bad-fg); }
.badge.warn { background: var(--never-bg); color: var(--never-fg); }

code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }

@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .container { padding-top: 20px; }
  .card { padding: 18px; }
  .brand-sub, .who { display: none; }
  .brand img { height: 32px; }
  .topbar-in { height: 56px; }
  .topnav { gap: 18px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px 16px; }
  .kpi b { font-size: 19px; }
  .bar-row { grid-template-columns: minmax(92px, 1fr) 1fr minmax(96px, auto); font-size: 13px; gap: 8px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .manager summary { padding: 16px 18px; }
  .manager-body { padding: 0 18px 16px; }
}

/* ---------- Finance ---------- */
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.kpi-note { font-size: 12px; color: var(--bad-fg); }
.kpi.accent .kpi-note { color: #fff; }
td.neg { color: var(--bad-fg); }
.cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; height: 220px; padding-top: 20px; margin: 8px 0 20px; border-bottom: 1px solid var(--line); }
.col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; }
.col-bar { width: 100%; max-width: 44px; height: calc(100% - 22px); display: flex; align-items: flex-end; }
.col-bar > div { position: relative; width: 100%; background: var(--bar-calm); border-radius: 4px 4px 0 0; min-height: 2px; transition: background .15s; }
.col.hot .col-bar > div { background: var(--orange); }
.col:hover .col-bar > div, .col:focus-visible .col-bar > div { background: var(--text); }
.col.hot:hover .col-bar > div { background: var(--orange-hover); }
.col-label { position: absolute; bottom: -20px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.col-value { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--text); }
.col[data-tip]:hover::after, .col[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; width: max-content; max-width: 240px; white-space: normal; z-index: 5; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.col:first-child[data-tip]:hover::after { left: 0; transform: none; }
.col:last-child[data-tip]:hover::after, .col:nth-last-child(2)[data-tip]:hover::after { left: auto; right: 0; transform: none; }
.cols + .more { margin-top: 28px; }
.more > summary { cursor: pointer; color: var(--muted); font-size: 14px; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; margin-top: -4px; transform: rotate(45deg); transition: transform .15s; }
.more[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.more > summary:hover { color: var(--orange); }
.more[open] > summary { margin-bottom: 8px; }
.show-more { font: inherit; font-size: 14px; margin-top: 12px; background: var(--bg); color: var(--text); border: 0; border-radius: 10px; padding: 0 16px; min-height: 40px; cursor: pointer; }
.show-more:hover { color: var(--orange); }
@media (max-width: 640px) { .col-label { font-size: 10px; transform: rotate(-45deg); transform-origin: center; bottom: -24px; } .cols { margin-bottom: 30px; } .cols + .more { margin-top: 44px; } }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; margin: 16px 0 24px; border-bottom: 1px solid var(--line); }
.tabs a { color: var(--muted); padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--orange); }

/* ---------- Payment calendar ---------- */
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--text); margin-left: 8px; }
.legend i.lg-fc { border-top: 2px dashed var(--orange); }
.line-chart { position: relative; height: 260px; }
.line-chart svg { display: block; overflow: visible; }
.line-chart .grid { stroke: var(--line); stroke-width: 1; }
.line-chart .zero { stroke: var(--muted); stroke-width: 1; }
.line-chart .tick { fill: var(--muted); font-size: 11px; }
.line-chart .tick.strong { fill: var(--text); font-weight: 500; }
.line-chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line-chart .ln.fact { stroke: var(--text); }
.line-chart .ln.fc { stroke: var(--orange); stroke-dasharray: 5 4; }
.line-chart .today-line { stroke: var(--muted); stroke-dasharray: 2 3; }
.line-chart .cross { stroke: var(--muted); stroke-width: 1; }
.line-chart .hover-dot, .line-chart .low-dot { fill: var(--orange); stroke: var(--surface); stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.forecast-defaults { margin-bottom: 8px; }
.hint.trend { margin: 0 0 16px; }
.hint.trend b { color: var(--text); font-weight: 500; }
.forecast-defaults label { flex: 0 1 240px; }
.months-table th.grp { border-bottom: 0; padding-bottom: 0; }
.months-table tr.fact td { color: var(--muted); }
.months-table tr.fact td b { color: var(--text); }
input.pct { width: 76px; min-height: 34px; padding: 4px 8px; text-align: right; }
.hint { font-size: 13px; margin: 12px 0 0; }
.row .grow { flex: 1 1 260px; }
.ledger { max-height: 70vh; overflow: auto; border-radius: 10px; background: var(--bg); }
.ledger thead th { position: sticky; top: 0; background: var(--bg); z-index: 1; box-shadow: inset 0 -1px 0 var(--line); }
.ledger tr.month-sep td { background: var(--surface-2); font-weight: 500; font-size: 13px; padding: 6px 12px; }
.ledger tr.fc td { font-style: italic; }
.ledger tr.fc td b, .ledger tr.fc td .badge { font-style: normal; }
.ledger tr.we td:first-child { color: var(--muted); }
.ledger tr.today td { background: var(--orange-soft); }
.ledger .wd { display: inline-block; width: 22px; color: var(--muted); }
.ledger td.notes { white-space: normal; min-width: 240px; font-size: 13px; }
.note { display: block; color: var(--muted); }
.note.plan { color: var(--text); font-style: normal; font-weight: 500; }
.more-card { padding: 20px 24px; }
.more-card > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.more-card > summary::-webkit-details-marker { display: none; }
.more-card > summary h2 { margin: 0; display: inline; }
.more-card[open] > summary { margin-bottom: 14px; }

/* ---------- Marketplaces ---------- */
.small { font-size: 12px; }
.filters-bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin: 16px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips + .kpis { margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 36px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; }
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.active { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .chip.active { background: var(--text); color: var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.active { background: var(--text); color: var(--bg); } }
.mp-logo { border-radius: 25%; flex: none; display: block; }
.chip .mp-logo { margin-left: -6px; }
.kpis-6 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpis-6 .kpi { container-type: inline-size; }
.kpis-6 .kpi b { font-size: clamp(16px, 14cqi, 22px); white-space: nowrap; }
@media (max-width: 640px) { .kpis-6 { grid-template-columns: 1fr 1fr; } .kpis-6 .kpi b { font-size: 17px; } .legend .lg-item { margin: 0 12px 0 0; } }
.delta { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.delta.down { color: var(--bad-fg); }
.mp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 16px; }
.mp-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border-radius: var(--radius); padding: 20px 22px; color: var(--text); transition: background .15s; }
.mp-card:hover { background: var(--surface-2); color: var(--text); }
.mp-card-head { display: flex; align-items: center; gap: 12px; }
.mp-card-head .delta { margin-left: auto; }
.mp-card.total { background: var(--surface-2); }
.mp-card.total .mp-logo { border-radius: 8px; }
.mp-name { font-weight: 500; font-size: 16px; }
.mp-sales { font-size: 24px; font-weight: 500; margin-top: 6px; }
.share { height: 6px; border-radius: 3px; background: var(--bar-track); overflow: hidden; }
.share > div { height: 100%; border-radius: 3px; }
.mp-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 8px 0 0; }
.mp-card dt { font-size: 12px; color: var(--muted); }
.mp-card dd { margin: 0; font-weight: 500; }
.legend { flex-wrap: wrap; row-gap: 4px; }
.legend .lg-item { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0; border: 0; }
.legend .sw.prev { height: 0; width: 14px; border-top: 2px solid var(--text); border-radius: 0; }
.cols.stacked .col-bar { position: relative; }
.cols.stacked .stack { width: 100%; display: flex; flex-direction: column; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 0; }
.cols.stacked .stack > div { min-height: 2px; flex-basis: 0; }
.cols.stacked .col:hover .stack, .cols.stacked .col:focus-visible .stack { filter: brightness(1.08); }
.prev-tick { position: absolute; left: -3px; right: -3px; height: 0; border-top: 2px solid var(--text); pointer-events: none; }
.mp-table td, .mp-table th { padding: 10px 10px; }
.mp-table tr.empty td { color: var(--muted); }
.mp-table tfoot td { font-weight: 500; border-top: 2px solid var(--line); border-bottom: 0; }
.defects td.wrap { white-space: normal; min-width: 220px; }
.defects .m { padding: 6px 2px; width: 34px; }
.defects .dot { display: inline-grid; place-items: center; width: calc(14px + var(--s) * 3px); height: calc(14px + var(--s) * 3px); border-radius: 50%; background: var(--orange-soft); color: var(--bad-fg); font-size: 11px; font-weight: 500; }
.sync-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sync-card h2 { margin-bottom: 6px; }
.sync-card p { margin: 0; }
.error-inline { color: var(--bad-fg); }
.mpapi .mpapi-status p { margin: 10px 0 4px; }
.mpapi-results { margin: 0 0 8px; padding-left: 18px; font-size: 13px; }
.mpapi-results li.bad { color: var(--bad-fg); }
.mpapi-actions { flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; }
.mpapi-actions form { display: inline-flex; align-items: center; gap: 8px; }
.mpapi-actions input.days { width: 64px; text-align: right; }
.mpapi-keys { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 560px; margin-bottom: 12px; }
.mpapi-keys .btn { justify-self: start; }
.sync-errors { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--bad-fg); }
.btn[disabled] { opacity: .5; cursor: default; }
.pay-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.pay-person { background: var(--bg); border-radius: 12px; padding: 18px 20px; }
.pay-name { font-weight: 500; font-size: 17px; }
.pay-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.pay-figures > div { display: flex; flex-direction: column; gap: 2px; }
.pay-figures b { font-size: 18px; font-weight: 500; white-space: nowrap; }
.pay-figures b.pay-main { font-size: 22px; color: var(--orange); }
.pay .more { margin-top: 8px; }
.pay-table tr.fc td { font-style: italic; }
.pay-table tr.fc td b { font-style: normal; }
.pay-table tfoot td { font-weight: 500; border-top: 2px solid var(--line); border-bottom: 0; }
.pay-form td { padding: 6px 8px; }
.pay-form input { min-height: 38px; padding: 6px 10px; }
.pay-form input.num { width: 120px; text-align: right; }
.inline-check { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; }
@media (max-width: 640px) { .pay-figures { grid-template-columns: 1fr 1fr; } }
.tile { position: relative; }
.tile-badge { position: absolute; top: 24px; right: 24px; }
.placeholder { max-width: 760px; padding: 28px; }
.placeholder h2 { font-size: 20px; margin: 14px 0 8px; }
.placeholder p { margin: 0 0 20px; max-width: 600px; }
.admin-table th.svc { white-space: normal; max-width: 104px; line-height: 1.3; vertical-align: bottom; font-size: 11px; letter-spacing: .02em; }
.admin-table th.svc { padding-left: 12px; padding-right: 12px; }
.admin-table th, .admin-table td { padding-left: 8px; padding-right: 8px; }
.admin-table .rename input { width: 130px; }

/* ---------- Project sales ---------- */
/* Дерево «руководитель → статус → регион → проект», как в отчётах 1С */
.prj-tree tr.g0 td { font-weight: 600; background: var(--surface-2); }
.prj-tree tr.g1 td { font-weight: 600; }
.prj-tree tr.g1 td:first-child { padding-left: 22px; }
.prj-tree tr.g2 td { color: var(--muted); font-size: 13px; }
.prj-tree tr.g2 td:first-child { padding-left: 34px; }
.prj-tree tr:not([class^="g"]) td:first-child, .prj-tree tr.closed td:first-child { padding-left: 46px; }
.prj-tree tr.total td { border-top: 2px solid var(--line); }
.prj-tree th { white-space: normal; vertical-align: bottom; }
.prj-tree th.r { min-width: 90px; }
.prj-tree td.prj-place { font-size: 13px; min-width: 110px; max-width: 160px; white-space: normal; }
.prj-docs tr.g1 td { font-weight: 500; }
a.kpi-link { color: inherit; text-decoration: none; }
.prj-import h3 { margin: 24px 0 6px; font-size: 16px; }
.prj-grid th, .prj-grid td { white-space: nowrap; vertical-align: top; }
.prj-grid tr.sum td { border-bottom: 0; padding-bottom: 2px; }
.prj-grid tr.cnt td { padding-top: 2px; }
.prj-grid tr.sum.total td { border-top: 2px solid var(--line); }

.prj-auto { margin: 8px 0; padding-left: 20px; font-size: 14px; }
.prj-auto li { margin-bottom: 4px; }
.prj-upload { display: grid; gap: 12px; margin-top: 10px; }
.prj-upload label { display: flex; flex-direction: column; gap: 4px; }
.prj-upload input[type=file] { max-width: 100%; }
.prj-funnel-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) minmax(0, 1.1fr); }
@media (max-width: 640px) { .prj-funnel-row { grid-template-columns: 1fr; gap: 4px; } .prj-funnel-row .r { text-align: left; } }
a.kpi-link:hover { box-shadow: inset 0 0 0 2px var(--orange-soft); }
.prj-docs td.sub { padding-left: 26px; }
.prj-form { display: grid; gap: 12px; margin-top: 8px; }
.prj-name { display: flex; flex-direction: column; gap: 4px; }
.prj-doc-form { margin-top: 8px; align-items: end; }
.prj-filters .grow input { min-width: 0; width: 100%; }
.prj-filters label { min-width: 0; max-width: 100%; }
.prj-filters select { min-width: 0; max-width: 100%; }
@media (max-width: 640px) { .prj-filters label { flex: 1 1 100%; } .prj-filters select, .prj-filters input { flex: 1; } }
@media (max-width: 640px) {
  .prj-tree tr.g1 td:first-child { padding-left: 14px; }
  .prj-tree tr.g2 td:first-child { padding-left: 18px; }
  .prj-tree tr:not([class^="g"]) td:first-child, .prj-tree tr.closed td:first-child { padding-left: 22px; }
}
.projects-table td.wrap { white-space: normal; min-width: 240px; }
.prj-link { display: block; font-weight: 500; color: var(--text); }
.prj-link:hover { color: var(--orange); }
.projects-table tr.closed td { color: var(--muted); }
.projects-table td.paid { min-width: 150px; }
.projects-table td.paid .share { margin-bottom: 4px; }
.share > div:not([style*="background"]) { background: var(--orange); }
.share.big { height: 10px; border-radius: 5px; }
.badge.stage { background: var(--bg); color: var(--text); }
.badge.stage.big { font-size: 14px; padding: 6px 14px; background: var(--surface); }
.back-link { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; }
.facts .wide { grid-column: 1 / -1; }
.assistant-form { margin-top: 8px; }
textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; width: 100%; resize: vertical; }
textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.comment-form { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.comment { border-top: 1px solid var(--line); padding: 14px 0; }
.comment-head { display: flex; gap: 12px; align-items: baseline; }
.comment-head form { margin-left: auto; }
.comment p { margin: 6px 0 0; white-space: pre-wrap; }
.projects-table td { padding-left: 10px; padding-right: 10px; }

/* ---------- Retail ---------- */
.store { padding: 0; }
.store summary { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(0, 1fr)) 16px; gap: 16px; align-items: center; padding: 18px 24px; cursor: pointer; list-style: none; }
.store summary::-webkit-details-marker { display: none; }
.store summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); justify-self: end; transition: transform .15s; }
.store[open] summary::after { transform: rotate(-135deg); }
.store summary:hover { background: var(--surface-2); border-radius: var(--radius); }
.store-name { font-size: 17px; font-weight: 500; }
.store-fig { display: flex; flex-direction: column; gap: 1px; }
.store-fig b { font-weight: 500; white-space: nowrap; }
.store-body { padding: 4px 24px 24px; }
.mini-kpis { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 4px 0 18px; }
.mini-kpis > div { display: flex; flex-direction: column; }
.mini-kpis b { font-size: 18px; font-weight: 500; }
.seg { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 3px; gap: 2px; margin-bottom: 12px; }
.seg button { font: inherit; font-size: 14px; border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.seg button.active { background: var(--surface-2); color: var(--text); font-weight: 500; }
.retail-cols { height: 200px; }
.retail-cols .col-bar > .rev { width: 100%; background: var(--bar-calm); border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; min-height: 1px; position: relative; }
.retail-cols .rev .profit { width: 100%; background: var(--orange); }
.retail-cols .col:hover .rev { background: var(--muted); }
.retail-cols.daily .col-label { font-size: 10px; }
.retail-cols.daily .col:nth-child(odd) .col-label { visibility: hidden; }
.retail-cols.daily .col.we .col-label { color: var(--bad-fg); }
.legend-note { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; }
.legend-note .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.sw-rev { background: var(--bar-calm); }
.sw-profit { background: var(--orange); }
.store-sub { margin-top: 24px; }
.tabs-box .table-wrap { margin-top: 24px; }
@media (max-width: 760px) {
  .store summary { grid-template-columns: 1fr 1fr; align-items: start; padding: 16px 18px; }
  .store-name { grid-column: 1 / -1; }
  .store summary::after { display: none; }
  .store-body { padding: 4px 18px 18px; }
  .retail-cols.daily .col:nth-child(3n+1) .col-label { visibility: visible; }
  .retail-cols.daily .col-label { visibility: hidden; transform: none; bottom: -18px; }
}

/* ---------- HR ---------- */
.sw-hire { background: var(--text); }
.sw-leave { background: var(--orange); }
.div-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; height: 220px; padding-bottom: 22px; position: relative; }
.dcol { display: grid; grid-template-rows: 1fr 1fr; position: relative; outline: none; }
.dcol .up, .dcol .dn { display: flex; flex-direction: column; align-items: center; }
.dcol .up { justify-content: flex-end; border-bottom: 1px solid var(--line); }
.dcol .dn { justify-content: flex-start; }
.dcol .up > div, .dcol .dn > div { width: 60%; max-width: 40px; min-height: 2px; }
.dcol .up > div { background: var(--text); border-radius: 4px 4px 0 0; }
.dcol .dn > div { background: var(--orange); border-radius: 0 0 4px 4px; }
.dcol span { font-size: 12px; font-weight: 500; line-height: 1.6; }
.dlabel { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; color: var(--muted); font-weight: 400 !important; }
.badge.hire { background: var(--bg); color: var(--text); }
td.wrap { white-space: normal; }

/* ---------- Marketing ---------- */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.promo { background: var(--bg); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.promo.finished { opacity: .6; }
.promo-head { display: flex; align-items: center; gap: 8px; }
.promo-head .edit { margin-left: auto; color: var(--muted); }
.promo-title { font-weight: 500; font-size: 16px; }
.promo-desc { margin: 2px 0 0; color: var(--muted); }
.promo-grid > form, .promo-grid > form + form { grid-column: 1 / -1; }
.promo-form, .vendor-form { margin-top: 12px; }
.promo-form .wide, .vendor-form .wide { flex-basis: 100%; }
.vendor-form input { width: 150px; }
.vendor-form .wide input { width: 100%; }
.vendor-table td.used { min-width: 130px; }
.vendor-table tfoot td { font-weight: 500; border-top: 2px solid var(--line); border-bottom: 0; }
.program { border-top: 1px solid var(--line); padding: 14px 0; }
.program:first-of-type { border-top: 0; padding-top: 0; }
.program-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.program p { margin: 4px 0 8px; }
.program .bar-row { grid-template-columns: minmax(200px, 1.2fr) 2fr 60px; }

/* Control panel: access requests */
.nav-count { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 2px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; vertical-align: 1px; }
.notice { background: var(--surface); padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; }
.req-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.req-bar .check { display: flex; flex-direction: row; gap: 8px; align-items: center; margin: 0 auto 0 0; cursor: pointer; color: var(--text); font-size: 15px; }
.req-bar .check input { width: 18px; margin: 0; }
.req-table td { vertical-align: middle; }
.nowrap { white-space: nowrap; }
.nowrap .link { margin-left: 12px; }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
.inline-h { display: inline; margin: 0; }
.clear-requests { margin: 4px 0 0 4px; }
details.card[open] > summary { margin-bottom: 12px; }

/* ---------- Marketplaces: manual entry ---------- */
.head-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mp-import > summary, .mp-entry-card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; }
.mp-import > summary::-webkit-details-marker, .mp-entry-card > summary::-webkit-details-marker { display: none; }
.mp-import > summary::after, .mp-entry-card > summary::after { content: ""; flex: none; margin: -4px 4px 0 auto; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.mp-import[open] > summary::after, .mp-entry-card[open] > summary::after { transform: rotate(-135deg); margin-top: 6px; }
.mp-import[open] > summary, .mp-entry-card[open] > summary { margin-bottom: 16px; }
.mp-import input[type=file] { flex: 1 1 260px; }
.mp-period { margin: 8px 0 16px; align-items: center; }
.mp-period .chip { min-height: 44px; min-width: 44px; justify-content: center; }
.mp-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.mp-fields > label { justify-content: space-between; } /* подпись в две строки не сдвигает поле ниже соседнего */
.mp-fields input { width: 100%; }
.mp-entry-card .more { margin-top: 16px; }
.mp-entry-card .more .mp-fields { margin-top: 12px; }
.mp-defects { display: grid; gap: 8px; }
.mp-defect { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px; }
.mp-defect input { width: 100%; min-width: 0; }
.mp-save { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .mp-fields { grid-template-columns: 1fr 1fr; }
  .mp-defect { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .mp-defect.head { display: none; }
  .mp-defect input:first-child { grid-column: 1 / -1; }
}

/* ---------- Ideas ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.idea-form textarea { min-height: 120px; }
.idea-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.idea-actions .btn { margin-left: auto; }
.btn-ghost { font: inherit; font-size: 15px; display: inline-flex; flex-direction: row; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost.on { border-color: var(--orange); background: var(--orange-soft); color: var(--bad-fg); }
.btn-ghost.on svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .btn-ghost.on svg { animation: none; } }
.file-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-pick:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.idea-picked { list-style: none; padding: 0; margin: 8px 0 0; font-size: 14px; }
.idea-picked:empty { display: none; }
.idea-picked li::before { content: "📎 "; }
.idea-filter { margin: 24px 0 8px; }
.idea { padding: 20px 24px; }
.idea-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.idea-text { white-space: pre-wrap; margin: 12px 0 0; }
.idea-files { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.idea-files audio { display: block; max-width: 100%; height: 36px; margin-bottom: 4px; }
.idea-note { margin: 12px 0 0; padding: 10px 14px; background: var(--bg); border-radius: 10px; white-space: pre-line; }
.idea-update p { margin: 4px 0 0; }
.idea .more { margin-top: 12px; }
.idea-status-form { margin-top: 12px; }
.idea-status-form .grow { flex: 1 1 240px; }
.idea-del { margin-top: 8px; }
.idea-st.new { background: var(--orange-soft); color: var(--bad-fg); }
.idea-st.in_work { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .idea-st.in_work { background: var(--text); color: var(--bg); }
input.token { flex: 1 1 280px; font-family: ui-monospace, monospace; font-size: 13px; }
@media (max-width: 640px) {
  .idea-actions .btn { margin-left: 0; width: 100%; }
  .idea { padding: 16px 18px; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .idea-st.in_work { background: var(--text); color: var(--bg); } }
.section-title { margin: 24px 0 12px; }

/* Дашборд РАЭК: plan zones as in the Excel legend (≥100%, 80–99%, <80%) */
.raek-company { align-items: center; margin: 8px 0 16px; }
.raek-company select { min-width: 220px; }
.zone { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--bg); white-space: nowrap; }
.zone.z-ok, td.z-ok { background: var(--zone-ok); }
.zone.z-mid, td.z-mid { background: var(--zone-mid); }
.zone.z-low, td.z-low { background: var(--orange-soft); }
.zone-count { display: flex; gap: 6px; margin: 2px 0; }
.zone-count .zone { font-size: 20px; font-weight: 600; padding: 2px 14px; color: var(--text); }
.raek-brands td, .raek-brands th, .raek-matrix td, .raek-matrix th, .tabs-box td, .tabs-box th { white-space: nowrap; }
.raek-matrix table { font-size: 12px; }
.raek-matrix td:first-child, .raek-matrix th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.raek-matrix td.r { padding-left: 6px; padding-right: 6px; }
tr.mine td { font-weight: 600; }
.raek-matrix td:first-child a { color: var(--text); }
tr.mine td:first-child, .raek-matrix tr.mine td:first-child a { color: var(--orange); }
tr.total td { font-weight: 600; }
.tabs-box .seg { flex-wrap: wrap; }
.raek-upload .row input[type=file] { flex: 1; min-width: 0; }

/* Admin: sections inside a folder service, picked under its checkbox */
.admin-table details.sections { margin-top: 4px; font-size: 12px; }
.admin-table details.sections summary { cursor: pointer; color: var(--muted); white-space: nowrap; }
.admin-table details.sections summary.none { color: var(--bad-fg); }
.sections-list { display: grid; gap: 2px; margin-top: 6px; text-align: left; }
.sections-list form { display: block; }
.sections-list label { display: flex; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; color: var(--text); cursor: pointer; }
.sections-list input[type=checkbox] { min-height: 0; margin: 0; }

/* Дашборд РАЭК: logos of members and brands sit on white chips in both themes */
.logo-chip { display: inline-flex; align-items: center; justify-content: center; flex: none; background: #fff; border-radius: 8px; padding: 4px 8px; width: 88px; height: 32px; }
.logo-chip.empty { background: transparent; }
.logo-chip img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-chip.small { display: flex; width: 60px; height: 22px; padding: 2px 4px; border-radius: 6px; margin: 0 0 4px auto; }
.logo-chip.big { width: 150px; height: 56px; padding: 8px 12px; border-radius: 12px; }
.raek-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.raek-name.compact .logo-chip { width: 64px; height: 24px; padding: 2px 6px; border-radius: 6px; }
.raek-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.raek-h .raek-name { font-weight: inherit; }
.raek-h .logo-chip { width: 110px; height: 36px; }

/* PLEXUP block in the trademark's colours (plexup.ru): navy and red */
.plexup h2 { color: var(--plexup-navy); margin: 0; }
.plexup-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.plexup-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.plexup-kpis > div { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border-radius: 12px; padding: 14px 16px; border-top: 3px solid var(--plexup-navy); }
.plexup-kpis b { font-size: 20px; font-weight: 600; }
.plexup-bars { display: grid; gap: 6px; }
.plexup-bar { display: grid; grid-template-columns: 260px 1fr 90px; gap: 12px; align-items: center; font-size: 14px; }
.plexup-bar .track { height: 10px; border-radius: 999px; background: var(--bar-track); overflow: hidden; }
.plexup-bar .track > div { height: 100%; border-radius: 999px; background: var(--plexup-navy); }
.plexup-bar.mine .track > div { background: var(--plexup-red); }
.plexup-bar.mine .raek-name { font-weight: 600; }
.plexup-bar .raek-name .logo-chip { width: 64px; height: 24px; padding: 2px 6px; border-radius: 6px; }
@media (max-width: 640px) {
  .plexup-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .plexup-bar { grid-template-columns: 1fr auto; row-gap: 4px; }
  .plexup-bar .track { grid-column: 1 / -1; grid-row: 2; }
}
.member-note { font-size: 11px; padding: 2px 8px; font-weight: 500; white-space: nowrap; }
.raek-members { margin: -8px 0 16px; }

/* HR monitor */
.hr-filters label { flex-direction: row; align-items: center; gap: 8px; }
.hr-funnel td .bar { margin-top: 6px; max-width: 260px; }
.hr-entry { margin-top: 14px; }
.hr-entry > summary { cursor: pointer; list-style: none; display: inline-block; margin-bottom: 12px; }
.hr-entry > summary::-webkit-details-marker { display: none; }
.row label input[type=email] { flex: none; }
.ref-step { display: block; margin-top: 4px; }
.ref-step button.badge { border: 0; cursor: pointer; font-family: inherit; }
.referrals tr.muted td { color: var(--muted); }
.referrals tr.note-row td { padding-top: 0; border-top: 0; }

/* Рекомендации по маркетплейсам */
.advice-note { margin: 0 0 12px; }
.advice-chips { margin-bottom: 16px; }
.advice .goods-in { display: flex; gap: 10px; align-items: flex-start; min-width: 220px; }
.advice .goods-in .mp-logo { flex: none; margin-top: 2px; border-radius: 6px; }
.advice td.small { min-width: 200px; max-width: 360px; white-space: normal; }
.advice .goods-in > div { white-space: normal; max-width: 280px; }
.tabs-box.card h3 { margin: 18px 0 8px; font-size: 16px; font-weight: 500; }
.ok-text { font-weight: 500; }
.warn-text { color: var(--bad-fg); }

/* Ценовая позиция */
.prices-head p { margin: 0 0 8px; }
.prices-head .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.prices-filter { display: grid; gap: 10px; margin: 0 0 16px; }
.prices-filter .search-row { display: flex; gap: 8px; max-width: 520px; }
.prices-filter .search-row input { flex: 1; min-width: 0; }
.price-group summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; cursor: pointer; }
.prices .goods-cell { white-space: normal; min-width: 220px; max-width: 320px; }
.prices td.recs { white-space: normal; min-width: 240px; max-width: 420px; }
.prices td.recs div + div { margin-top: 4px; }
.lvl { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.lvl-cheaper { background: var(--surface-2); color: var(--text); }
.lvl-par { color: var(--muted); }
.lvl-dearer { background: var(--orange-soft); color: var(--bad-fg); }
.accent-text { color: var(--bad-fg); }
.share.stacked { display: flex; }
.share.stacked > div { border-radius: 0; }

/* Телефон: поля ввода не мельче 16px — иначе Safari на iPhone увеличивает страницу при нажатии на поле */
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }
  .install-app > summary { align-items: flex-start; }
  .install-app > summary::after { margin-top: 8px; }
  .install-app[open] > summary::after { margin-top: 14px; }
}

/* логотип площадки и подпись — в одну строку, по центру */
.mp-inline { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mp-inline .mp-logo { flex: none; }
.rec-line { display: flex; align-items: flex-start; gap: 6px; }
.rec-line .mp-logo { flex: none; margin-top: 2px; }
td.wrap { white-space: normal; }
.mp-card-head .mp-name { white-space: nowrap; }

/* Маркетплейсы → Сегодня: список дел */
.task-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.task-main { display: grid; gap: 4px; min-width: 0; }
.task-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.task-text { overflow-wrap: anywhere; }
.task-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.task-actions input[name=note] { width: 200px; min-height: 34px; padding: 0 10px; }
@media (max-width: 760px) {
  .task { grid-template-columns: minmax(0, 1fr); }
  .task-actions input[name=note] { flex: 1 1 100%; width: auto; font-size: 16px; }
}
table.journal td.wrap { min-width: 240px; }
@media (max-width: 640px) { .kpis-6 .kpi:nth-child(3):last-child { grid-column: 1 / -1; } }

/* Маркетплейсы → Монитор: план на месяц */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 12px; }
.plan-card { background: var(--bg); border-radius: 12px; padding: 14px 16px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.plan-card.plan-all { box-shadow: inset 0 0 0 2px var(--orange); }
.plan-title { display: flex; align-items: center; gap: 8px; }
.plan-title .mp-logo { flex: none; }
.plan-metric { display: grid; gap: 4px; }
.plan-metric b { font-size: 20px; white-space: nowrap; }
.plan-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); margin: 4px 0 2px; }
.plan-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--orange); }
.plan-bar s { position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px; background: var(--text); }
.plan-form input { width: 140px; }
@media (max-width: 640px) { .plan-form input { font-size: 16px; width: 120px; } }
#plan > details.more { margin-top: 14px; }

/* Маркетплейсы → Товары */
.abc { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg); white-space: nowrap; }
.abc-A { background: var(--zone-ok); }
.abc-B { background: var(--zone-mid); }
.abc-loss { background: var(--orange-soft); color: var(--bad-fg); }
.abc-none { color: var(--muted); }
.title-row .abc { font-size: 14px; padding: 4px 12px; }
.abc-kpis a.kpi { color: inherit; text-decoration: none; }
.abc-kpis a.kpi.active { box-shadow: inset 0 0 0 2px var(--orange); }
.seg a { font-size: 14px; color: var(--muted); padding: 7px 14px; border-radius: 8px; text-decoration: none; }
.seg a.active { background: var(--surface-2); color: var(--text); font-weight: 500; }
.tabs-box .filters { align-items: center; margin: 4px 0 12px; }
.tabs-box .filters input[name=q] { flex: 1 1 220px; max-width: 360px; }
.mp-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.mp-row .mp-logo { flex: none; }
.mp-row .muted { margin-left: 4px; }
table.products td.wrap { min-width: 220px; max-width: 420px; white-space: normal; }
.reason-bars { display: grid; gap: 8px; margin-bottom: 12px; }
.reason-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 2fr) auto 56px; gap: 10px; align-items: center; font-size: 14px; }
.reason-row .bar-label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.reason-row .bar-label .mp-logo { flex: none; }
.reason-row .bar-note { text-align: right; }
.best-badge { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--zone-ok); color: var(--text); font-size: 11px; text-transform: none; letter-spacing: 0; }
ul.plain { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
b.neg { color: var(--bad-fg); }
@media (max-width: 640px) {
  .reason-row { grid-template-columns: minmax(0, 1fr) auto; }
  .reason-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .reason-row .bar-note { display: none; }
  .tabs-box .filters input[name=q] { font-size: 16px; max-width: none; }
}
@media (max-width: 640px) {
  .tabs-box .table-wrap:has(table.products) { overflow: visible; }
  table.products thead { display: none; }
  table.products, table.products tbody { display: block; }
  table.products tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.products td { display: block; padding: 0; border: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  table.products td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; }
  table.products td.c-abc { grid-column: 1 / -1; order: -1; display: none; }
  table.products td.c-name { grid-column: 1 / -1; min-width: 0; max-width: none; white-space: normal; }
  table.products td.c-name::before, table.products td.c-abc::before { content: none; }
  table.products td.c-best { grid-column: span 3; }
  table.products tbody tr:hover td { background: none; }
}
.abc-inline { display: none; margin-right: 8px; }
@media (max-width: 640px) { .abc-inline { display: inline; } }
table.pcard th:first-child, table.pcard td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; white-space: normal; min-width: 130px; }
table.pcard th .best-badge { display: block; width: max-content; margin-left: auto; }
@media (max-width: 640px) { table.pcard th, table.pcard td { padding-left: 8px; padding-right: 8px; } }
.seg.chips { flex-wrap: wrap; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi.active { box-shadow: inset 0 0 0 2px var(--orange); }
table.ads-table td.c-best { white-space: normal; min-width: 200px; }
@media (max-width: 640px) { table.ads-table td.c-best { grid-column: 1 / -1; } }

/* Маркетплейсы → Отзывы и вопросы */
.stars { color: var(--orange); letter-spacing: 1px; white-space: nowrap; font-size: 14px; }
.stars .off { color: var(--line); }
.star-one { color: var(--orange); }
.accent-text { color: var(--orange); font-weight: 500; }
.task-text { white-space: pre-line; }
.notice-line { display: block; margin: 0 0 12px; padding: 12px 16px; border-radius: 12px; background: var(--orange-soft); color: var(--text); text-decoration: none; }
.notice-line:hover { color: var(--text); box-shadow: inset 0 0 0 2px var(--orange); }

/* Маркетплейсы → Контент карточек */
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 28px; padding: 0 8px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.score.z-ok { background: var(--zone-ok); } .score.z-mid { background: var(--zone-mid); } .score.z-low { background: var(--orange-soft); color: var(--bad-fg); }
.task.content-card { grid-template-columns: minmax(0, 1fr); }
ul.recs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
ul.recs li { display: flex; gap: 8px; align-items: baseline; }
.rec-kind { flex: none; min-width: 112px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 640px) { ul.recs li { display: block; } .rec-kind { display: block; } }
.today-filters { display: grid; gap: 8px; margin: 4px 0 14px; }
.today-filters .seg { margin: 0; }
.task-facts { color: var(--muted); }
.task-facts b { color: var(--text); font-weight: 500; }
.sources-box summary { cursor: pointer; }
.sources-box .table-wrap { margin-top: 12px; }
.src { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--bg); white-space: nowrap; }
.src-api { background: var(--zone-ok); }
.src-manual { background: var(--zone-mid); }
.src-help { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 6px; }


/* SMM: контент-план и каналы */
.smm-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.smm-day { background: var(--bg); border-radius: 12px; padding: 8px; min-height: 96px; display: flex; flex-direction: column; gap: 6px; }
.smm-day.past { opacity: .6; }
.smm-day.today { box-shadow: inset 0 0 0 2px var(--orange); }
.smm-day-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.smm-day-head:hover, .smm-day-head:hover .smm-add { color: var(--orange); }
.smm-add { font-size: 16px; line-height: 1; }
.smm-post { display: flex; flex-direction: column; gap: 3px; background: var(--surface); border-radius: 10px; padding: 8px 10px; color: var(--text); font-size: 13px; border-left: 3px solid var(--line); }
.smm-post:hover { background: var(--surface-2); color: var(--text); }
.smm-post.st-scheduled { border-left-color: var(--orange); }
.smm-post.st-published { border-left-color: var(--muted); }
.smm-post-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.smm-post-title { font-weight: 500; overflow-wrap: anywhere; }
.smm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 8px; }
.smm-list .smm-post { background: var(--bg); }
.smm-form { display: flex; flex-direction: column; gap: 12px; }
.smm-form select { width: 100%; }
.smm-channels { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.smm-channels legend { font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 8px; }
.smm-channels label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.smm-channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.smm-channel-grid .card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.smm-channel h2 { margin: 0; font-size: 18px; }
.smm-channel.frozen h2 { color: var(--muted); }
.smm-channel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.smm-figures { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 6px 0; }
.smm-figures > div { display: flex; flex-direction: column; gap: 2px; }
.smm-figures b { font-size: 20px; font-weight: 500; }
.smm-figures b.smm-owner { font-size: 15px; overflow-wrap: anywhere; }
.smm-connect { margin: 0; }
@media (max-width: 820px) {
  .smm-week { grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 16px; }
  .smm-day { min-height: 0; }
  .smm-day.empty.past { display: none; }
}
.smm-tg { font-size: 12px; color: var(--muted); }
.smm-tg.ok { color: var(--good-fg); }
.smm-tg.bad { color: var(--bad-fg); }
.smm-images { display: flex; flex-direction: column; gap: 8px; }
.smm-images input[type=file] { min-height: 0; padding: 8px; }
.smm-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.smm-thumb { width: 104px; gap: 4px; }
.smm-thumb img { width: 104px; height: 104px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.smm-thumb .check { flex-direction: row; align-items: center; gap: 6px; display: flex; color: var(--text); }
.smm-pub { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.smm-pub p { margin: 0; }
.smm-bot summary { cursor: pointer; }
.smm-bot ol { padding-left: 18px; margin: 10px 0; display: grid; gap: 4px; }
.smm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.smm-kpis .kpi { background: var(--bg); }
.smm-chart { width: 100%; height: 160px; display: block; margin: 4px 0 12px; }
.smm-chart polyline { stroke: var(--orange); stroke-width: 2.5; }
.smm-days summary { cursor: pointer; }
.smm-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.smm-cols h3 { margin: 0 0 10px; font-weight: 500; }
.smm-cols h3 + .bar-row, .smm-cols .bar-row + h3 { margin-top: 0; }
.smm-cols .bar-row + h3, .smm-cols p + h3 { margin-top: 18px; }
.smm-bar { grid-template-columns: minmax(0, 1.3fr) 1.5fr 32px; }
@media (max-width: 640px) { .smm-kpis { gap: 8px; } .smm-kpis .kpi { padding: 14px; } .smm-kpis .kpi b { font-size: 20px; } .smm-bar { grid-template-columns: minmax(0, 1.3fr) 1fr 28px; } }
.kpi b .smm-tg, .kpi b .muted { font-size: inherit; }
.smm-code { overflow-wrap: anywhere; }
.smm-manual { margin-top: 10px; }
.smm-manual summary { cursor: pointer; }
.smm-manual .row { margin-top: 8px; }

/* Training (iSpring) */
.bar-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.bar-cell .bar { flex: 1; }
.bar-cell span { font-size: 13px; min-width: 38px; text-align: right; }

/* Неликвиды: cost of frozen money */
.money-rates { align-items: flex-end; margin: 8px 0 16px; }
.money-rates input.num { width: 90px; }
.rate-box { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.rate-box b { font-size: 20px; font-weight: 600; }
.money-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 640px) { .money-results { grid-template-columns: 1fr; } }
input[type=file] { max-width: 100%; min-width: 0; }
.mp-import form.row > input[type=file] { flex: 1 1 220px; }


/* ---------- Дирекция развития ---------- */
.dev-how > summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dev-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 820px; }
.dev-kpis { margin-top: 16px; }
.dev-filters label { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.dev-filters .check input, .filters-bar .check input { width: 18px; margin: 0; }
.filters-bar .check { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.dev-area { margin-bottom: 16px; }
.dev-area-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dev-area-head h2 { margin: 0; }
.dev-area-head h2 a { color: var(--text); }
.dev-area-head h2 a:hover { color: var(--orange); }
.dev-source { margin: 4px 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.dev-state-edit > summary { list-style: none; cursor: pointer; }
.dev-state-edit > summary::-webkit-details-marker { display: none; }
.dev-state-edit[open] { flex-basis: 100%; }
.dev-state-edit form { margin-top: 8px; }
.dev-state.ok { background: var(--zone-ok); color: var(--text); }
.dev-state.part { background: var(--zone-mid); color: var(--text); }
.dev-state.wait { background: var(--orange-soft); color: var(--bad-fg); }
.dev-item { border-top: 1px solid var(--line); }
.dev-item > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 0; }
.dev-item > summary::-webkit-details-marker { display: none; }
.dev-item > summary:hover .dev-title { color: var(--orange); }
.dev-title { flex: 1 1 260px; min-width: 0; font-weight: 500; }
.dev-meta { flex: 0 1 auto; }
.dev-item.st-done .dev-title, .dev-item.st-drop .dev-title { color: var(--muted); font-weight: 400; }
.dev-item.st-drop .dev-title { text-decoration: line-through; }
.dev-body { padding: 0 0 14px; }
.dev-text { white-space: pre-line; margin: 0 0 10px; }
.dev-st { white-space: nowrap; }
.dev-st.s-work { background: var(--ink); color: #fff; }
.dev-st.s-wait { background: var(--orange-soft); color: var(--bad-fg); }
.dev-st.s-plan { background: var(--surface-2); color: var(--text); }
.dev-st.s-done { background: var(--zone-ok); color: var(--text); }
:root[data-theme="dark"] .dev-st.s-work { background: var(--text); color: var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dev-st.s-work { background: var(--text); color: var(--bg); } }
.dev-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.dev-quick form { margin: 0; }
.dev-comments { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.dev-comments li { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.dev-comments p { margin: 2px 0 0; white-space: pre-line; }
.dev-comments form.inline { display: inline; margin-left: 8px; }
.dev-comment-form { margin-bottom: 10px; }
.dev-comment-form input { width: 100%; }
.dev-form { display: grid; gap: 12px; margin-top: 8px; }
.dev-form .wide { display: flex; flex-direction: column; }
.dev-form textarea, .dev-form .wide input { width: 100%; }
.dev-add { margin-top: 12px; }
.dev-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.dev-rec { display: flex; flex-direction: column; gap: 6px; }
.dev-rec h2 { margin: 0; }
.dev-rec .dev-quick { margin-top: auto; padding-top: 6px; }
.dev-rec-facts { margin: 0; display: grid; gap: 6px; }
.dev-rec-facts dd { margin: 0; }
.dev-dropped { margin-top: 16px; }
.dev-dropped .dev-recs { margin-top: 12px; }
.dev-kpis { grid-template-columns: repeat(auto-fit, minmax(min(96px, 100%), 1fr)); gap: 10px; }
.dev-kpis .kpi { padding: 14px 18px; }
.dev-state-edit > summary.link { color: var(--orange); }
.dev-idea { margin: 0 0 10px; }
.idea-plan { margin-top: 8px; }
.idea-plan-link { margin: 8px 0 0; }
.pulse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.pulse-block { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pulse-block:hover { color: var(--text); box-shadow: inset 0 0 0 2px var(--orange); }
.pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pulse-head h2 { margin: 0; font-size: 18px; }
.pulse-m { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pulse-m b { font-size: 22px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow-wrap: normal; }
.pulse-m b.text { font-size: 15px; white-space: normal; }
.pulse-m b.good { color: var(--good-fg); }
.pulse-m b.warn, .pulse-m b.bad { color: var(--bad-fg); }
.home-pulse .pulse-block { padding: 14px 16px; gap: 8px; }
.home-pulse .pulse-head h2 { font-size: 15px; }
.home-pulse .pulse-m b { font-size: 18px; }
.home-pulse, .home-pulse-wait { margin: 0 0 20px; }
.home-pulse-btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; width: auto; }
.home-pulse-btn::-webkit-details-marker { display: none; }
.home-pulse-btn svg { width: 18px; height: 18px; flex: none; }
.home-pulse-btn .badge { padding: 1px 8px; }
.home-pulse-chev { transition: transform .15s; }
.home-pulse[open] .home-pulse-chev { transform: rotate(180deg); }
.home-pulse-body { margin-top: 12px; }
.home-pulse .pulse-grid { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 12px; }
@media (max-width: 640px) { .home-pulse .pulse-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; } .home-pulse .pulse-block { padding: 12px; } .home-pulse .pulse-m b { font-size: 16px; } }
.ai-usage-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; color: var(--text); text-decoration: none; margin-bottom: 16px; }
.ai-usage-link:hover { color: var(--text); box-shadow: inset 0 0 0 2px var(--orange); }
.ai-usage-link p { margin: 4px 0 0; }
.ai-usage-mini, .ai-task-nums { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.ai-usage-mini > span, .ai-task-nums > span { display: flex; flex-direction: column; gap: 2px; }
.ai-usage-mini b { font-size: 20px; font-weight: 500; white-space: nowrap; }
.ai-days { display: grid; gap: 6px; }
.ai-day { display: grid; grid-template-columns: 48px minmax(0, 1fr) 90px minmax(0, 150px); align-items: center; gap: 10px; }
.ai-day-bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.ai-day-bar span { display: block; height: 100%; background: var(--orange); border-radius: 999px; }
.ai-day-num { text-align: right; white-space: nowrap; }
.ai-task { border-top: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; }
.ai-task-text { margin: 2px 0 4px; white-space: pre-line; }
.ai-task-nums b { font-weight: 500; white-space: nowrap; }
.ai-task-link { grid-column: 1 / -1; }
.ai-task-link select { width: 100%; }
@media (max-width: 640px) { .ai-task { grid-template-columns: minmax(0, 1fr); } .ai-day { grid-template-columns: 44px minmax(0, 1fr) 76px; } .ai-day-meta { grid-column: 2 / -1; margin-top: -4px; } }
.pp-kpis { grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 10px; }
.pp-kpis .kpi { padding: 14px 16px; }
.pp-table td { vertical-align: top; }
.pp-table td.wrap { min-width: 220px; max-width: 380px; white-space: normal; }
.pp-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; }
.pp-quotes { min-width: 250px; max-width: 340px; white-space: normal; }
.pp-quote .muted { white-space: normal; line-height: 1.3; }
.pp-quote { display: grid; grid-template-columns: 14px auto minmax(0, 1fr); align-items: baseline; gap: 2px 6px; margin-bottom: 4px; position: relative; }
.pp-quote .mp-logo { align-self: center; }
.pp-quote.ref span.nowrap { font-weight: 500; }
.pp-quote.ref::before { content: ""; position: absolute; left: -10px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.pp-rec { min-width: 150px; }
.pp-pick, .pp-all { display: flex; flex-direction: row; justify-content: flex-start; gap: 6px; cursor: pointer; color: var(--text); align-items: center; margin-bottom: 4px; font-size: 13px; }
.pp-all { font-weight: 400; text-transform: none; letter-spacing: 0; margin: 4px 0 0; }
.pp-pick input, .pp-all input { width: 18px; height: 18px; margin: 0; accent-color: var(--orange, #F16821); }
.pp-export { align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pp-1c-hint { margin: 0 0 10px; }
.pp-1c-hint summary { cursor: pointer; color: var(--muted); }
.pp-1c-hint ol { margin: 6px 0 0 1.2em; padding: 0; line-height: 1.5; }
.pp-v.lower { background: var(--orange-soft); color: var(--bad-fg); }
.pp-v.raise { background: var(--zone-ok); color: var(--text); }
.pp-v.check, .pp-v.close { background: var(--zone-mid); color: var(--text); }
.pp-dump { margin-top: 4px; padding: 4px 8px; border-radius: 8px; background: var(--zone-mid); color: var(--text); line-height: 1.3; white-space: normal; }
.pp-analog { min-width: 170px; max-width: 240px; }
.pp-analog .small { line-height: 1.3; }
.pp-how { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; max-width: 900px; }
.bad-text { color: var(--bad-fg); }
.good-text { color: var(--good-fg); }
.illiquid-cell { color: var(--orange); font-weight: 500; }
/* «Точная рекомендация» снабжения: с колонкой неликвидов таблица должна помещаться без прокрутки вбок */
.pp-exact td.wrap { min-width: 96px; }
.pp-exact td:first-child { min-width: 170px; }
.pp-exact td.pp-rec { min-width: 150px; }
.pp-exact .pp-v { white-space: nowrap; }  /* «Поднять до МРЦ» — одной строкой (владелец 13.11.2026) */
.pp-exact th, .pp-exact td { padding-left: 8px; padding-right: 8px; }
.pp-sources { display: grid; gap: 8px; }
.pp-sources-list { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.pp-sources-list label.check { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.pp-sources-list label.check .small { color: var(--muted); }
.pp-exact th { white-space: normal; }
.pp-exact .pp-all { white-space: normal; }
.pp-table th.pp-illiq, .pp-table td.pp-illiq { width: 8em; min-width: 7em; white-space: normal; }
.pp-table th.pp-illiq { min-width: 11em; }
.pp-noill .pp-all { align-items: flex-start; }
.pp-noill .pp-all input { flex: none; margin-top: 1px; }
.dev-fold > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.dev-fold > summary::-webkit-details-marker { display: none; }
.dev-fold > summary .dev-source { grid-column: 1; margin: 0; }
.dev-fold-chev { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--muted); transition: transform .15s; }
.dev-fold[open] > summary .dev-fold-chev { transform: rotate(180deg); }
.dev-fold[open] > summary { margin-bottom: 12px; }
.dev-fold > summary:hover h2 { color: var(--orange); }
.dev-fold .dev-area-head { justify-content: flex-start; }
.ai-exp { margin-top: 16px; }
.ai-exp-kpis { margin: 4px 0 14px; }
.ai-exp-cats { margin-bottom: 8px; }
.ai-exp-cats .ai-day { grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 110px; }
.ai-exp-cat { font-size: 14px; }
.ai-exp-seats > summary { list-style: none; cursor: pointer; }
.ai-exp-seats > summary::-webkit-details-marker { display: none; }
.ai-exp-seats > summary .ai-exp-cat { text-decoration: underline dotted; text-underline-offset: 3px; }
.ai-exp-seats > summary:hover .ai-exp-cat { color: var(--orange); }
.ai-exp-seats-body { margin: 4px 0 12px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); }
.ai-exp-seats-body .badge.accent { background: var(--orange-soft); color: var(--orange); }
.ai-exp-seats-body p { margin: 0 0 8px; }
.ai-exp-seats-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ai-exp-seats-body li { display: flex; align-items: center; gap: 12px; font-size: 15px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ai-exp-seats-body li:last-child { border-bottom: 0; }
.ai-seat-name { flex: 1; min-width: 0; }
.ai-seat-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-exp-seats-body li .badge { min-width: 76px; text-align: center; }
.ai-seat-rate { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.ai-seat-rate label { flex: 0 1 190px; }
.ai-seat-rate input { width: 100%; }
@media (max-width: 640px) { .ai-exp-cats .ai-day { grid-template-columns: minmax(0, 1fr) 96px; } .ai-exp-cats .ai-day-bar { grid-column: 1 / -1; grid-row: 2; } }
.ai-exp-list { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.ai-exp-list h3 { margin: 0; font-size: 16px; }
.ai-exp-list[open] > summary { margin-bottom: 4px; }
.smm-channel-link { color: var(--text); transition: background .15s; }
.smm-channel-link:hover { background: var(--surface-2); color: var(--text); }
.smm-channel-link .smm-url { color: var(--orange); }
.smm-kids { display: flex; flex-wrap: wrap; gap: 6px; }
.smm-kids .chip { min-height: 28px; padding: 0 10px; font-size: 12px; background: var(--bg); }
.smm-more { margin-top: auto; }
.smm-sub { margin: 24px 0 12px; font-size: 20px; }
.dev-effect { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--zone-ok); display: flex; flex-direction: column; gap: 2px; }
.dev-effect .muted { color: var(--text); opacity: .7; }
.smm-pack { display: flex; flex-direction: column; gap: 10px; margin: 4px 0; }
.smm-pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.smm-pack-grid a { aspect-ratio: 1; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.smm-pack-grid a:hover { box-shadow: inset 0 0 0 2px var(--orange); }
.smm-pack-grid img, .smm-pack-grid video { width: 80%; height: 80%; object-fit: contain; }
.smm-pack-ext { font-size: 11px; color: var(--muted); }
.smm-pack > .btn { align-self: flex-start; }
.smm-pack input[type=file] { min-height: 0; padding: 8px; }
.smm-pack label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.smm-pack-list { display: grid; gap: 4px; max-height: 220px; overflow: auto; }

/* ---------- Compact tables on phones ----------
   Tighter cells and smaller type, the first column (what the row is about) stays in place while
   the rest scrolls sideways under the finger, and a shadow at the edge shows there is more to swipe. */
@media (max-width: 640px) {
  .table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .card .table-wrap:not(.card) { margin: 0 -18px; padding: 0 18px; } /* swipe from the card's edge, not from its padding */
  .table-wrap { --tbl-bg: var(--bg); }
  .card .table-wrap, .card.table-wrap { --tbl-bg: var(--surface); }
  .table-wrap {
    background: linear-gradient(to right, var(--tbl-bg) 30%, transparent) left / 24px 100% no-repeat local,
                linear-gradient(to left, var(--tbl-bg) 30%, transparent) right / 24px 100% no-repeat local,
                radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .18), transparent) left / 10px 100% no-repeat scroll,
                radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .18), transparent) right / 10px 100% no-repeat scroll var(--tbl-bg); }
  .table-wrap > table:not(.products) { font-size: 13px; }
  .table-wrap > table:not(.products) th, .table-wrap > table:not(.products) td { padding: 8px 7px; }
  .table-wrap > table:not(.products) th { font-size: 10.5px; letter-spacing: .02em; }
  .table-wrap > table:not(.products) th:first-child, .table-wrap > table:not(.products) td:first-child { padding-left: 0; }
  .table-wrap > table:not(.products):not(.pcard) tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--tbl-bg);
    white-space: normal; min-width: 96px; max-width: 42vw; }
  /* Cover the scroller's padding the column sticks inside, and draw a thin shadow on its right edge
     (box-shadow on a table cell is painted under the neighbouring cells, pseudo-elements are not). */
  .table-wrap > table:not(.products):not(.pcard) tr > :first-child::before,
  .table-wrap > table:not(.products):not(.pcard) tr > :first-child::after { content: ""; position: absolute; top: 0; bottom: 0; pointer-events: none; }
  .table-wrap > table:not(.products):not(.pcard) tr > :first-child::before { right: 100%; width: 18px; background: var(--tbl-bg); }
  .table-wrap > table:not(.products):not(.pcard) tr > :first-child::after { left: 100%; width: 6px; background: linear-gradient(to right, rgba(0, 0, 0, .12), transparent); }
  .table-wrap > table:not(.products) td.wrap { min-width: 180px; }
  .table-wrap > table:not(.products) td .small, .table-wrap > table:not(.products) td.small { font-size: 11.5px; }
}
@media (hover: none) { tbody tr:hover td { background: none; } }
.smm-pack-grid.adaptive img, .smm-pack-grid.adaptive video { filter: brightness(0); } /* адаптивный пак — чёрными, как владельцу приятнее; файлы не меняются */
.dev-area-links { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-bottom: 8px; }
.dev-fold .dev-area-head { flex-wrap: wrap; gap: 6px 8px; }
.dev-sub { border-top: 1px solid var(--line); padding: 10px 0 6px; }
.dev-sub > summary h3 { margin: 0; font-size: 16px; }
.dev-sub[open] > summary { margin-bottom: 8px; }
.dev-sub .dev-sub, .dev-sub .dev-item:first-of-type { border-top: 0; }
.spend-bar-cell { min-width: 120px; }
.spend-bar-cell .ai-day-bar { display: block; margin-bottom: 2px; }
.mp-fields > label > input, .mp-fields > label > select { min-width: 0; width: 100%; box-sizing: border-box; } /* поле даты на iPhone иначе шире колонки */

/* Поиск клиентов */
.leads-form { display: grid; gap: 12px; }
.leads-table td { vertical-align: top; }
.lead-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.badge.lead-st.work { background: var(--zone-mid); color: var(--text); }
.badge.lead-st.lead { background: var(--zone-ok); color: var(--text); }
.badge.lead-st.client { background: var(--bg); color: var(--text); }
.badge.lead-st.dnc { background: var(--orange-soft); color: var(--bad-fg); }
.badge.lead-st.big { font-size: 14px; padding: 6px 14px; }
input[type=file] { max-width: 100%; min-width: 0; } /* в Safari на iPhone поле файла иначе раздвигает страницу вбок */
[hidden] { display: none !important; }
select { max-width: 100%; text-overflow: ellipsis; } /* длинные названия в списке не раздвигают страницу на телефоне */
.row > label { min-width: 0; max-width: 100%; }

/* ---------- Нейросети: график токенов Claude ---------- */
.ai-usage-card .card-head { margin-bottom: 4px; }
.ai-chart { margin-top: 16px; }
.ai-chart-cap { margin: 10px 0 4px; }
.ai-chart-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
/* подписи оси на уровне верха и низа столбиков: .cols — отступ 8px, padding 20px, ещё 22px над .col-bar */
.ai-chart-axis { display: flex; flex-direction: column; justify-content: space-between; box-sizing: border-box; height: 227px; margin-top: 8px; padding-top: 35px; font-size: 11px; line-height: 14px; color: var(--muted); text-align: right; white-space: nowrap; }
.ai-cols { height: 220px; margin-bottom: 26px; }
.ai-cols .col-bar { max-width: 56px; }
.ai-cols .col-bar > div { background: linear-gradient(180deg, #FF9A5C, #F16821); opacity: .55; }
.ai-cols .col.hot .col-bar > div { opacity: 1; }
.ai-cols .col:hover .col-bar > div, .ai-cols .col:focus-visible .col-bar > div { background: linear-gradient(180deg, #FF9A5C, #F16821); opacity: 1; }
.ai-cols .col.we .col-label { color: var(--bad-fg); }
.ai-cols.month .col-label { font-size: 10px; }
.ai-cols.month .col:nth-child(odd):not(.hot) .col-label { visibility: hidden; }
@media (max-width: 640px) {
  .ai-cols .col-label { transform: none; bottom: -20px; }
  .ai-cols.month .col .col-label { visibility: hidden; }
  .ai-cols.month .col:nth-child(5n+1) .col-label, .ai-cols.month .col.hot .col-label { visibility: visible; }
  .ai-cols.year .col-label { font-size: 9px; }
}
.sections-list .sections-sub { padding-left: 22px; } /* разделы вложенной папки (SMM в «Маркетинге») */

/* ---------- Дирекция развития: диктофон Plaud ---------- */
.plaud-note { margin-bottom: 12px; -webkit-touch-callout: none; }
.plaud-note.is-idea { box-shadow: inset 3px 0 0 var(--orange); }
.plaud-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plaud-head > div { min-width: 0; }
.plaud-title { margin: 0 0 2px; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.plaud-badge { white-space: nowrap; text-decoration: none; }
.plaud-idea-form button { white-space: nowrap; }
.plaud-text { margin-top: 10px; }
.plaud-text > summary { list-style: none; cursor: pointer; }
.plaud-text > summary::-webkit-details-marker { display: none; }
.plaud-preview { display: block; white-space: pre-line; color: var(--text); }
.plaud-more { color: var(--orange); }
.plaud-text[open] .plaud-preview, .plaud-text[open] .plaud-more { display: none; }
.plaud-body { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; }
.plaud-files { margin: 10px 0 0; color: var(--muted); }
.notice.bad { background: var(--orange-soft); }
.smm-emoji { margin: 4px 0 8px; }
.smm-emoji summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.smm-emoji-pack { margin: 10px 0 4px; }
.smm-emoji-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.smm-emoji-btn { width: 40px; height: 40px; padding: 4px; border: 0; border-radius: 8px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.smm-emoji-btn:hover { box-shadow: 0 0 0 2px var(--orange); }
.smm-emoji-btn img, .smm-emoji-btn video { width: 32px; height: 32px; object-fit: contain; pointer-events: none; }
.smm-emoji-preview { background: var(--surface); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; font-size: 14px; margin-bottom: 8px; }
.smm-emoji-inline img, .smm-emoji-inline video { width: 20px; height: 20px; vertical-align: -4px; object-fit: contain; }
.smm-emoji-refresh { margin-top: 8px; }
.smm-emoji-note { background: var(--surface); border-left: 3px solid var(--orange); border-radius: 8px; padding: 8px 12px; margin: 6px 0; }
.idea-done { margin-top: 24px; }
.idea-done > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.idea-done > summary::-webkit-details-marker { display: none; }
.idea-done > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 0 0 4px; transition: transform .15s; }
.idea-done[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.idea-done > summary .section-title { margin: 0; }

/* «Идеи»: вместо своей кнопки диктовки — подсказка про микрофон клавиатуры (28.10.2026: iOS навсегда запоминал отказ в доступе) */
.idea-dictate-hint { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.idea-dictate-hint > svg { flex-shrink: 0; margin-top: 1px; color: var(--orange); }
.idea-dictate-hint .kbd-mic { display: inline-block; vertical-align: -3px; color: var(--text); }

/* Диктофон Plaud — панель папок (27.10.2026) */
.plaud-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin: 14px 0 10px; }
.plaud-crumbs a { text-decoration: none; }
.plaud-drive { margin-left: auto; }
.plaud-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px; margin-bottom: 16px; }
.plaud-folder { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin: 0; }
.plaud-folder-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.plaud-folder-link > span { display: grid; gap: 2px; min-width: 0; }
.plaud-folder-link b { font-weight: 500; overflow-wrap: anywhere; }
.plaud-folder-link svg { flex-shrink: 0; color: var(--orange); }
.plaud-new { display: block; }
.plaud-new > summary { list-style: none; cursor: pointer; }
.plaud-new > summary::-webkit-details-marker { display: none; }
.plaud-menu { position: relative; flex-shrink: 0; }
.plaud-menu > summary { list-style: none; cursor: pointer; }
.plaud-menu > summary::-webkit-details-marker { display: none; }
.plaud-menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(320px, calc(100vw - 48px)); display: grid; gap: 12px;
  padding: 14px; border-radius: 14px; background: var(--bg, var(--surface)); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.plaud-op { display: grid; gap: 6px; margin-top: 10px; }
.plaud-menu-body .plaud-op { margin-top: 0; }
.plaud-op label { display: grid; gap: 4px; }
.plaud-op .btn { justify-self: start; }
.plaud-op input, .plaud-op select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }

/* Маркетплейсы → Место в поисковой выдаче */
.sr-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin: 12px 0 16px; }
.sr-sum-card { display: grid; gap: 8px; align-content: start; background: var(--surface); border-radius: 14px; padding: 14px 16px; color: var(--text); min-width: 0; }
.sr-sum-card:hover { background: var(--surface-2); color: var(--text); }
.sr-sum-card.active { box-shadow: inset 0 0 0 2px var(--orange); }
.sr-big { font-size: 24px; font-weight: 500; }
.sr-bands { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.sr-band { padding: 2px 8px; border-radius: 999px; background: var(--bg); white-space: nowrap; }
.sr-band.b-low, .sr-band.b-none { background: var(--orange-soft); color: var(--bad-fg); }
.sr-list { margin-top: 12px; }
.sr-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.sr-pos { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--surface); text-align: center; }
.sr-pos b { font-size: 24px; line-height: 1.1; }
.sr-pos .small { color: var(--muted); }
.sr-pos.b-low, .sr-pos.b-none { background: var(--orange-soft); }
.sr-pos.b-low b, .sr-pos.b-none b { color: var(--bad-fg); }
.sr-pos.b-top b { color: var(--good-fg); }
.sr-delta.down { color: var(--bad-fg) !important; }
.sr-delta.up { color: var(--good-fg) !important; }
.sr-queries { color: var(--muted); overflow-wrap: anywhere; }
.sr-factors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sr-f { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.sr-f.f-bad { background: var(--orange-soft); color: var(--bad-fg); }
.sr-f.f-warn { background: var(--never-bg); color: var(--never-fg); }
.sr-f.f-ok { color: var(--good-fg); }
.sr-ideas { margin-top: 6px; }
.sr-ideas summary { cursor: pointer; color: var(--bad-fg); font-weight: 500; }
.sr-ideas ol { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.sr-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px 20px; margin-top: 10px; }
.sr-rules ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 640px) {
  .sr-item { grid-template-columns: 60px minmax(0, 1fr); gap: 10px; padding: 12px; }
  .sr-pos b { font-size: 20px; }
  .filters input[name=q] { font-size: 16px; }
}
.defects-upload { margin: 0 0 12px; } .defects-upload summary { cursor: pointer; color: var(--bad-fg); font-weight: 500; } .defects-upload form { margin: 10px 0 6px; align-items: center; }
.badge.good { background: var(--surface-2); color: var(--good-fg); }
.launch-table td:last-child { min-width: 120px; } .launch-table td:first-child { min-width: 220px; }

/* ---------- Liquid glass, loading, motion (29.10.2026) ---------- */
/* Glass surface: translucent, blurred backdrop, thin light edge. Without backdrop-filter it stays a solid card. */
.glass, .plaud-menu-body { background: var(--surface); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .plaud-menu-body { background: var(--glass-bg); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--glass-shadow), inset 0 0 0 1px var(--glass-line); }
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mp-save { background: var(--glass-bg); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); }
}
.glyph { width: 1.05em; height: 1.05em; vertical-align: -.15em; display: inline-block; }

/* Slow page: a glass pill with a spinning ring appears after a short delay (theme.js). */
.page-loader { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 100; display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 999px; color: var(--text); font-size: 14px; background: var(--surface); box-shadow: var(--glass-shadow); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .2s; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .page-loader { background: var(--glass-bg); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--glass-shadow), inset 0 0 0 1px var(--glass-line); }
}
.page-loader.on { opacity: 1; transform: translate(-50%, 0); }
.spinner { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2.5px solid var(--bar-track); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Submit button while the form is being sent (files upload): spinner instead of a dead button. */
.is-loading { position: relative; pointer-events: none; opacity: .85; }
.is-loading::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.link.is-loading::before { display: inline-block; vertical-align: -3px; margin-right: 6px; }

/* Small, cheap motion: content fades in, tiles lift a little, folds open smoothly. Only opacity/transform. */
main.container { animation: page-in .28s ease-out backwards; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
.tile, .kpi { transition: background .15s, transform .2s ease, box-shadow .2s ease; }
@media (hover: hover) {
  .tile:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20, 20, 24, .08); }
  .tiles.reordering .tile:hover { transform: none; box-shadow: none; }
}
.btn:active, .btn-ghost:active { transform: scale(.97); }
.btn, .btn-ghost { transition: background .15s, transform .1s; }
/* details: height animation and row cascade — motion.js (24.11.2026) */
@keyframes fold-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  main.container { animation: none; }
  .tile:hover { transform: none; }
  .spinner, .is-loading::before { animation-duration: 1.6s; }
}

/* Парсер цен снабжения: подсказка «Что здесь и где какие цены» */
.pp-about > summary::after { content: " ▾"; color: var(--muted); }
.pp-about[open] > summary::after { content: " ▴"; }
.pp-about p, .pp-about ul { margin: 0 0 8px; }
.pp-about ul { padding-left: 20px; }
.pp-about li { margin-bottom: 6px; }
.pp-brand { min-width: 0; max-width: 100%; }
.pp-groups { padding: 10px 14px; margin: 10px 0; }
.pp-gpick > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.pp-glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 4px 16px; margin: 10px 0; }
.pp-glist label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.pp-gsel { margin: 6px 0 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--orange); cursor: pointer; text-decoration: underline; font: inherit; }
.pp-brand select { max-width: 100%; }
.mp-links { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; }
.mp-links a { white-space: nowrap; }
td.r .mp-links { justify-content: flex-end; }

/* «Посмотреть глазами сотрудника»: плашка под шапкой, пока админ в режиме просмотра. */
.view-as-bar { position: sticky; top: 68px; z-index: 9; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; max-width: 1240px; margin: 12px auto 0; padding: 10px 16px; border-radius: 14px; background: var(--orange-soft); box-shadow: inset 0 0 0 2px var(--orange); }
.view-as-bar .btn { min-height: 38px; padding: 0 16px; }
@media (max-width: 1272px) { .view-as-bar { margin: 12px 16px 0; } }

/* «нет данных» с причиной в подсказке (Конкуренты OZON) */
.nodata { font-size: 12px; cursor: help; border-bottom: 1px dotted currentColor; }

/* «Новости об обновлении портала» */
.news-item { padding: 20px 24px; }
.news-item h2 { margin: 8px 0 6px; }
.news-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.news-body { margin: 0; white-space: pre-line; }
.news-item.is-new { box-shadow: inset 3px 0 0 var(--orange); }
.news-form { display: grid; gap: 12px; max-width: 640px; margin-top: 12px; }
.news-form textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.badge.accent { background: var(--orange-soft); color: var(--orange); }
@media (max-width: 640px) { .news-item { padding: 16px 18px; } }

/* Отметка «неликвид» у товара в парсере снабжения и маркетплейсах (отчёт 1С «Неликвиды») */
.illiquid-badge { font-size: 11px; padding: 1px 8px; white-space: nowrap; cursor: help; vertical-align: 1px; }
.levels-form { align-items: center; gap: 10px; margin: 4px 0 8px; }
.levels-form input.num { width: 80px; }
a.kpi { color: inherit; text-decoration: none; }
.nodata-note { margin: -4px 0 16px; }
.nodata-note .badge, td .badge.warn { cursor: help; }

/* Панель управления → «Использование портала» */
.usage-head { margin-bottom: 14px; }
.usage-head .muted { margin: 10px 0 0; max-width: 760px; }
.usage-table td, .usage-table th { vertical-align: top; }
.usage-table .nowrap { white-space: nowrap; }
.usage-idle td { color: var(--muted); }
.usage-bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: 6px; min-width: 80px; overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: linear-gradient(90deg, #f9a46b, var(--orange)); border-radius: 2px; }
.usage-strip { display: grid; grid-template-columns: repeat(var(--n), var(--c)); gap: 2px; }
.usage-strip i { display: block; height: 14px; border-radius: 2px; background: var(--surface-2); }
.usage-strip i.none { background: transparent; outline: 1px dashed var(--line); outline-offset: -1px; }
.usage-strip i.l1 { background: rgba(241, 104, 33, .3); }
.usage-strip i.l2 { background: rgba(241, 104, 33, .55); }
.usage-strip i.l3 { background: rgba(241, 104, 33, .8); }
.usage-strip i.l4 { background: var(--orange); }

/* Top scrollbar above wide tables (theme.js, data-top-scroll): sticks under the header, always visible */
.top-scroll { position: sticky; top: 69px; z-index: 5; overflow-x: auto; overflow-y: hidden; height: 16px; margin: 0 0 6px;
  background: var(--surface); scrollbar-width: auto; scrollbar-color: var(--grey) var(--bar-track); }
.top-scroll > div { height: 1px; }
.top-scroll::-webkit-scrollbar { height: 12px; }
.top-scroll::-webkit-scrollbar-track { background: var(--bar-track); border-radius: 999px; }
.top-scroll::-webkit-scrollbar-thumb { background: var(--grey); border-radius: 999px; }
.top-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* «Из чего считается рекомендация» (Конкуренты OZON) */
.explain-list { display: grid; gap: 0; margin: 8px 0; }
.explain-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.explain-row > span:first-child { flex: 1 1 200px; min-width: 0; }
.explain-row > .r { flex: 1 1 220px; min-width: 0; text-align: right; }
@media (max-width: 640px) { .explain-row > .r { text-align: left; } }
.usage-filters { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.usage-sort-label { align-self: center; margin-right: 2px; }
.usage-th { color: inherit; }
.usage-th:hover, .usage-th.active { color: var(--orange); }

/* «Идеи для развития» — лидеры месяца и года */
.idea-leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.idea-leaders-col h2 { font-size: 17px; margin: 0 0 12px; }
.idea-leaders-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.idea-leaders-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.idea-place { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; font-size: 14px; background: var(--surface-2); color: var(--text); }
.idea-place.p1 { background: var(--orange); color: #fff; }
.idea-place.p2 { background: rgba(241, 104, 33, .55); color: #fff; }
.idea-place.p3 { background: rgba(241, 104, 33, .3); }
.idea-leader-name { font-weight: 500; overflow-wrap: anywhere; }
.idea-leader-nums { text-align: right; white-space: nowrap; line-height: 1.3; }

/* ===================================================================================================
   Монохромный слой в духе Dots (06.11.2026, просьба владельца «взять, что уместно, и сделать красивее»):
   надзаголовки с точкой, плотные крупные заголовки, кнопки-пилюли, вкладки-пилюли с тёмной активной,
   тонкие линии между разделами, подвал с крупной «точечной» надписью. Только CSS — без картинок и шрифтов.
   =================================================================================================== */
:root { --hairline: var(--line); }

/* Заголовки: плотнее и весомее, как у Dots */
h1 { font-weight: 700; letter-spacing: -.025em; line-height: 1.12; }
h2 { font-weight: 600; letter-spacing: -.01em; }
.kpi b { font-weight: 600; letter-spacing: -.02em; }
.lead { font-size: 16px; line-height: 1.6; }

/* Надзаголовок: мелкие прописные серые буквы с разрядкой, при желании — с точкой */
.eyebrow { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text); flex: none; }
.back-link { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.back-link:hover { color: var(--text); }

/* Кнопки и поля — пилюли */
.btn, .btn-ghost { border-radius: 999px; }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn:active, .btn-ghost:active, .chip:active { transform: scale(.98); }

/* Вкладки — переключатель-пилюли, активная тёмная */
.tabs { border-bottom: 0; gap: 6px; flex-wrap: wrap; }
.tabs a { margin: 0; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--surface); color: var(--text); font-size: 14px; transition: background .15s, color .15s; }
.tabs a:hover { background: var(--surface-2); color: var(--text); }
.tabs a.active { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .tabs a.active, :root[data-theme="dark"] .chip.active { background: #F2F2F3; color: #1C1C1D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs a.active, :root:not([data-theme="light"]) .chip.active { background: #F2F2F3; color: #1C1C1D; } }

/* Тонкая линия-разделитель раздела */
.section-rule { border-top: 1px solid var(--hairline); padding-top: 20px; margin-top: 8px; }

/* Главная: приветствие по центру, как первый экран Dots */
.hero { text-align: center; padding: 40px 0 44px; }
.hero .eyebrow { justify-content: center; }
.hero-title { font-size: clamp(32px, 6vw, 60px); line-height: 1.04; letter-spacing: -.035em; margin: 14px 0 0; }
.hero-sub { color: var(--muted); font-size: 17px; margin: 16px auto 0; max-width: 560px; }
.hero-fine { margin: 14px 0 0; font-size: 13px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.hero-fine a { color: var(--muted); border-bottom: 1px solid var(--line); }
.hero-fine a:hover { color: var(--text); border-color: var(--text); }
.home-pulse { margin-bottom: 20px; }
.home-head.section-rule { margin-top: 0; }
.tiles { margin-top: 16px; }
.tile-title { letter-spacing: -.01em; }


@media (max-width: 640px) {
  .hero { padding: 20px 0 28px; }
  .hero-sub { font-size: 15px; }
}
/* Подсказка у логотипа (06.11.2026, владелец): в две строки, на узких экранах прячется */
.brand-sub { white-space: normal; max-width: 220px; line-height: 1.3; font-size: 12px; }
@media (max-width: 900px) { .brand-sub { display: none; } }
/* Упущенный спрос (09.11.2026): магазин записывает, снабжение решает */
.lost-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: end; }
.lost-form .lost-wide { grid-column: 1 / -1; }
.lost-form label, .lost-decide label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.lost-form textarea, .lost-decide textarea { width: 100%; }
.lost-head { margin-top: 32px; }
.lost-list { display: grid; gap: 12px; margin-top: 16px; }
.lost-item { margin: 0; }
.lost-item.is-new { box-shadow: inset 0 0 0 2px var(--orange); }
.lost-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lost-top h3 { margin: 0 0 4px; font-size: 17px; overflow-wrap: anywhere; }
.lost-top p { margin: 0; }
.lost-top .badge { flex: none; }
.lost-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0 0; }
.lost-answer { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.lost-answer p { margin: 6px 0 0; }
.lost-decide { margin-top: 12px; }
.lost-decide form { display: grid; gap: 10px; margin-top: 10px; }
.lost-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lost-postpone { display: inline-flex; gap: 8px; align-items: center; }
.lost-postpone input[type=date] { width: auto; }
.lost-stores .chips { margin: 0; }
.badge.ld-new { background: var(--never-bg); color: var(--never-fg); }
.badge.ld-good { background: var(--zone-ok); color: var(--text); }
.badge.ld-illiquid { background: var(--orange-soft); color: var(--bad-fg); }
.badge.ld-postponed { background: var(--bg); color: var(--text); }
@media (max-width: 640px) {
  .lost-form { grid-template-columns: minmax(0, 1fr); }
  .lost-top { flex-direction: column; }
  .lost-postpone { flex-wrap: wrap; }
}
.lost-top p + p { margin-top: 2px; }
.lost-regroup { display: flex !important; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.lost-regroup label { flex: 1 1 260px; font-size: 13px; color: var(--muted); }
.lost-regroup select { width: 100%; }

/* «Развитие интернет-магазина»: таблицы Метрики с полосой доли (10.11.2026) */
.ym-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; }
.ym-grid > .card { margin: 0 0 16px; min-width: 0; }
.ym-sub { margin-top: 22px; }
.ym-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.ym-table th.num, .ym-table td.num { width: 86px; }
.ym-table td.num:last-child, .ym-table th.num:last-child { width: 62px; }
.ym-kpis .delta { white-space: normal; }
.ym-goals th.num, .ym-goals td.num, .ym-goals td.num:last-child, .ym-goals th.num:last-child { width: 120px; }
.ym-table th { font-weight: 500; font-size: 12px; color: var(--muted); text-align: left; padding: 0 0 6px; }
.ym-table td { padding: 7px 0; border-top: 1px solid var(--line); vertical-align: top; }
.ym-table .num { text-align: right; white-space: nowrap; padding-left: 12px; }
.ym-table td.ym-name { overflow-wrap: anywhere; white-space: normal; }
.ym-name a { color: inherit; word-break: break-all; }
.ym-bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 5px; overflow: hidden; }
.ym-bar > div { height: 100%; background: var(--orange); border-radius: 2px; }
.ym-steps li { margin-bottom: 6px; }
.ym-steps code { word-break: break-all; white-space: normal; }
.ym-client { margin-top: 6px; gap: 8px; flex-wrap: wrap; }
.ym-client input { flex: 1 1 220px; min-width: 0; }

/* «План развития интернет-магазина»: микрозадачи из GitLab (10.11.2026) */
.gl-goal { display: flex; flex-direction: column; gap: 6px; }
.gl-goal h2 { margin: 0; }
.gl-goal p { margin: 0; }
.gl-edit { margin-top: 6px; }
.gl-edit summary { cursor: pointer; color: var(--muted); }
.gl-h { margin: 28px 0 4px; }
.gl-day { display: block; margin: 20px 0 10px; }
.gl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.badge.accent { background: var(--orange-soft); color: var(--bad-fg); }
.badge.gl-prod { background: var(--zone-ok); color: var(--good-fg); }
.badge.gl-kind { background: var(--surface-2); color: var(--text); }
.gl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.gl-row, .gl-task summary { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gl-title { font-weight: 500; font-size: 16px; color: var(--text); overflow-wrap: anywhere; }
a.gl-title:hover { color: var(--orange); }
.gl-lead { color: var(--text); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.gl-task { margin-bottom: 10px; }
.gl-task summary { cursor: pointer; list-style: none; }
.gl-task summary::-webkit-details-marker { display: none; }
.gl-task[open] summary { margin-bottom: 8px; }
.gl-body { border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.gl-body h4 { font-size: 13px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.gl-md, .gl-commits { overflow-wrap: anywhere; }
.gl-md p, .gl-md ul { margin: 0 0 8px; }
.gl-md ul, .gl-commits { padding-left: 20px; }
.gl-md code { font-size: 13px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.gl-commits li { margin-bottom: 4px; }
.gl-commits .badge { font-size: 11px; padding: 1px 7px; }
.gl-task[open] .gl-lead { display: none; }
.badge.gl-proj { background: var(--icon-bg); color: var(--icon-fg); }
.gl-sections { width: 100%; font-size: 14px; }
.gl-sections td, .gl-sections th { padding: 8px 10px; text-align: left; vertical-align: top; }
.gl-sections .num { text-align: right; white-space: nowrap; }
.gl-sections tr.active td { background: var(--orange-soft); }
.gl-path { display: block; }
.gl-chips { margin-top: 4px; }
.gl-main { display: flex; flex-direction: column; gap: 8px; }
.gl-main h2, .gl-main > p { margin: 0; }
.gl-main-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gl-main-top > div:first-child { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gl-main-top h2 { margin: 0; }
.gl-ring { position: relative; flex: 0 0 auto; width: 96px; height: 96px; }
.gl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gl-ring circle { fill: none; stroke-width: 3.6; }
.gl-ring-bg { stroke: var(--bar-track); }
.gl-ring-fg { stroke: var(--orange); stroke-linecap: round; stroke-dashoffset: 0; }
.gl-ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.gl-ring-txt b { font-size: 22px; letter-spacing: -0.02em; }
.gl-ring-txt span { font-size: 11px; color: var(--muted); }
@media (max-width: 480px) { .gl-ring { width: 76px; height: 76px; } .gl-ring-txt b { font-size: 18px; } }
.gl-stages { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.gl-stage { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 14px; }
.gl-stage:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.gl-step { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px;
  background: var(--bg); color: var(--muted); border: 2px solid var(--line); box-sizing: border-box; }
.st-now .gl-step { background: var(--orange); border-color: var(--orange); color: #fff; }
.st-done .gl-step { background: var(--zone-ok); border-color: var(--zone-ok); color: var(--good-fg); }
.st-partial .gl-step { border-color: var(--zone-ok); color: var(--good-fg); }
.final .gl-step { border-color: var(--text); color: var(--text); }
.gl-stage-body { min-width: 0; padding-top: 4px; }
.gl-stage-head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.gl-stage-body p { margin: 4px 0 0; }
.gl-stage-form { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.gl-stage-form label { display: flex; flex-direction: column; gap: 4px; }
.gl-through-h { margin: 4px 0 0; }
.gl-through { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.gl-track { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.app-facts { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.app-builds { display: grid; gap: 10px; }
.app-builds h2 { margin: 0; }
.app-builds p { margin: 0; }
.app-dl { justify-self: start; font-size: 16px; padding: 12px 22px; }
.app-dl-block { display: grid; gap: 6px; }
.app-dl-block + .app-dl-block { border-top: 1px solid var(--line); padding-top: 10px; }
.app-how summary { cursor: pointer; }
.app-how ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
.app-build-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.app-build-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.app-build-title { flex-basis: 100%; min-width: 0; overflow-wrap: anywhere; }
.app-build-list .bad-text { flex-basis: 100%; color: var(--bad-fg); }
.app-log { margin: 8px 0 0; max-height: 360px; overflow: auto; font-size: 12px; line-height: 1.45; white-space: pre-wrap;
  overflow-wrap: anywhere; background: var(--bg); border-radius: 10px; padding: 10px; }
.app-build-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.app-build-form label { display: grid; gap: 4px; min-width: 0; flex: 1 1 200px; }
.app-keys-form { display: grid; gap: 10px; margin-top: 8px; }
.app-keys-form label { display: grid; gap: 4px; min-width: 0; }
.app-keys-form button { justify-self: start; }
/* «B2B-сайт и его интеграция в приложения» (24.11.2026): устройство, решения, функции нынешнего B2B */
.b2b-arch { list-style: none; margin: 8px 0 0; padding: 0; }
.b2b-arch li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 2.4fr); gap: 6px 14px;
  align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .b2b-arch li { grid-template-columns: minmax(0, 1fr) auto; } .b2b-arch li > :last-child { grid-column: 1 / -1; } }
.b2b-dec, .b2b-feat { display: grid; gap: 8px; }
.b2b-feat { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); align-items: start; }
.b2b-dec-item, .b2b-feat-item { background: var(--bg); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.b2b-dec-item > summary, .b2b-feat-item > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.b2b-dec-item p { margin: 8px 0 2px; }
.b2b-dec-item.ds-open { box-shadow: inset 3px 0 0 var(--orange); }
.b2b-feat-item ul { margin: 8px 0 2px; padding-left: 18px; display: grid; gap: 3px; }
.gl-through li { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--bg); }
.gl-bench { margin-bottom: 16px; }
.gl-bench .gl-h { margin-top: 0; }
.gl-bench-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 12px; margin-top: 10px; align-items: start; }
.gl-bench-card { margin: 0; }
.gl-bench-card summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.gl-bench-card summary::-webkit-details-marker { display: none; }
.gl-bench-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; font-size: 16px; }
.gl-bench-link { font-size: 13px; overflow-wrap: anywhere; }
.gl-bench-more { color: var(--muted); }
.gl-bench-more::before { content: "▸ "; }
.gl-bench-card[open] .gl-bench-more::before { content: "▾ "; }
.gl-bench-card ul { margin: 10px 0 0; padding-left: 18px; }
.gl-bench-card li { margin-bottom: 4px; }
.gl-more { margin-top: 8px; }
.gl-more > summary { list-style: none; cursor: pointer; display: inline-flex; }
.gl-more > summary::-webkit-details-marker { display: none; }
.gl-more[open] > summary { display: none; }
/* Сравнение розницы с прошлым годом (идея №25 Сениной, 10.11.2026) */
.rt-cmp .chips { margin: 12px 0 8px; }
.rt-custom { margin: 4px 0 12px; }
.rt-custom input[type=date] { width: auto; }
.rt-custom .btn-ghost.active { box-shadow: inset 0 0 0 2px var(--orange); }
.rt-cmp-table th[colspan] { text-align: center; }
.rt-cmp-table tr.total td { border-top: 2px solid var(--line); }
.rt-cmp-table td .small { font-size: 12px; }
.gl-audit { display: flex; flex-direction: column; gap: 10px; }
.gl-score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.gl-score h2, .gl-score p { margin: 0; }
.gl-score-num { font-size: 52px; line-height: 1; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.gl-score-num small { font-size: 20px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.gl-dims { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gl-dims li { display: grid; grid-template-columns: minmax(0, 150px) auto 16px minmax(0, 1fr); gap: 4px 10px; align-items: center; font-size: 14px; }
.gl-dim-bar { display: inline-flex; gap: 3px; }
.gl-dim-bar i { width: 14px; height: 8px; border-radius: 2px; background: var(--bar-track); }
.gl-dim-bar i.on { background: var(--orange); }
@media (max-width: 640px) { .gl-dims li { grid-template-columns: minmax(0, 1fr) auto 16px; } .gl-dim-note { grid-column: 1 / -1; } }
.gl-docs { margin: 0; }
.gl-plan { display: flex; flex-direction: column; gap: 8px; }
.gl-plan > h2, .gl-plan > p { margin: 0; }
.gl-tgroup { border-top: 1px solid var(--line); padding-top: 10px; }
.gl-tgroup > summary { cursor: pointer; display: flex; gap: 8px; align-items: center; }
.gl-tasks { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gl-tasks p { margin: 2px 0 0; }
.gl-task-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.badge.gl-ts.gs-work, .badge.gl-ts.gs-now { background: var(--orange-soft); color: var(--bad-fg); }
.badge.gl-ts.gs-dev { background: var(--zone-mid); color: var(--text); }
.badge.gl-ts.gs-done { background: var(--zone-ok); color: var(--good-fg); }
.badge.gl-ts.gs-mockup { background: var(--icon-bg); color: var(--icon-fg); }
/* ФЗП магазинов (11.11.2026) */
.fzp-table input { width: 120px; text-align: right; }
.fzp-table td { vertical-align: top; }
.fzp-table td .small { margin-top: 4px; white-space: nowrap; }
.fzp-form .mp-save { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fzp-form .mp-save { position: sticky; z-index: 5; }
/* Вертикальные линии между колонками (11.11.2026, владелец: «цифры сливаются»): тонкие — между годами,
   плотнее — между показателями (оборот | наценка | чеки | средний чек | ФЗП | ФЗП / наценка) */
.rt-cmp-table td + td, .rt-cmp-table thead tr:last-child th { border-left: 1px solid var(--line); }
.rt-cmp-table thead tr:first-child th + th,
.rt-cmp-table thead tr:last-child th:is(:nth-child(1), :nth-child(4), :nth-child(7), :nth-child(9), :nth-child(12), :nth-child(14)),
.rt-cmp-table tbody td:is(:nth-child(2), :nth-child(5), :nth-child(8), :nth-child(10), :nth-child(13), :nth-child(15)) {
  border-left: 2px solid var(--muted);
}
.rt-cmp-table thead tr:first-child th { border-bottom: 1px solid var(--line); }
.fzp-table td + td, .fzp-table th + th { border-left: 1px solid var(--line); }

/* Панель управления: таблица доступов листается внутри себя, строка заголовков закреплена (11.11.2026, просьба владельца) */
.admin-scroll { max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow: auto; overscroll-behavior: contain; }
.admin-scroll .admin-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
.table-wrap.admin-scroll > table.admin-table:not(.products) thead th:first-child { z-index: 3; top: 0; }
@media (max-width: 640px) { .admin-scroll { max-height: calc(100dvh - 90px); } }
.gl-audit-note { margin-top: 6px !important; }
.badge.gl-ts.gs-drop { background: var(--bg); color: var(--muted); text-decoration: line-through; }
.badge.gl-ts.gs-maybe { background: var(--bg); color: var(--muted); border: 1px dashed var(--line); }

/* Доля ФЗП по магазинам (идея №26 Сениной, 11.11.2026) */
.fzp-ytd { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; margin: 12px 0 8px; }
.fzp-ytd-item { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.fzp-ytd-item b { font-size: 20px; }
.fzp-ytd-item.total { outline: 1px solid var(--line); }
.fzp-ytd .pos { color: var(--good-fg); }
.fzp-ytd .neg { color: var(--bad-fg); }
.fzp-share-table td + td, .fzp-share-table th + th { border-left: 1px solid var(--line); }
.fzp-share-table td.ytd, .fzp-share-table th:last-child { border-left: 2px solid var(--muted); }
.fzp-share-table tr.total td { border-top: 2px solid var(--line); }
.fzp-share-table td .small { font-size: 12px; }
.gl-sync { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 18px; }

/* «Нейросети» → «Расходы»: регулярные по месяцам (11.11.2026) */
.ai-exp-month { margin: 8px 0 14px; }
.ai-exp-month label { display: inline-flex; flex-direction: row; align-items: center; gap: 10px; font-size: 14px; }
.ai-exp-month select { width: auto; max-width: 100%; }
.ai-exp-regular { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 18px; table-layout: fixed; }
.ai-exp-regular td:first-child { white-space: normal; overflow-wrap: anywhere; }
.ai-exp-regular th.r, .ai-exp-regular td.r { width: 104px; }
@media (max-width: 640px) { .ai-exp-regular th.r, .ai-exp-regular td.r { width: 84px; } }
.ai-exp-regular th { font-weight: 500; font-size: 12px; color: var(--muted); text-align: left; padding: 0 0 6px; }
.ai-exp-regular td { padding: 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.ai-exp-regular .r { text-align: right; padding-left: 12px; }

/* Новинки на складе (идея №28 Сениной, 11.11.2026) */
.new-kpis { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); margin: 14px 0; }
.new-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.new-filter select { max-width: min(360px, 100%); }
.new-filter input[type=search] { flex: 1 1 220px; min-width: 0; }
.new-table tr.is-new td { background: var(--orange-soft); }
.new-table td .small { font-size: 12px; }
.new-note { margin-top: 14px; }
.new-old { margin: -4px 0 12px; }
.new-table td.new-why { white-space: normal; min-width: 220px; max-width: 380px; }
.new-table td:first-child { white-space: normal; min-width: 240px; max-width: 460px; }
.new-table td:nth-child(2) { white-space: normal; min-width: 140px; max-width: 220px; }

/* Автозаказ магазинов (12.11.2026) */
.order-kpis { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); margin: 14px 0; }
.order-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; }
.order-table .order-qty { width: 84px; text-align: right; font-size: 16px; padding: 4px 6px; }
.order-all { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; font-weight: 400; }
.order-settings { display: grid; gap: 10px; margin-top: 10px; }
.order-settings input[type=number] { width: 80px; }
.order-how p { margin: 8px 0 0; }
.order-table td:first-child, .order-table th:first-child { width: 44px; }
.order-table td:nth-child(2) { white-space: normal; min-width: 220px; max-width: 420px; }
.order-table td:nth-child(8) { white-space: normal; min-width: 140px; max-width: 220px; }
.order-table td .small { font-size: 12px; }
.draft-plate { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--orange-soft); }
.draft-plate p { margin: 0; }
.draft-plate .badge { flex: none; margin-top: 2px; }
@media (max-width: 640px) { .draft-plate { flex-direction: column; gap: 8px; } }

/* Цены конкурентов для магазина (идея №31, 12.11.2026) */
.prices-kpis { margin: 14px 0 6px; }
.prices-table td:first-child { white-space: normal; min-width: 240px; max-width: 460px; }
.prices-table td .small { font-size: 12px; }
.prices-table .btn-ghost.small { white-space: nowrap; }
.gm-table td + td, .gm-table th + th { border-left: 1px solid var(--line); }
.gm-table tr.total td { border-top: 2px solid var(--line); }

/* Ассортимент магазинов (идея №38, 12.11.2026) */
.assort-table th.assort-mine, .assort-table td.assort-mine { background: var(--orange-soft); }
.assort-table td:first-child { white-space: normal; min-width: 200px; }
.ai-exp-editable input { width: 100%; min-width: 0; padding: 6px 8px; font-size: 14px; }
.ai-exp-editable .ai-exp-num { width: 110px; text-align: right; }
.ai-exp-editable th:nth-child(2) { width: 30%; }
.ai-exp-editable th.r, .ai-exp-editable td.r { width: 150px; }
.ai-exp-move { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ai-exp-edit .row { flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; margin-bottom: 14px; }  /* «Сохранить» не вплотную к полосе прокрутки таблицы */
@media (max-width: 640px) { .ai-exp-editable input { font-size: 16px; } .ai-exp-editable .ai-exp-num { width: 96px; } .ai-exp-editable { min-width: 560px; } }

/* Панель управления → «Розница» (13.11.2026): руководители магазинов и разделы */
.retail-access th.c, .retail-access td.c { text-align: center; }
.retail-access thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); font-size: 12px; vertical-align: bottom; }
.retail-access td { vertical-align: middle; }
.retail-access select { min-width: 130px; }
.retail-add { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 14px 0; }

/* Мотивации вендоров (13.11.2026) */
.mv-when { margin: 6px 0 12px; }
.mv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mv-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; margin: 10px 0; }
.mv-meta > div { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.mv-meta dt { font-size: 12px; color: var(--muted); }
.mv-meta dd { margin: 2px 0 0; font-weight: 500; }
.mv-cond { background: var(--orange-soft); border-left: 3px solid var(--orange); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.mv-table td, .mv-table th { vertical-align: middle; }
.mv-table .mv-group td { border-top: 1px solid var(--line); }
.mv-table .mv-member td { font-size: 13px; color: var(--muted); }
.mv-table .mv-member td:first-child { padding-left: 22px; font-style: italic; }
.mv-table .mv-grouptitle td { background: var(--surface-2); }
.mv-table tr.mv-hit td { background: rgba(91, 208, 138, .12); }
.mv-table tr.mv-me td { background: var(--orange-soft); color: var(--text); font-style: normal; }
.mv-bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: 4px; min-width: 60px; overflow: hidden; }
.mv-bar i { display: block; height: 100%; background: var(--orange); border-radius: 2px; }
.mv-bar i.done { background: var(--good-fg); }
.mv-offices { margin-top: 12px; }
.mv-offices > summary { cursor: pointer; }
.mv-upload { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 10px 0; }
.mv-list { padding-left: 18px; }
.mv-list li { margin: 4px 0; }
.mv-list form { display: inline; }

/* «Цены конкурентов»: выбор конкурентов, пакетный запрос; у снабжения — пакеты (13.11.2026) */
.cp-sources { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 12px 0 4px; }
.cp-src { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.cp-src-title { margin: 14px 0 6px; }
.cp-step-label { align-self: center; margin-right: 4px; }
.cp-bulk { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 10px 0; }
.cp-bulk input[name=comment] { flex: 1 1 240px; min-width: 0; }
.lost-batches h2 { margin-top: 0; }
.lost-batch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .lost-batch { grid-template-columns: minmax(0, 1fr); } }
.cp-src { flex-direction: row; font-size: 14px; color: var(--text); }
.prices-table td.cp-check { min-width: 0; width: 36px; }
.prices-table td.cp-title { white-space: normal; min-width: 240px; max-width: 460px; }
.prices-table th .order-all { flex-direction: row; }

/* ---------- Таблицы: закреплённая строка заголовков и прокрутка вбок (13.11.2026, владелец: «во всех таблицах и на будущее») ----------
   Обёртка .table-wrap — своя область прокрутки высотой с экран: полоса прокрутки вбок всегда видна внизу области,
   а строка заголовков (весь thead, и двухэтажный тоже) остаётся наверху, пока листаешь вниз. Новые таблицы — только в .table-wrap. */
.table-wrap { --tbl-bg: var(--bg); max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow: auto; }
.card .table-wrap, .card.table-wrap, details .table-wrap { --tbl-bg: var(--surface); }
.table-wrap > table > thead { position: sticky; top: 0; z-index: 3; }
.table-wrap > table > thead th { background: var(--tbl-bg); box-shadow: inset 0 -1px 0 var(--line); }
.table-wrap > table > thead tr > :first-child { z-index: 4; }
@media (max-width: 640px) {
  .table-wrap:has(> table.products) { max-height: none; overflow: visible; } /* на телефоне строки «Товаров» — карточки */
}

/* «Цены конкурентов»: плотнее, без сильных переносов (13.11.2026) */
.prices-table { font-size: 13px; }
.prices-table th, .prices-table td { padding: 8px 8px; }
.prices-table th { font-size: 11px; }
.prices-table td.cp-title { min-width: 220px; max-width: 320px; line-height: 1.3; }
.prices-table td.cp-title b { font-weight: 500; }
.prices-table td.cp-title .small { font-size: 11.5px; }
.prices-table .illiquid-cell { font-weight: 500; color: var(--orange); }
.table-wrap { scroll-margin-top: 80px; }
@media (max-width: 640px) {
  /* «Цены конкурентов»: на телефоне закреплено название товара, а не столбец с галочками */
  .table-wrap > table.prices-table:not(.products) tr > .cp-check, .table-wrap > table.prices-table tr > th:first-child:not(.cp-title) {
    position: static; min-width: 0; max-width: none; }
  .table-wrap > table.prices-table tr > .cp-check::before, .table-wrap > table.prices-table tr > .cp-check::after,
  .table-wrap > table.prices-table tr > th:first-child:not(.cp-title)::before, .table-wrap > table.prices-table tr > th:first-child:not(.cp-title)::after { display: none; }
  .table-wrap > table.prices-table tr > .cp-title { position: sticky; left: 0; z-index: 1; background: var(--tbl-bg); min-width: 150px; max-width: 46vw; white-space: normal; }
  .table-wrap > table.prices-table thead tr > .cp-title { z-index: 4; }
}

/* Рынок РАЭК: B2C (розница, 13.11.2026) */
.rb-period { margin-bottom: 16px; }
.rb-kpis { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.rb-kpis .kpi b .delta { font-size: 22px; }
.rb-verdict { font-weight: 600; margin: 4px 0 12px; }
.rt-cmp-table tr.rb-b2c td { background: var(--orange-soft); }
.rt-cmp-table tr.rb-ours td { border-top: 2px solid var(--line); }

/* Мотивации вендоров: удвоение бонуса, общее выполнение, продажи по брендам (идеи №42, №43, 16.11.2026) */
.mv-double { background: var(--orange); color: #fff; border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.mv-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 12px; }
.mv-total b { font-size: 20px; }
.mv-total .mv-bar { flex-basis: 100%; }
.mv-brands { margin-top: 2px; }
.mv-brands summary { cursor: pointer; }
.mv-brands div { display: flex; justify-content: space-between; gap: 12px; max-width: 280px; }

/* Рекомендация по наценке на группы товаров (опт, 17.11.2026) */
.wm-opts { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.wm-opts .eyebrow { display: block; margin-bottom: 6px; }
.wm-table td:first-child { white-space: normal; min-width: 200px; }
.wm-table th { white-space: nowrap; }
.wm-table td.wm-c { text-align: right; white-space: nowrap; padding: 0; }
.wm-table td.wm-c a { display: block; padding: 6px 10px; color: inherit; text-decoration: none; }
.wm-table td.wm-c a:hover { background: var(--surface-2); }
.wm-now { display: block; font-size: 11px; color: var(--muted); }
.wm-key.wm-high, .wm-c.wm-high .wm-now { color: var(--bad-fg); }
.wm-neg { color: var(--bad-fg); }
.wm-c.wm-low a, .wm-key.wm-low { background: var(--zone-mid); }
.wm-c.wm-ok .wm-now, .wm-key.wm-ok { color: var(--good-fg); }
.wm-key { padding: 1px 6px; border-radius: 6px; font-weight: 500; }

/* Партии закупки в «Точной рекомендации» снабжения (17.11.2026): раскрытие у товара, самая дорогая — первой */
.pp-batches { margin-top: 4px; text-align: left; }
.pp-batches summary { cursor: pointer; color: var(--orange); }
.pp-batch-table { font-size: 12px; margin-top: 4px; border-collapse: collapse; }
.pp-batch-table th, .pp-batch-table td { padding: 2px 6px !important; white-space: nowrap; font-weight: 400; }
.pp-batch-table th { color: var(--muted); text-transform: none; letter-spacing: 0; position: static !important; }
.gl-task-del { margin-left: auto; }
.gl-task-del button { background: none; border: 0; padding: 4px 6px; min-height: 32px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.gl-task-del button:hover, .gl-task-del button:focus-visible { color: var(--bad-fg); background: var(--surface-2); }

/* Проверка наценок в счёте (опт, 17.11.2026) */
.inv-upload { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.inv-upload label { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.inv-table td:first-child { white-space: normal; min-width: 240px; max-width: 420px; }
.inv-v { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--surface-2); }
.inv-v-ok { background: var(--zone-ok); color: var(--good-fg); }
.inv-v-high, .inv-v-loss { background: var(--orange-soft); color: var(--bad-fg); }
.inv-v-low { background: var(--zone-mid); color: var(--text); }
.inv-kpi-high { color: var(--bad-fg); }

/* Отдел сотрудника в Панели управления (17.11.2026) */
.dept-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.dept-filter .chips { margin: 0; }
.dept-filter button.chip { font: inherit; cursor: pointer; border: 0; }
.dept-edit { flex-basis: 100%; }
.dept-edit summary { cursor: pointer; color: var(--muted); }
.dept-edit form { display: grid; gap: 8px; max-width: 520px; margin-top: 8px; }
.dept-edit textarea { width: 100%; }
.admin-table .dept-cell select { width: 150px; max-width: 150px; font-size: 13px; }
.admin-table tr.dept-saved td { background: var(--accent-soft, rgba(241, 104, 33, .12)); transition: background .3s; }
@media (max-width: 640px) { .admin-table .dept-cell select { font-size: 16px; width: 130px; } }

/* Аватарки (19.11.2026) */
.avatar { width: var(--av, 32px); height: var(--av, 32px); flex: 0 0 var(--av, 32px); border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; background: var(--surface-2); }
.avatar-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; }
.avatar-empty svg { width: 78%; height: 78%; fill: currentColor; opacity: .75; transform: translateY(10%); }
.who-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; border-radius: 999px; padding: 2px 10px 2px 2px; }
.who-link:hover, .who-link.active { background: var(--surface); color: var(--text); }
.who-link .who { color: inherit; }
@media (max-width: 900px) { .who-link { padding: 2px; } }
.who-cell { display: flex; align-items: center; gap: 10px; }
.who-cell > div { min-width: 0; }
.me-card { max-width: 560px; }
.me-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.me-name { font-size: 18px; }
.me-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 10px; }
.me-form > * { min-width: 0; }
.me-label { color: var(--muted); font-size: 14px; }
.me-head > div { min-width: 0; overflow-wrap: anywhere; }
.file-pick { position: relative; display: flex; flex-direction: row; align-items: center; gap: 12px; min-width: 0; max-width: 100%; padding: 8px; border-radius: 12px; background: var(--bg); cursor: pointer; }
.file-pick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.file-pick-btn { flex: 0 0 auto; pointer-events: none; }
.file-pick-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text); }
.file-pick-name.an-pick-note { font-size: 13px; color: var(--muted); }
.file-pick:focus-within { outline: 2px solid var(--accent, #F16821); outline-offset: 2px; }
@media (max-width: 640px) { .me-head { gap: 14px; } .me-head .me-avatar { --av: 84px !important; } .me-name { font-size: 17px; } }

/* Своя раскладка плиток (19.11.2026): качание в режиме правки, меню «Переместить» */
.touch-only { display: none; }
@media (hover: none) { .touch-only { display: inline; } }
.tiles .tile { -webkit-touch-callout: none; }
/* Как на iPhone: плитки качаются, взятая плитка «поднимается» и едет за пальцем/мышкой, соседи плавно расступаются,
   над папкой плитка уменьшается, папка подсвечивается — отпустили, и плитка «ныряет» внутрь. */
@keyframes tile-jiggle { 0%, 100% { rotate: -.7deg; } 50% { rotate: .7deg; } }
.tiles.reordering .tile { animation: tile-jiggle .3s ease-in-out infinite; transform-origin: 50% 50%;
  transition: background .15s, translate .32s cubic-bezier(.2, .9, .3, 1), scale .22s ease, opacity .2s, box-shadow .2s; }
.tiles .tile.pressed { scale: 1.04; box-shadow: 0 14px 36px rgba(0, 0, 0, .18); transition: scale .25s cubic-bezier(.2, .9, .3, 1.4), box-shadow .25s; }
.tiles.reordering .tile.drag-source { animation: none; opacity: .18; scale: .96; }
.tiles.reordering .tile.drop-target { animation: none; scale: 1.06; background: var(--surface-2); box-shadow: 0 0 0 3px var(--orange), 0 14px 36px rgba(0, 0, 0, .16); }
.tiles.reordering .tile.drop-target .icon-box { background: var(--orange); }
.tile-ghost { position: fixed !important; left: 0; top: 0; margin: 0; z-index: 90; pointer-events: none; animation: none !important;
  box-sizing: border-box; transform-origin: 50% 50%; transition: scale .22s cubic-bezier(.2, .9, .3, 1.3), box-shadow .22s, opacity .22s; will-change: translate; }
.tile-ghost.lifted { scale: 1.06; box-shadow: 0 22px 50px rgba(0, 0, 0, .28); }
.tile-ghost.over-folder { scale: .62; opacity: .92; }
.tile-ghost .tile-move { display: none !important; }
body.tile-dragging, body.tile-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.tile-dropzone { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); z-index: 95; translate: -50% -140%; opacity: 0;
  display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 999px; font-weight: 600; color: var(--text);
  transition: translate .28s cubic-bezier(.2, .9, .3, 1.2), opacity .2s, scale .2s, background .2s; pointer-events: none; }
.tile-dropzone.show { translate: -50% 0; opacity: 1; }
.tile-dropzone.over { scale: 1.08; background: var(--orange); color: #fff; }
.tile-dropzone svg { width: 20px; height: 20px; }
@media (hover: none) { .tiles.reordering .tile-move [data-move] { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .tiles.reordering .tile { animation: none; transition: background .15s; }
  .tile-ghost, .tile-dropzone { transition: none; }
}
.tile-pop { position: fixed; z-index: 60; min-width: 240px; max-width: min(340px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto;
  padding: 8px; border-radius: 16px; background: var(--surface); box-shadow: 0 12px 40px rgba(0, 0, 0, .22); display: flex; flex-direction: column; gap: 2px; }
.tile-pop.sheet { left: 8px !important; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto !important; max-width: none; }
.tile-pop-title { font-weight: 700; padding: 8px 12px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-pop-sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 8px 12px 4px; }
.tile-pop-item { text-align: left; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.tile-pop-item:hover, .tile-pop-item:focus-visible { background: var(--surface-2); outline: none; }
.tile-pop-item.muted { color: var(--muted); }
@media (max-width: 640px) { .tile-pop-item { font-size: 16px; padding: 12px; } }
@media (max-width: 640px) { .tile-move [data-tile-menu] svg { transform: none; } }
.reorder-reset { display: none; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 0; }
.reordering ~ .reorder-reset { display: flex; }

/* Плашка «Портал на телефоне» (19.11.2026): на Android — приложение «Авента», на iPhone — значок на экране «Домой»,
   на компьютере — оба способа. Платформу определяет скрипт под плашкой (класс is-android / is-ios / is-desktop). */
.install-app .inst-and, .install-app .inst-ios { display: none; }
.install-app.is-android .inst-any, .install-app.is-ios .inst-any { display: none; }
.install-app.is-android .inst-and, .install-app.is-ios .inst-ios { display: inline; }
.install-app.is-android .inst-block-ios, .install-app.is-ios .inst-block-and { display: none; }
.inst-block + .inst-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.install-app.is-android .inst-block + .inst-block, .install-app.is-ios .inst-block + .inst-block { border-top: 0; margin-top: 0; padding-top: 0; }
.inst-block .btn { margin-right: 10px; }
/* Кнопка «Скачать приложение» и подпись с версией (03.12.2026): подпись под кнопкой,
   по левому краю её текста, и заметный отступ до списка шагов. */
.app-get { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 4px 0 20px; }
.app-get .btn { margin-right: 0; }
.app-get-meta { padding-left: 22px; font-size: 13px; line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; }
.app-get .dl-hint { margin-top: 0; padding-left: 22px; }
.install-body ol li { line-height: 1.5; }
.install-body ol + p { margin-top: 14px; }

/* Download buttons: «скачивается…», then a hint where the file went */
.dl-hint { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.dl-hint[hidden] { display: none; }
.dl-busy::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) { .dl-busy::before { animation-duration: 1.6s; } }
a[data-dl] { text-align: center; }

/* Две кнопки скачивания приложения магазина: тестовое и боевое (23.11.2026) — рядом, на телефоне одна под другой. */
.app-dl-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.app-dl-pair .app-dl-block + .app-dl-block { border-top: 0; padding-top: 0; }
@media (max-width: 640px) {
  .app-dl-pair { grid-template-columns: minmax(0, 1fr); }
  .app-dl-pair .app-dl-block + .app-dl-block { border-top: 1px solid var(--line); padding-top: 12px; }
}

/* ---------- Motion layer (24.11.2026, owner: smooth transitions like the menu concept video) ---------- */
/* 1. Page transitions (view transitions) were removed on 24.11.2026: on the phone they hid the «Загрузка…» pill — the owner keeps the pill. */
.tile-title { align-self: flex-start; }

/* 2. Sliding indicator: the active pill of tabs, segments and chips slides to the chosen item (motion.js). */
.has-ind { position: relative; isolation: isolate; }
.has-ind > a, .has-ind > button { position: relative; background: transparent !important; }
.has-ind > a::before, .has-ind > button::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -2; background: var(--surface); transition: background .15s, opacity .15s; }
.has-ind > a:hover::before, .has-ind > button:hover::before { background: var(--surface-2); }
.has-ind > .active::before { opacity: 0; }
.seg.has-ind > a::before, .seg.has-ind > button::before { background: transparent; }
.slide-ind { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; background: var(--ink);
  transition: transform .36s cubic-bezier(.3,.8,.2,1), width .36s cubic-bezier(.3,.8,.2,1), height .36s cubic-bezier(.3,.8,.2,1); }
.seg > .slide-ind { background: var(--surface-2); }
:root[data-theme="dark"] .tabs > .slide-ind, :root[data-theme="dark"] .chips > .slide-ind { background: #F2F2F3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs > .slide-ind, :root:not([data-theme="light"]) .chips > .slide-ind { background: #F2F2F3; } }

/* 3. Hover pill that follows the mouse in segments and tile menus. */
.has-hover { isolation: isolate; }
.seg.has-hover { position: relative; }
.hover-ind { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; background: var(--surface-2); opacity: 0;
  transition: transform .22s cubic-bezier(.3,.8,.2,1), width .22s, height .22s, opacity .15s; }
.seg > .hover-ind { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.hover-ind.on { opacity: 1; }
.has-hover > .tile-pop-item:hover { background: none; }
.slide-ind.no-anim, .hover-ind.no-anim { transition: none; }

/* 4. Press ripple. */
.ripple-box { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 0; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .14; transform: scale(0); animation: ripple-in .45s cubic-bezier(.2,.7,.2,1) forwards; }
.tile .ripple { opacity: .07; }
.ripple.out { opacity: 0; transition: opacity .4s; }
@keyframes ripple-in { to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .slide-ind, .hover-ind { transition: none; }
  .ripple-box { display: none; }
}

/* Учёт пакетов (30.11.2026) */
.bag-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.bag-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.bag-filter .bag-check { flex-direction: row; align-items: center; min-height: 44px; }
.bag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; margin-bottom: 16px; }
.bag-grid > .card { min-width: 0; }
.bag-form { display: flex; flex-direction: column; gap: 14px; }
.bag-form label { display: flex; flex-direction: column; gap: 6px; }
.bag-scan { font-size: 20px; padding: 14px; border: 2px dashed var(--orange) !important; background: var(--orange-soft) !important; letter-spacing: .04em; }
.bag-who { background: var(--surface); border-radius: 12px; padding: 14px 16px; min-height: 64px; display: flex; flex-direction: column; justify-content: center; }
.bag-name { font-weight: 600; font-size: 17px; }
.bag-who.ok { box-shadow: inset 4px 0 0 var(--good-fg); }
.bag-who.ok .bag-name { font-size: 22px; color: var(--good-fg); }
.bag-who.bad .bag-name { color: var(--bad-fg); }
.bag-counter { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; }
.bag-counter output { font-size: 52px; font-weight: 600; min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; line-height: 1; }
.bag-purpose { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bag-purpose legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.bag-purpose label { flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.bag-purpose label:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
#bag-comment-box.need input { border-color: var(--orange); }
.bag-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bag-err { color: var(--bad-fg); min-height: 1em; margin: 0; }
.bag-cancel td { color: var(--muted); text-decoration: line-through; }
.bag-cancel td.bag-keep { text-decoration: none; }
tr.is-new td { background: var(--orange-soft); }
.bag-undo summary { cursor: pointer; color: var(--muted); }
.bag-undo form { display: flex; gap: 6px; margin-top: 6px; }
.bag-undo input { min-width: 140px; }
.bag-bar { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.bag-bar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bag-bar i { display: block; height: 10px; border-radius: 5px; background: var(--bar-track); overflow: hidden; }
.bag-bar i b { display: block; height: 100%; background: var(--orange); border-radius: 5px; }
.bag-bar .r { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bag-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bag-card { border: 1px dashed var(--grey); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: #fff; color: #000; break-inside: avoid; }
.bag-card svg { max-width: 100%; height: auto; }
.bag-card > span:last-child { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; }
@media print { header, footer, .no-print, .view-as-bar { display: none !important; } .bag-card { border-color: #999; } }
/* Учёт пакетов: окно точки по ссылке без входа (01.12.2026) */
.bag-kiosk .container { max-width: 640px; }
.bag-kiosk h1 { margin: 4px 0 16px; }
.bag-link { flex: 1 1 220px; min-width: 0; max-width: 360px; font-size: 13px; }
.bag-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bag-print-bar { margin: 0 0 12px; }
.bag-sel-col { width: 1%; }
/* Учёт пакетов: инструкция точки для печати (01.12.2026) */
.bag-guide { max-width: 760px; line-height: 1.5; }
.bag-guide h2 { font-size: 18px; margin: 22px 0 8px; }
.bag-guide ol, .bag-guide ul { padding-left: 22px; margin: 0 0 8px; }
.bag-guide li { margin: 3px 0; }
.bag-guide-link { font: 600 17px/1.4 ui-monospace, Menlo, Consolas, monospace; word-break: break-all; padding: 10px 14px; border: 2px dashed var(--orange); border-radius: 10px; }
.bag-guide-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.bag-scan-block { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.bag-scan-block > div:first-child { flex: 1 1 260px; }
.bag-scan-code { display: inline-block; background: #fff; padding: 10px 12px 6px; border-radius: 8px; text-align: center; margin: 6px 0; break-inside: avoid; }
.bag-scan-code svg { display: block; max-width: 100%; height: auto; }
.bag-step-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.bag-scan-code .small { color: #555; }
.bag-guide-table th, .bag-guide-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.bag-guide-table { table-layout: fixed; }
.bag-guide-table th, .bag-guide-table td { white-space: normal; overflow-wrap: anywhere; }
@media print {
  body { background: #fff !important; color: #000 !important; }
  .bag-guide, .bag-guide * { color: #000 !important; }
  .bag-guide-link { border-color: #000; }
  .bag-guide-table th, .bag-guide-table td { border-color: #999; }
  .container { padding-top: 0 !important; animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Замечания по Android-приложению со скриншотами (02.12.2026): новые подсвечены, сделанные — серые и зачёркнутые. */
.an-form { display: grid; gap: 12px; margin-top: 12px; }
.an-form label { display: grid; gap: 6px; min-width: 0; }
.an-form textarea, .an-status textarea { width: 100%; font-size: 16px; }
.an-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.an-variant { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg); }
.an-variant label, .an-form .an-variant label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.an-variant input { accent-color: var(--orange); margin: 0; }
.an-variant label:has(input:checked) { background: var(--surface-2); color: var(--text); font-weight: 500; }
.an-hint { margin: 0; }
@media (hover: none) { .an-hint { display: none; } }
.an-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.an-preview img { display: block; width: 72px; height: 120px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; margin: 16px 0; }
.an-card { display: flex; flex-direction: column; min-width: 0; border-radius: 14px; overflow: hidden; background: var(--bg); color: var(--text); text-decoration: none; transition: transform .15s ease, opacity .15s ease; }
.an-card:hover { transform: translateY(-2px); color: var(--text); }
.an-card.st-new { box-shadow: 0 0 0 2px var(--orange); }
.an-card.st-done, .an-card.st-drop { opacity: .55; }
.an-card.st-done img, .an-card.st-drop img { filter: grayscale(1); }
.an-card.st-done .an-txt, .an-card.st-drop .an-txt { text-decoration: line-through; color: var(--muted); }
.an-card.st-done:hover, .an-card.st-drop:hover { opacity: .85; }
.an-shot { position: relative; height: 220px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.an-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.an-more { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; }
.an-body { display: grid; gap: 6px; padding: 10px 12px 12px; min-width: 0; }
.an-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.an-txt { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.an-reply { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.an-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.an-add summary { cursor: pointer; }
.an-tabs { flex-wrap: wrap; }
.an-note-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; margin-top: 0; }
.an-note.st-done .an-note-text, .an-note.st-drop .an-note-text { text-decoration: line-through; color: var(--muted); }
.an-full { display: flex; flex-wrap: wrap; gap: 12px; }
.an-full a { flex: 0 1 300px; min-width: 0; }
.an-full img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--bg); }
.an-answer { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.an-answer p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.an-nav { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.an-status { display: grid; gap: 12px; }
.an-status label { display: grid; gap: 6px; }
@media (max-width: 640px) { .an-shot { height: 180px; } .an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.an-status .an-variant label, .an-form .an-variant label { display: inline-flex; }
.an-variant input[type=radio] { width: auto; height: auto; padding: 0; flex: 0 0 auto; }
@media (max-width: 640px) { .an-full a { flex: 0 1 calc(50% - 6px); } }
.an-variant label { flex-direction: row; }
.an-variant input[type=radio] { min-height: 0; width: 16px; height: 16px; border: 0; accent-color: var(--orange); }

/* Кнопка «Назад» в шапке (02.12.2026): на каждой странице, кроме главной, — на уровень выше по папкам. */
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 8px; border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; flex: none; }
.nav-back:hover { color: var(--orange); }
.nav-back svg { flex: none; }
@media (max-width: 640px) {
  .topbar-left { gap: 8px; }
  .nav-back { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .nav-back span { display: none; }  /* на телефоне шапка тесная — круглая кнопка со стрелкой */
  .nav-back svg { width: 20px; height: 20px; }
}

/* Панель управления: вложенная папка в списке разделов — галочка «вся папка» и название, которое раскрывает разделы. */
.sections-nest { display: flex; align-items: flex-start; gap: 6px; }
.sections-nest > form { padding-top: 2px; }
.sections-nest > details { min-width: 0; }
.sections-nest > details > summary { cursor: pointer; font-size: 13px; color: var(--text); white-space: nowrap; list-style: none; }
.sections-nest > details > summary::-webkit-details-marker { display: none; }
.sections-nest > details > summary::before { content: "▸ "; color: var(--muted); }
.sections-nest > details[open] > summary::before { content: "▾ "; }
.sections-nest .sections-sub { padding-left: 4px; }
.an-thumb { position: relative; display: inline-block; }
.an-thumb-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; line-height: 26px; cursor: pointer; }

/* ── Ритм текста (02.12.2026, просьба владельца: мелкие подписи прижимались к кнопкам и крупному тексту) ──
   Мелкий текст — с межстрочным 1,5; от кнопки над ним — 8 px, от того, что идёт после него, — 16 px. */
.small { line-height: 1.5; }
p.small { margin-top: 8px; margin-bottom: 0; }
p.small:first-child { margin-top: 0; }
:is(.btn, .btn-ghost) + :is(p.small, p.muted, .muted.small) { margin-top: 8px; }
:is(p.small, p.muted) + :is(h2, h3, h4, form, details, ul, ol, .btn, .btn-ghost, .table-wrap, .notice, .an-grid, .an-links, .app-dl-pair, .gl-tgroup) { margin-top: 16px; }
.lead + :is(.btn, .gl-sync) { margin-top: 4px; }
.eyebrow + h2 { margin-top: 6px; }
h2 + p.small, h2 + p.muted { margin-top: 0; }

/* «Android-приложение», «План развития магазина», B2B: блоки с кнопками и подписями */
.gl-sync { gap: 8px 14px; margin: 8px 0 28px; }
.gl-sync .muted.small { line-height: 1.5; }
.an-links { margin-top: 20px; gap: 10px 14px; }
.an-hint { margin: 10px 0 20px; }
.app-dl-block { gap: 10px; }
.app-dl-block > p.small { margin: 0; }
.app-dl-pair { margin-bottom: 8px; }
.gl-stage-body p { margin: 6px 0 0; line-height: 1.5; }
.gl-tgroup { padding-top: 14px; margin-top: 14px; }
.gl-tasks { gap: 22px; margin: 14px 0 10px; }
.gl-tasks p { margin: 6px 0 0; line-height: 1.5; }
.gl-task-head { gap: 6px 8px; }
.app-how { margin-top: 12px; }
.app-how > summary { padding: 4px 0; }

/* SEO-оптимизация (04.12.2026): круговая диаграмма готовности — сделано / в работе / в планах. */
:root { --seo-done: #F16821; --seo-work: #8A6BC8; }
:root[data-theme="dark"] { --seo-work: #9B80D6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --seo-work: #9B80D6; } }
.seo-top { display: flex; align-items: center; gap: 24px; }
.seo-chart { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.seo-donut { position: relative; width: 132px; height: 132px; }
.seo-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.seo-donut circle { fill: none; stroke-width: 4.2; }
.seo-track { stroke: var(--bar-track); }
.seo-arc.seo-next { stroke: var(--bar-track); }
.seo-arc.seo-done { stroke: var(--seo-done); }
.seo-arc.seo-work { stroke: var(--seo-work); }
.seo-arc:hover { stroke-width: 5; }
.seo-donut-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; pointer-events: none; }
.seo-donut-txt b { font-size: 28px; letter-spacing: -0.02em; }
.seo-donut-txt span { font-size: 12px; color: var(--muted); }
.seo-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.seo-legend li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.seo-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; background: var(--bar-track); box-shadow: inset 0 0 0 1px var(--line); }
.seo-key.seo-done { background: var(--seo-done); box-shadow: none; }
.seo-key.seo-work { background: var(--seo-work); box-shadow: none; }
.seo-goal { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.seo-goal h2, .seo-goal p { margin: 0; }
.seo-group h2 { display: flex; align-items: center; gap: 10px; }
.seo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.seo-list p { margin: 4px 0 0; }
.seo-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.seo-blocks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seo-row .seo-block { background: transparent; box-shadow: inset 0 0 0 1px var(--line, #ACACAC); color: var(--muted, #6b6b6b); }
.seo-later summary { cursor: pointer; }
@media (max-width: 640px) {
  .seo-top { flex-direction: column; align-items: stretch; gap: 16px; }
  .seo-chart { justify-content: center; }
  .seo-donut { width: 112px; height: 112px; }
  .seo-donut-txt b { font-size: 24px; }
}
