/* Кабинеты KPI — один стиль на всех экранах и ролях (0.12.0).
   Шкала: заголовок экрана 28/800 · заголовок карточки 17/700 · текст 15 · подпись 13 · главная цифра 44 ·
   цифры в малых карточках 22; межстрочный 1.35; Inter (запасной -apple-system), цифры одной ширины.
   Карточки: радиус 22, отступ 16, между карточками 12, поля экрана 16. Иконки 36×36 (радиус 10, значок 18, линия 2).
   Цвета смыслов: зелёный — начислено/выполнено; жёлтый — условно/близко (копилка); серый — прогноз;
   фиолетовый — потенциал; красный — только реальные потери и ошибки (экраны владельца и админа). */
@font-face { font-family: "Inter Cab"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-cyrillic.woff2?v=7dc610e621) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter Cab"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-latin.woff2?v=7dc610e621) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F5F4F9; --glass: rgba(255,255,255,0.75); --glass-line: rgba(255,255,255,0.85); --dark: #141418;
  --ink: #1C1C1E; --ink2: #55525F; --muted: #55525F; --faint: #8E8E93; --line: rgba(20,20,24,0.08);
  --fill: rgba(20,20,24,0.05); --track: rgba(20,20,24,0.08);
  /* смыслы */
  --ok: #1F9D55; --ok-ink: #157F3D; --ok-soft: #DDF3E6;
  --pig: #FFF3C7; --pig-ink: #6E4E00; --pig-bar: #E9B400;
  --fc: #8E8E93; --fc-ink: #55525F;
  --vio: #7B61FF; --vio-ink: #5B45D6; --vio-soft: #EEEAFB;
  --bad: #B42318; --bad-ink: #8A1C12; --bad-soft: #FDECEA; --bad-bar: #F4B4AE;
  --warn: #8A5A00; --warn-ink: #6E4E00; --warn-soft: #FFF3C7; --warn-bar: #F2C230;
  --link: #0A58CA; --h1: #CDEBD6; --h2: #FFF3C7;
  --grad: linear-gradient(to bottom, rgba(40,10,60,0.20), rgba(40,10,60,0.30)), linear-gradient(135deg, #7B61FF, #E85C9A);
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
/* у body фона нет: иначе он закрывает пятна (z-index −1) */
html, body { margin: 0; color: var(--ink); overflow-x: hidden; }
body { font-family: "Inter Cab", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px; line-height: 1.35; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
h3 { font-size: 15px; font-weight: 700; }
b { font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- фон: 4 размытых пятна, медленно плавают; обёртка — параллакс при прокрутке ---------- */
.blobs { position: fixed; left: 0; right: 0; top: 0; height: 200vh; z-index: -1; pointer-events: none; overflow: hidden;
  will-change: transform; }
/* пятно с размытием 80 px нарисовано радиальным градиентом: тот же вид без filter — дёшево на слабых телефонах */
.blobs i { position: absolute; width: 460px; height: 460px; border-radius: 50%; will-change: transform;
  background: radial-gradient(closest-side, var(--c) 0%, var(--c) 45%, transparent 100%);
  animation: drift 18s ease-in-out infinite alternate; }
.blobs .b1 { --c: #FF9EC2; opacity: .45; left: -170px; top: -140px; }
.blobs .b2 { --c: #8FC8FF; opacity: .42; right: -190px; top: calc(22vh - 80px); animation-duration: 20s; animation-delay: -6s; }
.blobs .b3 { --c: #8EE8C4; opacity: .4; left: -150px; top: calc(70vh - 80px); animation-duration: 16s; animation-delay: -3s; }
.blobs .b4 { --c: #FFE27A; opacity: .42; right: -160px; top: calc(115vh - 80px); animation-duration: 19s; animation-delay: -10s; }
@keyframes drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(40px, 30px, 0) scale(1.08); }
  100% { transform: translate3d(-30px, 50px, 0) scale(.95); } }
.blobs.lite i { animation: none; }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid var(--glass-line); border-radius: 22px; padding: 24px 16px; max-width: 380px; width: 100%;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 8px 24px rgba(20,20,24,0.06); }
.login-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.login-card p { margin: 0; color: var(--ink2); font-size: 15px; }

/* ---------- каркас ---------- */
.shell { display: flex; min-height: 100vh; }
.side { display: none; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.subtabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 16px 0; max-width: 560px;
  margin: 0 auto; width: 100%; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { flex: none; padding: 0 16px; min-height: 44px; display: flex; align-items: center; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--ink2); font-size: 15px; font-weight: 600; }
.subtabs a.on { background: var(--dark); border-color: var(--dark); color: #fff; }
.subtabs + .main { padding-top: 12px; }
.main { flex: 1; min-width: 0; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column;
  gap: 12px; max-width: 560px; margin: 0 auto; width: 100%; }
.main.no-tabbar { padding-bottom: 32px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); background: rgba(245,244,249,0.82);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); border-top: 1px solid var(--glass-line);
  box-shadow: 0 -1px 0 rgba(20,20,24,0.05); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 48px; color: var(--faint); font-size: 13px; font-weight: 600; }
.tabbar a.on { color: var(--ink); font-weight: 700; }
/* 6 пунктов (владелец): колонки по ширине подписи, свободное место — между ними; помещается от 340 px */
.tabbar.n6 { grid-template-columns: repeat(6, auto); justify-content: space-between; padding-left: 6px; padding-right: 6px; }
.tabbar.n6 a { letter-spacing: -0.02em; white-space: nowrap; padding: 0 2px; }
.rv-slot { display: contents; }                              /* блок, который досчитывается позже: пока пуст — без отступа */
.tabbar svg, .side svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.tabbar.scroll { display: flex; overflow-x: auto; scrollbar-width: none; }
.tabbar.scroll::-webkit-scrollbar { display: none; }
.tabbar.scroll a { flex: 0 0 76px; }

/* полоса с названием экрана, когда заголовок ушёл вверх */
.top-bar, .cab-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 6; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; font-size: 15px;
  background: rgba(245,244,249,0.82); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--glass-line); box-shadow: 0 1px 0 rgba(20,20,24,0.05);
  opacity: 0; transform: translate3d(0, -100%, 0); transition: transform .3s var(--ease), opacity .3s; pointer-events: none; }
.top-bar.on, .cab-bar.on { opacity: 1; transform: none; }
.top-bar b { font-size: 17px; font-weight: 700; }
.cab-bar > span { color: var(--ink2); font-size: 13px; }
.cab-bar > span b { font-size: 15px; }

/* ---------- заголовок экрана ---------- */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.head .sub, .hello .sub { font-size: 13px; color: var(--ink2); font-weight: 500; }
.head h1, .hello h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.hello { padding: 4px 0 2px; }
.hello h1 { margin-top: 2px; }
.pill { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap;
  background: var(--fill); color: var(--ink2); }
.pill.warn { background: var(--pig); color: var(--pig-ink); }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.pill.ok { background: var(--ok-soft); color: var(--ok-ink); }
.pill.mute { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }
.card .row.exp { align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.card .row.exp .k { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; overflow-wrap: anywhere; color: var(--ink); }
.card .row.exp b { white-space: nowrap; }
.fot-r { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* ---------- карточки: матовое стекло ---------- */
.card, .cc, .list { position: relative; background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid var(--glass-line); border-radius: 22px; box-shadow: 0 1px 2px rgba(20,20,24,0.04), 0 8px 24px rgba(20,20,24,0.04);
  min-width: 0; transition: transform .15s ease-out; }
.card, .cc { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.list { display: flex; flex-direction: column; overflow: hidden; }
/* нажатие — карточка чуть проседает (не там, где поля ввода, кнопки и таблицы) */
a.card:active, .cc:not(:has(input, select, textarea, table, button)):active,
.card:not(:has(input, select, textarea, table, button, details)):active, .list > a:active { transform: scale(.98); }
.card h2, .cc h2, .sect-title h2 { font-size: 17px; font-weight: 700; }
.cc h2 { display: flex; align-items: center; gap: 8px; }
.cc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.sect-title { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 4px 0; gap: 8px; flex-wrap: wrap; }
.card .sect-title { margin: 0; }
.card .row, .sale-doc .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 2px 0; }
.card .row .k, .sale-doc .row .k { color: var(--ink2); min-width: 0; }
.card .row b { font-weight: 600; text-align: right; }
.card a.row.link { min-height: 44px; align-items: center; color: inherit; text-decoration: none; }
.card a.row.link .k { color: var(--link); }
.card .row.pig-ink b { color: var(--pig-ink); }
.card .row.total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 8px; }
.note, .cap, .label, .desc { font-size: 13px; color: var(--ink2); }
.label { font-weight: 600; }
.text, .tip { font-size: 15px; color: var(--ink); }
.big, .hero { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; white-space: nowrap; }
.stat-v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
@media (max-width: 359px) { .big, .hero { font-size: 38px; } }
.bar { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar > div { height: 8px; background: var(--ink); border-radius: 999px; }
.red { color: var(--bad); } .orange { color: var(--warn); }
.green { color: var(--ok); } .green-ink, .ok-text { color: var(--ok-ink); }
.pig-ink { color: var(--pig-ink); } .fc-ink { color: var(--fc-ink); } .vio-ink { color: var(--vio-ink); }

/* главные итоговые карточки — тёмные или градиент */
.card.dark, .cc.dark { background: var(--dark); border-color: var(--dark); color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.dark .note, .dark .cap, .dark .label, .dark .desc, .dark .row .k, .dark .brow span { color: #B4B4BE; }
.dark .note b { color: #fff; }
.dark .bar, .dark .track, .dark .mp-bar { background: rgba(255,255,255,0.14); }
.dark .bar > div { background: #fff; }
.dark .tile { background: rgba(255,255,255,0.08); }
.dark .tile .t, .dark .tile .s { color: #B4B4BE; }
.dark .row.total, .dark .rows { border-color: rgba(255,255,255,0.14); }
.dark .q summary::before { background: #2C2C33; color: #E5E5EA; }
.dark .green, .green-on-dark { color: #3DDC84; }
.dark .red { color: #FF8A80; }
.cc.grad, .card.grad { background: var(--grad); border-color: transparent; color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.grad .mini-t, .grad .cap, .grad .note { color: #fff; }
.grad .q summary::before { background: rgba(255,255,255,0.25); color: #fff; }

/* плитки внутри карточек; парные — равной высоты */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.tiles.two, .sales-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { background: var(--fill); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .t { font-size: 13px; color: var(--ink2); font-weight: 600; }
.tile .v { font-size: 22px; font-weight: 800; white-space: nowrap; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.tile .s { font-size: 13px; color: var(--ink2); margin-top: auto; }
.tile .v small { font-size: 15px; font-weight: 700; }
/* телефон: три плитки в ряд не помещают сумму — две в ряд, нечётная последняя на всю ширину */
@media (max-width: 480px) {
  .tiles:not(.two):not(.wide-tiles) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles:not(.two):not(.wide-tiles) > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 1023px) { .wide-tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 359px) { .tile .v { font-size: 17px; } }
.tile.ok-t { background: var(--ok-soft); } .tile.ok-t .v { color: var(--ok-ink); }
.tile.pig-t { background: var(--pig); } .tile.pig-t .v, .tile.pig-t .t, .tile.pig-t .s { color: var(--pig-ink); }
.tile.vio-t { background: var(--vio-soft); } .tile.vio-t .v, .tile.vio-t .t { color: var(--vio-ink); } .tile.vio-t .s { color: #4A3AA8; }
.wide-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.wide-tiles > .card { gap: 4px; }
.wide-tiles .v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wide-tiles.tiles > .tile { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px; padding: 16px;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }

.banner { border-radius: 22px; padding: 12px 16px; font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.banner.bad { background: var(--bad-soft); color: var(--bad-ink); }
.banner.warn { background: var(--pig); color: var(--pig-ink); }

/* ---------- строки списков: иконка 36 | текст | сумма справа ---------- */
.item, .mgr { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 16px;
  border-bottom: 1px solid var(--line); min-height: 56px; }
.item:last-child, .mgr:last-child { border-bottom: 0; }
.item > .body:first-child { grid-column: 1 / -1; }
.dot { width: 36px; height: 36px; border-radius: 10px; background: var(--fill); display: flex; align-items: center; justify-content: center; }
.dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.dot.bad { background: var(--bad-soft); } .dot.bad::after { background: var(--bad); }
.dot.warn { background: var(--pig); } .dot.warn::after { background: var(--pig-bar); }
.dot.ok { background: var(--ok-soft); } .dot.ok::after { background: var(--ok); }
.item .body, .mgr-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item .top, .mgr .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; font-weight: 700; }
.item .top > span:last-child, .mgr .top > span:last-child { white-space: nowrap; text-align: right; }
.item .act { font-size: 13px; font-weight: 600; }
.mgr-body { gap: 6px; }
.segs { display: flex; gap: 3px; }
.segs span { flex: 1; height: 6px; border-radius: 3px; background: var(--bad-bar); }
.segs span.on { background: var(--ok); }
.mgr .foot, .pos .foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); gap: 8px; flex-wrap: wrap; }
.mgr .foot b { color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 4px; font-size: 13px; color: var(--ink2); }
.legend i { display: inline-block; width: 12px; height: 8px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.opt { margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 13px; font-weight: 600; background: var(--pig); color: var(--pig-ink); }

.clist { display: flex; flex-direction: column; }
.clist.adv { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line, rgba(127,127,127,.25)); }
.crow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 56px;
  padding: 10px 0; border-top: 1px solid var(--line); }
.crow:first-child { border-top: 0; padding-top: 0; min-height: 46px; }
.crow:last-child { padding-bottom: 0; }
.ct { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ct b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.ct span { font-size: 13px; color: var(--ink2); }
.cs { font-size: 15px; font-weight: 700; white-space: nowrap; text-align: right; }
.ci { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none;
  background: var(--vio-soft); color: var(--vio-ink); font-size: 15px; font-weight: 800; }
.ci svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ci.pink { background: #FFE4EE; color: #C2185B; }
.ci.ok { background: var(--ok-soft); color: var(--ok-ink); }
.ci.pig { background: var(--pig); color: var(--pig-ink); }
.ci.violet { background: var(--vio-soft); color: var(--vio-ink); }
.ci.num { background: var(--fill); color: var(--ink); }
.ci.gold { background: var(--pig); color: var(--pig-ink); }
.crow.me .ct b { font-weight: 800; }
.crow.me .ci.num { background: var(--dark); color: #fff; }
.brow { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 4px 0; }
.brow span { color: var(--ink2); min-width: 0; overflow-wrap: anywhere; }
.pig-on-dark { color: #FFD966; }
.brow b { white-space: nowrap; }

/* ---------- менеджеры, позиции ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { border: 1px solid var(--glass-line); background: var(--glass); border-radius: 999px; padding: 0 16px; min-height: 44px;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chips button.on { background: var(--dark); border-color: var(--dark); color: #fff; }
.pos { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pos:last-child { border-bottom: 0; }
.pos .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.pos .top > span:last-child { white-space: nowrap; }
.pos .tag { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin-left: 8px; white-space: nowrap; display: inline-block; }
.pos .hint { font-size: 13px; font-weight: 600; }
.track { position: relative; height: 10px; background: var(--track); border-radius: 999px; }
.track > .fc, .track > .fact { position: absolute; left: 0; top: 0; height: 10px; border-radius: 999px; }
.track > .mark { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--ink); }
.track > .mark.goal { background: var(--faint); }
.lvl-below .tag { color: var(--bad-ink); background: var(--bad-soft); }
.lvl-below .fact { background: var(--bad); } .lvl-below .fc { background: var(--bad-bar); }
.lvl-ok .tag { color: var(--ok-ink); background: var(--ok-soft); }
.lvl-ok .fact { background: var(--ok); } .lvl-ok .fc { background: #A7D9B7; }
.lvl-near .tag { color: var(--warn-ink); background: var(--warn-soft); }   /* «План магазина»: 80–99% */
.lvl-near .fact { background: var(--warn-bar); } .lvl-near .fc { background: #F8E3A0; }
.warn-ink { color: var(--warn-ink); }
.pos .own { font-size: 13px; font-weight: 600; color: var(--faint); margin-left: 8px; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.pos .hint.muted { color: var(--ink2); font-weight: 600; }
.plan-card { display: flex; flex-direction: column; gap: 12px; }
.plan-card .list { margin: 0 -16px; }
@media (min-width: 1024px) {   /* компьютер: 11 строк в две колонки, чтобы «Менеджеры» не уезжали вниз */
  .plan-card .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0; }
  .plan-card .pos:last-child { border-bottom: 1px solid var(--line); }
  .plan-card .pos:nth-child(odd) { border-right: 1px solid var(--line); }
}
.lvl-few .tag { color: var(--ink2); background: var(--fill); }      /* первые 5 рабочих дней: прогноза нет */
.lvl-few .fact { background: var(--fc-ink); } .lvl-few .fc { background: transparent; }
a.pos { color: inherit; cursor: pointer; }
a.pos .top > span:first-child::after { content: " ›"; color: var(--faint); font-weight: 600; }
@media (hover: hover) { a.pos:hover, tr.click:hover td { background: rgba(255,255,255,0.6); } }

.hbar { display: flex; flex-direction: column; gap: 4px; }
.hbar .lbl { display: flex; justify-content: space-between; font-size: 15px; gap: 12px; }
.hbar .lbl span { min-width: 0; }
.hbar .lbl b { white-space: nowrap; }
.hbar .tr { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.hbar .tr > div { height: 8px; border-radius: 999px; background: #636366; }
.hbar .tr > div.red { background: var(--bad); }
.cols { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.cols > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.cols .c { width: 100%; background: #A99BFF; border-radius: 6px 6px 2px 2px; min-height: 2px; }
.cols .c.top { background: var(--vio); }
.cols .x { font-size: 13px; color: var(--ink2); }

/* ---------- таблицы владельца и админа: в тех же карточках, прокрутка только внутри таблицы ---------- */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th { text-align: left; font-size: 13px; color: var(--ink2); font-weight: 600; padding: 6px 8px; white-space: nowrap; }
td { padding: 10px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; } th:last-child, td:last-child { padding-right: 0; }
td.num, th.num { text-align: right; }
tr.click { cursor: pointer; }
.heat td { text-align: center; font-size: 13px; font-weight: 600; padding: 8px 4px; }
.heat td.name { text-align: left; font-size: 15px; }
.heat th { text-align: center; font-size: 13px; white-space: normal; min-width: 64px; }
.h0 { background: var(--bad-soft); color: var(--bad-ink); } .h1 { background: var(--h2); color: var(--pig-ink); }
.h2 { background: var(--h1); color: var(--ok-ink); } .h3 { background: var(--ok-ink); color: #fff; }
.grid-cards { display: flex; flex-direction: column; gap: 12px; }
.loading, .error { padding: 40px 16px; text-align: center; color: var(--ink2); font-size: 15px; }

/* ---------- кнопки, формы ---------- */
.btn { border: 1px solid var(--glass-line); background: var(--glass); border-radius: 14px; min-height: 44px; padding: 0 16px;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .15s ease-out; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.primary { background: var(--dark); border-color: var(--dark); color: #fff; }
.refresh-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -4px 4px 0; }
.refresh-bar .btn { flex: none; }
.more-btn { color: var(--ink2); width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.link-btn { display: inline-flex; align-items: center; align-self: flex-start; }
.back { color: var(--link); font-size: 15px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.form input, input.copy { font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 14px; min-height: 44px; padding: 0 12px; width: 100%; }
.form-err { margin: 0; color: var(--bad); font-size: 15px; }
.view-as { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--dark); color: #fff; border-radius: 22px; padding: 10px 16px; font-size: 15px; position: sticky; top: 8px; z-index: 7; }
.view-as .btn { background: #fff; color: var(--ink); border-color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.actions .btn { padding: 0 12px; font-size: 13px; }
.num-in, .shift-row input { font: inherit; font-size: 15px; width: 100%; min-width: 108px; min-height: 44px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.set-row .num-in { max-width: 140px; }
.shift-row { display: grid; grid-template-columns: 96px 96px 1fr auto; gap: 8px; align-items: center; margin-top: 8px; }
.shift-row .who { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-sm { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0 12px; font-size: 13px; cursor: pointer; min-height: 44px; }
.chip-sm.on { background: var(--dark); color: #fff; border-color: var(--dark); }
@media (max-width: 600px) { .shift-row { grid-template-columns: 1fr 1fr; } .shift-row .who { grid-column: 1 / -1; } }

/* автообновление при открытии */
.updating-pill { display: flex; align-items: center; gap: 8px; margin: 0 4px -4px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.updating-pill.warn { color: var(--pig-ink); }
.spin { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid var(--line);
  border-top-color: var(--ink2); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* группы: папка → модель → позиции */
.glist { display: flex; flex-direction: column; gap: 8px; }
.g-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.g-search { flex: 1 1 180px; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 14px;
  padding: 8px 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.groups { display: flex; flex-direction: column; gap: 6px; }
details.g { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.6); }
details.g > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 6px 12px; padding: 10px 12px; min-height: 48px; }
details.g > summary::-webkit-details-marker { display: none; }
details.g > summary::before { content: "▸"; color: var(--faint); flex: none; transition: transform .15s; }
details.g[open] > summary::before { transform: rotate(90deg); }
.g-title { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.g-meta { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; font-size: 15px; text-align: right; }
.g-in { display: flex; flex-direction: column; gap: 6px; padding: 0 8px 8px 18px; }
.g-pos { border-top: 1px solid var(--line); padding: 8px 4px 4px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.g-pos-head { display: flex; justify-content: space-between; gap: 12px; }
.g-pos-head span { min-width: 0; overflow-wrap: anywhere; }
.g-pos-head b { white-space: nowrap; }
.g-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 2px 0 0; font-size: 13px; }
.g-facts dt { color: var(--ink2); } .g-facts dd { margin: 0; text-align: right; }
.g-more { align-self: center; min-height: 44px; margin-top: 4px; }

/* продажи позиции KPI */
.seg { display: flex; background: var(--fill); border-radius: 12px; padding: 2px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 10px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--ink2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.sales { display: flex; flex-direction: column; gap: 8px; }
details.sale { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px;
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
details.sale.ret { background: rgba(255,255,255,0.5); }
details.sale > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; min-height: 56px; }
details.sale > summary::-webkit-details-marker { display: none; }
.sale-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 15px; }
.sale-main b { overflow-wrap: anywhere; }
.sale-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sale-sum { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 15px; white-space: nowrap; }
.sale-doc { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; border-top: 1px solid var(--line); }
.card.empty { gap: 4px; }

/* ---------- кабинет менеджера ---------- */
.cab { position: relative; display: flex; flex-direction: column; gap: 12px; }
.today-sums { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pig-chip { display: flex; flex-direction: column; align-items: flex-end; background: var(--pig); color: var(--pig-ink);
  border-radius: 14px; padding: 8px 12px; }
.pig-chip b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.pig-chip span { font-size: 13px; font-weight: 600; }
.mbreak > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; border-top: 1px solid var(--line); }
.dark .mbreak > summary { border-color: rgba(255,255,255,0.14); }
.mbreak > summary::-webkit-details-marker { display: none; }
.mbreak > summary::after { content: "▾"; opacity: .6; }
.mbreak[open] > summary::after { content: "▴"; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.mini { gap: 4px; justify-content: flex-start; }
.mini-t { font-size: 13px; font-weight: 600; color: var(--ink2); }
.mini-v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; margin: 2px 0; }
@media (max-width: 359px) { .mini-v, .pig-chip b { font-size: 19px; } }
.mini > .cap { margin-top: auto; }
.mini.pig { background: rgba(255,243,199,0.85); border-color: rgba(255,243,199,0.95); }
.mini.pig .mini-t, .mini.pig .mini-v, .mini.pig .cap, .mini.pig .brow span, .mini.pig .brow b { color: var(--pig-ink); }
.mini.pig .mbreak > summary { font-size: 13px; color: var(--pig-ink); border-color: rgba(110,78,0,0.15); }
.mini.pig .brow { font-size: 13px; }
.mini.fc .mini-v { color: var(--fc-ink); }
.mini-v.few { font-size: 17px; font-weight: 700; white-space: normal; }   /* «мало данных» вместо суммы прогноза */
.potential { gap: 4px; }
.pot-v { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; white-space: nowrap; }
@media (max-width: 359px) { .pot-v { font-size: 38px; } }
.live { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.6); opacity: 0; } }

/* кольца в стиле Apple Watch */
.ring-wrap { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; }
.rings { width: 132px; height: 132px; transform: rotate(-90deg); }
.rings circle { fill: none; stroke-linecap: round; }
.rings .ring-bg { opacity: .2; }
.rings .ring-fg { transition: stroke-dashoffset 1.6s var(--ease); }
.ring-legend { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rl { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rl > i { width: 10px; height: 10px; border-radius: 50%; }
.rl .ct span { color: #B4B4BE; }

/* рейтинг недели */
.rate-me { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.place { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.place small { font-size: 13px; font-weight: 600; color: var(--ink2); letter-spacing: 0; }
.rate-pts { display: flex; flex-direction: column; align-items: flex-end; }
.rate-pts > span:first-child { font-size: 22px; font-weight: 800; }
.rate-bar { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.rate-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7B61FF, #E85C9A); }

/* «?» у блока и свёрнутые блоки */
.q { position: relative; }
.q summary { list-style: none; width: 44px; height: 44px; margin: -10px -10px -10px 0; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 0; }
.q summary::-webkit-details-marker { display: none; }
.q summary::before { content: "?"; width: 24px; height: 24px; border-radius: 50%; background: var(--fill); color: var(--ink2);
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.q-text { position: absolute; right: 0; top: 40px; z-index: 8; width: min(300px, 82vw); background: var(--dark); color: #fff;
  font-size: 13px; padding: 12px 14px; border-radius: 14px; font-weight: 400; box-shadow: 0 8px 24px rgba(20,20,24,0.2); }
.mypos > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.mypos > summary::-webkit-details-marker { display: none; }
.mypos > summary .cc-head::after { content: "▾"; color: var(--ink2); font-size: 15px; }
.mypos[open] > summary .cc-head::after { content: "▴"; }
.mypos[open] { display: flex; flex-direction: column; gap: 8px; }
.counts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.mp { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); min-height: 44px; }
.mp-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 600; }
.st { font-size: 13px; font-weight: 700; white-space: nowrap; border-radius: 999px; padding: 1px 8px; }
.st.done { color: var(--ok-ink); background: var(--ok-soft); }
.st.close { color: var(--pig-ink); background: var(--pig); }
.st.far { color: var(--ink2); background: var(--fill); }
.mp-bar { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.mp-bar > div { height: 8px; border-radius: 999px; }
.mp-bar > .done { background: var(--ok); } .mp-bar > .close { background: var(--pig-bar); } .mp-bar > .far { background: #B4B4BE; }

/* ---------- обучение и аттестация ---------- */
.st.vio { color: var(--vio-ink); background: var(--vio-soft); }
a.link-card { color: inherit; }
.pt { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.pt:first-child { border-top: 0; padding-top: 0; }
.pt > div { font-size: 15px; padding-top: 7px; min-width: 0; }
.phrase { position: relative; background: var(--vio-soft); border-radius: 14px; padding: 12px 14px 12px 18px; font-size: 15px; font-weight: 600; }
.phrase::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--vio); }
.chat { display: flex; flex-direction: column; gap: 8px; }
.bub { max-width: 86%; border-radius: 18px; padding: 10px 14px; font-size: 15px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.bub .who { font-size: 13px; font-weight: 700; }
.bub.client { align-self: flex-start; background: var(--fill); border-bottom-left-radius: 6px; }
.bub.client .who { color: var(--ink2); }
.bub.seller { align-self: flex-end; background: var(--dark); color: #fff; border-bottom-right-radius: 6px; }
.bub.seller .who { color: #B4B4BE; }
.bub.wrong { align-self: flex-end; border: 1px dashed rgba(20,20,24,0.28); color: var(--ink2); border-bottom-right-radius: 6px; }
.bub.wrong .txt { text-decoration: line-through; text-decoration-color: rgba(20,20,24,0.45); }
.bub-note { align-self: center; text-align: center; font-size: 13px; color: var(--ink2); max-width: 92%; padding: 2px 0; }
.end-mark { height: 1px; margin-top: -12px; }
.lesson-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lesson-nav .btn { display: flex; align-items: center; justify-content: center; }
.quote { background: var(--fill); border-radius: 14px; padding: 10px 12px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.att { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.cc-head + .att, .cc > .att:first-of-type { border-top: 0; padding-top: 0; }
.att .mp-top > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.att .brow b { font-weight: 600; text-align: right; overflow-wrap: anywhere; white-space: normal; }
.mods { display: flex; gap: 6px; flex-wrap: wrap; }
.mods .btn { display: inline-flex; align-items: center; }
.ta, .sel { font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; width: 100%; }
.ta { min-height: 96px; resize: vertical; }
.sel { min-height: 44px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.score-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cc-head + .score-row { border-top: 0; padding-top: 0; }
.score-row > span { flex: 1 1 160px; min-width: 0; font-size: 15px; }
.score-row .seg { flex: 0 0 156px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper .btn { width: 44px; padding: 0; }
.stepper b { font-size: 22px; font-weight: 800; min-width: 24px; text-align: center; }
.scale { position: relative; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.14); margin-top: 4px; }
.scale > .fill { height: 10px; border-radius: 999px; background: #fff; transform-origin: left center; transform: scaleX(0);
  transition: transform .3s var(--ease); }
.scale > .tick { position: absolute; top: -4px; width: 2px; height: 18px; margin-left: -1px; background: #B4B4BE; }
.scale-lbl { position: relative; height: 18px; font-size: 13px; color: #B4B4BE; }
.scale-lbl span { position: absolute; transform: translateX(-50%); }
.repeat .rep-title { display: flex; align-items: center; min-height: 44px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.repeat .phrase { background: rgba(255,255,255,0.16); color: #fff; }
.repeat .phrase::before { background: #fff; }
.repeat .pt { border-color: rgba(255,255,255,0.2); }
.repeat .ci.num { background: rgba(255,255,255,0.2); color: #fff; }
.ci.on-grad { background: rgba(255,255,255,0.2); color: #fff; }
.on-grad-btn { background: #fff; border-color: #fff; color: var(--ink); }
.cheat .ch-item { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.cheat .ch-item:first-child { border-top: 0; padding-top: 0; }
.cheat .ch-item.plain b { font-weight: 500; }
.ch-line { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.ch-lbl { display: inline-block; margin-right: 6px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.g-search[type="search"] { -webkit-appearance: none; appearance: none; }
.cc .btn:not(.primary):not(.on-grad-btn) { background: var(--fill); border-color: transparent; }
.dark .pill { background: rgba(255,255,255,0.14); color: #fff; }
.dark .pill.ok { background: var(--ok-soft); color: var(--ok-ink); }

/* история месяцев: месяц сверху, цифры ниже — длинный «сентябрь 2026» не обрезается */
.hist-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.hist-row:first-of-type { border-top: 0; padding-top: 0; }
.hist-row span { color: var(--ink2); overflow-wrap: anywhere; }

/* слабый телефон: стекло без размытия подложки (плотнее), фон не плавает */
.shell.lite .card, .shell.lite .cc, .shell.lite .list, .shell.lite details.sale { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,0.92); }
.shell.lite .card.dark, .shell.lite .cc.dark { background: var(--dark); }
.shell.lite .cc.grad { background: var(--grad); }
.shell.lite .mini.pig { background: var(--pig); }

/* ---------- движение: появление с подъёмом 16 px, полоски растут, один раз ---------- */
.rv { opacity: 0; transform: translate3d(0, 16px, 0); }
.rv.in { opacity: 1; transform: none; transition: opacity .5s ease-out, transform .5s var(--ease); }
.rv.in.first { transition-duration: .6s; }
.grow { transform-origin: left center; transition: transform .9s var(--ease); }
.grow0 { transform: scaleX(0); }
.cols .c.grow { transform-origin: center bottom; }
.cols .c.grow0 { transform: scaleY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blobs i, .live::after, .spin { animation: none; }
  .rv, .grow0, .cols .c.grow0 { opacity: 1; transform: none; }
  .card, .cc, .list, .btn, .top-bar, .cab-bar, .rings .ring-fg, .grow, .scale > .fill { transition: none; }
  a.card:active, .cc:active, .card:active, .list > a:active, .btn:active { transform: none; }
}

/* ---------- компьютер: боковое меню, широкая сетка ---------- */
@media (min-width: 1024px) {
  .tabbar, .tabbar.scroll { display: none; }
  .side { display: flex; flex-direction: column; gap: 4px; width: 240px; flex: none; background: rgba(255,255,255,0.6);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border-right: 1px solid var(--glass-line);
    padding: 24px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  /* ползунок — только когда меню не помещается по высоте (класс ставит app.js) */
  .side.overflow { scrollbar-width: thin; scrollbar-color: rgba(20,20,24,0.18) transparent; }
  .side.overflow::-webkit-scrollbar { display: block; width: 6px; }
  .side.overflow::-webkit-scrollbar-thumb { background: rgba(20,20,24,0.18); border-radius: 3px; }
  .side .brand { font-size: 17px; font-weight: 800; padding: 0 12px 4px; }
  .side .side-who { padding: 0 12px 12px; }
  .side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 15px;
    font-weight: 600; color: var(--ink2); min-height: 44px; }
  .side a.on { background: var(--glass); color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,24,0.06); }
  .side .grow { flex: 1; }
  .side .side-sub { display: flex; flex-direction: column; gap: 2px; margin: -2px 0 4px 32px; }
  .side .side-sub a { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  .subtabs { display: none; }
  .subtabs + .main { padding-top: 24px; }
  .main { max-width: 1400px; padding: 24px 32px 48px; }
  .main.no-tabbar { max-width: 680px; }
  .top-bar, .cab-bar { left: 240px; }
  .wide-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .wide-tiles.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
  .grid2 > .col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .grid2 th, .grid2 td { padding-left: 6px; padding-right: 6px; }
  .grid2 th:first-child, .grid2 td:first-child { padding-left: 0; }
  .grid2 th:last-child, .grid2 td:last-child { padding-right: 0; }
  /* «Карта выполнения» в левой колонке: столбцы равные, названия позиций — вертикально целым словом */
  .grid2 .heat { table-layout: fixed; width: 100%; }
  .grid2 .heat th:first-child { width: 84px; }
  .grid2 .heat th:not(:first-child) { min-width: 0; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap;
    text-align: left; vertical-align: bottom; padding: 8px 0; height: 112px; }
  .grid2 .heat td { padding: 8px 2px; }
  .grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .grid-cards > .span2 { grid-column: 1 / -1; }
  .cheat > .note { grid-column: 1 / -1; }
  .sales-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}

/* курс «Продавец-консультант»: уровень, полоса по модулям, замки, подтверждение назначения */
.banner.ok { background: var(--ok-soft); color: var(--ok-ink); }
.red-ink { color: var(--bad-ink); }
.lvl { display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; color: var(--vio-ink); background: var(--vio-soft);
  border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.lvl.sm { font-size: 13px; padding: 1px 8px; margin-left: 6px; vertical-align: 1px; }
.lvl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lvl-under { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.ct-line { font-size: 15px; font-weight: 600; }
.csegs { display: flex; gap: 4px; }
.csegs span { flex: 1; height: 8px; border-radius: 4px; background: var(--track); }
.csegs span.cur { background: var(--vio-soft); box-shadow: inset 0 0 0 1.5px var(--vio-ink); }
.csegs span.on { background: var(--ok); }
.dark .csegs span { background: rgba(255,255,255,0.14); }
.lock-i { display: inline-flex; width: 18px; height: 18px; margin-right: 6px; vertical-align: -2px; color: var(--ink2); }
.lock-i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cc.locked h2 { color: var(--ink2); }
.mp.off { opacity: .6; }
.brow b.due { white-space: nowrap; }

/* ---------- приложение на экране телефона (0.15.0): вход кодом, «чёлка» и нижняя полоса, подсказка установки ---------- */
.main-col { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.tabbar { padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
.top-bar, .cab-bar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.login { padding: calc(16px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
  calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.login-logo { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 4px 12px rgba(123,97,255,0.25); }
.people { display: flex; flex-direction: column; gap: 8px; }
.people .btn.person { display: flex; align-items: center; justify-content: space-between; text-align: left; font-size: 17px;
  font-weight: 700; min-height: 52px; background: #fff; border-color: var(--line); box-shadow: 0 1px 3px rgba(20,20,24,0.08); }
.people .btn.person::after { content: "›"; font-size: 24px; font-weight: 400; color: var(--faint); line-height: 1; }
.people .note { margin-top: 4px; }
#code-form input[name=code] { font-size: 28px; font-weight: 700; letter-spacing: 0.3em; text-align: center; }
#code-form input[name=code]::placeholder { font-size: 17px; font-weight: 500; letter-spacing: normal; color: var(--faint); }
.code-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.code-actions .btn { padding: 0 8px; font-size: 13px; }
.login-alt { align-self: center; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 13px;
  color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.form-err.ok-ink { color: var(--ok-ink); }
.ios-hint { position: fixed; z-index: 8; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
  bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; padding: 8px 4px 8px 16px;
  background: var(--dark); color: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(20,20,24,0.25); font-size: 15px;
  max-width: 528px; margin: 0 auto; animation: hint-in .4s var(--ease); }
body.has-tabbar .ios-hint { bottom: calc(76px + env(safe-area-inset-bottom)); }
.ios-hint-t { flex: 1; min-width: 0; }
.ios-hint svg { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.ios-hint-x { flex: none; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; }
@keyframes hint-in { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@media (min-width: 1024px) { .main-col { padding-top: 0; } }
/* «Прибыли и убытки» — как отчёт МойСклад: строки с копейками, ▲▼ к периоду сравнения, график по дням */
.pl-ctl { display: flex; flex-direction: column; gap: 12px; }
.pl-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-nav b { font-size: 17px; text-align: center; min-width: 0; overflow-wrap: anywhere; }
.pl-arrow { width: 44px; padding: 0; font-size: 24px; line-height: 1; color: var(--link); }
.pl-arrow:disabled { color: var(--faint); opacity: 0.45; }
.pl-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.pl-custom label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink2); min-width: 0; }
.pl-custom input { font: inherit; font-size: 16px; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); min-width: 0; width: 100%; }
.pl-custom .btn { grid-column: 1 / -1; }
.pl-ctl .seg button { font-size: 13px; padding: 0 4px; }
.pl-card { display: flex; flex-direction: column; }
.pl-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 15px; }
.pl-row .k { min-width: 0; overflow-wrap: anywhere; }
.pl-row .v { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.pl-row .v b { font-weight: 500; }
.pl-row.b .k, .pl-row.b .v b { font-weight: 700; }
.pl-row.sub { padding-left: 12px; font-size: 13px; }
.pl-row.sub .k { color: var(--ink2); }
.pl-row.sub .v b { font-size: 15px; }
.pl-card > .pl-row:last-of-type { border-bottom: 0; }
.pl-d { font-size: 13px; color: var(--ink2); }
.pl-d.up { color: var(--ok-ink); } .pl-d.down { color: var(--bad); }
.pl-all { margin-top: 8px; }
.pl-chart { position: relative; display: flex; align-items: stretch; gap: 2px; margin-top: 4px; }
.pl-col { position: relative; flex: 1 1 0; min-width: 0; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 4px; }
.pl-col i { position: absolute; left: 12%; right: 12%; border-radius: 3px; background: #C9C3F5; }
.pl-col i.neg { background: var(--bad-bar); }
.pl-col.on i { background: var(--vio); }
.pl-col.on i.neg { background: var(--bad); }
@media (hover: hover) { .pl-col:hover { background: var(--fill); } }
.pl-col:focus-visible { outline: 2px solid var(--vio); outline-offset: 1px; }
.pl-zero { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); pointer-events: none; }
.pl-axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); }
.pl-sub { display: flex; flex-direction: column; padding: 2px 0 6px 12px; }
.pl-sub .row { font-size: 13px; }
.pl-decide { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding: 12px; border-radius: 14px; background: var(--warn-soft); }
.pl-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pl-dir .row b { white-space: nowrap; }
@media (min-width: 1024px) { .grid-cards.pl > .pl-ctl { grid-column: 1 / -1; } }

/* ---------- чек-лист дежурного (0.23.0): строки галочка 44 | текст | стрелка 44, ✓/✕ админа 44×44 ---------- */
.ck { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; align-items: center; min-height: 56px;
  padding: 10px 0; border-top: 1px solid var(--line); }
.clist > .ck:first-child { border-top: 0; padding-top: 0; min-height: 46px; }
.clist > .ck:last-child { padding-bottom: 0; }
.ck.adm { grid-template-columns: minmax(0, 1fr) auto; }
.ck.done .ct b { color: var(--ink2); }
.tick { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 2px solid rgba(20,20,24,0.18); background: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: transform .15s ease-out; }
.tick:active { transform: scale(.94); }
.tick svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.tick[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.tick[aria-pressed="true"] svg { opacity: 1; }
.tick.ret { background: var(--pig); border-color: var(--pig-bar); }
.tick:disabled { cursor: default; }
.tick:disabled:not([aria-pressed="true"]):not(.ret) { background: var(--fill); border-color: transparent; }
.ck-more { grid-column: 2 / -1; font-size: 13px; color: var(--ink2); }
.ck-more summary { list-style: none; cursor: pointer; color: var(--vio-ink); font-weight: 600; min-height: 44px;
  display: inline-flex; align-items: center; }
.ck-more summary::-webkit-details-marker { display: none; }
.ck-more summary::after { content: "\00a0▾"; opacity: .7; }
.ck-more[open] summary::after { content: "\00a0▴"; }
.ck-more ul { margin: 2px 0 4px; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; }
.acts { display: flex; gap: 8px; align-items: center; }
.ibtn { width: 44px; height: 44px; border-radius: 12px; border: 0; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; color: #fff; transition: transform .15s ease-out; }
.ibtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ibtn.yes { background: var(--ok); }
.ibtn.no { background: var(--bad); }
.ibtn:active { transform: scale(.94); }
.ibtn:disabled { opacity: .6; }
.retin { grid-column: 1 / -1; display: flex; gap: 8px; }
.duty-in { flex: 1; min-width: 0; font: inherit; font-size: 16px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; color: var(--ink); }
.duty-of { font-size: 17px; font-weight: 700; color: #B4B4BE; letter-spacing: 0; }
.seg .duty-rb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.1;
  min-height: 52px; }
.duty-rb small { font-size: 13px; font-weight: 600; color: var(--faint); }
.duty-rb.on small { color: var(--ok-ink); }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.duty-buy { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.chip-sm:disabled { cursor: default; }
.duty-sel { width: auto; max-width: 160px; min-height: 44px; }
.duty-heat td { white-space: nowrap; }
.duty-all { grid-column: auto; }
.dark .pill.bad { background: rgba(255,138,128,0.18); color: #FF8A80; }
.dark .pill.warn { background: rgba(255,217,102,0.18); color: #FFD966; }
.ck.it3 { grid-template-columns: 44px minmax(0, 1fr) 44px; }
.ck-i { width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; color: var(--faint); padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ck-i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s var(--ease); }
.ck-i[aria-expanded="true"] svg { transform: rotate(180deg); }
.ck-pts { grid-column: 2 / -1; margin: 0; padding-left: 16px; font-size: 13px; color: var(--ink2); display: flex; flex-direction: column; gap: 3px; }

/* ---------- отметки прихода и ухода (0.24.0) ---------- */
.att-day { margin-top: 12px; }
.att-swap { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.clist > .att-swap:first-child { border-top: 0; }
.att-swap .sel, .card > .sel { width: 100%; }

/* ---------- «Зарплаты» (0.25.0): строка сотрудника — телефон: имя | к выплате, ниже суммы; компьютер — колонки ---------- */
.pay-head { display: none; }
.payrow { border-top: 1px solid var(--line); }
.payrow > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px; align-items: baseline; padding: 10px 0; min-height: 44px; }
.payrow > summary::-webkit-details-marker { display: none; }
.payrow .pn { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; min-width: 0; }
.mbreak.sum > summary { gap: 8px; }
.mbreak.sum > summary b { margin-left: auto; }
.payrow .pn::after { content: "▾"; color: var(--faint); font-size: 13px; }
.payrow[open] .pn::after { content: "▴"; }
.payrow .pn small { font-size: 13px; color: var(--faint); }
.payrow .pcs { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.payrow .pc { font-size: 13px; color: var(--ink2); white-space: nowrap; }
.payrow .pc i { font-style: normal; color: var(--faint); }
.payrow .pc.pay { font-size: 15px; color: var(--ink); text-align: right; }
.payrow .pc.pay i { font-size: 13px; }
.pay-in { display: flex; flex-direction: column; gap: 6px; padding: 0 0 14px; }
.pay-t { font-size: 13px; font-weight: 700; color: var(--ink2); margin-top: 8px; }
.pp { display: flex; flex-direction: column; font-size: 13px; }
.pp-h, .pp-r { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 8px; padding: 5px 0; }
.pp-h { color: var(--faint); font-weight: 600; }
.pp-r { border-top: 1px solid var(--line); }
.pp-h > span:not(:first-child), .pp-r > :not(:first-child) { text-align: right; white-space: nowrap; }
.pp-r > span:first-child { overflow-wrap: anywhere; }
.pp-r.off, .brow.off span, .brow.off b { color: var(--faint); }
.pay-corr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 0;
  border-top: 1px solid var(--line); }
.clist > .pay-corr:first-child { border-top: 0; padding-top: 0; }
.pay-corr .ct { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.pay-corr.off .ct b { text-decoration: line-through; color: var(--faint); }
.pay-fot { display: flex; flex-direction: column; gap: 2px; border-top: 2px solid var(--line); padding-top: 10px; }
@media (min-width: 1024px) {
  .pay-head, .payrow > summary { display: grid; grid-template-columns: minmax(150px, 1.5fr) repeat(6, minmax(0, 1fr)); gap: 12px; align-items: baseline; }
  .pay-head { font-size: 13px; font-weight: 600; color: var(--faint); padding-bottom: 4px; }
  .pay-head > span:not(:first-child), .payrow .pc { text-align: right; }
  .payrow .pcs { display: contents; }
  .payrow .pc { font-size: 15px; color: var(--ink); }
  .payrow .pc i { display: none; }
  .pay-in { max-width: 720px; }
}
/* окно поверх экрана (корректировка): снизу на телефоне, по центру на компьютере */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(20,20,24,0.36); display: flex; align-items: flex-end;
  justify-content: center; }
.sheet { width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 -8px 32px rgba(20,20,24,0.18); }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: sheet-up .25s var(--ease); } }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .sheet-bg { align-items: center; } .sheet { border-radius: 22px; } }
.ibtn.close { background: var(--fill); color: var(--ink2); }
.sheet .duty-in { width: 100%; }
/* чек-лист: «что сделать» под пунктом при проверке (0.25.0) */
.ck-desc, .ct .ck-desc { font-size: 13px; font-weight: 400; color: var(--faint); overflow-wrap: anywhere; }
.duty-heat td.name { white-space: normal; min-width: 200px; }
.ck-desc-ed { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.linkbtn { border: 0; background: none; padding: 0; min-height: 44px; font-size: 13px; font-weight: 600; color: var(--vio-ink);
  cursor: pointer; text-align: left; justify-self: start; }

/* цифра и метка «предварительно» рядом (чистая прибыль, ЗП администратора до 5-го) */
.v-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.v-line > .v, .v-line > .big { min-width: 0; }
.v-line > .pill { padding: 2px 8px; }
