/* 12.10.2026, вечер: единый вид всего приложения.
   Плитки и плашки — как в «Протоколах встреч»: белая карточка, тонкая рамка, радиус 14px, без цветных полос.
   Префикс html[data-theme] body перебивает общее правило светлой темы «все ссылки синие». */

/* ---------- 1. Текст в плитках-ссылках и переключателях — обычным цветом ---------- */
html[data-theme] body :is(.mkk-row,.mkk-card,.mkk-stat,.act-sum,.plan-count,.plan-mini a,.pi-body,.proto-item,.tile,.tile-link,.mat-item,.act-team-row,.cal-chip,.cal-col header a,.cal-num){color:var(--ink);text-decoration:none}
html[data-theme] body .scope-switch a{color:var(--muted)}
html[data-theme] body .scope-switch a:hover{color:var(--ink)}
html[data-theme] body .scope-switch a.is-active,html[data-theme] body .scope-switch a.is-active:hover{color:#fff}
html[data-theme] body .cal-cell.is-today .cal-num{color:#fff}
html[data-theme] body .cal-more{color:var(--primary-strong)}

/* ---------- 2. Плитки-счётчики: Активности, План действий, Лиды от МКК ---------- */
html[data-theme] body :is(.act-sum,.plan-count,.mkk-stat){display:flex;flex-direction:column;gap:4px;min-width:0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:none;transform:none;transition:border-color .16s,box-shadow .16s,transform .09s}
html[data-theme] body :is(.act-sum-label,.plan-count>span,.mkk-stat>span){font-size:12.5px;font-weight:700;line-height:1.3;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-theme] body :is(.act-sum,.plan-count,.mkk-stat)>strong{font-size:28px;line-height:1.05;font-weight:800;font-variant-numeric:tabular-nums}
html[data-theme] body :is(.act-sum,.plan-count,.mkk-stat)>small{font-size:12px;line-height:1.3;font-weight:600;color:var(--muted)}
html[data-theme] body :is(a.act-sum,a.plan-count,a.mkk-stat):hover{border-color:color-mix(in srgb,var(--primary) 30%,var(--line));box-shadow:var(--shadow)}
html[data-theme] body :is(.act-sum,.plan-count,.mkk-stat).is-active{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 16%,transparent)}
.act-summary,.plan-counts{gap:12px}
.act-summary{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.act-summary .act-total{grid-column:auto!important}
.mkk-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:0 0 14px}
.mkk-stat.st-paid strong{color:#1f9d5a}
.mkk-stat.st-refused strong{color:#e5484d}
.mkk-bar{justify-content:flex-end}

/* ---------- 3. Плашки списков — как карточка протокола ---------- */
html[data-theme] body :is(.act-card,.mkk-row,.mat-item,.proto-item,.tile){border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:none}
html[data-theme] body :is(.act-card,.mkk-row){padding:16px 18px}
html[data-theme] body :is(a.mkk-row,.mat-item,.proto-item,a.tile,.tile.has-more,.act-card):hover{border-color:color-mix(in srgb,var(--primary) 30%,var(--line));box-shadow:var(--shadow)}
html[data-theme] body .mkk-row.is-overdue{border-left:1px solid var(--line)}
.act-list,.mkk-list,.proto-list,.tile-list,.mat-list{gap:12px}
html[data-theme] body .pi{border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:none}
html[data-theme] body .pi-title{color:var(--ink)}
html[data-theme] body .pi.is-done .pi-title{color:var(--muted)}
html[data-theme] body .mkk-card{border-radius:12px}

/* ---------- 4. Протокол: карандаш и крестик одного размера ---------- */
.proto-title .proto-title-edit{width:38px;height:38px;min-width:38px;min-height:38px;padding:0;border-radius:10px}
.proto-title .proto-title-edit svg{width:18px;height:18px}

/* ---------- 5. Телефон ---------- */
@media(max-width:1100px){.mkk-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.act-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:767px){
  /* шапка раздела: заголовок, под ним кнопки одного размера в одну строку */
  .section-heading:not(:has(>.lead-mode)){flex-direction:column;align-items:stretch;gap:12px}
  .section-heading>.button{width:100%;min-height:44px;padding:10px 14px;font-size:15px}
  .section-heading>.button .ui-icon{width:18px;height:18px}
  .section-heading>.actions:not(:has(>.status)){display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);align-items:stretch;gap:8px;width:100%;margin:0}
  .section-heading>.actions>form{display:flex;margin:0;min-width:0}
  .section-heading>.actions:not(:has(>.status))>.button,.section-heading>.actions>form>.button,.section-heading>.actions>form>label.button{width:100%;height:44px;min-height:44px;padding:0 6px;font-size:13px;line-height:1.15;white-space:normal;text-align:center;overflow:hidden;box-shadow:none;margin:0}
  .section-heading>.actions:has(>:nth-child(3)) .button .ui-icon{display:none}

  /* плитки-счётчики 2 в ряд */
  .act-summary,.plan-counts,.mkk-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  html[data-theme] body :is(.act-sum,.plan-count,.mkk-stat){padding:12px 14px}
  html[data-theme] body :is(.act-sum,.plan-count,.mkk-stat)>strong{font-size:24px}
  html[data-theme] body :is(.act-card,.mkk-row){padding:14px 16px}
  .act-list,.mkk-list,.proto-list,.tile-list,.mat-list{gap:10px}

  /* фильтры: поиск, под ним «Фильтр» слева и «Найти» справа; остальное — по кнопке «Фильтр» */
  html[data-theme] body .filter-panel:has(.has-mfilter){padding:0;border:0;background:transparent;box-shadow:none}
  .filter-panel:has(.has-mfilter:not(.is-open))>:is(.period-bar,.date-range){display:none!important}
  .filter-panel:has(.has-mfilter.is-open)>.period-bar{margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
  .filter-panel:has(.has-mfilter.is-open)>.date-range{margin-top:10px}
  .has-mfilter>.mf-toggle,.has-mfilter>.mf-submit,.has-mfilter>.mf-submit .button{height:44px;min-height:44px;margin:0}

  /* календарь: заголовок недели сверху, стрелки и «Сегодня» одной строкой, виды — во всю ширину */
  .cal-bar{gap:8px;margin-bottom:10px}
  .cal-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;width:100%}
  .cal-nav .cal-title{grid-column:1/-1;order:-1;margin:0 0 2px;font-size:18px;line-height:1.3;flex-basis:auto}
  .cal-nav .icon-button{width:44px;height:44px}
  .cal-nav .cal-today{width:100%;min-height:44px;margin:0}
  .cal-views{display:flex;width:100%}
  .cal-views a{flex:1;justify-content:center;padding:0 6px}
  /* неделя на телефоне: дни — заголовками, пункты — плашками, без рамки вокруг дня */
  .cal-week{gap:16px}
  html[data-theme] body .cal-col{min-height:0;border:0;border-radius:0;background:transparent;box-shadow:none}
  .cal-col header{padding:0 2px 8px}
  .cal-col header span{font-size:13px}
  .cal-col header strong{font-size:18px}
  .cal-col.is-today header span,.cal-col.is-today header strong{color:var(--primary)}
  .cal-col-body{padding:0;gap:8px}
  html[data-theme] body .cal-col .pi{padding:12px 14px;gap:10px}
  .cal-col .pi-title{font-size:14.5px}
  .cal-col .pi-meta{font-size:12px}
  .cal-col .pi-check button{width:22px;height:22px}
  .cal-empty{margin:0;padding:10px 0;text-align:left;font-size:13px}
}

/* пункты плана и календаря — без цветной полосы слева, тип виден по цветной подписи */
html[data-theme] body .pi::before{display:none}
html[data-theme] body .pi{padding-left:14px}
html[data-theme] body .cal-col .pi{padding:8px 8px 8px 10px}
@media(max-width:767px){html[data-theme] body .cal-col .pi{padding:12px 14px;gap:10px}}
/* компьютер: кнопки шапки в одну строку справа от заголовка */
@media(min-width:768px){.section-heading>.actions{flex-wrap:nowrap;flex:none}.section-heading>.actions .button,.section-heading>.button{white-space:nowrap}}
/* доска лидов МКК: название, кто передал и следующее действие — каждое с новой строки */
html[data-theme] body .mkk-card{display:grid;gap:4px;padding:12px 13px}
html[data-theme] body .mkk-card>*{display:block;min-width:0}
html[data-theme] body .mkk-card>*{grid-area:auto}
/* колонки доски МКК — без цветной полосы сверху, стадия отмечена точкой */
html[data-theme] body .mkk-col{border-top:1px solid var(--line);border-radius:14px}
.mkk-col header span{display:inline-flex;align-items:center;gap:8px}
.mkk-col header span::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--st)}
@media(max-width:767px){.mkk-event-head .segmented.mkk-kinds{display:grid;grid-template-columns:1fr 1fr;gap:4px}.mkk-event-head .segmented.mkk-kinds>*{justify-content:center;text-align:center}}

/* ================= 12.10, ночь: единый стандарт (аудит 4 групп) ================= */
/* --- элементы управления: одна высота 44 px --- */
:root{--control-h:44px}
html[data-theme] body :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select){height:var(--control-h)!important;min-height:var(--control-h)!important;padding-top:0;padding-bottom:0;line-height:1.3}
html[data-theme] body .button{min-height:var(--control-h);text-align:center;line-height:1.2;font-size:15px;font-weight:650;border-radius:10px}
html[data-theme] body label.button{font:inherit;font-size:15px;font-weight:650}
html[data-theme] body .icon-button{width:40px;height:40px;border-radius:10px}
html[data-theme] body .button.danger-outline{color:#b42335;border-color:#efc1cb}
html[data-theme] body .button.danger-outline:hover{background:#fff0f2}
html[data-theme=dark] body .button.danger-outline{color:#ff9aa8;border-color:#7a3446}
html[data-theme=dark] body .button.danger-outline:hover{background:#3a1c26}
/* верхняя панель */
html[data-theme] body .topbar :is(.menu-toggle,.bell-button){width:40px;height:40px;border-radius:10px}
html[data-theme] body .theme-toggle{height:40px;min-height:40px;border-radius:10px;font-size:13px;padding:0 12px}
/* --- заголовки: одна шкала --- */
html[data-theme] body main h1{font-size:30px;line-height:1.2;letter-spacing:-.035em;font-weight:700;white-space:normal}
html[data-theme] body main :is(h2:not(.sr-only)){font-size:20px;line-height:1.3;font-weight:700;letter-spacing:-.015em}
html[data-theme] body main .card h3,html[data-theme] body main .proto-doc h3{font-size:16px}
html[data-theme] body .dash-greeting{font-size:30px!important;white-space:normal;overflow:visible;text-overflow:clip;letter-spacing:-.035em}
html[data-theme] body :is(.eyebrow,.dashboard-eyebrow,.report-index-eyebrow,.org2-eyebrow){font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
html[data-theme] body .subtitle{font-size:15px;line-height:1.55;color:var(--muted)}
html[data-theme] body .report-index-summary h2{font-size:20px;margin:8px 0 6px}
html[data-theme] body .report-index-summary{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:20px 24px;box-shadow:none}
/* --- переносы: только по словам --- */
html[data-theme] body :is(th,td,.pi-title,.task-title,.essence-text,.client-name,.pipeline-column-title,.lead-card strong){overflow-wrap:break-word;word-break:normal;hyphens:auto}
html[data-theme] body .scroll-table th{white-space:nowrap}
html[data-theme] body .scroll-table{max-height:none}
/* --- отступы между карточками в сетках: без двойных 20 px --- */
:is(.detail-layout,.task-layout,.mkk-layout,.mkk-main,.mkk-side,.lead-detail-layout,.lead-side,.mat-files,.stack,.proto-layout,.proto-main)>.card+.card,
:is(.detail-layout,.task-layout,.mkk-layout,.lead-detail-layout,.mat-files)>*>.card+.card{margin-top:0}
.task-layout,.detail-layout,.lead-detail-layout{align-items:stretch}
:is(.detail-layout,.task-layout)>.card{display:flex;flex-direction:column}
/* --- вкладки: одна высота и вид подчёркиванием --- */
html[data-theme] body .tabs a{min-height:44px;font-size:14px;font-weight:650}
html[data-theme] body .task-tabs.tabs{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:0;background:transparent;gap:0}
html[data-theme] body .task-tabs.tabs a{min-height:44px;border-radius:0;border-bottom:2px solid transparent;background:transparent!important;box-shadow:none!important;padding:0 14px}
html[data-theme] body .task-tabs.tabs a.active{color:var(--primary)!important;border-bottom:2px solid var(--primary)!important}
/* --- сегменты --- */
html[data-theme] body .scope-switch{height:44px;flex:none}
html[data-theme] body .pulse-switch button{min-height:32px;font-size:13px;padding:0 12px}
html[data-theme] body .pulse-switch button.is-active{background:var(--primary);color:#fff}
html[data-theme] body .kpi-q{min-height:44px;border-radius:10px;font-size:14px;font-weight:650}
html[data-theme] body .summary-period-buttons .chip{min-height:44px;white-space:nowrap;border:1px solid var(--line)}
html[data-theme] body .chip{border-color:transparent}
html[data-theme] body .chip.active{border-color:color-mix(in srgb,var(--primary) 30%,var(--line))}
/* --- нижняя панель форм: подсказка слева, [Отмена][Главная] справа --- */
html[data-theme] body .form-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}
html[data-theme] body .form-footer>.help{flex:1;min-width:0}
html[data-theme] body .form-footer>.actions{display:flex;flex:none;flex-wrap:nowrap;gap:10px;margin:0}
html[data-theme] body .tf-foot .inline-actions{flex-wrap:nowrap}
/* поля: 2 поля в сетке на 3 колонки — без пустой колонки */
.form-page form .field-grid.three:has(>:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
.mkk-lookup{margin-bottom:0}
#mkk-status:empty{display:none}
/* --- боковое меню: профиль всегда виден --- */
@media(min-width:768px){html[data-theme] body .app-layout>.sidebar{overflow:hidden}html[data-theme] body .side-nav{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:thin}html[data-theme] body .sidebar-user{flex:none;margin-top:12px}html[data-theme] body .side-nav a{min-height:40px}}
@media(max-width:767px){html[data-theme] body .nav-open .sidebar{overflow:hidden}html[data-theme] body .side-nav{flex:1 1 auto;min-height:0;overflow-y:auto}html[data-theme] body .sidebar-user{flex:none;margin-top:12px}}
/* --- уведомления --- */
html[data-theme] body :is(.notif-item,.notif-item strong,.notif-text){color:var(--ink);text-decoration:none}
html[data-theme] body .notif-text small{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.notif-item:not(.is-unread) .notif-dot{visibility:hidden}
/* --- встречи: на компьютере только таблица, карточки — на телефоне --- */
@media(min-width:768px){.mobile-only.tile-list{display:none!important}}
html[data-theme] body .meetings-table{min-width:0!important;width:100%;table-layout:fixed}
html[data-theme] body .meetings-table th:nth-child(1){width:108px}
html[data-theme] body .meetings-table th:nth-child(2){width:22%}
html[data-theme] body .meetings-table th:nth-child(3){width:15%}
html[data-theme] body .meetings-table th:nth-child(5){width:140px}
html[data-theme] body .meetings-table th:nth-child(6):not(:last-child){width:150px}
html[data-theme] body .meetings-table th:last-child{width:60px}
html[data-theme] body .meetings-table col.meeting-col-date{width:108px}html[data-theme] body .meetings-table col.meeting-col-client{width:22%}html[data-theme] body .meetings-table col.meeting-col-owner{width:15%}html[data-theme] body .meetings-table col.meeting-col-summary{width:auto}html[data-theme] body .meetings-table col.meeting-col-status{width:140px}html[data-theme] body .meetings-table col.meeting-col-manager{width:150px}html[data-theme] body .meetings-table col.meeting-col-actions{width:96px}
@media(min-width:768px) and (max-width:1365px){html[data-theme] body .meetings-table col.meeting-col-manager{width:0;visibility:collapse}.meetings-table tr>:nth-child(6):not(:last-child){padding:0;font-size:0;border:0}}
/* компании */
html[data-theme] body .client-table table{min-width:0;table-layout:fixed;width:100%}
@media(min-width:768px){
 .client-table th:nth-child(2){width:140px}.client-table th:nth-child(4){width:160px}.client-table th:nth-child(5){width:70px}.client-table th:nth-child(6){width:112px}.client-table th:nth-child(7),.client-table th:nth-child(8){width:84px}.client-table th:nth-child(9){width:96px}
 .client-table tr>:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
@media(min-width:768px) and (max-width:1365px){.client-table tr>:nth-child(3){display:none}}
/* отчёты, KPI: таблицы без разрыва слов */
html[data-theme] body .kpi-table td:first-child{min-width:200px}
html[data-theme] body .kpi-table .team-person{white-space:nowrap}
html[data-theme] body .kpi-table th small{white-space:nowrap}
@media(min-width:768px){html[data-theme] body .kpi-table table{min-width:960px}}
/* --- доски PL / Лиды Cowork / МКК: один вид --- */
html[data-theme] body :is(.pipeline-board,.lead-board,.mkk-board){align-items:start}
@media(min-width:768px){html[data-theme] body .pipeline-board{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(220px,1fr);overflow-x:auto}}
html[data-theme] body .mkk-board{grid-auto-columns:minmax(176px,1fr)}
html[data-theme] body :is(.pipeline-column,.lead-column,.mkk-col){border-radius:14px;min-height:0}
html[data-theme] body :is(.pipeline-deal,.lead-card,.mkk-card){border-radius:12px;padding:12px}
html[data-theme] body .pipeline-column-title{overflow-wrap:normal;word-break:normal}
html[data-theme] body .pipeline-deal :is(.text-link,.meta){white-space:nowrap}
html[data-theme=light] body .pipeline-column[data-pipeline-stage="refused"],html[data-theme=light] body .lead-column[data-lead-stage="refused"]{background:#fff5f6}
html[data-theme] body .lead-stale-badge{white-space:nowrap;font-size:11px}
@media(max-width:767px){
 html[data-theme] body :is(.pipeline-board,.lead-board){display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:85%;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;padding-bottom:8px}
 html[data-theme] body :is(.pipeline-column,.lead-column){scroll-snap-align:start;min-height:0}
 html[data-theme] body .pipeline-summary{flex-direction:row;align-items:center;flex-wrap:wrap;gap:6px 12px}
}
/* --- МКК: список/доска и фильтры --- */
html[data-theme] body .mkk-bar>.scope-switch{flex:none;height:44px}
@media(min-width:768px){html[data-theme] body .mkk-filter-grid{grid-template-columns:2fr repeat(3,minmax(0,1fr))}html[data-theme] body .mkk-head,html[data-theme] body .mkk-row{grid-template-columns:92px minmax(0,2fr) minmax(0,1.8fr) minmax(0,1.2fr) 110px minmax(0,1.6fr)}}
html[data-theme] body .mkk-csm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* --- шапка лида: «Один / Списком» под подзаголовком --- */
.section-heading:has(>.lead-mode){flex-direction:column!important;align-items:stretch!important}
.section-heading>.lead-mode{order:3;width:100%;max-width:420px;height:44px}
.section-heading>.lead-mode a{flex:1;justify-content:center}
/* --- карточка сделки / детали: колонки поровну --- */

/* --- материалы: карточки файлов ровно --- */
html[data-theme] body .mat-files>.mat-file{margin:0;grid-template-rows:auto 1fr auto}
html[data-theme] body .mat-file-actions{align-self:end}
html[data-theme] body .mat-file-actions .button{height:44px;min-height:44px;font-size:15px}
/* --- KPI: кольцо не перекрывает подписи плиток --- */
.kpi-tile>*{position:relative;z-index:1}
/* --- протоколы --- */
html[data-theme] body .proto-actions .button{height:44px;min-height:44px;font-size:15px}
html[data-theme] body .proto-info div{text-align:center;align-items:center;justify-content:center}
html[data-theme] body .proto-head{margin-top:0}
html[data-theme] body .proto-head .eyebrow{margin:0 0 6px}
html[data-theme] body .proto-numbers th:nth-child(1){width:32%}html[data-theme] body .proto-numbers th:nth-child(2){width:28%}
html[data-theme] body .ip-shot img{max-height:380px;width:auto;max-width:100%;margin-inline:auto;object-fit:contain}
.ip-steps2>li{align-items:center}
/* --- календарь на компьютере --- */
@media(min-width:768px){
 html[data-theme] body .cal-nav :is(.icon-button,.cal-today){height:44px;min-height:44px}
 html[data-theme] body .cal-nav .icon-button{width:44px}
 html[data-theme] body .cal-views a{height:100%}
}
@media(min-width:1101px){html[data-theme] body .cal-week{grid-template-columns:repeat(5,minmax(0,1fr)) repeat(2,minmax(0,.6fr))}}
/* --- план действий --- */
html[data-theme] body .plan-add{padding:16px}
html[data-theme] body .plan-group h2{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 8px}
html[data-theme] body .plan-group.is-today h2{color:var(--primary)}html[data-theme] body .plan-group.is-overdue h2{color:#e5484d}
/* --- оргструктура на телефоне: списком --- */
@media(max-width:767px){
 html[data-theme] body .org2-list{display:grid;grid-template-columns:1fr;overflow:visible;gap:8px}
 html[data-theme] body .org2-id{min-width:0}
 html[data-theme] body .org2-id-text :is(strong,small){white-space:normal}
}
/* --- задачи: карточка и форма --- */
html[data-theme] body .task-status-actions .button,html[data-theme] body .task-comment-form>.button{min-height:44px;font-size:15px;padding:0 16px}
html[data-theme] body .tf-grid label{font-size:13px}
html[data-theme] body .tf-people{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:6px}
html[data-theme] body .tf-people .chip-choice span{width:100%}
html[data-theme] body .task-detail-heading h1,html[data-theme] body .tf-head h1{font-size:30px}
html[data-theme] body .tf-head .subtitle{font-size:15px}
/* --- дашборд --- */
html[data-theme] body .dash-edit-toggle{min-height:44px;font-size:15px;padding:0 16px}
.dash-tile{animation-delay:min(.3s,calc(.12s + var(--i,0)*.05s))!important}
/* --- настройки --- */
html[data-theme] body .card h2{font-size:20px}
.small-disclosure summary{color:var(--primary-strong);font-weight:650;cursor:pointer}

/* ================= телефон ================= */
@media(max-width:767px){
 html[data-theme] body main h1{font-size:26px}
 html[data-theme] body .dash-greeting{font-size:26px!important}
 html[data-theme] body main :is(h2:not(.sr-only)),html[data-theme] body .card h2{font-size:18px}
 html[data-theme] body .report-index-summary h2{font-size:18px}
 html[data-theme] body .report-index-summary{padding:16px}
 html[data-theme] body .subtitle{font-size:14px}
 html[data-theme] body .icon-button{width:44px;height:44px}
 html[data-theme] body .topbar :is(.menu-toggle,.bell-button,.theme-toggle){width:44px;min-width:44px;height:44px;padding:0;justify-content:center}
 html[data-theme] body .bell-popover{left:16px;right:16px;max-width:none}
 html[data-theme] body :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select){font-size:16px}
 /* шапка раздела: главная кнопка на всю ширину, остальные — по 2 в ряд, текст 15 px без переноса */
 .section-heading>.actions:not(:has(>.status)){grid-auto-flow:row!important;grid-template-columns:1fr 1fr!important}
 .section-heading>.actions:not(:has(>.status))>:is(.button:not(.secondary),form:has(>.button:not(.secondary))){grid-column:1/-1;order:-1}
 .section-heading>.actions:not(:has(>.status)):not(:has(>.button:not(.secondary)))>:last-child:nth-child(odd){grid-column:1/-1}
 .section-heading>.actions:not(:has(>.status)):has(>.button:not(.secondary)):not(:has(>:nth-child(3)))>*{grid-column:1/-1}
 .section-heading>.actions:not(:has(>.status)):has(>.button:not(.secondary)):has(>:nth-child(4)):not(:has(>:nth-child(5)))>.secondary:nth-last-child(1 of .secondary){grid-column:1/-1}
 html[data-theme] body .section-heading>.actions:not(:has(>.status))>.button,html[data-theme] body .section-heading>.actions>form>:is(.button,label.button){font-size:15px;padding:0 12px;white-space:nowrap}
 html[data-theme] body .section-heading>.actions .button .ui-icon{display:inline-block}
 .section-heading>.actions:has(>.icon-button){grid-template-columns:1fr 1fr 44px!important}
 .section-heading>.actions:has(>.icon-button)>.icon-button{grid-column:auto!important;justify-self:end}
 html[data-theme] body .section-heading>.button{font-size:15px}
 /* формы: главная кнопка сверху на всю ширину, «Отмена» под ней */
 html[data-theme] body .form-footer{flex-direction:column;align-items:stretch;gap:12px}
 html[data-theme] body .form-footer>.actions{flex-direction:column-reverse;width:100%;gap:8px}
 html[data-theme] body .form-footer>.actions>*{width:100%}
 html[data-theme] body .form-footer>.actions .button{width:100%;white-space:normal}
 html[data-theme] body .tf-foot .inline-actions{flex-direction:column-reverse;width:100%;gap:8px}
 html[data-theme] body .tf-foot .inline-actions .button{width:100%;flex:none}
 /* кнопки статуса задачи: 2 в ряд, главная сверху */
 html[data-theme] body .task-work-head .task-status-actions{grid-auto-flow:row!important;grid-template-columns:1fr 1fr!important}
 html[data-theme] body .task-work-head .task-status-actions form:has(.button:not(.secondary)){grid-column:1/-1;order:-1}
 html[data-theme] body .task-work-head .task-status-actions .button{white-space:nowrap;padding:0 10px}
 html[data-theme] body .task-comment-form>.button{justify-self:stretch;width:100%}
 /* вкладки — равные части */
 html[data-theme] body .tabs:not(.task-tabs) a,html[data-theme] body .task-tabs.tabs a{flex:1 1 0;padding:0 6px;font-size:13px}
 /* плитки статистики отчётов: 3 в ряд */
 html[data-theme] body .stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 html[data-theme] body .stat-grid .stat-value{font-size:20px}
 /* поиск с кнопкой в одну строку */
 html[data-theme] body .simple-search{display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:8px;align-items:end}
 html[data-theme] body .simple-search>.button{width:100%;grid-column:auto}
 html[data-theme] body .simple-search>:is(.scope-switch,.text-link,.chip){grid-column:1/-1}
 /* МКК: «Фильтр | Найти» поровну */
 html[data-theme] body .mkk-filter-btns{flex:1 1 0}
 html[data-theme] body .mkk-filter-btns>.button{flex:1;width:100%}
 /* протоколы */
 html[data-theme] body .proto-toolbar .button{font-size:15px;padding:0 12px}
 html[data-theme] body .proto-toolbar .rec-button{font-size:16px;min-height:48px}
 html[data-theme] body .proto-info div:nth-child(4){grid-column:1/-1;border-right:0}
 html[data-theme] body .proto-code{flex-direction:column;align-items:stretch}
 html[data-theme] body .proto-code .button{min-height:44px;font-size:15px}
 html[data-theme] body .ip-steps2>li{border:0;padding:14px 0;background:none}
 :root[data-theme] .proto-table tbody tr:nth-child(even) td{background:transparent}
 html[data-theme] body .proto-actions .button{font-size:14px}
 /* KPI */
 html[data-theme] body .kpi-metric-tools .icon-button{width:44px;height:44px}
 html[data-theme] body .kpi-footer .button{width:100%}
 html[data-theme] body .kpi-table td:last-child:nth-child(odd){grid-column:1/-1}
 /* сетка структуры закрепления во встрече */
 html[data-theme] body .org-detail-chain{grid-template-columns:1fr}
 /* календарь: пустые дни без «—» */
 html[data-theme] body .cal-col.is-weekend .cal-empty{display:none}
 /* лид: форма работы сразу после контактов */
 html[data-theme] body .lead-detail-layout>.lead-side{order:-1}
 /* карточки с одиночной кнопкой */
 html[data-theme] body .card .actions:has(>.button:only-child)>.button{width:100%}
 /* шаги в форме встречи: бейдж к заголовку */
 html[data-theme] body .form-section-heading{align-items:flex-start}
}

@media(min-width:768px){html[data-theme] body .dashboard-quick-actions{flex-wrap:nowrap;flex:none}html[data-theme] body .dashboard-heading{align-items:flex-start}}
@media(max-width:767px){html[data-theme] body .dashboard-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}html[data-theme] body .dashboard-quick-actions>.button:first-child{grid-column:1/-1}html[data-theme] body .dashboard-quick-actions .button{white-space:nowrap;font-size:15px}}

/* телефон: длинные подписи второстепенных кнопок в шапке — в 2 строки, но той же высоты */
@media(max-width:767px){html[data-theme] body .section-heading>.actions>.button.secondary{white-space:normal;line-height:1.15;font-size:15px}}
@media(max-width:767px){html[data-theme] body .dashboard-quick-actions>.button:last-child:nth-child(even){grid-column:1/-1}}

@media(min-width:768px){html[data-theme] body .pipeline-filters .filter-main{grid-template-columns:minmax(220px,1fr) repeat(2,minmax(160px,220px)) auto}html[data-theme] body .pipeline-filters .filter-main>.button{grid-column:auto;width:auto;padding:0 22px}}
/* форма задачи: заголовок над карточкой, приоритет первой строкой карточки */
html[data-theme] body .tf-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.tf-head-label{margin:0}
html[data-theme] body .tf-people{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
@media(max-width:767px){html[data-theme] body .tf-head{flex-direction:row;align-items:center}html[data-theme] body .tf-priority{flex:1;max-width:240px}}

/* кнопки: в рядах на компьютере — без переноса */
@media(min-width:768px){html[data-theme] body :is(.section-heading,.form-footer,.tf-foot,.proto-actions,.proto-toolbar,.filter-main,.has-mfilter,.cal-nav,.dashboard-quick-actions,.inline-actions,.actions) .button{white-space:nowrap}}
html[data-theme] body .proto-code code{min-width:0;max-width:100%;overflow-wrap:anywhere}
@media(max-width:767px){html[data-theme] body .summary-period-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}html[data-theme] body .summary-period-buttons .chip{white-space:normal;font-size:13px;line-height:1.15;padding:0 6px}}
.subtitle-status{margin:8px 0 0}
/* таблицы-карточки на телефоне: подпись слева, всё содержимое справа */
@media(max-width:767px){
 html[data-theme] body .responsive-table td{grid-template-columns:112px minmax(0,1fr);align-items:baseline}
 html[data-theme] body .responsive-table td>*{grid-column:2}
 html[data-theme] body .responsive-table td.client-actions,html[data-theme] body .responsive-table td.meeting-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;width:100%}
 html[data-theme] body .responsive-table td.client-actions:before,html[data-theme] body .responsive-table td.meeting-actions:before{margin-right:auto}
 html[data-theme] body .responsive-table td.client-actions form{display:inline-flex;margin:0}
}
/* иконка рядом с обычной кнопкой — той же высоты */
html[data-theme] body .report-index-snapshot-actions .icon-button{width:44px;height:44px;min-height:44px}
/* ===== 12.10, правки по независимому ревью ===== */
/* календарь-неделя: карточки не шире колонки */
html[data-theme] body .cal-col-body{grid-template-columns:minmax(0,1fr)}
html[data-theme] body .cal-col .pi{min-width:0}
/* таблицы: колонка действий вмещает две кнопки 40px */
html[data-theme] body .meetings-table col.meeting-col-actions,html[data-theme] body .meetings-table th:last-child{width:116px}
@media(min-width:768px){
 .client-table th:nth-child(9){width:116px}
 html[data-theme] body .client-table th{white-space:normal}
 .client-table tr>:nth-child(2){white-space:normal;overflow:visible}
 html[data-theme] body .meeting-actions{white-space:nowrap}
}
.client-contact-inline{display:none}
@media(min-width:768px) and (max-width:1365px){.client-contact-inline{display:block}}
/* KPI: таблица по ширине карточки */
@media(min-width:768px){html[data-theme] body .kpi-table table{min-width:0;table-layout:auto}html[data-theme] body .kpi-table td:first-child{min-width:170px}}
/* PL: все 6 стадий видны на 1280 */
@media(min-width:768px){html[data-theme] body .pipeline-board{grid-auto-columns:minmax(140px,1fr)}}
/* доски: колонки одной высоты, карточки сверху */
html[data-theme] body :is(.pipeline-board,.lead-board,.mkk-board){align-items:stretch}
html[data-theme] body .mkk-board{grid-auto-columns:minmax(200px,1fr)}
/* задача: главная кнопка сверху на всю ширину, две вторичные под ней — везде */
html[data-theme] body .task-work-head{display:block}
html[data-theme] body .task-work-head h2{margin:0 0 12px}
html[data-theme] body .task-work-head .task-status-actions{display:grid!important;grid-auto-flow:row!important;grid-template-columns:1fr 1fr!important;gap:8px}
html[data-theme] body .task-work-head .task-status-actions>form{margin:0}
html[data-theme] body .task-work-head .task-status-actions .button{width:100%;white-space:nowrap}
html[data-theme] body .task-work-head .task-status-actions form:has(.button:not(.secondary)){grid-column:1/-1;order:-1}
html[data-theme] body .task-work-head .task-status-actions>form:last-child:nth-child(odd):not(:has(.button:not(.secondary))){grid-column:1/-1}
/* меню: все пункты видны на ноутбуке */
@media(min-width:768px) and (max-height:940px){html[data-theme] body .side-nav a{min-height:34px;padding-top:5px;padding-bottom:5px}}
/* шапка с иконкой внутри формы */
@media(max-width:767px){
 .section-heading>.actions:has(>form>.icon-button){grid-template-columns:1fr 1fr 44px!important}
 .section-heading>.actions:has(>form>.icon-button)>form:has(>.icon-button){grid-column:auto!important;justify-self:end}
 .section-heading>.actions:has(>form>.icon-button)>:nth-last-child(2):nth-child(odd){grid-column:auto!important}
}
/* форма внутри карточки — без второй рамки */
html[data-theme] body .card .form-footer{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;padding:16px 0 0;margin-top:16px}
/* карточка протокола: нечётная последняя ячейка — на всю ширину */
@media(max-width:767px){html[data-theme] body .proto-info div:nth-child(4){grid-column:auto;border-right:revert}html[data-theme] body .proto-info>div:last-child:nth-child(odd){grid-column:1/-1;border-right:0}}
/* инструкция iPhone: текст сверху, скриншоты читаемы */
.ip-steps2>li{align-items:start}
html[data-theme] body .ip-shot img{max-height:560px}
/* лид Cowork: отступ перед «Запрос с сайта» */
html[data-theme] body .key-values+.eyebrow{margin-top:18px}
/* быстрые даты МКК — как чипы-фильтры */
html[data-theme] body .mkk-quick .chip{min-height:34px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:650}
html[data-theme] body .mkk-quick .chip:hover{border-color:var(--primary)}
@media(max-width:767px){html[data-theme] body .mkk-quick .chip{min-height:40px}}
/* МКК: ФИО и названия переносятся, а не обрезаются */
html[data-theme] body .mkk-row :is(.mkk-co strong,.mkk-co small,.mkk-org small,.mkk-org b){white-space:normal;overflow:visible;overflow-wrap:anywhere}
/* задача: имена в чипах одной строкой */
html[data-theme] body .tf-people{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
/* дашборд: имена с многоточием */
html[data-theme] body .login-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* дашборд на телефоне: «Показатели / Настроить плитки» на всю ширину */
@media(max-width:767px){html[data-theme] body .dash-toolbar>.button{flex:1 1 0}}
/* тёмная тема: контраст цифр активностей */
html[data-theme="dark"] body .act-field_visit strong{color:#9b9cff}
html[data-theme="dark"] body .act-network_training strong{color:#4fd0df}
@media(min-width:768px){
 html[data-theme] body .kpi-table th small{white-space:normal}
 html[data-theme] body .kpi-table th:nth-child(2){width:120px}
 html[data-theme] body .kpi-table td:first-child{min-width:150px}
 html[data-theme] body .kpi-table .kpi-total,html[data-theme] body .kpi-table .kpi-bar{min-width:0}
 .client-table th:nth-child(5){width:80px}
 html[data-theme] body .client-table th:nth-child(5){white-space:nowrap}
}
/* ===== 12.10, согласованные правки ===== */
/* «Обновить» — в шапке слева от темы, только на телефоне */
html[data-theme] body .topbar-refresh{display:none}
@media(max-width:767px){html[data-theme] body .topbar-refresh{display:inline-flex;align-items:center;justify-content:center}}
/* План: 6 плиток-фильтров вместо плиток + вкладок */
html[data-theme] body .plan-counts.plan-counts-6{grid-template-columns:repeat(6,minmax(0,1fr))!important}
@media(max-width:900px){html[data-theme] body .plan-counts.plan-counts-6{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:767px){html[data-theme] body .plan-counts.plan-counts-6{gap:8px}html[data-theme] body .plan-counts-6 .plan-count{padding:10px 12px}html[data-theme] body .plan-counts-6 .plan-count>span{font-size:12px}}
/* Протокол: редкие действия в меню «Ещё ⋯» */
html[data-theme] body .proto-more{position:relative;min-width:0}
html[data-theme] body .proto-more>summary{list-style:none;cursor:pointer;width:100%}
html[data-theme] body .proto-more>summary::-webkit-details-marker{display:none}
html[data-theme] body .proto-more-dots{font-size:18px;line-height:1;margin-left:2px}
html[data-theme] body .proto-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:220px;padding:6px;display:grid;gap:2px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 12px 32px rgba(15,23,42,.16)}
html[data-theme] body .proto-more-menu form{display:block;margin:0}
html[data-theme] body .proto-more-menu :is(button,a){display:flex;text-decoration:none;box-sizing:border-box;align-items:center;width:100%;min-height:44px;padding:0 12px;border:0;border-radius:8px;background:transparent;color:var(--ink);font:inherit;font-size:15px;font-weight:600;text-align:left;cursor:pointer}
html[data-theme] body .proto-more-menu :is(button,a):hover{background:var(--soft)}
html[data-theme] body .proto-more-menu button.is-danger{color:#d93a42}
@media(max-width:767px){html[data-theme] body .proto-actions>.button:not(.secondary):first-child:nth-last-child(odd){grid-column:1/-1}html[data-theme] body .proto-more-menu{left:auto;right:0}}
/* Компании на телефоне: компактная карточка */
@media(max-width:767px){
 html[data-theme] body .client-table tbody tr{display:flex!important;flex-wrap:wrap;align-items:flex-start;gap:6px 14px;padding:14px 16px!important}
 html[data-theme] body .client-table tbody td{display:block!important;width:auto!important;padding:0!important;border:0!important;background:none!important;min-height:0!important;font-size:13px;line-height:1.35}
 html[data-theme] body .client-table tbody td>*{grid-column:auto}
 html[data-theme] body .client-table tbody td:before{display:inline!important;content:attr(data-label)" "!important;margin:0 2px 0 0!important;font-size:12px!important;font-weight:600!important;color:var(--muted)!important;text-transform:none!important;letter-spacing:0!important}
 html[data-theme] body .client-table tbody td:nth-child(1){order:0;flex:1 1 0;min-width:0;font-size:15px}
 html[data-theme] body .client-table tbody td:nth-child(1):before,html[data-theme] body .client-table tbody td.client-actions:before{display:none!important}
 html[data-theme] body .client-table tbody td.client-actions{order:1;flex:none;display:flex!important;gap:8px;margin-left:auto}
 html[data-theme] body .client-table tbody td:nth-child(n+2):not(.client-actions){order:2}
 html[data-theme] body .client-table tbody td:nth-child(2),html[data-theme] body .client-table tbody td:nth-child(3),html[data-theme] body .client-table tbody td:nth-child(4){flex:1 1 100%}
 html[data-theme] body .client-table tbody td :is(.meta,div){display:inline}
 html[data-theme] body .client-table tbody td:nth-child(1) .meta{display:block}
 html[data-theme] body .client-table tbody td:nth-child(4) .meta:before,html[data-theme] body .client-table tbody td:nth-child(3) .meta:before{content:" · "}
 html[data-theme] body .client-table tbody td .status{display:inline-flex;vertical-align:middle}
 html[data-theme] body .client-table tbody td.empty{flex:1 1 100%}
 html[data-theme] body .client-table tbody td.empty:before{display:none!important}
 html[data-theme] body .client-contact-inline{display:none!important}
}
/* Календарь, месяц: дела выбранного дня под сеткой (телефон) */
.cal-daypanel{display:none}
@media(max-width:767px){
 html[data-theme] body .cal-daypanel{display:block;margin-top:16px}
 html[data-theme] body .cal-daypanel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
 html[data-theme] body .cal-daypanel-head h2{margin:0;font-size:18px}
 html[data-theme] body .cal-daypanel-head .button{min-height:44px;flex:none}
 html[data-theme] body .cal-cell{cursor:pointer}
 html[data-theme] body .cal-cell.is-picked{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface))}
 html[data-theme] body .cal-daypanel .cal-empty{padding:16px;border:1px dashed var(--line);border-radius:14px;margin:0}
}
/* Уведомления: непрочитанные — фон, точка и цветной заголовок; прочитанные — спокойные */
html[data-theme] body .notif-item.is-unread{background:color-mix(in srgb,var(--primary) 7%,var(--surface))}
html[data-theme] body .notif-item.is-unread strong{color:var(--primary);font-weight:750}
html[data-theme] body .notif-item:not(.is-unread) strong{font-weight:600}
html[data-theme] body .notif-item:not(.is-unread) .notif-text{color:var(--muted)}
/* Лиды Cowork и повторные встречи в календаре */
.tone-cowork{--tone:#e0682b}.tone-repeat{--tone:#2f6fd6}
/* Лид Cowork: следующее действие */
html[data-theme] body .lead-main{display:grid;gap:16px;align-content:start;min-width:0}
html[data-theme] body .lead-next-current{display:grid;gap:8px;padding:12px 14px;margin:0 0 14px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--primary) 6%,var(--surface))}
html[data-theme] body .lead-next-current.is-overdue{border-color:color-mix(in srgb,#e5484d 45%,var(--line))}
html[data-theme] body .lead-next-current p{margin:0;color:var(--muted)}
html[data-theme] body .lead-next-current form{margin:0}
html[data-theme] body .lead-next-form{display:grid;gap:12px}
html[data-theme] body .lead-next-kinds{display:flex;flex-wrap:wrap;width:100%}
html[data-theme] body .lead-next-kinds .segmented-option{flex:1 1 auto}
html[data-theme] body .lead-next .meta{margin:10px 0 0}
@media(max-width:767px){html[data-theme] body .lead-next-kinds .segmented-option{flex:1 1 30%}html[data-theme] body .lead-next-form>.button{width:100%}}
/* Лиды Cowork: загрузка из Excel */
html[data-theme] body .lead-xlsx{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
html[data-theme] body .lead-xlsx h2{margin:0 0 4px}
html[data-theme] body .lead-xlsx-text{flex:1 1 320px;min-width:0}
html[data-theme] body .lead-xlsx-actions{display:flex;gap:10px;flex:none}
html[data-theme] body .lead-xlsx-actions label.button{cursor:pointer}
@media(max-width:767px){html[data-theme] body .lead-xlsx-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}}
/* Встреча: повторная */
html[data-theme] body .repeat-meeting{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0 16px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,#2f6fd6 6%,var(--surface))}
html[data-theme] body .repeat-meeting>span{display:grid;gap:2px}
html[data-theme] body .repeat-meeting .eyebrow{margin:0}
@media(max-width:767px){html[data-theme] body .repeat-meeting .button{width:100%}}
/* Активности: запланированные */
html[data-theme] body .act-planned{margin:0 0 20px}
html[data-theme] body .act-planned-title{margin:0 0 10px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
html[data-theme] body .act-card.is-planned{border-style:dashed}
html[data-theme] body .act-top .status{margin-left:6px}
/* Опасное действие под формой */
html[data-theme] body .danger-zone{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;padding:16px 22px;border:1px dashed color-mix(in srgb,#d93a42 35%,var(--line));border-radius:14px}
html[data-theme] body .danger-zone .help{margin:0}
@media(max-width:767px){html[data-theme] body .danger-zone{flex-direction:column;align-items:stretch;padding:16px}html[data-theme] body .danger-zone .button{width:100%}}
/* Встречи по CSM: имя целиком, полоса короче */
@media(max-width:767px){html[data-theme] body .team-bar-row{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 34px}}
html[data-theme] body .login-name{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
/* Лид Cowork на телефоне: сначала следующее действие и работа с лидом */
@media(max-width:767px){html[data-theme] body .lead-detail-layout{display:flex!important;flex-direction:column}html[data-theme] body .lead-detail-layout>.lead-main{order:-1}html[data-theme] body .lead-detail-layout>.lead-side{display:grid;gap:16px}}
/* Виды следующего действия: 3 + 2 ровными рядами */
html[data-theme] body .lead-next-kinds{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}
html[data-theme] body .lead-next-kinds .segmented-option{grid-column:span 2}
html[data-theme] body .lead-next-kinds .segmented-option:nth-child(n+4){grid-column:span 3}
html[data-theme] body .lead-next-kinds .segmented-option span{display:flex;align-items:center;justify-content:center;min-height:40px;width:100%;white-space:nowrap}
html[data-theme] body .lead-next-current{grid-template-columns:minmax(0,1fr) auto;align-items:center}
html[data-theme] body .lead-next-current>strong,html[data-theme] body .lead-next-current>p,html[data-theme] body .lead-next-current>.status{grid-column:1}
html[data-theme] body .lead-next-current>form{grid-column:2;grid-row:1/span 3}
@media(max-width:767px){html[data-theme] body .lead-next-current{grid-template-columns:1fr}html[data-theme] body .lead-next-current>form{grid-column:1;grid-row:auto}html[data-theme] body .lead-next-current .button{width:100%}html[data-theme] body .lead-xlsx-actions{grid-template-columns:1fr}}
@media(max-width:767px){html[data-theme] body .lead-detail-layout>.lead-side{order:1}}
/* Календарь-неделя: длинные слова переносятся внутри колонки */
html[data-theme] body .cal-col .pi-title{overflow-wrap:anywhere;word-break:break-word;hyphens:auto}
html[data-theme] body .cal-col .pi-body{min-width:0;overflow:hidden}
/* Активность: метки в одну строку с ровным отступом */
html[data-theme] body .act-top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
html[data-theme] body .act-top .status{margin-left:0}
/* Дашборд, Лиды Cowork: плитки как везде (без цветной полосы), 4 + 3 на всю ширину */
html[data-theme] body .lead-tiles{grid-template-columns:repeat(12,minmax(0,1fr))}
html[data-theme] body .lead-tiles>.lead-tile{grid-column:span 3}
html[data-theme] body .lead-tiles>.lead-tile:nth-child(n+5):nth-last-child(-n+3){grid-column:span 4}
html[data-theme] body .lead-tile:before{display:none}
html[data-theme] body .lead-tile{border-radius:14px;background:var(--surface);transform:none}
html[data-theme] body .lead-tile strong{color:var(--lead-accent,var(--ink))}
@media(max-width:767px){html[data-theme] body .lead-tiles>.lead-tile{grid-column:span 4}html[data-theme] body .lead-tiles>.lead-tile:nth-child(n+5):nth-last-child(-n+3){grid-column:span 4}html[data-theme] body .lead-tiles>.lead-tile:last-child:nth-child(3n+1){grid-column:1/-1}}
/* Шапка телефона: три кнопки 44px и название без выезда за край */
@media(max-width:767px){
 html[data-theme] body .topbar{gap:8px}
 html[data-theme] body .topbar-actions{gap:8px;flex:none}
 html[data-theme] body .topbar .brand-mark{display:none}
 html[data-theme] body .topbar .brand{min-width:0;overflow:hidden}
 html[data-theme] body .topbar .brand-short{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html[data-theme] body .brand-group{min-width:0;flex:1 1 auto}
}
/* Виды следующего действия: 3 + 3 */
html[data-theme] body .lead-next-kinds{grid-template-columns:repeat(3,minmax(0,1fr))}
html[data-theme] body .lead-next-kinds .segmented-option,html[data-theme] body .lead-next-kinds .segmented-option:nth-child(n+4){grid-column:auto}
/* Доски: колонки по содержимому, без длинных пустых столбцов */
html[data-theme] body :is(.pipeline-board,.lead-board,.mkk-board){align-items:start}
/* Админ-блок дашборда: короткие имена, без обрезки */
html[data-theme] body .admin-logins .lg-full{display:none}
html[data-theme] body .admin-logins .lg-short{display:inline}
/* Календарь-неделя: компактнее текст, без разрыва слов посередине, максимум 4 строки */
@media(min-width:768px){
 html[data-theme] body .cal-col .pi-title{font-size:12.5px;overflow-wrap:break-word;word-break:normal;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
 html[data-theme] body .cal-col .pi{padding:8px 8px 8px 9px;gap:6px}
 html[data-theme] body .cal-col .pi-check button{width:18px;height:18px}
}
@media(min-width:1101px){html[data-theme] body .cal-week{grid-template-columns:repeat(5,minmax(0,1fr)) repeat(2,minmax(0,.5fr))}}
/* Форма встречи: повторная встреча и время — по половине ряда */
@media(min-width:1001px){html[data-theme] body .mf-grid>.mf-repeat{grid-column:span 2}}
/* Карточка «Из Excel» и низ формы внутри секции */
html[data-theme] body label.button{display:inline-flex;align-items:center;justify-content:center;height:44px;min-height:44px;box-sizing:border-box}
html[data-theme] body .form-section .form-footer{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;padding:16px 0 0;margin-top:16px}
html[data-theme] body .lead-xlsx .help{margin:0}
/* План: исполнитель целиком */
@media(min-width:768px){html[data-theme] body .plan-add select{width:240px}}
/* Лид Cowork на телефоне: действие → контакты → работа → встречи → история */
@media(max-width:767px){
 html[data-theme] body .lead-detail-layout{display:flex!important;flex-direction:column;gap:16px}
 html[data-theme] body .lead-detail-layout>.lead-side,html[data-theme] body .lead-detail-layout>.lead-main{display:contents}
 html[data-theme] body .lead-detail-layout .card{margin:0}
 html[data-theme] body .lead-next{order:1}html[data-theme] body .lead-contacts{order:2}html[data-theme] body .lead-work{order:3}html[data-theme] body .lead-meetings{order:4}html[data-theme] body .lead-history{order:5}
}
/* МКК: CSM целиком; на телефоне стадия всегда в правом верхнем углу */
@media(min-width:768px){html[data-theme] body .mkk-head,html[data-theme] body .mkk-row{grid-template-columns:92px minmax(0,2fr) minmax(0,1.5fr) minmax(140px,1.2fr) 110px minmax(0,1.6fr)}}
html[data-theme] body .mkk-csm{white-space:normal;overflow-wrap:anywhere}
@media(max-width:767px){html[data-theme] body .mkk-row>span:nth-child(5){justify-self:end;align-self:start}}
/* МКК, шапка на телефоне: «Новый лид» сверху, ниже три равные кнопки */
@media(max-width:767px){
 html[data-theme] body .section-heading>.actions.mkk-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px}
 html[data-theme] body .mkk-actions>*{grid-column:auto!important;order:0!important;min-width:0}
 html[data-theme] body .mkk-actions>.button:not(.secondary){grid-column:1/-1!important;order:-1!important}
 html[data-theme] body .mkk-actions>form{display:contents}
 html[data-theme] body .mkk-actions .button.secondary{padding:0 6px;font-size:15px;gap:6px}
 html[data-theme] body .mkk-actions .button.secondary .ui-icon{display:none}
}
/* Статус «Отказ» — красный везде */
html[data-theme] body .status.status-refused{background:color-mix(in srgb,#e5484d 14%,var(--surface));color:#c8323a}
html[data-theme="dark"] body .status.status-refused{color:#ff8a8f}
/* Активности: мета через разделитель, действия — кнопки-иконки как в протоколе */
html[data-theme] body .act-meta span+span:before{content:" · "}
html[data-theme] body .act-actions{display:flex;gap:8px;align-items:center}
html[data-theme] body .act-actions form{margin:0;display:inline-flex}
html[data-theme] body .icon-button.is-danger{color:#d93a42;border-color:color-mix(in srgb,#d93a42 35%,var(--line));background:color-mix(in srgb,#d93a42 6%,var(--surface))}
html[data-theme="dark"] body .icon-button.is-danger{color:#ff8a8f}
/* Поля с поиском (МКК, компания) — на одной линии с обычными полями */
html[data-theme] body .field.company-lookup{margin-top:0}
html[data-theme] body .field.company-lookup>label{margin-bottom:0}
/* Два поля в ряду формы — две равные колонки, без пустой третьей */
@media(min-width:1280px){html[data-theme] body .form-page form .field-grid:has(>:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Дашборд: высота плиток по содержимому (без внутренней прокрутки и обрезанных строк), соседи в ряду — одной высоты */
/* «Требует внимания» на компьютере — 2 колонки, чтобы все пункты помещались в плитку обычной высоты */
@media(min-width:1001px){html[data-theme] body .dash-tile[data-widget="attention"] .dashboard-alerts{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}html[data-theme] body .dash-tile[data-widget="attention"] .dashboard-alerts>a{min-height:0;padding:10px 12px}}
html[data-theme] body .act-team-name{white-space:normal;overflow:visible;overflow-wrap:anywhere}
html[data-theme] body .act-actions{flex-direction:row!important;align-items:center;align-self:start;justify-content:flex-end}
/* Активности: «По CSM» — плитки с числом, скрываемый блок */
html[data-theme] body .act-team{margin:0 0 20px;padding:0;border:0;background:none;box-shadow:none}
html[data-theme] body .act-team-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
html[data-theme] body .act-team-head .act-planned-title{margin:0}
html[data-theme] body .act-team-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
html[data-theme] body .act-team-tile .act-sum-label{white-space:normal;overflow:visible}
html[data-theme] body .act-team.is-collapsed .act-team-grid{display:none}
html[data-theme] body .act-team.is-collapsed .act-team-head{margin:0}
@media(max-width:900px){html[data-theme] body .act-team-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
html[data-theme] body .act-team-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
@media(max-width:900px){html[data-theme] body .act-team-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-theme] body .act-team-grid>:last-child:nth-child(odd){grid-column:1/-1}}
@media(min-width:1001px){html[data-theme] body .dash-tile[data-widget="attention"] .dashboard-alerts>a:last-child:nth-child(odd){grid-column:1/-1}html[data-theme] body .dash-tile[data-widget="attention"] .dashboard-alerts>a>span:not([aria-hidden]){font-size:13px;line-height:1.3}}
/* Шапка телефона: логотип возвращён, кнопки 40px */
@media(max-width:767px){
 html[data-theme] body .topbar .brand-mark{display:inline-flex}
 html[data-theme] body .topbar :is(.menu-toggle,.bell-button,.theme-toggle){width:40px;min-width:40px;height:40px;min-height:40px}
 html[data-theme] body .topbar-actions{gap:6px}
 html[data-theme] body .topbar .brand{gap:8px}
}
@media(max-width:374px){html[data-theme] body .topbar .brand{font-size:14px;gap:6px}html[data-theme] body .topbar .brand-mark{width:26px;height:26px}html[data-theme] body .topbar{padding-left:10px;padding-right:10px}html[data-theme] body .topbar-actions{gap:4px}}
@media(max-width:374px){html[data-theme] body .topbar :is(.bell-button,.theme-toggle){width:36px;min-width:36px;height:36px;min-height:36px}html[data-theme] body .topbar .menu-toggle{width:32px;min-width:32px}html[data-theme] body .brand-group{gap:4px}}
/* Логотип: иконка строго по центру */
html[data-theme] body .topbar .brand-mark{display:grid!important;place-items:center;flex:none}
html[data-theme] body .topbar .brand-mark svg{display:block;margin:0}
@media(max-width:374px){html[data-theme] body .topbar .brand-mark svg{width:17px;height:17px}}
/* План и календарь: выполненный пункт плавно исчезает */
html[data-theme] body .pi.is-leaving{opacity:0;height:0!important;padding-top:0!important;padding-bottom:0!important;margin:0!important;border-width:0!important;overflow:hidden;transition:opacity .2s ease,height .25s ease,padding .25s ease}
html[data-theme] body .pi-check button{cursor:pointer}
/* Ошибки в формах: поле и подпись красным, текст под полем */
html[data-theme] body .field-error :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border-color:#e5484d!important;box-shadow:0 0 0 3px color-mix(in srgb,#e5484d 16%,transparent)!important}
html[data-theme] body .field-error>label,html[data-theme] body .field-error>.field-label{color:#d12f37}
html[data-theme] body .field-error .errorlist,html[data-theme] body .field-error .js-field-msg{margin:6px 0 0;padding:0;list-style:none;color:#d12f37;font-size:13px;font-weight:600}
html[data-theme="dark"] body .field-error>label,html[data-theme="dark"] body .field-error .errorlist,html[data-theme="dark"] body .field-error .js-field-msg{color:#ff8a8f}
html[data-theme] body .segmented.field-error,html[data-theme] body .mf-kind.field-error .segmented{box-shadow:0 0 0 2px #e5484d;border-radius:12px}
/* Новая активность: 5 типов ровно (3 + 2 на всю ширину), без «участников» у визитов и звонков */
html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]){display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;width:100%}
html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]) .segmented-option{grid-column:span 2;min-width:0}
html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]) .segmented-option:nth-child(n+4){grid-column:span 3}
html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]) .segmented-option span{display:flex;align-items:center;justify-content:center;width:100%;min-height:40px;padding:0 8px;white-space:nowrap;font-size:14px}
html[data-theme] body .act-participants[hidden]{display:none}
html[data-theme] body .act-participants>.field{margin:0}
html[data-theme] body .act-row3.no-part{grid-template-columns:180px minmax(0,1fr)}
@media(max-width:767px){html[data-theme] body .act-row3.no-part{grid-template-columns:1fr}html[data-theme] body .act-row3.no-part .field:last-child{grid-column:auto}}
html[data-theme] body .field-wide-wrap{grid-column:1/-1}
/* Цвета новых типов */
.act-mkk_calls{--act-tone:#22a463}.act-ckp_calls{--act-tone:#c94fa3}
html[data-theme] body .act-mkk_calls strong{color:#1f8f55}html[data-theme] body .act-ckp_calls strong{color:#b0408f}
html[data-theme] body .act-mkk_calls .act-badge{background:#dcf5e8;color:#1f8f55}html[data-theme] body .act-ckp_calls .act-badge{background:#f8e1f1;color:#a33a84}
html[data-theme="dark"] body .act-mkk_calls strong{color:#5fd39a}html[data-theme="dark"] body .act-ckp_calls strong{color:#ee8fd0}
/* Активности: 5 типов + «Всего» = 3 + 3 */
@media(min-width:901px){html[data-theme] body .act-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
/* Активности: карточка как везде — без цветной полосы, вся кликабельна, удаление свайпом */
html[data-theme] body .act-card{display:grid;grid-template-columns:62px minmax(0,1fr);border:1px solid var(--line)!important;border-left:1px solid var(--line)!important;color:var(--ink);text-decoration:none}
html[data-theme] body a.act-card:hover{border-color:color-mix(in srgb,var(--primary) 30%,var(--line))!important;box-shadow:var(--shadow)}
html[data-theme] body .act-card h3{color:var(--ink)}
html[data-theme] body .act-list{display:grid;gap:10px}
html[data-theme] body .act-swipe{border-radius:14px}
@media(max-width:767px){html[data-theme] body .act-card{grid-template-columns:52px minmax(0,1fr)}html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]) .segmented-option span{font-size:13px;padding:0 4px}}
@media(max-width:767px){
 html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]){grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]) .segmented-option,html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]) .segmented-option:nth-child(n+4){grid-column:auto}
 html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]) .segmented-option:last-child{grid-column:1/-1}
 html[data-theme] body .mf-kind .segmented:has(input[value="ckp_calls"]) .segmented-option span{font-size:14px}
}
html[data-theme] body .form-section .field-grid+.field-grid{margin-top:18px}
/* Задача: совместная/каждому, напоминание, повтор */
html[data-theme] body .tf-mode{margin-top:12px}
html[data-theme] body .tf-mode .segmented{display:grid;grid-template-columns:1fr 1fr;width:100%}
html[data-theme] body .tf-mode .segmented-option span{display:flex;justify-content:center;width:100%;min-height:40px;text-align:center}
html[data-theme] body .tf-mode .help{margin:8px 0 0}
html[data-theme] body .tf-extras{display:grid;grid-template-columns:1fr 1fr;gap:12px}
html[data-theme] body .tf-extra{padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
html[data-theme] body .tf-switch{display:flex;gap:12px;align-items:flex-start;cursor:pointer;margin:0}
html[data-theme] body .tf-switch input{width:20px;height:20px;margin:2px 0 0;flex:none;accent-color:var(--primary)}
html[data-theme] body .tf-switch span{display:grid;gap:2px}
html[data-theme] body .tf-switch b{font-size:15px;font-weight:650;color:var(--ink)}
html[data-theme] body .tf-switch small{font-size:12.5px;color:var(--muted)}
html[data-theme] body .tf-extra-body{margin-top:14px}
html[data-theme] body .tf-extra-body[hidden]{display:none}
html[data-theme] body .tf-extra-body .field-grid{grid-template-columns:1fr 1fr}
html[data-theme] body .tf-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
html[data-theme] body .tf-days .chip-choice span{justify-content:center;width:100%;padding:0 4px}
html[data-theme] body .series-stop{margin-top:6px}
@media(max-width:767px){html[data-theme] body .tf-extras{grid-template-columns:1fr}html[data-theme] body .tf-days{gap:4px}}
html[data-theme] body .task-joint{font-weight:700;color:var(--primary)}
/* Предложения */
html[data-theme] body .idea-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 14px}
html[data-theme] body .idea-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
html[data-theme] body .idea-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:16px 18px;border:1px solid var(--line);border-radius:14px;background:var(--surface);transition:border-color .16s,box-shadow .16s}
html[data-theme] body .idea-card:hover{border-color:color-mix(in srgb,var(--primary) 30%,var(--line));box-shadow:var(--shadow)}
html[data-theme] body .idea-link{position:absolute;inset:0;z-index:1;border-radius:14px}
html[data-theme] body .idea-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
html[data-theme] body .idea-card-head h3{margin:0;font-size:16px;line-height:1.35;color:var(--ink)}
html[data-theme] body .idea-excerpt{margin:0;color:var(--muted);font-size:14px;line-height:1.45}
html[data-theme] body .idea-card-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto}
html[data-theme] body .idea-card-foot .meta{min-width:0}
html[data-theme] body .idea-votes{position:relative;z-index:2;display:flex;gap:6px;flex:none}
html[data-theme] body .idea-votes form{margin:0}
html[data-theme] body .idea-vote{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font:inherit;font-size:14px;cursor:pointer}
html[data-theme] body .idea-vote b{font-weight:700;font-variant-numeric:tabular-nums}
html[data-theme] body .idea-vote.is-on{border-color:#e5484d;background:color-mix(in srgb,#e5484d 10%,var(--surface))}
html[data-theme] body .idea-vote.is-down.is-on{border-color:var(--muted);background:var(--soft)}
html[data-theme] body .idea-status{flex:none;white-space:nowrap}
html[data-theme] body .idea-status-new{background:var(--soft);color:var(--muted)}
html[data-theme] body .idea-status-backlog{background:color-mix(in srgb,#e3a008 16%,var(--surface));color:#9a6b00}
html[data-theme] body .idea-status-prom{background:color-mix(in srgb,#22a463 16%,var(--surface));color:#1a7f47}
html[data-theme] body .idea-status-rejected{background:color-mix(in srgb,#e5484d 14%,var(--surface));color:#c8323a}
html[data-theme="dark"] body .idea-status-backlog{color:#f5c451}html[data-theme="dark"] body .idea-status-prom{color:#5fd39a}html[data-theme="dark"] body .idea-status-rejected{color:#ff8a8f}
html[data-theme] body .idea-head-status{align-self:flex-start}
html[data-theme] body .idea-body-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
html[data-theme] body .idea-status-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
html[data-theme] body .idea-comment-form{margin-top:14px}
html[data-theme] body .idea-comment-form .button{justify-self:end}
@media(max-width:767px){
 html[data-theme] body .idea-grid{grid-template-columns:1fr}
 html[data-theme] body .idea-status-form{grid-template-columns:1fr 1fr}
 html[data-theme] body .idea-card-foot{flex-wrap:wrap}
 html[data-theme] body .idea-comment-form .button{justify-self:stretch;width:100%}
 html[data-theme] body .idea-vote{height:40px}
 html[data-theme] body .idea-detail-head>.actions{display:flex!important;justify-content:flex-start}
}
/* Задача: блоки «Напомнить» и «Повторять» — друг под другом, поля внутри в ряд */
html[data-theme] body .tf-extras{grid-template-columns:1fr}
html[data-theme] body .tf-extra-body .field-grid{margin:0}
@media(min-width:768px){
 html[data-theme] body [data-tf-body="remind"]:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,240px));gap:16px}
 html[data-theme] body [data-tf-body="repeat"]:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:16px;align-items:end}
 html[data-theme] body [data-tf-body="repeat"] .field-grid{grid-template-columns:1fr}
 html[data-theme] body .tf-mode .segmented{max-width:420px}
}
@media(max-width:767px){html[data-theme] body .tf-people{grid-template-columns:repeat(2,minmax(0,1fr))!important}html[data-theme] body .tf-people .chip-choice span{font-size:13px;white-space:normal;text-align:center;line-height:1.2;min-height:40px}}
@media(max-width:767px){html[data-theme] body .idea-detail-head>.idea-head-status{display:flex!important;justify-content:flex-start!important;width:100%}}
/* Настройки Telegram: тихие часы */
html[data-theme] body form.tg-quiet{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
html[data-theme] body form.tg-quiet h3{margin:0 0 4px}
html[data-theme] body form.tg-quiet .help{margin:0 0 12px}
html[data-theme] body .tg-quiet-weekends{margin:14px 0}
@media(max-width:767px){html[data-theme] body :is(form.tg-quiet,.tg-card form) .button{width:100%}}
@media(max-width:767px){html[data-theme] body form[action*="/telegram/"] .button{width:100%}}
/* Предложения: оценки компактнее и без рамки, справа внизу; свайпы */
html[data-theme] body .idea-vote{height:30px;padding:0 8px;gap:4px;border:0;background:transparent;font-size:13px;border-radius:8px}
html[data-theme] body .idea-vote:hover{background:var(--soft)}
html[data-theme] body .idea-vote b{font-size:13px;font-weight:650;color:var(--muted)}
html[data-theme] body .idea-vote.is-on{border:0;background:color-mix(in srgb,#e5484d 10%,transparent)}
html[data-theme] body .idea-vote.is-on b{color:var(--ink)}
html[data-theme] body .idea-vote.is-down.is-on{background:var(--soft)}
html[data-theme] body .idea-votes{gap:2px;margin-left:auto}
html[data-theme] body .idea-swipe{border-radius:14px;height:100%}
html[data-theme] body .idea-swipe>.idea-card{height:100%;box-sizing:border-box}
html[data-theme] body .idea-no-comments{margin:4px 0 0}
@media(max-width:767px){html[data-theme] body .idea-card-foot{flex-wrap:nowrap;align-items:flex-end}html[data-theme] body .idea-card-foot .meta{flex:1 1 auto}html[data-theme] body .idea-vote{height:36px}}
html[data-theme] body .idea-card-head .task-pin-mark{margin-right:6px}
/* Настройки: Telegram — компактно, две колонки, одна кнопка сохранения */
html[data-theme] body .tg-card .tg-head{margin-bottom:16px}
html[data-theme] body .tg-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
html[data-theme] body .tg-col{display:grid;gap:8px;align-content:start;min-width:0}
html[data-theme] body .tg-h{margin:0;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
html[data-theme] body .tg-col .tg-h:not(:first-child){margin-top:10px}
html[data-theme] body .tg-mandatory{display:grid;gap:0;margin:0;padding:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
html[data-theme] body .tg-mandatory li{display:block;padding:8px 12px;border-radius:0;background:transparent;font-size:13.5px;line-height:1.35}
html[data-theme] body .tg-mandatory li+li{border-top:1px solid var(--line)}
html[data-theme] body .tg-mandatory li b{font-weight:650}
html[data-theme] body .tg-mandatory li span{display:block;font-size:12px;color:var(--muted)}
html[data-theme] body .tg-options{display:grid;grid-template-columns:1fr;gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden}
html[data-theme] body .tg-option{display:flex;gap:10px;align-items:flex-start;margin:0;padding:8px 12px;border:0;border-radius:0;background:var(--surface)}
html[data-theme] body .tg-option+.tg-option{border-top:1px solid var(--line)}
html[data-theme] body .tg-option input,html[data-theme] body .tg-check input{width:18px;height:18px;margin:1px 0 0;flex:none;accent-color:var(--primary)}
html[data-theme] body .tg-option span{display:grid;gap:1px}
html[data-theme] body .tg-option b{font-size:13.5px;font-weight:650;line-height:1.35}
html[data-theme] body .tg-option small{font-size:12px;color:var(--muted);line-height:1.35}
html[data-theme] body .tg-quiet-row{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center}
html[data-theme] body .tg-quiet-row select{height:40px!important;min-height:40px!important;font-size:14px}
html[data-theme] body .tg-dash{color:var(--muted)}
html[data-theme] body .tg-check{display:flex;gap:10px;align-items:center;margin:2px 0 0;font-size:13.5px;font-weight:600;cursor:pointer}
html[data-theme] body .tg-note{margin:0;font-size:12px}
html[data-theme] body .tg-foot{display:flex;align-items:center;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
html[data-theme] body .tg-foot .tg-off{margin-left:auto}
@media(max-width:767px){
 html[data-theme] body .tg-cols{grid-template-columns:1fr;gap:14px}
 html[data-theme] body .tg-foot{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 html[data-theme] body .tg-foot>.button:first-child{grid-column:1/-1}
 html[data-theme] body .tg-foot .tg-off{margin:0;justify-self:center}
 html[data-theme] body .tg-foot .button{width:100%;padding:0 8px;font-size:14px}
}
/* Значок iPhone — компактно: текст слева, кнопка справа */
html[data-theme] body .push-card{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:24px;row-gap:4px;align-items:center}
html[data-theme] body .push-card>h2{grid-column:1;margin:0}
html[data-theme] body .push-card>.meta{grid-column:1;margin:0;font-size:13px}
html[data-theme] body .push-card .push-status{grid-column:1;margin:2px 0 0;font-size:13px}
html[data-theme] body .push-card .push-status:empty{display:none}
html[data-theme] body .push-card .push-actions{grid-column:2;grid-row:1/span 3;display:flex;gap:8px;align-items:center;margin:0}
html[data-theme] body .push-card .small-disclosure{grid-column:1/-1;margin:6px 0 0}
@media(max-width:767px){html[data-theme] body .push-card{grid-template-columns:1fr}html[data-theme] body .push-card .push-actions{grid-column:1;grid-row:auto;margin-top:8px;flex-wrap:wrap}html[data-theme] body .push-card .push-actions .button{width:100%}}
html[data-theme] body .tg-card h3.tg-h{font-size:12px;line-height:1.4}
@media(max-width:767px){
 html[data-theme] body .tg-card .tg-head{display:grid;grid-template-columns:44px minmax(0,1fr);gap:4px 12px;align-items:center}
 html[data-theme] body .tg-card .tg-head>.tg-status{grid-column:1/-1;margin:4px 0 0}
 html[data-theme] body .tg-card .tg-head h2{margin:0;font-size:18px}
 html[data-theme] body .tg-foot{grid-template-columns:1fr}
 html[data-theme] body .tg-foot>.button{grid-column:auto}
 html[data-theme] body .tg-foot .tg-off{justify-self:center;min-height:40px}
}
/* Предложение: статус рядом с названием, смена статуса — одно меню справа вверху */
html[data-theme] body .section-heading.idea-detail-head{display:flex!important;flex-direction:row!important;align-items:flex-start!important;justify-content:space-between;gap:12px}
html[data-theme] body .idea-head-main{min-width:0;flex:1}
html[data-theme] body .idea-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
html[data-theme] body .idea-title-row h1{margin:0;min-width:0;overflow-wrap:anywhere}
html[data-theme] body .idea-title-row .idea-status{flex:none}
html[data-theme] body .idea-status-menu{flex:none;margin-top:4px}
html[data-theme] body .idea-status-menu>summary{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;padding:0 14px}
html[data-theme] body .idea-status-menu>summary .ui-icon{width:16px;height:16px;transition:transform .15s}
html[data-theme] body .idea-status-menu[open]>summary .ui-icon{transform:rotate(180deg)}
html[data-theme] body .idea-status-menu .proto-more-menu{min-width:200px}
html[data-theme] body .idea-status-menu .proto-more-menu button{justify-content:space-between}
html[data-theme] body .idea-status-menu .proto-more-menu button.is-current{color:var(--primary,#5b5ce2)}
html[data-theme] body .idea-check{font-size:15px}
@media(max-width:767px){
 html[data-theme] body .idea-status-menu{margin-top:0}
 html[data-theme] body .idea-status-menu>summary{width:auto!important;height:40px;min-height:40px;padding:0 12px;font-size:14px}
}
/* Меню: группы разделены линией, без подписей (14.10) */
html[data-theme] body .side-nav-sep{display:block;height:1px;background:var(--line);margin:9px 12px;flex:none}
/* Календарь и план — одна вкладка меню, переключатель вида на странице */
html[data-theme] body .plan-cal-tabs{margin:0 0 16px}
@media(min-width:768px){html[data-theme] body .side-nav{gap:2px}html[data-theme] body .side-nav a{min-height:36px;padding-top:6px;padding-bottom:6px}html[data-theme] body .app-layout>.sidebar{padding-top:20px;padding-bottom:16px}}
@media(max-width:767px){html[data-theme] body .side-nav{gap:2px}html[data-theme] body .side-nav a{min-height:42px;padding-top:7px;padding-bottom:7px}}
html[data-theme] body .team-seen{white-space:nowrap}
/* План: «Нужно назначить» — пункты протоколов без сотрудника-ответственного */
html[data-theme] body .plan-assign{margin:0 0 16px;padding:0}
html[data-theme] body .plan-assign>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;cursor:pointer;list-style:none}
html[data-theme] body .plan-assign-head{display:grid;gap:2px;min-width:0}
html[data-theme] body .plan-assign>summary .ui-icon{flex:none;width:18px;height:18px;color:var(--muted);transition:transform .15s}
html[data-theme] body .plan-assign[open]>summary .ui-icon{transform:rotate(180deg)}
html[data-theme] body .plan-assign>summary::-webkit-details-marker{display:none}
html[data-theme] body .plan-assign-title{font-size:15px;font-weight:700;color:var(--ink)}
html[data-theme] body .plan-assign>summary .meta{font-size:12px}
html[data-theme] body .plan-assign-list{border-top:1px solid var(--line)}
html[data-theme] body .plan-assign-row{display:grid;grid-template-columns:minmax(0,1fr) 200px auto;gap:10px;align-items:center;margin:0;padding:10px 18px;border-top:1px solid var(--line)}
html[data-theme] body .plan-assign-row:first-child{border-top:0}
html[data-theme] body .plan-assign-text{display:grid;gap:2px;min-width:0}
html[data-theme] body .plan-assign-text strong{font-size:14px;font-weight:600;line-height:1.35}
html[data-theme] body .plan-assign-text .meta{font-size:12px;overflow-wrap:anywhere}
html[data-theme] body .plan-assign-row select{height:40px;min-height:40px}
html[data-theme] body .plan-assign-row .button{height:40px;min-height:40px}
@media(max-width:767px){html[data-theme] body .plan-assign-row{grid-template-columns:minmax(0,1fr) auto}html[data-theme] body .plan-assign-text{grid-column:1/-1}}
/* Telegram (14.10): два списка одной высоты, строки распределены ровно; тихие часы — отдельной строкой во всю ширину */
html[data-theme] body .tg-cols{align-items:stretch}
html[data-theme] body .tg-col{display:flex;flex-direction:column;gap:8px}
html[data-theme] body .tg-col>.tg-mandatory,html[data-theme] body .tg-col>.tg-options{display:flex;flex-direction:column;flex:1}
html[data-theme] body .tg-mandatory li,html[data-theme] body .tg-option{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:52px;padding:8px 14px}
html[data-theme] body .tg-option{flex-direction:row;align-items:center;justify-content:flex-start}
html[data-theme] body .tg-option input{margin:0}
html[data-theme] body .tg-quiet-block{display:grid;gap:8px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
html[data-theme] body .tg-quiet-line{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
html[data-theme] body .tg-quiet-block .tg-quiet-row{grid-template-columns:150px auto 150px}
html[data-theme] body .tg-quiet-block .tg-check{margin:0}
@media(max-width:767px){
 html[data-theme] body .tg-quiet-line{display:grid;gap:12px}
 html[data-theme] body .tg-quiet-block .tg-quiet-row{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
 html[data-theme] body .tg-mandatory li,html[data-theme] body .tg-option{min-height:0;flex:none}
 html[data-theme] body .tg-col>.tg-mandatory,html[data-theme] body .tg-col>.tg-options{flex:none}
}
/* Протокол: все действия в один ряд на компьютере */
@media(min-width:768px){html[data-theme] body .proto-actions{display:flex;flex-wrap:wrap;gap:10px}html[data-theme] body .proto-actions>.button,html[data-theme] body .proto-actions>form>.button{flex:1 1 auto;width:auto;padding:0 16px;overflow:visible}html[data-theme] body .proto-actions>.proto-more{flex:none}html[data-theme] body .proto-actions>.proto-more>summary{padding:0 18px}}
/* Фото профиля: кружок в шапке справа (размер как у соседних кнопок), окно профиля, карточка «Мой профиль» */
html[data-theme] body .topbar-avatar{display:grid;place-items:center;flex:none;width:40px;min-width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--soft);color:var(--primary);overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent}
html[data-theme] body .topbar-avatar:hover{border-color:var(--primary)}
html[data-theme] body .topbar-avatar:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
html[data-theme] body .avatar-img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
html[data-theme] body .avatar-initials{font-size:14px;font-weight:750;line-height:1;letter-spacing:.02em;color:var(--primary)}
@media(max-width:374px){html[data-theme] body .topbar-avatar{width:36px;min-width:36px;height:36px}html[data-theme] body .topbar-avatar .avatar-initials{font-size:13px}}
/* телефон: тема переезжает в окно профиля, в шапке «Обновить», колокольчик и фото */
@media(max-width:767px){html[data-theme] body .topbar #theme-toggle{display:none}}
@media(min-width:768px){html[data-theme] body dialog.user-dialog .user-dialog-theme{display:none}}
html[data-theme] body dialog.user-dialog .user-dialog-theme-icon{display:grid;place-items:center;width:19px;height:19px;color:var(--muted);font-size:16px;flex:none}
html[data-theme] body dialog.user-dialog .user-dialog-head{display:flex;align-items:center;gap:12px;margin:0 40px 14px 6px}
html[data-theme] body .user-dialog-avatar{display:grid;place-items:center;flex:none;width:52px;height:52px;border:1px solid var(--line);border-radius:50%;background:var(--soft);overflow:hidden}
html[data-theme] body .user-dialog-avatar .avatar-initials{font-size:18px}
html[data-theme] body .user-dialog-who{min-width:0}
html[data-theme] body .profile-compact-head.has-avatar{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:4px 14px;margin-bottom:16px}
html[data-theme] body .profile-avatar{grid-row:1/3;display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--line);border-radius:50%;background:var(--soft);overflow:hidden}
html[data-theme] body .profile-avatar .avatar-initials{font-size:22px}
html[data-theme] body .profile-who{display:flex;flex-direction:column;gap:2px;min-width:0}
html[data-theme] body .profile-who h2{margin:0}
html[data-theme] body .profile-avatar-actions{display:flex;gap:8px;justify-content:flex-end}
html[data-theme] body .profile-avatar-actions form{margin:0}
html[data-theme] body .profile-avatar-actions .button{min-height:44px;cursor:pointer}
html[data-theme] body .profile-avatar-actions input:focus-visible+label{outline:2px solid var(--primary);outline-offset:2px}
html[data-theme] body .profile-avatar-hint{grid-column:2/-1;margin:0;font-size:12px;color:var(--muted)}
html[data-theme] body .profile-avatar-hint.is-error{color:#c42b3c}
@media(max-width:767px){
 html[data-theme] body .profile-compact-head.has-avatar{grid-template-columns:56px minmax(0,1fr);gap:4px 12px}
 html[data-theme] body .profile-avatar{grid-row:auto;width:56px;height:56px}
 html[data-theme] body .profile-avatar-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));margin-top:10px}
 html[data-theme] body .profile-avatar-actions .button{width:100%;justify-content:center}
 html[data-theme] body .profile-avatar-hint{grid-column:1/-1}
}
/* меню на компьютере помещается целиком на экране высотой 800 px (блок профиля ушёл в шапку) */
@media(min-width:768px){html[data-theme] body .side-nav .side-nav-sep{margin-top:6px;margin-bottom:6px}}

/* Окно обрезки фото профиля — круг как в Telegram (15.10.2026) */
html[data-theme] body dialog.avatar-crop{width:min(440px,calc(100vw - 32px));padding:20px}
html[data-theme] body dialog.avatar-crop h2{margin:0 0 14px;font-size:19px}
html[data-theme] body .avatar-crop-stage{position:relative;width:100%;aspect-ratio:1/1;max-height:62dvh;margin:0 auto;border-radius:14px;overflow:hidden;background:#0b0f19;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;--d:240px}
html[data-theme] body .avatar-crop-stage:active{cursor:grabbing}
html[data-theme] body .avatar-crop-stage:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
html[data-theme] body .avatar-crop-stage img{position:absolute;left:50%;top:50%;max-width:none;max-height:none;transform-origin:center;pointer-events:none;will-change:transform}
html[data-theme] body .avatar-crop-ring{position:absolute;left:50%;top:50%;width:var(--d);height:var(--d);transform:translate(-50%,-50%);border-radius:50%;border:2px solid #fffc;box-shadow:0 0 0 9999px #0b0f19a6;pointer-events:none}
html[data-theme] body .avatar-crop-tip{margin:10px 0 0;text-align:center;font-size:13px}
html[data-theme] body .avatar-crop-zoom{display:grid;grid-template-columns:24px 1fr 24px;align-items:center;gap:8px;margin:10px 0 0;color:var(--muted);font-size:20px;line-height:1;text-align:center}
html[data-theme] body .avatar-crop-zoom input{width:100%;height:44px;margin:0;accent-color:var(--primary);background:transparent;border:0;padding:0}
html[data-theme] body .avatar-crop-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
html[data-theme] body .avatar-crop-actions .button{width:100%;justify-content:center;min-height:44px}
@media(max-width:767px){html[data-theme] body dialog.avatar-crop{width:100vw;max-width:100vw;padding:16px 16px calc(16px + env(safe-area-inset-bottom))}}
html[data-theme] body .avatar-crop-tip .tip-mouse{display:none}
@media(hover:hover) and (pointer:fine){html[data-theme] body .avatar-crop-tip .tip-mouse{display:inline}html[data-theme] body .avatar-crop-tip .tip-touch{display:none}}
/* Фото вместо инициалов в «Команде» и KPI */
html[data-theme] body .avatar.has-photo{overflow:hidden;padding:0;border:1px solid var(--line)}

/* ===== Аудит 15.10 · группа 1: единые плитки, скругления, кнопки, фильтры, шапки ===== */
/* скругление карточек везде 14 (тёмная тема давала 15, дашборд 19) */
html[data-theme]{--radius:14px}
html[data-theme] body :is(.card,.dashboard-panel,.dash-tile,.dash-pulse,.table-wrap,.lead-card,.kpi-empty,.kpi-hero){border-radius:14px}
/* плитки-счётчики: один вид — рамка, радиус 14, цифра чёрная; цвет только по смыслу */
html[data-theme] body :is(.lead-tile,.plan-mini>a,.dashboard-alerts>a,.org-stats>div){border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:none;color:var(--ink);text-decoration:none}
html[data-theme] body :is(.lead-tile,.plan-mini>a,.org-stats>div){display:flex;flex-direction:column;justify-content:center;gap:4px;min-width:0;min-height:74px;padding:12px 14px}
html[data-theme] body :is(.lead-tile,.plan-mini>a,.dashboard-alerts>a,.org-stats>div)>strong{font-size:24px;line-height:1.05;font-weight:800;font-variant-numeric:tabular-nums;color:var(--ink)}
html[data-theme] body :is(.lead-tile,.plan-mini>a,.org-stats>div)>span{font-size:12.5px;font-weight:700;line-height:1.3;color:var(--muted)}
html[data-theme] body .act-sum>strong{color:var(--ink)}
html[data-theme] body :is(.lead-tile-paid,.mkk-stat.st-paid)>strong{color:#1f9d5a}
html[data-theme] body :is(.lead-tile-refused,.mkk-stat.st-refused,.plan-mini>a.is-red,.dashboard-alerts>a.is-red,.org-stats>div.is-warn)>strong{color:#e5484d}
html[data-theme] body :is(a.lead-tile,.plan-mini>a,.dashboard-alerts>a):hover{border-color:color-mix(in srgb,var(--primary) 30%,var(--line));box-shadow:var(--shadow)}
html[data-theme] body .dashboard-alerts>a{min-height:62px;padding:10px 14px}
/* Активности: 6 плиток — полными рядами (6 / 3 / 2) */
@media(min-width:768px){html[data-theme] body .act-summary{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
/* кнопки: запись 44 как все */
html[data-theme] body .proto-toolbar .rec-button{min-height:44px;height:44px}
/* шапки: кнопки справа на линии заголовка */
@media(min-width:768px){
 html[data-theme] body .section-heading{align-items:flex-start}
 html[data-theme] body .section-heading>.actions,html[data-theme] body .section-heading>.button{align-self:flex-start;margin-top:0}
 html[data-theme] body .section-heading>.proto-toolbar{display:flex;flex-wrap:nowrap;gap:8px;margin:0}
 html[data-theme] body .section-heading>.proto-toolbar>*{flex:none}
 html[data-theme] body .section-heading>.proto-toolbar .button{width:auto}
}
html[data-theme] body .section-heading>.proto-toolbar{margin-bottom:0}
/* фильтры: одна панель в рамке на компьютере, «Найти» одной ширины */
@media(min-width:768px){
 html[data-theme] body :is(.plan-filters,.proto-filters,.simple-search){padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:none}
 html[data-theme] body :is(.filter-panel,.plan-filters,.proto-filters,.simple-search,.mkk-filter-btns) :is(button[type=submit],button:not([type])):not(.icon-button):not(.chip){width:120px;min-width:120px;flex:0 0 120px;justify-self:start}
}
/* предложения: «0 комментариев» не рвётся */
html[data-theme] body .idea-card-foot .meta .nw{white-space:nowrap}
/* 404 */
html[data-theme] body .not-found{max-width:560px;margin:48px auto;text-align:center;display:grid;gap:10px;justify-items:center}
html[data-theme] body .not-found h1{margin:0}
html[data-theme] body .not-found .actions{display:flex;gap:10px;justify-content:center;margin-top:8px}
@media(max-width:767px){html[data-theme] body .responsive-table tr{border-radius:14px}}
/* «Назначить» и поле рядом — одна высота; KPI «Изменить/Удалить» — нормальные кнопки */
html[data-theme] body .plan-assign-row :is(select,.button){height:44px;min-height:44px}
html[data-theme] body .kpi-metric-tools .icon-button{width:40px;height:40px;border-radius:10px}
html[data-theme] body .kpi-metric-tools .text-button{display:inline-flex;align-items:center;min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);text-decoration:none;font-weight:650}
/* Меню на телефоне: панель по ширине пунктов (было 300 px), текст и размеры не меняются */
@media(max-width:767px){html[data-theme] body .sidebar{width:min(240px,85vw)}}
/* Значок iPhone: текст по ширине; кнопки как в блоке Telegram — «Отключить» красная */
html[data-theme] body .push-card>.meta,html[data-theme] body .push-card .small-disclosure p{text-align:justify;hyphens:auto;-webkit-hyphens:auto}
html[data-theme] body .push-card .push-off{color:#e5484d!important}
html[data-theme] body .push-card .push-off:hover{color:#c53035!important}
@media(max-width:767px){
 html[data-theme] body .push-card .push-actions:has(.push-off:not([hidden])){display:grid;grid-template-columns:1fr;gap:8px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
 html[data-theme] body .push-card .push-actions .push-off{justify-self:center;min-height:40px;margin:0}
}
/* Замещение на время отсутствия (Настройки → Мой профиль) */
html[data-theme] body .sub-card h2{margin:0 0 8px}
html[data-theme] body .sub-card .sub-line{margin:0 0 8px}
html[data-theme] body .sub-card .sub-current{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
html[data-theme] body .sub-card .sub-current p{margin:0}
html[data-theme] body .sub-card .sub-form .field-grid{margin-top:12px}
html[data-theme] body .sub-card .sub-actions{display:flex;justify-content:flex-end}
@media(max-width:767px){html[data-theme] body .sub-card .button{width:100%}html[data-theme] body .sub-card .sub-current form{width:100%}}
html[data-theme] body .sub-card .sub-actions{margin-top:12px}
/* Значок iPhone: состояние — значком в правом верхнем углу, «Если не работает» — ссылкой в тексте */
html[data-theme] body .push-card>.push-head{grid-column:1/-1;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0}
html[data-theme] body .push-card>.push-head h2{margin:0;min-width:0}
html[data-theme] body .push-card .push-badge{flex:none;display:inline-flex;align-items:center;height:28px;padding:0 10px;border-radius:999px;font-size:13px;font-weight:700;white-space:nowrap;background:var(--soft);color:var(--muted)}
html[data-theme] body .push-card .push-badge.is-ok{background:color-mix(in srgb,#15803d 12%,var(--surface));color:#15803d}
html[data-theme] body .push-card .push-badge[hidden]{display:none}
html[data-theme] body .push-card .push-help-link{display:inline;padding:0;border:0;background:none;color:var(--primary);font:inherit;font-weight:650;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
html[data-theme] body .push-card>.push-help{grid-column:1;margin:6px 0 0;font-size:13px;text-align:justify;hyphens:auto;-webkit-hyphens:auto}
@media(min-width:768px){html[data-theme] body .push-card .push-actions{grid-row:2/span 3}}
/* Поля даты и времени: значение по центру поля по высоте (iOS прижимал к верху) */
html[data-theme] body input:is([type=date],[type=time],[type=datetime-local]){display:flex;align-items:center;-webkit-appearance:none;appearance:none;min-width:0}
html[data-theme] body input:is([type=date],[type=time],[type=datetime-local])::-webkit-date-and-time-value{margin:0;text-align:left;min-height:1.2em}
/* телефон: дата ДД.ММ.ГГГГ поверх системного поля */
html[data-theme] body .date-dmy{position:relative;display:block;width:100%;min-width:0}
html[data-theme] body .date-dmy>input{width:100%;color:transparent!important;-webkit-text-fill-color:transparent}
html[data-theme] body .date-dmy>input::-webkit-date-and-time-value{color:transparent}
html[data-theme] body .date-dmy-text{position:absolute;inset:0;display:flex;align-items:center;pointer-events:none;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden}
html[data-theme] body .date-dmy.is-empty .date-dmy-text{color:var(--muted)}
html[data-theme] body .date-dmy.is-disabled .date-dmy-text{opacity:.55}
/* Замещение: «С» и «По» в одну строку */
@media(max-width:767px){html[data-theme] body .sub-form .field-grid{grid-template-columns:1fr 1fr}html[data-theme] body .sub-form .field-grid>:first-child{grid-column:1/-1}}
html[data-theme] body .date-dmy>input::-webkit-calendar-picker-indicator{display:none}
/* ПРАВИЛО (15.10, Влад): пояснения в несколько строк — по ширине, с переносами; короткие слова не переносим */
html[data-theme] body :is(main,dialog) p:is(.meta,.subtitle,.help),html[data-theme] body main :is(.card,.dashboard-panel-head,.tg-head,.idea-card) p{text-align:justify;hyphens:auto;-webkit-hyphens:auto;hyphenate-limit-chars:7 3 3;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3}
html[data-theme] body :is(main,dialog) :is(.empty,.not-found,.lead-dropzone) p,html[data-theme] body :is(main,dialog) p:is(.avatar-crop-tip,.task-swipe-hint,.jazz-or,.pipeline-empty){text-align:center}
html[data-theme] body .push-card>.meta,html[data-theme] body .push-card>.push-help{hyphenate-limit-chars:7 3 3;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3}
html[data-theme] body .side-nav{overscroll-behavior:contain}
/* Лидеры недели — весь список без прокрутки */
html[data-theme] body .pv-leaders{max-height:none;overflow:visible}
html[data-theme] body .contact-card-head{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;margin-bottom:12px}
html[data-theme] body .contact-card-head h2{margin:0;min-width:0}
/* «Позвонить» — аккуратный зелёный кружок с трубкой в правом углу заголовка карточки контакта */
html[data-theme] body .call-icon{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;margin-left:auto;border-radius:50%;background:#1f9d5a;color:#fff;text-decoration:none;box-shadow:0 2px 6px rgba(31,157,90,.28);transition:background .15s,transform .15s}
html[data-theme] body .call-icon:hover{background:#188a4e}
html[data-theme] body .call-icon:active{transform:scale(.94)}
html[data-theme] body .call-icon:focus-visible{outline:2px solid #1f9d5a;outline-offset:2px}
html[data-theme] body .call-icon .ui-icon{width:17px;height:17px;fill:currentColor;stroke:none}
html[data-theme="dark"] body .call-icon{background:#22a865;box-shadow:none}
@media(max-width:767px){html[data-theme] body .call-icon{width:40px;height:40px}html[data-theme] body .call-icon .ui-icon{width:18px;height:18px}}
@media(max-width:767px){html[data-theme] body .section-heading>.lead-actions>:is(a.button.secondary,form){grid-column:auto!important}}
/* Статус — плашка в правом верхнем углу: шапки карточек (сделка, лид, лид МКК, задача), плитки, встречи, активности */
html[data-theme] body .section-heading:has(>.head-status){position:relative}
html[data-theme] body .section-heading>.head-status{position:absolute;top:0;right:0;margin:0;z-index:1;max-width:46%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-theme] body .section-heading:has(>.head-status)>div:first-of-type>.eyebrow{padding-right:130px}
@media(min-width:768px){html[data-theme] body .section-heading:has(>.head-status)>.actions{margin-top:38px}}
html[data-theme] body .card-topline .status{margin-left:auto}
html[data-theme] body .act-top .act-status{margin-left:auto}
/* PL: переключатель «Доска / Список» справа от числа сделок */
html[data-theme] body .pipeline-summary{flex-direction:row!important;align-items:center!important;justify-content:space-between;flex-wrap:nowrap}
html[data-theme] body .pipeline-summary>.pl-view{flex:none}
html[data-theme] body .pl-list .tile-top h3{min-width:0}
/* Скорость: дашборд появляется сразу, без «въезда» плиток с задержкой (было до 1,1 с) */
html[data-theme] body :is(.dash-kpi,.dash-tile){animation:dash-rise .18s ease-out both!important;animation-delay:0s!important}
html[data-theme] body .grow-y{animation:dash-grow-y .3s ease-out both!important}
html[data-theme] body .grow-x{animation:dash-grow-x .3s ease-out both!important}
/* Полоса загрузки — только если страница открывается дольше 0,25 с */
/* Мгновенный отклик: полоса загрузки — сразу при нажатии (без задержки) */
html.is-navigating body .nav-progress,html.is-navigating .nav-progress{animation:nav-progress 1.6s cubic-bezier(.1,.7,.2,1) both}
/* Активность: «Формат визита» — второй ряд под «Полевой визит» (визит / звонки с МКК / звонки по ЦКП) */
html[data-theme] body .act-subkind{display:grid;gap:6px;margin:12px 0 4px}
html[data-theme] body .act-subkind[hidden]{display:none}
html[data-theme] body .act-subkind .segmented{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;width:100%}
html[data-theme] body .act-subkind .segmented-option{min-width:0}
html[data-theme] body .act-subkind .segmented-option span{display:flex;align-items:center;justify-content:center;width:100%;text-align:center;white-space:normal;line-height:1.2}
html[data-theme] body .act-subkind{margin:14px 0 16px}
@media(max-width:767px){html[data-theme] body .mf-kind .segmented:has(input[value="operative"]){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;width:100%}
 html[data-theme] body .mf-kind .segmented:has(input[value="operative"]) .segmented-option span{display:flex;align-items:center;justify-content:center;width:100%;text-align:center;white-space:normal;line-height:1.2}}
/* Команда и приглашения на телефоне — компактные плитки: фото и ФИО, плашка справа сверху, остальное строкой ниже */
html[data-theme] body .team-tiles{display:grid;gap:8px}
html[data-theme] body .team-tile{padding:12px 14px;gap:6px}
html[data-theme] body .team-tile .tile-top{align-items:center}
html[data-theme] body .team-tile .team-person{display:flex;align-items:center;gap:10px;min-width:0}
html[data-theme] body .team-tile .team-person h3{margin:0;font-size:15px;line-height:1.3;min-width:0;overflow-wrap:anywhere}
html[data-theme] body .team-tile .avatar{width:32px;height:32px;flex:none;font-size:12px}
html[data-theme] body .team-tile .tile-meta{padding-left:42px;font-size:12.5px}
html[data-theme] body .team-tile .team-online{color:#1f9d5a;font-weight:650}
html[data-theme] body .team-tile-action{padding-left:42px;margin:0}
html[data-theme] body .team-tile-action .text-button{min-height:0;padding:2px 0;font-size:13px}
/* «Что нового?» — окно профиля (зелёная точка у аватара, пока не открыли) и страница записей */
html[data-theme] body .topbar-avatar{position:relative}
html[data-theme] body .wn-badge{position:absolute;top:0;right:0;width:11px;height:11px;border-radius:50%;background:#1f9d5a;box-shadow:0 0 0 2px var(--surface)}
html[data-theme] body .user-dialog-item .wn-new{margin-left:auto}
html[data-theme] body .wn-list{display:grid;gap:22px;max-width:860px}
html[data-theme] body .wn-day{display:grid;gap:12px}
html[data-theme] body .wn-day>h2{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
html[data-theme] body .wn-item{display:grid;gap:10px;padding:16px 18px}
html[data-theme] body .wn-item .tile-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
html[data-theme] body .wn-item h3{margin:0;font-size:16px;line-height:1.35;min-width:0}
html[data-theme] body .wn-item .tile-top .status{flex:none}
html[data-theme] body .wn-dot{display:inline-block;width:8px;height:8px;margin:0 8px 2px 0;border-radius:50%;background:#1f9d5a;vertical-align:middle}
html[data-theme] body .wn-points{margin:0;padding-left:18px;display:grid;gap:4px;color:var(--ink);font-size:14px;line-height:1.5}
html[data-theme] body .wn-shots{display:flex;flex-wrap:wrap;gap:10px}
html[data-theme] body .wn-shot{display:block;max-width:300px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--soft)}
html[data-theme] body .wn-shot img{display:block;width:100%;height:auto;max-height:420px;object-fit:cover;object-position:top}
html[data-theme] body .wn-link{justify-self:start;font-size:14px}
@media(max-width:767px){html[data-theme] body .wn-shot{max-width:100%}html[data-theme] body .wn-item{padding:14px 16px}}
/* Главная · «Задачи» команды: строка на сотрудника, задачи листаются вбок; виджет фиксированной высоты с прокруткой */
html[data-theme] body .tw-rows{display:grid;gap:12px;max-height:440px;overflow-y:auto;overscroll-behavior:contain;margin-top:4px;padding-right:2px}
html[data-theme] body .tw-row{display:grid;gap:6px;min-width:0}
html[data-theme] body .tw-who{display:flex;align-items:center;gap:8px;min-width:0;color:var(--ink);text-decoration:none;font-size:13.5px}
html[data-theme] body .tw-avatar{width:26px;height:26px;flex:none;font-size:10.5px;overflow:hidden;border-radius:50%}
html[data-theme] body .tw-avatar .avatar-img{width:100%;height:100%;object-fit:cover;border-radius:50%}
html[data-theme] body .tw-name{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-theme] body .tw-count{font-weight:800;color:var(--primary-strong,var(--primary))}
html[data-theme] body .tw-late{margin-left:auto;flex:none;font-size:12px;font-weight:700;color:#e5484d}
html[data-theme] body .tw-scroll{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding-bottom:4px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
html[data-theme] body .tw-task{flex:0 0 min(78%,280px);scroll-snap-align:start;padding:12px 14px;gap:6px;min-width:0}
html[data-theme] body .tw-task .tile-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
html[data-theme] body .tw-task h3{margin:0;font-size:14px;line-height:1.3;min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html[data-theme] body .tw-task .status{flex:none}
html[data-theme] body .tw-task .tile-meta{font-size:12px}
html[data-theme] body .tw-more{flex:0 0 auto;display:grid;place-items:center;padding:12px 16px;font-size:13px;font-weight:700;color:var(--primary);scroll-snap-align:start;text-decoration:none}
/* Главная · «План действий»: компактно и в одном стиле, список с прокруткой в той же высоте */
html[data-theme] body .plan-widget .plan-mini{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
html[data-theme] body .plan-widget .plan-mini>a{min-height:62px;padding:10px 6px;align-items:center;text-align:center;gap:2px}
html[data-theme] body .plan-widget .plan-mini>a>strong{font-size:22px}
html[data-theme] body .plan-widget .plan-mini>a>span{font-size:11.5px;font-weight:650;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-theme] body .plan-widget .pi-list{max-height:330px;overflow-y:auto;overscroll-behavior:contain;gap:6px;margin-top:10px;padding-right:2px}
html[data-theme] body .plan-widget .pi{padding:8px 12px;gap:10px;min-height:0}
html[data-theme] body .plan-widget .pi-check,html[data-theme] body .plan-widget .pi-dot{flex:none}
html[data-theme] body .plan-widget .pi-check button{width:20px;height:20px;border-radius:6px}
html[data-theme] body .plan-widget .pi-check button svg{width:13px;height:13px}
html[data-theme] body .plan-widget .pi-dot{width:8px;height:8px;margin:0 6px}
html[data-theme] body .plan-widget .pi-body{gap:2px}
html[data-theme] body .plan-widget .pi-title{font-size:14px;font-weight:650;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;hyphens:none}
html[data-theme] body .plan-widget .pi-meta{font-size:12px;gap:2px 8px;flex-wrap:nowrap;overflow:hidden;white-space:nowrap}
html[data-theme] body .plan-widget .pi-meta>*{font-weight:500;flex:none}
html[data-theme] body .plan-widget .pi-meta .pi-kind{font-weight:700}
html[data-theme] body .plan-widget .pi-meta .pi-late{font-weight:700}
html[data-theme] body .plan-widget .pi-meta>span:last-child{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
html[data-theme] body .plan-widget .plan-mini>a{padding:10px 2px}
@media(max-width:767px){html[data-theme] body .plan-widget .plan-mini{gap:6px}html[data-theme] body .plan-widget .plan-mini>a>span{font-size:11px;letter-spacing:-.01em}html[data-theme] body .tw-task{flex-basis:86%}}
@media(max-width:379px){html[data-theme] body .plan-widget .plan-mini{gap:5px}html[data-theme] body .plan-widget .plan-mini>a{padding:10px 1px}html[data-theme] body .plan-widget .plan-mini>a>span{font-size:10.5px;letter-spacing:-.02em}}
/* Пустая история (сделка, лид): без линии таймлайна, текст обычной строкой */
html[data-theme] body .pipeline-timeline:has(>li.empty)::before{display:none}
html[data-theme] body .pipeline-timeline>li.empty{display:block;padding:0;color:var(--muted);font-size:14px;text-align:left}
/* Лиды Cowork — в стиле «Лидов от МКК»: плитки стадий, «Список / Доска», строки */
.st-assigned{--st:#6d6ef0}.st-in_pipeline{--st:#17a2b8}
html[data-theme] body .lead-stats{grid-template-columns:repeat(8,minmax(0,1fr))}
@media(max-width:1100px){html[data-theme] body .lead-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:767px){html[data-theme] body .lead-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
html[data-theme] body .lead-stats>a.is-active{border-color:var(--st);background:color-mix(in srgb,var(--st) 10%,var(--surface))}
html[data-theme] body .lead-bar{margin:14px 0 10px}
@media(max-width:767px){html[data-theme] body .lead-bar{flex-direction:row!important;align-items:center!important}html[data-theme] body .lead-bar .mkk-view{width:auto}}
html[data-theme] body .lead-stale-note{color:#c99a1a!important;font-weight:650}
/* Карточка лида Cowork — раскладка как у лида от МКК */
html[data-theme] body .lead-layout .lead-next-form,html[data-theme] body .lead-layout .lead-work-form{display:grid;gap:12px;margin-top:12px}
html[data-theme] body .lead-layout .lead-next-grid{grid-template-columns:1fr 1fr 2fr}
html[data-theme] body .lead-layout .lead-work-grid{grid-template-columns:1fr 1fr}
html[data-theme] body .lead-layout .mkk-event-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}
html[data-theme] body .lead-layout .mkk-event-actions .meta{margin-right:auto;font-size:12.5px}
html[data-theme] body .lead-layout .mkk-event-head form{margin:0}
html[data-theme] body .lead-layout .lead-work-form textarea{width:100%}
@media(max-width:767px){html[data-theme] body .lead-layout .lead-next-grid{grid-template-columns:1fr 1fr}html[data-theme] body .lead-layout .lead-next-grid .field:last-child{grid-column:1/-1}html[data-theme] body .lead-layout .lead-work-grid{grid-template-columns:1fr}
 html[data-theme] body .lead-layout .mkk-event-actions{flex-direction:column;align-items:stretch}html[data-theme] body .lead-layout .mkk-event-actions .meta{margin:0;text-align:center}}
html[data-theme] body .lead-layout .card{order:0!important}
html[data-theme] body .lead-bar>span{margin-right:auto;text-align:left}
/* Лиды Cowork: стадии — одна компактная карточка: список стадий слева, круговая диаграмма справа */
html[data-theme] body .lead-stage-card{display:flex;align-items:center;gap:16px;padding:12px 14px;margin:0 0 14px}
html[data-theme] body .lead-stage-legend{flex:1;min-width:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 10px}
html[data-theme] body .lead-stage-item{display:flex;align-items:center;gap:7px;min-width:0;padding:5px 8px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:13px}
html[data-theme] body .lead-stage-item:hover{background:var(--soft)}
html[data-theme] body .lead-stage-item.is-active{background:color-mix(in srgb,var(--primary) 12%,transparent)}
html[data-theme] body .lead-stage-item i{width:8px;height:8px;border-radius:50%;flex:none}
html[data-theme] body .lead-stage-item span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-weight:600}
html[data-theme] body .lead-stage-item b{margin-left:auto;font-weight:800;font-variant-numeric:tabular-nums}
html[data-theme] body .lead-stage-item.is-zero{opacity:.55}
html[data-theme] body .lead-stage-item:first-child span{color:var(--ink)}
html[data-theme] body .lead-donut{flex:none;width:92px;height:92px;border-radius:50%;display:grid;place-items:center}
html[data-theme] body .lead-donut>span{width:62px;height:62px;border-radius:50%;background:var(--surface);display:grid;place-content:center;text-align:center;line-height:1}
html[data-theme] body .lead-donut b{font-size:20px;font-weight:800}
html[data-theme] body .lead-donut small{font-size:10.5px;color:var(--muted);margin-top:2px}
@media(max-width:767px){html[data-theme] body .lead-stage-card{gap:10px;padding:10px 12px}html[data-theme] body .lead-stage-legend{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 6px}
 html[data-theme] body .lead-stage-item{padding:4px 6px;font-size:12.5px;gap:6px}html[data-theme] body .lead-donut{width:80px;height:80px}html[data-theme] body .lead-donut>span{width:54px;height:54px}html[data-theme] body .lead-donut b{font-size:17px}}
@media(max-width:379px){html[data-theme] body .lead-stage-card{gap:8px;padding:10px}html[data-theme] body .lead-stage-item{padding:4px 4px;font-size:12px;gap:5px}html[data-theme] body .lead-donut{width:68px;height:68px}html[data-theme] body .lead-donut>span{width:46px;height:46px}html[data-theme] body .lead-donut b{font-size:15px}html[data-theme] body .lead-donut small{font-size:9.5px}}
/* Диаграмма стадий — общий компонент (лиды Cowork, лиды от МКК, виджет на главной) */
html[data-theme] body .lead-stage-note{grid-column:1/-1;margin:4px 8px 0;font-size:12px;color:var(--muted)}
html[data-theme] body .lead-stage-card.is-widget{border:0;padding:0;margin:0;box-shadow:none;background:none;gap:14px}
html[data-theme] body .lead-stage-card.is-widget .lead-stage-legend{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-theme] body .lead-stage-card.is-widget .lead-donut{width:116px;height:116px}
html[data-theme] body .lead-stage-card.is-widget .lead-donut>span{width:78px;height:78px}
html[data-theme] body .lead-stage-card.is-widget .lead-donut b{font-size:24px}
@media(max-width:767px){html[data-theme] body .lead-stage-card.is-widget .lead-donut{width:96px;height:96px}html[data-theme] body .lead-stage-card.is-widget .lead-donut>span{width:64px;height:64px}html[data-theme] body .lead-stage-card.is-widget .lead-donut b{font-size:19px}}
@media(max-width:767px){html[data-theme] body .lead-stage-card.is-widget{gap:10px}html[data-theme] body .lead-stage-card.is-widget .lead-donut{width:84px;height:84px}html[data-theme] body .lead-stage-card.is-widget .lead-donut>span{width:56px;height:56px}html[data-theme] body .lead-stage-card.is-widget .lead-donut b{font-size:17px}}
@media(max-width:379px){html[data-theme] body .lead-stage-card.is-widget .lead-donut{width:70px;height:70px}html[data-theme] body .lead-stage-card.is-widget .lead-donut>span{width:48px;height:48px}html[data-theme] body .lead-stage-card.is-widget .lead-donut b{font-size:15px}html[data-theme] body .lead-stage-card.is-widget .lead-stage-item{padding:4px 4px;font-size:12px;gap:5px}}

/* Скорость «как у приложения»: плавная смена страниц без белой вспышки (Safari 18.2+, Chrome 126+),
   шапка и меню не мигают, нажатие видно сразу */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.12s}
html[data-theme] body .topbar{view-transition-name:topbar}
html[data-theme] body #sidebar{view-transition-name:sidebar}
::view-transition-group(topbar),::view-transition-group(sidebar){animation:none}
html[data-theme] body :is(.button,button,.tile,a.mkk-row,.mkk-card,.lead-stage-item,.dash-tile a,.nav a,.sidebar a,.scope-switch a,.tabs a,.chip,.icon-button,.user-dialog-item,.pi-body,.tw-task){-webkit-tap-highlight-color:transparent}
html[data-theme] body :is(.button,button,.icon-button,.chip,.scope-switch a,.tabs a,.user-dialog-item):active{transform:scale(.97);transition:transform .06s}
html[data-theme] body :is(.tile,a.mkk-row,.mkk-card,.tw-task,.lead-stage-item,.pi-body):active{opacity:.75;transition:opacity .06s}
@media(prefers-reduced-motion:reduce){@view-transition{navigation:none}}
/* Материалы CSM: видео проигрывается на платформе, HTML-страница — живое превью (в «песочнице») */
html[data-theme] body .mat-video video{display:block;width:100%;max-height:70vh;border-radius:12px;background:#000}
html[data-theme] body .mat-html{position:relative;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;height:min(70vh,560px)}
html[data-theme] body .mat-html iframe{display:block;width:100%;height:100%;border:0;background:#fff}
html[data-theme] body .mat-thumb{position:relative;flex:none;width:96px;height:64px;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:#fff;pointer-events:none}
html[data-theme] body .mat-thumb video{width:100%;height:100%;object-fit:cover;background:#111;display:block}
html[data-theme] body .mat-thumb i{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-style:normal;font-size:18px;text-shadow:0 1px 4px rgba(0,0,0,.6)}
html[data-theme] body .mat-thumb.is-html iframe{width:400%;height:400%;border:0;transform:scale(.25);transform-origin:0 0;background:#fff}
@media(max-width:767px){html[data-theme] body .mat-thumb{width:80px;height:56px}}
/* HTML-материал в карточке — превью 16:9 как у видео: страница целиком в «компьютерной» ширине, уменьшенная втрое */
html[data-theme] body .mat-files .mat-html{height:auto;aspect-ratio:16/9;background:#000;border:0;border-radius:12px}
html[data-theme] body .mat-files .mat-html iframe{width:300%;height:300%;transform:scale(calc(1/3));transform-origin:0 0}
html[data-theme] body .mat-files .mat-video video{aspect-ratio:16/9;object-fit:contain;max-height:none}
/* Превью PDF: первая страница (pdf.js) — в карточке 16:9 как у видео и HTML, в списке маленькой картинкой */
html[data-theme] body .mat-pdf{position:relative;display:grid;place-items:center;aspect-ratio:16/9;border-radius:12px;background:var(--soft);border:1px solid var(--line);overflow:hidden}
html[data-theme] body .mat-pdf canvas,html[data-theme] body .mat-thumb.is-pdf canvas{max-width:100%;max-height:100%;width:auto;height:auto;background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.12);opacity:0;transition:opacity .2s}
html[data-theme] body .mat-pdf canvas.is-ready,html[data-theme] body .mat-thumb.is-pdf canvas.is-ready{opacity:1}
html[data-theme] body .mat-pdf[data-pages]::after{content:attr(data-pages);position:absolute;right:8px;bottom:8px;padding:2px 8px;border-radius:999px;background:rgba(0,0,0,.6);color:#fff;font-size:11.5px;font-weight:700}
html[data-theme] body .mat-pdf.is-failed::before,html[data-theme] body .mat-thumb.is-pdf.is-failed::before{content:"PDF";font-weight:800;color:#4849c9}
html[data-theme] body .mat-thumb.is-pdf{display:grid;place-items:center;background:var(--soft)}
/* HTML-материал: превью — это ссылка; касание открывает страницу в браузере телефона (в приложении «на экране Домой» — тоже) */
html[data-theme] body a.mat-html{display:block;position:relative;text-decoration:none}
html[data-theme] body a.mat-html iframe{pointer-events:none}
html[data-theme] body .mat-open-hint{position:absolute;right:8px;bottom:8px;padding:3px 10px;border-radius:999px;background:rgba(0,0,0,.6);color:#fff;font-size:12px;font-weight:700}
/* Главная руководителя на телефоне: вместо трёх кнопок — бледный «+» справа от приветствия, меню «Создать» */
html[data-theme] body .dash-plus{display:none}
@media(max-width:767px){
 html[data-theme] body .dashboard-heading.has-plus{position:relative}
 html[data-theme] body .dashboard-heading.has-plus>.dashboard-quick-actions{display:none!important}
 html[data-theme] body .dashboard-heading.has-plus .dash-greeting{padding-right:44px}
 html[data-theme] body .dash-plus{display:block;position:absolute;right:-6px;top:var(--plus-top,18px);z-index:5}
 html[data-theme] body .dash-plus>summary{list-style:none;display:grid;place-items:center;width:44px;height:44px;border:0;background:none;color:var(--muted);opacity:.7;font-size:34px;font-weight:300;line-height:1;cursor:pointer}
 html[data-theme] body .dash-plus>summary::-webkit-details-marker{display:none}
 html[data-theme] body .dash-plus[open]>summary{opacity:1;color:var(--primary)}
 html[data-theme] body .dash-plus .proto-more-menu{min-width:200px}
}
html[data-theme] body .mat-pdf canvas{position:absolute;inset:0;margin:auto;max-width:100%;max-height:100%}
html[data-theme] body .mat-thumb.is-html::after{content:"HTML";position:absolute;left:4px;bottom:4px;padding:1px 6px;border-radius:6px;background:rgba(0,0,0,.55);color:#fff;font-size:10px;font-weight:800;letter-spacing:.03em}
html[data-theme] body .mat-thumb.is-pdf::after{content:"PDF";position:absolute;left:4px;bottom:4px;padding:1px 6px;border-radius:6px;background:rgba(0,0,0,.55);color:#fff;font-size:10px;font-weight:800;letter-spacing:.03em}
/* Черновики встреч (16.10): блок над фильтром в «Встречах», плитки со свайпом «Удалить» */
html[data-theme] body .draft-block{margin:0 0 14px}
html[data-theme] body .draft-head{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:15px;font-weight:700}
html[data-theme] body .draft-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:var(--soft);color:var(--muted);font-size:12px;font-weight:700}
html[data-theme] body .draft-list{display:grid;gap:8px}
@media(min-width:768px){html[data-theme] body .draft-list{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}}
html[data-theme] body .draft-list .tile p{margin:4px 0 0;color:var(--muted);font-size:13px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html[data-theme] body .draft-flash .text-link{background:none;border:0;padding:0;font:inherit;font-weight:650;color:var(--primary);cursor:pointer}
html[data-theme] body .form-footer [data-draft-status].is-live{display:block!important;flex-basis:100%;order:-1;margin:0 0 4px;color:var(--text);font-size:13px;font-weight:600;text-align:left}
html[data-theme] body .draft-list .tile{padding:10px 12px}
html[data-theme] body .draft-list .tile-top h3{font-size:15px}
html[data-theme] body .draft-list .tile-meta{font-size:12px;gap:4px 10px}
html[data-theme] body .draft-list .tile p{-webkit-line-clamp:1;font-size:12.5px;margin-top:2px}
