/* Визуальная чистка (аудит 28.09.2026): мелкие несоответствия по всем разделам.
   Подключается последним, поэтому перекрывает общие стили кнопок, полей и чипов
   там, где они протекали в элементы, которым не предназначались. */

/* ---------- Боковое меню: «Закреплено» и «Недавнее» ---------- */
.today-side .pusk-side-marks a {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.today-side .pusk-side-marks b {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* метка «дело / клиент / договор» — тихая подпись, не бейдж-счётчик */
.today-side .pusk-side-marks em.kind {
  flex: none;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--text-tertiary, #8a8580) !important;
  font-size: 11px !important;
  font-style: normal;
  font-weight: 400 !important;
}
.today-side .pusk-side-clear {
  margin: 2px 0 0;
  padding: 0 10px;
  text-align: right;
}
.today-side .pusk-side-clear button {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--text-tertiary, #8a8580) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}
.today-side .pusk-side-clear button:hover {
  color: var(--text-accent, #1f7a70) !important;
  text-decoration: underline;
}

/* ---------- Телефон: список .ios ровно по ширине экрана ---------- */
@media (max-width: 760px) {
  /* ios.css рассчитан на поле 16px, а у main.with-side оно 14px, у pusk-main — 0:
     блок уезжал влево и оставлял пустую полосу справа */
  main.with-side > .ios {
    width: auto !important;
    max-width: none !important;
    margin: 0 -14px !important;
    align-self: stretch !important;
  }
  main.pusk-main .ios,
  .pusk-main-pane .ios {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
}

/* ---------- Телефон, «Сегодня»: нижняя панель разделов ---------- */
@media (max-width: 860px) {
  body.pusk-mobile-today.pusk-today-page > nav.tabbar { display: flex !important; }
  body.pusk-mobile-today main.pusk-main { padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
}

/* ---------- Узкое окно (≤768px) без мобильной вёрстки: меню выезжает ---------- */
/* pusk-shell.css держит меню в сетке (sticky !important), и оно отнимало ширину у
   контента — колонка сжималась до 130px, слова рвались по буквам */
@media (max-width: 768px) {
  body.pusk-today-shell .today-side {
    position: fixed !important;
    left: 0 !important;
    width: min(280px, 88vw) !important;
    max-width: 280px !important;
    height: 100vh;
  }
  body.pusk-today-shell .today-desktop {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* ---------- Кнопка и поле в одной строке — одной высоты ---------- */
/* В разделах на pusk-system поле 36px (min-height, height:auto), а кнопка
   оставалась 38px из style.css — торчала над полями на 2px */
body.pusk-system.pusk-generic .pusk-generic-pane
  :is(button, a.button, input[type=submit], input[type=button]):not(.mini):not(.del):not(.link-btn):not(.row-plus):not(.calm-add):not(.tickbox) {
  height: auto;
}

/* ---------- Фильтр в шапке колонки: подсказка «фильтр» не обрезается ---------- */
input.tfilter-box {
  height: 26px !important;
  min-height: 0 !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  line-height: 20px !important;
}

/* ---------- Свёрнутый <details>: заголовок по центру, без лишнего отступа снизу ---------- */
details:not([open]) > summary {
  margin-bottom: 0 !important;
}

/* ---------- Чип-ссылка со своим значком («↓ Выгрузить») без второй точки ---------- */
a.tag::before {
  display: none !important;
}

/* ---------- Кнопка сворачивания разделов нужна только на телефоне ---------- */
@media (min-width: 951px) {
  .sec-toggle { display: none !important; }
}

/* ---------- Значки-кнопки в сетках и строках: без плашки кнопки ---------- */
/* «+» в дне календаря и в строках таблиц получали height 38 / тень из общего стиля */
button.calm-add {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 3px !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}
button.row-plus {
  display: inline-grid !important;
  place-items: center;
  width: 22px !important;
  height: 22px !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  vertical-align: middle;
}

/* ---------- Чекбоксы — фирменного цвета, а не системного синего ---------- */
input[type=checkbox], input[type=radio] {
  accent-color: var(--bg-accent, #1f7a70);
}

/* ---------- «Сегодня»: строка задачи ---------- */
/* дата стояла на 4px выше названия и значков ★ ⋯ ✕: у неё свой line-height 15px,
   у названия — 18px с отступом 2px */
.feed.tasks li.trow .thead > .due {
  margin-top: 2px;
  line-height: 18.2px;
}
/* ★ ⋯ ✕ — одинаковые квадраты 22px, значок по центру; дата отделена от них
   тем же шагом, что и значки между собой */
.feed.tasks li.trow .trow-acts {
  gap: 4px;
  margin-left: 4px;
}
.feed.tasks li.trow .trow-acts form {
  display: flex;
  margin: 0;
}
.feed.tasks li.trow .trow-acts :is(button.favorite, button.more, button.del, button.read) {
  display: inline-grid !important;
  place-items: center;
  width: 22px !important;
  height: 22px !important;
  min-height: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.feed.tasks li.trow .trow-acts button.favorite { font-size: 15px !important; }
.feed.tasks li.trow .trow-acts button.more { font-size: 20px !important; font-weight: 700 !important; letter-spacing: -1px; }
.feed.tasks li.trow .trow-acts button.del { font-size: 13px !important; }
/* галочка «выполнено» — квадрат и у закреплённых задач (там растягивалась до 20×38) */
.feed.tasks li.trow form.tick {
  align-self: start;
}
.feed.tasks li.trow .tickbox {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  margin-top: 0 !important;
}
/* подпись у «Закреплённых» не обрезается многоточием */
.today-pinned-head small {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 12px !important;
}

/* ---------- «Сегодня»: расписание дня ---------- */
/* подпись часа — на одной линии с «Свободно» */
.pusk-slot time { padding-top: 3px !important; }
/* метка текущего времени — ровно по красной линии и с обводкой, когда ложится на подпись часа */
.pusk-now-line em {
  top: -9px !important;
  line-height: 14px !important;
  box-shadow: 0 0 0 3px var(--bg-surface, #fff);
}

/* ---------- Значки участия (идём / отслеживаем / в архив) — компактнее ---------- */
.pusk-attend { gap: 2px !important; }
.pusk-attend .pusk-attend-btn {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  padding: 0 !important;
  border-radius: 5px !important;
}
.pusk-attend .pusk-attend-btn svg {
  width: 12px !important;
  height: 12px !important;
}

/* ---------- «Не идём» — название заседания зачёркнуто во всех календарях ---------- */
.pusk-ws-event.is-skipped .pusk-ws-event-title,
.pusk-schedule-card.is-skipped .pusk-schedule-title,
.pusk-ahead-event.is-skipped .pusk-ahead-event-title,
.pusk-mob-event.is-skipped :is(b, strong, .pusk-mob-event-title),
.calm-ev.skipped .calm-ttl,
.cals-ev.skipped .cals-ttl {
  text-decoration: line-through !important;
  text-decoration-thickness: 1.5px !important;
  text-decoration-color: currentColor !important;
}

/* ---------- Телефон: карточка дела в одну колонку ---------- */
@media (max-width: 760px) {
  body.pusk-today-shell .pusk-case-hearing-hero,
  body.pusk-today-shell .pusk-case-overview-layout,
  body.pusk-today-shell .pusk-case-top-row,
  body.pusk-today-shell .pusk-case-overview-mini {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.pusk-today-shell .pusk-case-tab {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  body.pusk-today-shell .pusk-case-dossier-actions {
    flex-wrap: wrap;
  }
}

/* ---------- Боковое меню: полоса прокрутки не отнимает ширину у пунктов ---------- */
/* с блоком «Недавнее» меню выше экрана, системная полоса 16px обрезала
   «Суды, дела и банкротство» до многоточия; прокрутка колёсиком остаётся */
.today-side {
  scrollbar-width: none;
}
.today-side::-webkit-scrollbar {
  display: none;
}

/* ---------- Строка формы ---------- */
/* «ОК» рядом с полем в строке формы — той же высоты, что поле */
form.inline > button.ghost:not(.mini),
td form > button.ghost:not(.mini) {
  min-height: 36px !important;
}

/* ---------- «Документы» на ноутбуке: строка в две колонки ---------- */
/* style.css переключает строку при окне ≤1000px, не учитывая меню и левую
   колонку фильтров — на 1024–1280 название сжималось до 45px, по слову в строке */
@media (max-width: 1280px) {
  .doc-row { grid-template-columns: 80px minmax(0, 1fr) !important; }
  .doc-amount, .doc-state { text-align: left !important; grid-column: 2; }
}

/* ---------- Узкое окно: подсказка в поиске обрезается многоточием, а не по букве ---------- */
.today-global-search input { text-overflow: ellipsis; }

/* ---------- «Распечатать» и «Создать задачу» в шапке задач — одной высоты ---------- */
.pusk-planner-head-actions { align-items: center; }
.pusk-planner-head-actions > :is(a, button) { height: 36px !important; min-height: 36px !important; }
