:root {
  --bg: #F7F7F8; --ink: #141518; --mut: #6B6F76; --soft: #A0A3A9; --ln: #E2E3E6; --s: #EEEFF1;
  --acc: #1F8F5C; --var: #1F8F5C; --ok: #1F8F5C; --bad: #C2493A;
  --g1: #0B0B0B; --g2: #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F11; --ink: #ECECEE; --mut: #8B8E95; --soft: #5D6067; --ln: #24262A; --s: #17181B;
    --acc: #5DBB8A; --var: #7FD0A6; --ok: #5DBB8A; --bad: #E0796B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F11; --ink: #ECECEE; --mut: #8B8E95; --soft: #5D6067; --ln: #24262A; --s: #17181B;
  --acc: #5DBB8A; --var: #7FD0A6; --ok: #5DBB8A; --bad: #E0796B;
  color-scheme: dark;
}

:root { --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.4, .5, 1); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
a, button, input, textarea { touch-action: manipulation; }
html { scroll-behavior: auto; }

/* появление экрана: блоки мягко поднимаются по очереди */
.view.in > * { animation: rise .42s var(--ease) both; }
.view.in > *:nth-child(2) { animation-delay: .03s; }
.view.in > *:nth-child(3) { animation-delay: .06s; }
.view.in > *:nth-child(4) { animation-delay: .09s; }
.view.in > *:nth-child(5) { animation-delay: .12s; }
.view.in > *:nth-child(6) { animation-delay: .15s; }
.view.in > *:nth-child(n+7) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view.in .track i { animation: grow .8s var(--ease) .15s both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.tick { animation: tick .45s var(--spring); }
@keyframes tick { 40% { transform: scale(1.06); } }

/* тонкая полоска загрузки сверху — только если ждём дольше мгновения */
.loader { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .2s; }
.loader::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--acc); animation: slide 1s var(--ease) infinite; }
.loader.on { opacity: 1; }

/* отклик на нажатие */
.chip, .it, .kind, .var, .tcard, .seg button, .nav a, .picker, .link, .actions a { transition: transform .18s var(--spring), background-color .2s, color .2s, border-color .2s, opacity .2s; }
.chip:active, .kind:active, .var:active, .tcard:active, .seg button:active, .actions a:active { transform: scale(.96); }
.it:active { opacity: .6; }
.nav a:active { transform: scale(.9); }
.switch, .switch::after { transition: background-color .25s, transform .3s var(--spring); }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 14px/1.5 Onest, system-ui, sans-serif; min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.ti { line-height: 1; }

.view { max-width: 520px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 24px calc(104px + env(safe-area-inset-bottom)); }

/* типографика */
.k { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); display: flex; align-items: center; gap: 6px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 22px; }
.top .ti { font-size: 20px; }
.h { font-weight: 300; letter-spacing: -0.03em; font-size: 40px; line-height: 1.05; margin: 14px 0 0; word-break: break-word; }
.h.big { font-size: 84px; line-height: .9; }
.h.mid { font-size: 56px; line-height: 1; }
.mut { color: var(--mut); }
.sub { color: var(--mut); margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.small { font-size: 12px; }
.ln { height: .5px; background: var(--ln); margin: 22px 0; }
.lbl { font-size: 12px; color: var(--mut); margin: 22px 0 10px; display: flex; align-items: center; gap: 6px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ic-row { display: flex; align-items: center; gap: 6px; }
.quote { font-weight: 300; font-size: 17px; line-height: 1.5; margin-top: 28px; padding-left: 16px; border-left: 1px solid var(--acc); white-space: pre-wrap; word-break: break-word; }
.quote .v { color: var(--var); }

/* кнопки */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; border-radius: 26px; font-size: 14px;
  transition: transform .18s var(--spring), opacity .2s, background-color .2s; }
.btn:active { transform: scale(.97); }
.btn .ti { font-size: 19px; }
.btn.fill { background: var(--ink); color: var(--bg); }
.btn.out { border: .5px solid var(--ink); }
.btn.soft { background: var(--s); }
.btn[disabled] { opacity: .45; }
.btn.del { margin: 34px 0 8px; color: var(--mut); border: .5px solid var(--ln); }
.btn.del.sure { color: var(--bad); border-color: var(--bad); }
/* переливающаяся обводка: двигается слой (transform), а не фон — видеокарта, без перерисовки каждый кадр */
.gb { position: relative; padding: 1.5px; border-radius: 27px; overflow: hidden; isolation: isolate; }
.gb::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 200%; z-index: -1;
  background: linear-gradient(90deg, var(--g1), var(--g2), var(--g1), var(--g2), var(--g1)); animation: flow 3.5s linear infinite; will-change: transform; }
.gb .btn { position: relative; background: var(--bg); height: 49px; }
.gb.slow { opacity: .7; }
.gb.slow::before { animation-duration: 6s; }
@keyframes flow { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.stack { display: flex; flex-direction: column; gap: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.link.acc { color: var(--acc); }

/* выбор */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 18px; border: .5px solid var(--ln); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs { display: flex; gap: 16px; color: var(--mut); margin-top: 10px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.tabs button { white-space: nowrap; padding: 4px 0; }
.tabs .on { color: var(--ink); }
.picker { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 14px; text-align: left;
  font-weight: 300; letter-spacing: -0.03em; font-size: 40px; line-height: 1.1; }
.picker span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .ti { font-size: 22px; color: var(--mut); flex: none; transition: transform .2s; }
.picker:active .ti { transform: translateY(2px); }

/* лист выбора поверх экрана */
.sheet { position: fixed; inset: 0; z-index: 20; background: var(--bg); opacity: 0; transform: translateY(24px); transition: opacity .2s, transform .2s; overflow-y: auto; overscroll-behavior: contain; }
.sheet.show { opacity: 1; transform: none; }
.sheet-in { max-width: 520px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 24px calc(40px + env(safe-area-inset-bottom)); }
.sheet .close .ti { font-size: 22px; }
.sheet .search { position: sticky; top: 0; background: var(--bg); z-index: 1; }
.it.city { font-size: 20px; font-weight: 300; letter-spacing: -0.01em; padding: 16px 0; }
.it.city .ti { font-size: 20px; color: var(--acc); }
.it.city.on { color: var(--ink); }
@media (hover: hover) { .it.city:hover { color: var(--acc); } }
body.locked { overflow: hidden; }
.field { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: .5px solid var(--ln); }
.field:last-child { border-bottom: 0; }
.field input[type=number], .field input[type=time], .field input[type=text] { width: 92px; text-align: right; background: none; border: 0; border-bottom: .5px solid var(--ln); padding: 4px 0; }
.field input[type=text].wide { width: 170px; }
.range { display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; border: .5px solid var(--ln); border-radius: 18px; padding: 2px; }
.seg button { padding: 6px 12px; border-radius: 16px; font-size: 12.5px; color: var(--mut); }
.seg .on { background: var(--ink); color: var(--bg); }
.switch { width: 44px; height: 26px; border-radius: 13px; background: var(--ln); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); transition: transform .2s; }
.switch.on { background: var(--ink); }
.switch.on::after { transform: translateX(18px); }
input.search { width: 100%; background: none; border: 0; border-bottom: .5px solid var(--ink); padding: 8px 0; margin-top: 14px; outline: none; }
textarea { width: 100%; min-height: 180px; background: var(--s); border: 0; border-radius: 14px; padding: 14px; font-weight: 300; font-size: 16px; line-height: 1.55; resize: vertical; outline: none; }
textarea.note { min-height: 80px; font-size: 14px; }
input.title { width: 100%; background: none; border: 0; border-bottom: .5px solid var(--ln); font-weight: 300; font-size: 28px; letter-spacing: -0.02em; padding: 6px 0; outline: none; }

/* списки */
.list { margin-top: 18px; }
.it { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: .5px solid var(--ln); width: 100%; text-align: left; }
.it:last-child { border-bottom: 0; }
.it .grow { flex: 1; min-width: 0; }
.it .name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ic { width: 36px; height: 36px; border-radius: 50%; background: var(--s); display: flex; align-items: center; justify-content: center; flex: none; color: var(--acc); }
.ic .ti { font-size: 17px; }
.st { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.st.new, .st.skipped, .st.no_tg { color: var(--mut); }
.st.sent, .st.reminded { color: var(--acc); }
.st.replied, .st.talk, .st.paid { color: var(--ok); }
.st.refused { color: var(--bad); }

/* прогресс и воронка */
.bar { height: 1px; background: var(--ln); margin-top: 22px; position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); width: 0; transition: width .4s; }
.bar.run i { width: 35%; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.fb { margin-top: 16px; }
.fb .track { height: 6px; border-radius: 3px; background: var(--s); margin-top: 7px; overflow: hidden; }
.fb .track i { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 26px; }
.actions a, .actions button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mut); }
.actions .ic { width: 48px; height: 48px; }
.actions .ic .ti { font-size: 21px; }
.empty { margin-top: 40px; color: var(--mut); line-height: 1.6; }
.hint { font-size: 12px; color: var(--mut); text-align: center; display: flex; justify-content: center; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--soft); }
.dot.on { background: var(--ok); }

/* карточка рассылки: свайп */
.card { touch-action: pan-y; transition: transform .25s, opacity .25s; }
.card.drag { transition: none; }

/* нижнее меню */
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; max-width: 520px; margin: 0 auto;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-top: .5px solid var(--ln); z-index: 5; }
.nav[hidden] { display: none; }
.selbar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; z-index: 6; display: flex; align-items: center; gap: 18px;
  padding: 12px 24px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-top: .5px solid var(--ln); animation: selup .25s ease-out; }
.selbar .btn { width: auto; flex: 1; height: 46px; }
.selbar .del-n { background: var(--ink); color: var(--bg); }
.selbar .del-n.sure { background: var(--bad); }
@keyframes selup { from { transform: translateY(100%); } }
.it.pickable .ic { transition: background-color .2s, color .2s; }
.it.picked .ic { background: var(--ink); color: var(--bg); }
.it.picked .name { color: var(--acc); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--soft); min-width: 64px; }
.nav .ti { font-size: 22px; }
.nav a.on { color: var(--ink); }
.nav a.on::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--acc); margin-top: 1px; }

.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); border-radius: 22px; padding: 11px 18px; font-size: 13px; display: flex; gap: 14px; align-items: center;
  transition: opacity .2s, transform .2s; z-index: 10; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: var(--bg); text-decoration: underline; text-underline-offset: 3px; }

/* сообщения (шаблоны) */
.v { color: var(--var); }
.num { width: 26px; height: 26px; border-radius: 50%; border: .5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.tsec { margin-top: 34px; }
.tsec-h { display: flex; gap: 14px; align-items: flex-start; }
.tsec-h .num { margin-top: 1px; }
.tsec-t { font-size: 18px; display: block; margin-bottom: 4px; }
.tcard { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0 40px; padding: 14px 16px; border-radius: 16px; background: var(--s); }
.tcard-t { font-size: 15px; }
.tcard-p { font-weight: 300; font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.tcard.off { opacity: .55; }
.tadd { margin: 14px 0 0 40px; }
.step { display: flex; align-items: center; gap: 10px; margin: 34px 0 14px; font-size: 15px; }
.kinds { display: flex; flex-direction: column; gap: 8px; }
.kind { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 16px; border: .5px solid var(--ln); }
.kind.on { border-color: var(--ink); background: var(--s); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: .5px solid var(--mut); flex: none; position: relative; }
.kind.on .radio { border-color: var(--ink); }
.kind.on .radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink); }
.vars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.var { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 14px; border: .5px solid var(--ln); }
.var:active { background: var(--s); }
.var .ti { color: var(--acc); }
.phone-pv { background: var(--s); border-radius: 20px; padding: 14px; }
.bubble { margin-top: 10px; background: var(--bg); border-radius: 4px 16px 16px 16px; padding: 12px 14px; font-weight: 300; font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

@media (prefers-reduced-motion: reduce) {
  .gb::before, .bar.run i, .view.in > *, .view.in .track i, .loader::after, .tick { animation: none !important; }
}
#nums .field { gap: 10px; }
#nums .chip.app { padding: 6px 10px; font-size: 12px; flex: none; }
.it.qr { align-items: flex-start; }
.qr-b { display: flex; gap: 8px; flex: none; padding-top: 2px; }
.qr-b .ic { width: 40px; height: 40px; }
.qr-b .ic:active { transform: scale(.92); }
.remind-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; padding: 12px 16px; border-radius: 14px; background: var(--s); color: var(--acc); font-size: 14px; }
.remind-bar .grow { color: var(--ink); }
.num-switch { background: none; border: 1px solid var(--ln); border-radius: 999px; padding: 6px 10px; font: inherit; cursor: pointer; }
.num-switch:disabled { opacity: .5; }
button.remind-bar {width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
button.remind-bar:disabled { opacity: .5; }

/* перестройка 2026-11-27: строки-раскрывашки, закреплённый поиск, группы настроек */
.strow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 14px 0; border-bottom: .5px solid var(--ln); margin-top: 18px; }
.strow > .ti:last-child { color: var(--mut); transition: transform .25s var(--ease); }
.strow.open > .ti:last-child { transform: rotate(180deg); }
.strow .st { font-size: 14px; }
.fsum-t { font-size: 13.5px; min-width: 0; }
.stpick { padding: 14px 0 4px; animation: rise .25s var(--ease); }
.stpick .chips.sm { margin-top: 12px; opacity: .75; }
.stpick .chips.sm .chip { padding: 6px 11px; font-size: 12px; }
#filters { animation: rise .25s var(--ease); }
.phone-copy { margin-top: 10px; color: var(--ink); font-size: 15px; }
.phone-copy .ti { color: var(--acc); }
.phone-copy:active { opacity: .6; }
.fold { border-bottom: .5px solid var(--ln); }
.fold:first-of-type { margin-top: 18px; border-top: .5px solid var(--ln); }
.fold summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 0; cursor: pointer; font-size: 13px; color: var(--mut); }
.fold summary::-webkit-details-marker { display: none; }
.fold summary > .ti:last-child { margin-left: auto; transition: transform .25s var(--ease); }
.fold[open] summary > .ti:last-child { transform: rotate(180deg); }
.fold[open] > :not(summary) { animation: rise .25s var(--ease); }
.fold > p { margin: 0 0 14px; }
.sticky { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 4px 0 2px; margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
.acc-k { color: var(--acc); }
.grp { display: flex; align-items: center; gap: 8px; margin: 34px 0 4px; font-size: 18px; font-weight: 300; letter-spacing: -0.01em; }
.grp .ti { color: var(--acc); font-size: 19px; }
.strow .grow { flex: 1; }
.rt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.vars-pick { margin-top: 16px; padding-left: 17px; }
.vars-pick .chip { padding: 6px 12px; font-size: 12.5px; }
.back { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--acc); }
.back .ti { font-size: 17px; }
.back:active { opacity: .6; }

/* ---------- компьютер ---------- */
.desk { display: none; }
kbd { font: 500 11px/1 Onest, system-ui, sans-serif; padding: 3px 6px; border-radius: 5px; border: .5px solid var(--ln); background: var(--s); color: var(--ink); margin-right: 5px; }
.keys { flex-wrap: wrap; gap: 10px 16px; margin-top: 22px; font-size: 12px; color: var(--mut); align-items: center; }
.keys span { display: inline-flex; align-items: center; }
.keys .link { flex-basis: 100%; margin-top: 4px; }
@media (hover: hover) and (pointer: fine) {
  .desk { display: flex; }
  .touch { display: none; }
  .it:hover { background: color-mix(in srgb, var(--s) 55%, transparent); }
  a.it:hover .name, .tcard:hover .tcard-t { color: var(--acc); }
  .btn.fill:hover { opacity: .88; }
  .btn.out:hover, .chip:hover, .seg button:hover { border-color: var(--ink); }
  .nav a:hover { color: var(--ink); }
}
@media (min-width: 900px) {
  body { padding-left: 232px; }
  .nav { top: 0; bottom: 0; left: 0; right: auto; width: 232px; max-width: none; margin: 0; flex-direction: column; justify-content: flex-start; gap: 4px;
    padding: calc(40px + env(safe-area-inset-top)) 18px 24px; border-top: 0; border-right: .5px solid var(--ln); }
  .nav::before { content: "Рассылка"; font-weight: 300; font-size: 26px; letter-spacing: -0.03em; color: var(--ink); padding: 0 14px 26px; }
  .nav a { flex-direction: row; gap: 12px; font-size: 14px; min-width: 0; padding: 11px 14px; border-radius: 12px; }
  .nav a.on { background: var(--s); }
  .nav a.on::after { display: none; }
  .nav .ti { font-size: 20px; }
  .selbar { left: 232px; max-width: none; }
  .view { max-width: 1080px; padding: calc(48px + env(safe-area-inset-top)) 56px 64px; }
  .view[data-screen="collect"], .view[data-screen="settings"], .view[data-screen="summary"],
  .view[data-screen="templates"], .view[data-screen="template"] { max-width: 720px; }
  .view[data-screen="companies"] { max-width: 860px; }
  .h { font-size: 48px; }
  .sticky { margin: 0 -56px; padding-left: 56px; padding-right: 56px; }
  /* рассылка: текст слева, кнопки справа и всегда на виду */
  .send-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 64px; align-items: start; margin-top: 8px; }
  .send-side { position: sticky; top: 40px; }
  .send-side .stack { margin-top: 0 !important; }
  .send-side > .hint:first-child { margin: 0 0 16px !important; }
  .quote { font-size: 18px; }
  /* карточка студии: действия и ответы слева, заметка и история справа */
  .co-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .co-grid .actions { grid-template-columns: repeat(4, 1fr); }
  .co-grid > div:last-child > .lbl:first-child { margin-top: 26px; }
  .sheet-in { max-width: 640px; }
}

/* автоотправка: QR для входа номера */
.qr-box:empty { display: none; }
.qr-box { padding: 14px 0 4px; }
.qr-box img { display: block; background: #fff; padding: 10px; border: 1px solid var(--ln); border-radius: 10px; }
[hidden] { display: none !important; }

/* автопилот: этапы */
.ap-steps { display: flex; gap: 18px; margin: 4px 0 18px; font-size: 13px; color: var(--mut); flex-wrap: wrap; }
.ap-steps span { display: inline-flex; align-items: center; gap: 6px; }
.ap-steps .on { color: var(--ink); }
.ap-steps .done { color: var(--ok, var(--mut)); }


/* ===== стиль как у настольных CRM (2026-12-06): графит, спокойные веса, карточки с тонкой рамкой ===== */
.h { font-weight: 500; letter-spacing: -0.02em; font-size: 32px; line-height: 1.15; }
.h.big { font-size: 64px; font-weight: 500; letter-spacing: -0.03em; }
.h.mid { font-size: 44px; font-weight: 500; }
.picker { font-weight: 500; font-size: 28px; letter-spacing: -0.02em; }
.k { font-size: 11px; letter-spacing: .08em; }
.quote, .tcard-p, .bubble, textarea, input.title { font-weight: 400; }
input.title { font-size: 24px; }
.btn { height: 46px; border-radius: 10px; font-weight: 500; }
.btn.out { border: 1px solid var(--ln); }
.gb { padding: 0; border-radius: 10px; overflow: visible; }
.gb::before { display: none; }
.gb .btn { height: 46px; border: 1px solid var(--ln); background: var(--s); }
.gb.slow { opacity: 1; }
.chip { border-radius: 8px; border-width: 1px; }
.seg { border-radius: 10px; border-width: 1px; }
.seg button { border-radius: 8px; }
.ic { border-radius: 10px; color: var(--mut); }
.tcard, .phone-pv, .remind-bar, .kind, .var { border-radius: 12px; }
.tcard { border: 1px solid var(--ln); }
.nav-brand, .nav-sec, .nav-pc, .nav-wide, .pagehead { display: none; }

@media (min-width: 900px) {
  body { padding-left: 260px; }
  .nav { width: 260px; padding: calc(18px + env(safe-area-inset-top)) 14px 16px; gap: 2px; background: var(--bg); }
  .nav::before { display: none; }
  .nav-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--ln);
    font-size: 17px; font-weight: 600; color: var(--ink); }
  .nav-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--s); border: 1px solid var(--ln); display: grid; place-items: center; color: var(--acc); }
  .nav-logo .ti { font-size: 18px; }
  .nav-sec { display: block; padding: 16px 12px 8px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
  .nav a[data-tab] { font-size: 14px; padding: 10px 12px; border-radius: 10px; color: var(--mut); }
  .nav-wide { display: flex; }
  .nav a[data-tab].on { background: var(--s); color: var(--ink); }
  .nav a[data-tab]:hover { color: var(--ink); }
  .nav .ti { font-size: 19px; }
  .nav-pc { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px; border: 1px solid var(--ln); border-radius: 12px; font-size: 12.5px; color: var(--mut); }
  .nav-pc .dot.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
  .pagehead { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; z-index: 4; padding: 18px 40px; background: var(--bg); border-bottom: 1px solid var(--ln); }
  .pagehead b { font-size: 17px; font-weight: 600; }
  .pagehead span { font-size: 13px; color: var(--mut); }
  .selbar { left: 260px; }
  .view { padding: 32px 40px 64px; margin: 0; }
  .view[data-screen="collect"], .view[data-screen="settings"], .view[data-screen="summary"],
  .view[data-screen="templates"], .view[data-screen="template"] { max-width: 820px; }
  .view[data-screen="companies"] { max-width: 1000px; }
  .h { font-size: 30px; }
  .sticky { margin: 0 -40px; padding-left: 40px; padding-right: 40px; top: 73px; }
  /* списки — в карточке с рамкой, строки с отступами */
  .list { border: 1px solid var(--ln); border-radius: 14px; background: var(--s); padding: 4px 0; }
  .list .it { padding: 12px 18px; border-bottom: 1px solid var(--ln); }
  .list .it:last-child { border-bottom: 0; }
  .list .ic { background: var(--bg); }
  .field { border-bottom-width: 1px; }
}

/* сводка: карточки с цифрами (как плитки у настольных CRM) */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--ln); border-radius: 12px; background: var(--s); }
.stat .row .ti { font-size: 17px; color: var(--mut); }
.stat-n { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .stat { padding: 16px 18px; }
  .view[data-screen="summary"] { max-width: 1000px; }
}

/* телефон: в нижнем меню только 4 вкладки (логотип и «Сообщения/Настройки» — только в боковом меню на компьютере) */
.nav a.nav-brand, .nav a.nav-wide { display: none; }
@media (min-width: 900px) {
  .nav a.nav-brand, .nav a.nav-wide { display: flex; }
}

/* =====================================================================
   РЕДИЗАЙН 2026-12-06 (v3): панели с заголовками, плитки, таблица, две колонки.
   Компьютер — главный экран; на телефоне всё складывается в одну колонку.
   ===================================================================== */
:root { --s2: #EEF0F3; --panel: #FFFFFF; --bg: #F3F4F6; --ln: #E3E5E9; --r: 12px; }
:root[data-theme="dark"] { --bg: #0A0B0D; --panel: #111214; --s: #17181B; --s2: #1D1F23; --ln: #23252A; --ink: #EDEEF0; --mut: #8A8E95; --soft: #5A5E66;
  --acc: #2FC17E; --var: #4FD49A; --ok: #2FC17E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0A0B0D; --panel: #111214; --s: #17181B; --s2: #1D1F23; --ln: #23252A;
  --ink: #EDEEF0; --mut: #8A8E95; --soft: #5A5E66; --acc: #2FC17E; --var: #4FD49A; --ok: #2FC17E; } }
html, body { background: var(--bg); }
body { font-size: 14px; }

/* заголовок экрана на телефоне; на компьютере — шапка страницы */
.mhead { margin-bottom: 18px; }
.m-only { display: none; }

/* панель */
.panel { background: var(--panel); border: 1px solid var(--ln); border-radius: 14px; margin-bottom: 16px; min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ln); }
.panel-h .grow { min-width: 0; }
.panel-h b { display: block; font-size: 15px; font-weight: 600; }
.panel-h span { display: block; font-size: 12.5px; color: var(--mut); margin-top: 2px; }
.panel-b { padding: 16px 20px 18px; }
.panel-f { padding: 12px 20px; border-top: 1px solid var(--ln); }
.panel .list { margin-top: 0; border: 0; border-radius: 0; background: none; padding: 0; }
.panel .field:last-child { border-bottom: 0; }
.toolbar { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
.toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

/* колонки */
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; align-items: start; }
.grid2p { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; align-items: start; }

/* плитки с цифрами */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--ln); border-radius: 14px; background: var(--panel); min-width: 0; }
.stat .row .ti { font-size: 17px; color: var(--mut); }
.stat-n { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat.txt .stat-n, .stat-n.txt { font-size: 19px; line-height: 1.35; display: flex; align-items: center; gap: 8px; }
.stat.acc .stat-n { color: var(--acc); }

/* кнопки */
.btn { height: 44px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.btn.fill { background: var(--ink); color: var(--bg); }
.btn.out { border: 1px solid var(--ln); background: var(--s); color: var(--ink); }
.btn.sm { width: auto; height: 36px; padding: 0 14px; font-size: 13px; gap: 6px; flex: none; }
.btn.sm .ti { font-size: 16px; }
.btn.del { background: none; }
.gb .btn { background: var(--s); border: 1px solid var(--ln); height: 44px; }
.pair { grid-template-columns: 1fr 1fr; }

/* поля ввода */
.input, .field input.input { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--ln); border-radius: 10px;
  background: var(--s); color: var(--ink); text-align: left; width: 200px; font-size: 14px; outline: none; }
.input:focus-within, .input:focus { border-color: var(--mut); }
.input.sm, .field input.input.sm { width: 86px; }
.input input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; padding: 0; margin: 0; }
.input .ti { color: var(--mut); font-size: 16px; }
.search-box { width: auto; min-width: 200px; }
input.input#label { width: 100%; }
textarea { background: var(--s); border: 1px solid var(--ln); border-radius: 12px; font-size: 15px; }
.select { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 240px; height: 40px; padding: 0 12px;
  border: 1px solid var(--ln); border-radius: 10px; background: var(--s); font-size: 15px; font-weight: 500; }
.select .ti { color: var(--mut); }
.frow { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.frow.al-top { align-items: flex-start; }
.frow.al-top .flabel { padding-top: 8px; }
.flabel { width: 110px; flex: none; font-size: 13px; color: var(--mut); }
.fnote { display: block; }
.fnote-all { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.field { padding: 12px 0; border-bottom: 1px solid var(--ln); }
.num-row .input:first-child { flex: 1; width: auto; min-width: 0; }

/* сегменты и чипы */
.seg { border: 1px solid var(--ln); border-radius: 10px; padding: 3px; background: var(--s); }
.seg button { border-radius: 7px; padding: 6px 12px; font-size: 13px; }
.seg .on { background: var(--ink); color: var(--bg); }
.seg.scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.chip { border: 1px solid var(--ln); border-radius: 8px; background: var(--s); padding: 7px 12px; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* статус ПК */
.pcline { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--ln); border-radius: 10px; background: var(--s); font-size: 13px; }
.pcline.sm { margin: 0; padding: 8px 12px; color: var(--mut); }
.dot.on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }

/* таблица компаний */
.thead { display: none; }
.trow .tcell { display: none; }
.trow { padding: 12px 20px; }
.list .it { padding: 12px 20px; border-bottom: 1px solid var(--ln); }
.list .it:last-child { border-bottom: 0; }
.ic { background: var(--s2); }
.ic.lg { width: 48px; height: 48px; border-radius: 12px; }
.ic.lg .ti { font-size: 22px; }

/* карточка студии */
.crumbs { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; min-height: 24px; }
.crumbs b { font-weight: 500; }
.co-top { display: flex; gap: 14px; align-items: flex-start; }
.co-name { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; word-break: break-word; }
.co-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--mut); }
.co-meta a { color: var(--acc); }
.co-meta .phone-copy { margin: 0; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.warn { color: #D9A441; }
.co-hero .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.co-hero .actions a, .co-hero .actions button { flex-direction: row; gap: 8px; padding: 0 14px 0 6px; height: 40px; border: 1px solid var(--ln); border-radius: 10px;
  background: var(--s); color: var(--ink); font-size: 13px; }
.co-hero .actions .ic { width: 28px; height: 28px; border-radius: 7px; background: none; color: var(--acc); }
.co-hero .actions .ic .ti { font-size: 17px; }
.strow { margin-top: 0; padding: 0 0 12px; border-bottom: 0; }
.stpick { padding: 0; }
textarea.note { min-height: 110px; }

/* рассылка */
.msg-box { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--ln); border-radius: 12px; background: var(--s); }
.msg-box .quote { margin-top: 10px; padding: 0; border: 0; font-size: 15.5px; }
.vars-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.vars-pick { margin: 0; padding: 0; }
.view > .top { margin-bottom: 14px; }
.keys { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ln); }
.remind-bar { border: 1px solid var(--ln); background: var(--panel); margin: 0 0 16px; }
.ap-steps.big { margin: 16px 0 0; gap: 10px; }
.ap-steps.big span { padding: 8px 12px; border: 1px solid var(--ln); border-radius: 10px; background: var(--s); color: var(--ink); }

/* сообщения */
.tgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.tcard { margin: 0; border: 1px solid var(--ln); background: var(--s); }
.tcard:hover { border-color: var(--mut); }
.phone-pv { padding: 12px; background: var(--s2); }
.bubble { background: var(--panel); }
.kind { background: var(--s); border-color: var(--ln); }
.kind.on { border-color: var(--ink); }
.var { background: var(--s); }

@media (max-width: 899px) {
  .m-only { display: flex; }
  span.m-only { display: block; }
  .view { padding-left: 16px; padding-right: 16px; }
  .panel-h, .panel-b, .panel-f { padding-left: 16px; padding-right: 16px; }
  .list .it, .trow { padding-left: 16px; padding-right: 16px; }
  .toolbar .seg { max-width: 100%; overflow-x: auto; }
  .search-box { flex-basis: 100%; }
  .frow { flex-direction: column; align-items: stretch; gap: 8px; }
  .flabel { width: auto; }
  .frow.al-top .flabel { padding-top: 0; }
  .select { width: 100%; }
  .field input.input:not(.sm) { width: 150px; }
}

@media (min-width: 900px) {
  .mhead { display: none; }
  .view, .view[data-screen] { max-width: 1240px; padding: 24px 32px 64px; }
  .cols { grid-template-columns: minmax(0, 1fr) 340px; }
  .cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cols.send-cols { grid-template-columns: minmax(0, 1fr) 360px; }
  .grid2p { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .col-side .panel:first-child, .sticky-side { position: sticky; top: 90px; }
  .sticky-side .panel { position: static; }
  /* таблица */
  .thead { display: grid; grid-template-columns: 36px minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1fr) 130px; gap: 14px; padding: 10px 20px;
    border-bottom: 1px solid var(--ln); font-size: 12px; color: var(--mut); background: var(--s); }
  .trow { display: grid; grid-template-columns: 36px minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1fr) 130px; gap: 14px; align-items: center; }
  .trow .tcell { display: flex; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .trow .grow .name { font-size: 14.5px; font-weight: 500; }
  .trow .rt { align-items: flex-start; }
  .list .it:hover { background: var(--s); }
  .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-name { font-size: 26px; }
  .pagehead { padding: 18px 32px; }
  .remind-bar { max-width: none; }
}
.toolbar-row .grow, .crumbs .grow { flex: 1; }
.search-box { min-width: 260px; }
.panel-h > .grow { flex: 1; }
