/* Estimator - эстимейты и инвойсы (view/user/estimator/*).

   Отдельный файл по той же причине, что jobs.css и остальные: style.css
   собирается из LESS-проекта, правки в нём затрутся при сборке.
   Классы свои (est-*), не .form / .input / .input-form__field: на те
   цепляются общие скрипты форм сайта (form-validator.js, float-labels.js).
   Акцент и рамки - как у карточек «Работы» и событий. */

.est__wrapper {
  max-width: 1124px;
  margin: 0 auto;
  padding: 0 48px 60px;
}

.est__subtitle {
  margin: 0 0 20px;
  color: #6b6d70;
  font-size: 15px;
}

/* ------------------------------ сообщения ------------------------------ */

.est-message {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f3f9fc;
  color: #1c1c1c;
  font-size: 15px;
  line-height: 22px;
}

/* всплывающее сообщение после действия (web 2.59.9) - вверху экрана поверх страницы */
.est-toast {
  position: fixed;
  top: 28px;
  left: 50%;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: max-content;
  /* короткое «Saved» было узкой плашкой (просьба автора, web 2.170.79): не уже 340px, на телефоне - во всю ширину
     с полями; текст слева, ✕ справа */
  min-width: min(340px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  justify-content: space-between;
  padding: 13px 10px 13px 20px;
  border-left: 6px solid #3ebde6;   /* как .alert-info сайта (style.css) */
  border-radius: 12px;
  background: rgba(72, 75, 78, 0.95);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
  color: #fff;
  font-size: 16px;
  line-height: 26px;
  opacity: 0;
  transform: translate(-50%, -16px);
  transition: opacity 0.25s, transform 0.25s;
}

.est-toast--on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.est-toast__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.est-toast__close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* «Отменить» после удаления записи (web 2.172.0): текст слева, кнопка и ✕ справа */
.est-toast__text {
  flex: 1 1 auto;
  min-width: 0;
}

.est-toast__action {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6fd0f0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.est-toast__action:hover,
.est-toast__action:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.est-toast__action:disabled {
  opacity: 0.5;
  cursor: default;
}

.est-message[hidden] {
  display: none;
}

.est-message--warn {
  background: #fff3d6;
}

.est-message--error {
  padding-left: 32px;
  background: #fdecec;
  color: #a12a2a;
}

.est-empty {
  margin: 24px 0;
  color: #6b6d70;
}

.est-hint {
  margin: 8px 0 0;
  color: #8a8f94;
  font-size: 13px;
  line-height: 18px;
}

/* ------------------------------ кнопки ------------------------------ */

.est-btn {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid rgba(174, 174, 174, 0.6);
  border-radius: 999px;
  background: #fff;
  color: #1c1c1c;
  font: inherit;
  font-size: 15px;
  line-height: 22px;
  text-decoration: none;
  cursor: pointer;
}

.est-btn:hover {
  border-color: #3ebde6;
  color: #3ebde6;
}

.est-btn--primary {
  border-color: #3ebde6;
  background: #3ebde6;
  color: #fff;
}

.est-btn--primary:hover {
  background: #1f8db3;
  border-color: #1f8db3;
  color: #fff;
}

.est-btn--ghost {
  border-color: transparent;
}

/* «Отмена» в формах (клиент, документ, формы добавления в работе и балансе) - красная рамка, просьба автора 2026-10-29 */
.est-btn--cancel {
  border-color: #d14343;
}

.est-btn--cancel:hover {
  border-color: #d14343;
  background: #fdf1f1;
}

/* неактивная - «Сохранить», пока в форме ничего не поменяли (data-est-dirty, web 2.81.0) */
.est-btn:disabled,
.est-btn:disabled:hover {
  opacity: 0.45;
  cursor: default;
}

.est-btn:not(.est-btn--primary):disabled:hover {
  border-color: rgba(174, 174, 174, 0.6);
  color: #1c1c1c;
}

.est-btn--primary:disabled:hover {
  background: #3ebde6;
  border-color: #3ebde6;
}

/* зелёная - добавить в свёрнутой форме (data-est-addform, web 2.82.0; без галочки - web 2.82.3, просьба автора) */
.est-btn--ok {
  border-color: #1f9d55;
  background: #1f9d55;
  color: #fff;
  font-weight: 600;
  transition: background-color 0.15s, opacity 0.15s;
}

.est-btn--ok:hover {
  border-color: #1a8549;
  background: #1a8549;
  color: #fff;
}

.est-btn--ok:disabled,
.est-btn--ok:disabled:hover {
  border-color: #1f9d55;
  background: #1f9d55;
  color: #fff;
  opacity: 0.35;
}

/* ------------------------------ свёрнутая форма «Добавить …» ------------------------------ */

.est-addform__toggle {
  margin-top: 4px;
}

/* отступы у кнопок (web 2.84.1, просьба автора: кнопки прижаты к линиям и соседям) -
   свёрнутая форма после текста / списка, список после формы, кнопка после подсказки */
:is(.est-hint, .est-empty, .est-list, p) + .est-addform {
  margin-top: 12px;
}

.est-addform + :is(.est-paid__list, .est-list, ul) {
  margin-top: 16px;
}

:is(.est-card, form) > .est-hint + .est-btn {
  margin-top: 8px;
}

.est-addform--open .est-addform__toggle,
.est-addform__toggle[hidden] {
  display: none;
}

/* в ряду кнопок (data-toggle-into) - без своего отступа сверху */
.est-actions .est-addform__toggle {
  margin-top: 0;
}

/* выезд вниз: высота 0fr -> 1fr анимируется без JS-замеров */
.est-addform__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.est-addform--open .est-addform__body,
.est-addform__body--open {
  grid-template-rows: 1fr;
}

.est-addform__inner {
  min-height: 0;
  overflow: hidden;
  /* рамка фокуса у полей не обрезается */
  margin: -4px;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.est-addform--open .est-addform__inner,
.est-addform__body--open > .est-addform__inner {
  opacity: 1;
}

.est-addform__cancel {
  margin-left: 4px;
}

/* работа из инвойса (web 2.83.0): метка в работе и в списке работ, строки «Из инвойса» в депозитах */
.est-from-invoice {
  margin: 0 0 16px;
}

/* «Создана 11/17/2026» под «← Работы» (web 2.173.1, просьба автора): ближе к ссылке, чем к блоку ниже */
.est-job-created {
  margin: -12px 0 16px;
  color: #8a8f94;
  font-size: 13px;
  line-height: 18px;
}

.est-from-invoice__link,
.est-from-invoice__mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  background: #e2f7e9;
  color: #1c7a43;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
  vertical-align: middle;
}

.est-from-invoice__mark {
  margin-left: 8px;
  padding: 1px 8px 1px 2px;
  font-size: 12px;
}

.est-from-invoice__link .est-doc-icon,
.est-from-invoice__mark .est-doc-icon {
  width: 18px;
  height: 18px;
}

.est-from-invoice__mark .est-doc-icon {
  width: 16px;
  height: 16px;
}

.est-from-invoice__tag {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2f7e9;
  color: #1c7a43;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.est-paid__list--from-invoice {
  margin-bottom: 6px;
  background: #f7fcf9;
}

/* способ оплаты не сжимается в «Налич…» - метка переносится на строку ниже */
.est-paid__list--from-invoice .est-paid__item .est-hint-inline {
  flex: 1 1 64px;
}

.est-paid__from-invoice-hint {
  margin: 0 0 16px;
  font-size: 13px;
}

.est-list__money {
  color: #6b6f75;
  font-size: 13px;
}

/* отчёт фирмы (web 2.84.0): выбор периода над отчётом, ссылка в балансе */
.est-report-period {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 8px;
}

.est-report-period .est-field {
  margin: 0;
}

.est-report-period__dates[hidden] {
  display: none;
}

.est-actions.est-bizbalance__report {
  margin: 16px 0 24px;
}

/* окно «Инвойс оплачен — что сделать с деньгами?» (web 2.83.1): варианты карточками с пояснением */
.est-paid-choice .est-dialog__form {
  max-width: 480px;
}

.est-paid-choice__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(174, 174, 174, 0.6);
  border-radius: 12px;
  cursor: pointer;
}

.est-paid-choice__item:has(input:checked) {
  border-color: #3ebde6;
  background: #eef9fd;
}

.est-paid-choice__item input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.est-paid-choice__item b {
  display: block;
  margin-bottom: 2px;
}

.est-paid-choice__item .est-hint {
  display: block;
  margin: 0;
  font-size: 13px;
  line-height: 18px;
}

/* неверный американский телефон - подсказка под полем (web 2.82.10); не ошибка, отправить можно */
.est-phone-warn {
  margin: 6px 0 0;
  color: #b25e09;
  font-size: 13px;
  line-height: 18px;
}

.est-phone-warn[hidden] {
  display: none;
}

.est-input.est-input--warn {
  border-color: #e0a04a;
}

/* ------------------------------ «Подробно» - лишние поля под кнопкой (<details>, web 2.82.4) ------------------------------ */

.est-details {
  margin-top: 4px;
}

.est-details__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  user-select: none;
}

.est-details__toggle::-webkit-details-marker {
  display: none;
}

/* стрелка вниз, открыто - вверх */
.est-details__toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin 0.2s ease;
}

.est-details[open] > .est-details__toggle::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.est-details__body {
  padding-top: 12px;
}
.est-details[open] > .est-details__body {
  animation: est-details-in 0.25s ease;
}

@keyframes est-details-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .est-addform__body,
  .est-addform__inner {
    transition: none;
  }

  .est-details[open] > .est-details__body {
    animation: none;
  }
}

/* «опасные» кнопки - удалить, отозвать, убрать, передать, покинуть: красная рамка и текст сразу, при наведении - красная
   заливка (web 2.36.0 - «Удалить», web 2.37.0 - все, просьба автора). .est-btn--delete - то же, оставлен для разметки 2.36.0 */
.est-btn--danger,
.est-btn--delete {
  border-color: #d14343;
  color: #d14343;
}

.est-btn--danger:hover,
.est-btn--delete:hover {
  background: #d14343;
  border-color: #d14343;
  color: #fff;
}

.est-icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(174, 174, 174, 0.6);
  border-radius: 50%;
  background: #fff;
  color: #6b6d70;
  font-size: 15px;
  line-height: 30px;
  cursor: pointer;
}

.est-icon-btn:hover {
  border-color: #3ebde6;
  color: #3ebde6;
}

/* ✕ убрать - тоже красный сразу (web 2.37.0), при наведении - заливка */
.est-icon-btn--danger {
  border-color: #d14343;
  color: #d14343;
}

.est-icon-btn--danger:hover {
  background: #d14343;
  border-color: #d14343;
  color: #fff;
}

/* web 2.41.0 (просьба автора): вместо ✕ - иконка корзины. Значок ✕ в разметке остаётся (без CSS, для aria - aria-label),
   здесь он скрыт, корзина рисуется маской цвета текста - красная, при наведении белая */
.est-icon-btn--danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0;
}

.est-icon-btn--danger::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ссылки в тексте раздела (подсказки, «Открыть работу →», «Балансе фирмы» и т.п.) - как на сайте (.text-link):
   голубые без подчёркивания, при наведении темнее. Кнопки и плитки (у них свой класс) не трогаем. web 2.35.0 */
.est a:not([class]),
.est a.est-hint-inline {
  color: #3ebde6;
  text-decoration: none;
}

.est a:not([class]):hover,
.est a.est-hint-inline:hover {
  color: #1f8db3;
}

.est a:not([class]):focus-visible,
.est a.est-hint-inline:focus-visible {
  outline: 2px solid rgba(62, 189, 230, 0.4);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ------------------------------ поля ------------------------------ */

.est-input {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(174, 174, 174, 0.8);
  border-radius: 6px;
  background: #fff;
  color: #1c1c1c;
  font: inherit;
  font-size: 15px;
  line-height: 22px;
}

.est-input:focus {
  outline: none;
  border-color: #3ebde6;
  box-shadow: 0 0 0 2px rgba(62, 189, 230, 0.2);
}

textarea.est-input {
  resize: vertical;
}

/* однострочные поля и выпадающие списки - одной высоты (web 2.56.3): iOS Safari рисует select ниже input */
input.est-input,
select.est-input {
  height: 40px;
}

/* дата / время в iOS Safari: своя мин. ширина (вылезает из колонки), своя высота и текст по центру -
   делаем как обычное поле (40px = 22 строка + 2×8 отступ + 2 рамка) */
input[type="date"].est-input,
input[type="time"].est-input,
input[type="datetime-local"].est-input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  min-width: 0;
  max-width: 100%;
  height: 40px;
  text-align: left;
}

input.est-input::-webkit-date-and-time-value {
  margin: 0;
  text-align: left;
}

.est-input--color {
  height: 40px;
  padding: 3px;
}

.est-label {
  display: block;
  margin: 0 0 4px;
  color: #6b6d70;
  font-size: 13px;
  line-height: 18px;
}

.est-field {
  margin: 0 0 12px;
}

.est-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
}

.est-row > .est-field {
  flex: 1 1 120px;
  min-width: 0;   /* иначе поле даты в iOS растягивает колонку */
}

/* два поля всегда в одну строку, и на телефоне («с» / «до» события, web 2.95.11) */
.est-row--pair {
  flex-wrap: nowrap;
}

.est-row > .est-field--color {
  flex: 0 0 70px;
}

.est-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  cursor: pointer;
}

/* «Запомнить клиента» под «Подробно» - не впритык к кнопке (web 2.90.2, просьба автора) */
.est-details + .est-check {
  margin-top: 16px;
}

.est-check[hidden],
.est-field[hidden] {
  display: none;
}

/* налог: галочка на месте подписи поля, выключен - нет ставки, галочек у позиций и строки в итоге */
.est-tax-toggle {
  height: 18px;   /* как у обычной подписи - поля «Скидка» и «Налог» на одной линии (web 2.56.1) */
  margin: 0 0 4px;
  gap: 8px;
  color: #6b6d70;
  font-size: 13px;
  line-height: 18px;
}

/* подсказка, после которой идёт следующее поле (депозит, итог) - с отступом снизу (web 2.56.2) */
.est-hint--gap {
  margin-bottom: 16px;
}

/* черновик на сервере (web 2.57.0) */
.est-autosave {
  align-self: center;
  color: #8a8f94;
  font-size: 13px;
}

.est-autosave--offline,
.est-autosave--failed,
.est-autosave--stale,
.est-autosave--session {
  color: #d14343;
}

.est-autosave-found {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.est-autosave-found__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.est-autosave-found__actions form {
  margin: 0;
}

/* «Создать ссылку» - не вплотную к подсказке */
.est-send__create {
  margin: 16px 0 0;
}

.est-editor--nodeposit [data-est-deposit-only],
.est-editor:not(.est-editor--nodeposit) [data-est-deposit-hint],
.est-editor--notax [data-est-tax-field],
.est-editor--notax [data-est-tax-row],
.est-editor--notax .est-line__taxable {
  display: none;
}

/* ------------------------------ список ------------------------------ */

.est-new {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.est-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
}

.est-filters__select {
  width: auto;
}

.est-filters__q {
  flex: 1 1 200px;
  width: auto;
}

.est-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(174, 174, 174, 0.5);
  border-radius: 12px;
  background: #fff;
}

.est-list__item + .est-list__item {
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

/* web 2.63.1 (просьба автора): работы - каждая своим блоком с промежутком, как клиенты (.est-clients) */
.est-list--cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: none;
}

.est-list--cards .est-list__item,
.est-list--cards .est-list__item + .est-list__item {
  overflow: hidden;
  border: 1px solid rgba(174, 174, 174, 0.5);
  border-radius: 12px;
  background: #fff;
}

/* документы на ПК - в два столбца (web 2.90.7, просьба автора), на узких - одним */
@media (min-width: 901px) {
  .est-list--docs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* web 2.63.2: работники - карточками .est-clients; в сетке рядом с формой - без отступа сверху */
.est-workers__list .est-clients {
  margin-top: 0;
}

.est-list__link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: inherit;
  text-decoration: none;
}

.est-list__link:hover {
  background: #f6fbfd;
}

.est-list__link .est-list__main {
  flex: 1 1 auto;
}

/* документ в списке: вся карточка - редактор (ссылка растянута ::after), перед суммой - иконка «Предпросмотр»
   (лист с «A», строками и картинкой, как в приложении) поверх неё (web 2.90.6, просьба автора; до 2.90.5 - наоборот) */
.est-list__item--doc {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}

.est-list__item--doc:hover {
  background: #f6fbfd;
}

.est-list__item--doc .est-list__link {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
}

.est-list__item--doc .est-list__link:hover {
  background: none;
}

/* сумма / статус / дата - не уже 100px, чтобы иконка «Предпросмотр» стояла в карточках на одной линии (web 2.90.7) */
.est-list__item--doc .est-list__side {
  min-width: 100px;
}

.est-list__item--doc .est-list__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.est-list .est-list__preview {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f8db3;
  font-size: 0;
  text-decoration: none;
}

.est-list .est-list__preview::before {
  content: "";
  width: 28px;
  height: 28px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2.5'/%3E%3Cpath d='M7 10l2-5 2 5M7.8 8.2h2.4M13.5 5.5h3.5M13.5 8.5h3.5'/%3E%3Crect x='7' y='12' width='10' height='7' rx='1'/%3E%3Cpath d='M7.5 18.5l3-3 2 2 1.5-1.5 2.5 2.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2.5'/%3E%3Cpath d='M7 10l2-5 2 5M7.8 8.2h2.4M13.5 5.5h3.5M13.5 8.5h3.5'/%3E%3Crect x='7' y='12' width='10' height='7' rx='1'/%3E%3Cpath d='M7.5 18.5l3-3 2 2 1.5-1.5 2.5 2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-list .est-list__preview:hover,
.est-list .est-list__preview:focus-visible {
  background: rgba(62, 189, 230, 0.12);
}

/* иконка типа документа (web 1.99.0) - с web 2.82.6 те же цветные SVG, что у плиток на главной (docIcon):
   подложка с градиентом внутри файла */
.est-doc-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.est-doc-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* в карточке списка - по центру высоты (web 2.82.7, просьба автора) */
.est-doc-icon--big {
  align-self: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(30, 50, 90, 0.12);
}

/* подписан клиентом (web 2.119.0, просьба автора) - зелёная галочка в правом верхнем углу иконки */
.est-doc-icon--big {
  position: relative;
}

.est-doc-icon__signed {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2e9e57;
  box-sizing: border-box;
}

.est-new__doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.est-new__doc--invoice {
  border-color: #6d55c7;
  background: #6d55c7;
}

.est-new__doc--invoice:hover,
.est-new__doc--invoice:focus-visible {
  border-color: #5b45b0;
  background: #5b45b0;
}

.est-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.est-tabs__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(174, 174, 174, 0.6);
  border-radius: 20px;
  background: #fff;
  color: #1c1c1c;
  font-size: 14px;
  text-decoration: none;
}

.est-tabs__item:hover {
  border-color: #3ebde6;
}

.est-tabs__item--on {
  border-color: #3ebde6;
  background: #e9f7fc;
  font-weight: 600;
}

.est-list__main,
.est-list__side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.est-list__side {
  align-items: flex-end;
  flex-shrink: 0;
}

.est-list__number {
  font-weight: 700;
}

.est-list__client {
  overflow: hidden;
  color: #6b6d70;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* документ в списке (web 2.56.5): тип отдельной строкой над номером, дата под статусом */
.est-list__main > .est-type {
  align-self: flex-start;
  margin-right: 0;
}

.est-list__date {
  color: #8a8f94;
  font-size: 13px;
}

.est-list__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a8f94;
  font-size: 13px;
}

.est-type {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #e9f7fc;
  color: #1f8db3;
  font-size: 12px;
  font-weight: 600;
  vertical-align: 1px;
}

.est-type--invoice {
  background: #efeaff;
  color: #5b45b0;
}

.est-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  background: #f0f0f1;
  color: #50575e;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  vertical-align: middle;
}

.est-status--sent { background: #e9f7fc; color: #1f8db3; }
.est-status--accepted,
.est-status--paid { background: #e6f6ea; color: #2e9e5b; }
.est-status--declined,
.est-status--void { background: #fdecec; color: #a12a2a; }

/* статусы работ (web 1.93.0) */
.est-status--job-active { background: #e9f7fc; color: #1f8db3; }
.est-status--job-done { background: #fff3d6; color: #8a5a00; }
.est-status--job-paid { background: #e6f6ea; color: #2e9e5b; }
.est-status--job-cancelled { background: #fdecec; color: #a12a2a; }
/* в архиве (web 2.110.0) */
.est-status--archived { background: #eceef1; color: #4d5562; }
.est-status--job-closed { background: #ececec; color: #4a4c4f; }

/* выплаты работникам (web 2.25.0) */
.est-payouts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.est-payouts__item {
  padding: 12px 0;
  border-top: 1px solid #e6e7e8;
}

.est-payouts__item:first-child {
  border-top: 0;
}

.est-payouts__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.est-payouts__row form {
  margin-left: auto;
}

/* «причитается / выплачено» - всегда под именем, а не сбоку, когда коротко (web 2.170.83, просьба автора) */
.est-payouts__row > .est-hint-inline {
  flex: 1 0 100%;
}

/* выплаты человека - отступ от строки с кнопкой (web 2.40.0: кнопка прилипала к списку) */
.est-payouts__item .est-paid__list {
  margin: 12px 0 0;
}

/* «Записать выплату» заполнили кнопкой «Выплатить» - подсветка на секунду */
.est-payouts__add--filled {
  animation: est-flash 1.2s ease-out;
}

@keyframes est-flash {
  from { background: rgba(62, 189, 230, 0.18); }
  to { background: transparent; }
}

/* «✓ выплачено» и «выплачено вперёд» - слева под строками «причитается / выплачено», зелёным - как в
   приложении (web 2.170.84, просьба автора; «вперёд» было красным справа) */
.est-payouts__done,
.est-payouts__over {
  color: #2e9e5b;
}

.est-close-job {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.est-close-job .est-hint {
  margin: 0;
}
.head__title .est-status { margin-left: 8px; font-size: 14px; vertical-align: middle; }

/* статус работы / документа - отдельной строкой под голубой линией заголовка (web 2.113.1);
   .head__wrapper (style.css) - flex в ряд, поэтому переносим и строку статуса растягиваем на всю ширину */
.head__wrapper:has(> .est-head-status) {
  flex-wrap: wrap;
}

.est-head-status {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.est-head-status .est-status {
  font-size: 14px;
}

.est-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 0;
}

/* ------------------------------ редактор ------------------------------ */

.est-editor__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.est-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.est-card {
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid rgba(174, 174, 174, 0.5);
  border-radius: 12px;
  background: #fff;
}

.est-grid > .est-card {
  margin-bottom: 0;
}

.est-grid + .est-card,
.est-card + .est-grid {
  margin-top: 20px;
}

.est-card__title {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 26px;
}

.est-card__title--sub {
  margin-top: 20px;
}

/* CSV для бухгалтерии (web 2.122.0): кнопки на странице отчёта, ссылка над списком документов */
.est-card.est-csv {
  margin-top: 20px;   /* не впритык к кнопкам PDF / печать (web 2.123.1) */
}

.est-csv__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.est-csv-list {
  margin: 0 0 12px;
  text-align: right;
  font-size: 14px;
}

/* тариф в настройках (web 2.124.0) */
.est-card.est-plan {
  padding: 16px 20px;
  font-size: 15px;
}

.est-plan__name {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 12px;
  border-radius: 999px;
  background: #e8f6fb;
  color: #1f8db3;
}

.est-plan__name--pro {
  background: #fff3d6;
  color: #9a6a00;
}

.est-plan__name--free {
  background: #f0f0f0;
  color: #555;
}

/* выплаты зарплаты на странице работника (web 2.128.0) */
.est-worker-form [data-est-pay-for="salary"] {
  flex-wrap: wrap;
}

.est-worker-form [data-est-pay-for="salary"] .est-hint {
  flex-basis: 100%;
  margin: 0 0 16px;
}

.est-salary-list {
  margin: 0 0 20px;
  padding: 6px 20px;
  list-style: none;
}

.est-salary-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.est-salary-list__item:last-child {
  border-bottom: 0;
}

.est-salary-list__item span {
  flex: 1;
}

/* метка тарифа у закрытого (web 2.126.0) */
.est-plan-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff3d6;
  color: #9a6a00;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.est-plan p {
  margin: 0 0 8px;
}

/* что входит в тарифы (web 2.136.0; вид - 2.138.0): шапки тарифов, группы, иконки строк, галочки в кружках */
.est-plan__compare {
  margin-top: 10px;
}

.est-plan__compare summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f8db3;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.est-plan__compare summary::-webkit-details-marker {
  display: none;
}

.est-plan__compare summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s;
}

.est-plan__compare[open] summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.est-plan-table__wrap {
  margin: 16px 0 12px;
  overflow-x: auto;
}

.est-plan-table {
  width: 100%;
  min-width: 330px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.est-plan-table th,
.est-plan-table td {
  padding: 10px 6px;
  border-bottom: 1px solid #eef0f3;
  text-align: center;
  vertical-align: middle;
}

/* шапки тарифов */
.est-plan-table thead th {
  border-bottom: 0;
  padding: 14px 6px 12px;
  vertical-align: bottom;
}

.est-plan-table__plan {
  width: 22%;
  border-top: 3px solid #d5d9df;
  border-radius: 12px 12px 0 0;
}

.est-plan-table__plan--basic {
  border-top-color: #4fb3d6;
}

.est-plan-table__plan--pro {
  border-top-color: #f0b429;
}

.est-plan-table__name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #1d2733;
}

.est-plan-table__tagline {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  color: #8a8f94;
}

.est-plan-table__yours {
  display: inline-block;
  margin-bottom: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #1f8db3;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* своя колонка - мягкая подложка до конца таблицы */
.est-plan-table .is-current {
  background: #f1f9fc;
}

.est-plan-table tbody:last-child tr:last-child .is-current {
  border-radius: 0 0 12px 12px;
}

/* заголовок группы */
.est-plan-table__group th {
  padding: 18px 0 8px;
  border-bottom: 1px solid #e3e7ec;
  background: none;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8a8f94;
}

/* строка: иконка + название */
.est-plan-table td.est-plan-table__rule {
  padding-left: 0;
  text-align: left;
}

.est-plan-table__rule > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1d2733;
}

.est-plan-table__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #eaf4fb;
  color: #1f8db3;
}

.est-plan-table__icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* значения */
.est-plan-table__yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2e9e5b;
  vertical-align: middle;
}

.est-plan-table__yes svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.est-plan-table__no {
  display: inline-block;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: #cfd5dc;
  vertical-align: middle;
}

.est-plan-table__num {
  font-size: 15px;
  font-weight: 700;
  color: #1d2733;
}

.est-plan-table__inf {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #1f8db3;
}

@media (max-width: 480px) {
  .est-plan-table__icon {
    width: 26px;
    height: 26px;
  }

  .est-plan-table__rule > div {
    gap: 8px;
    font-size: 13px;
  }

  .est-plan-table__name {
    font-size: 15px;
  }

  .est-plan-table__plan {
    width: 19%;
  }
}

.est-plan-locked__text {
  margin: 0 0 10px;
  font-size: 17px;
}

/* подпись исполнителя в окне (web 2.123.0) */
.est-signs + .est-signs__type {
  margin-top: 24px;
}

.est-bizsign__dialog {
  width: min(560px, calc(100vw - 32px));
}

/* подписи в эстимейтах и инвойсах (web 2.121.0) - галочки по типу документа */
.est-signs__type {
  margin: 16px 0 8px;
  font-size: 15px;
}

.est-signs .est-check {
  display: flex;
  margin-bottom: 8px;
}

.est-signs .est-btn {
  margin-top: 12px;
}

.est-logo {
  display: block;
  max-width: 140px;
  height: auto;
  margin: 0 0 12px;
  border-radius: 6px;
}

.est-logo[hidden] {
  display: none;
}

/* позиции: на большом экране - строкой, на телефоне - карточкой */
.est-lines {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.est-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

.est-line:first-child {
  border-top: 0;
  padding-top: 0;
}

.est-line__nums {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.est-line__field {
  width: 90px;
}

.est-line__field:nth-child(2) {
  width: 110px;
}

.est-line__taxable {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  font-size: 13px;
  color: #6b6d70;
  white-space: nowrap;
  cursor: pointer;
}

.est-line__amount {
  min-width: 90px;
  height: 40px;
  font-weight: 700;
  line-height: 40px;
  text-align: right;
  white-space: nowrap;
}

.est-line__tools {
  display: flex;
  gap: 4px;
  padding-top: 24px;
}

/* подписи полей позиции - только у первой из подряд идущих позиций на большом экране
   (после заголовка раздела - снова с подписями) */
.est-line--item + .est-line--item .est-line__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.est-line--item + .est-line--item .est-line__tools {
  padding-top: 4px;
}

/* заголовок раздела: одно поле во всю ширину, жирным, кнопки сразу справа */
.est-line--section {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.est-line--section .est-line__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.est-line__section {
  border-color: transparent;
  background: #f3f9fc;
  font-weight: 700;
}

.est-line--section .est-line__tools {
  padding-top: 0;
}

/* описание к позиции - под названием, мельче */
.est-line__details {
  margin-top: 8px;
  color: #50575e;
  font-size: 14px;
  line-height: 20px;
}

/* «+ Позиция», «+ Заголовок», «+ Подытог» - одной строкой (web 2.109.1, просьба автора); на узком - плотнее */
/* «Позиция / Заголовок / Подытог» - как в приложении (web 2.113.5, просьба автора): голубые текстовые кнопки с иконками
   (assets/icons/estimator/line-*.svg) по всей ширине, над ними линия */
.est-lines__add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e6e6e8;
}

.est-lines__add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border: 0;
  background: none;
  color: #3ebde6;
  font: inherit;
  font-size: 17px;
  white-space: nowrap;
  cursor: pointer;
}

.est-lines__add-btn:hover {
  color: #2a9cc2;
}

.est-lines__add-icon {
  display: inline-flex;
  font-size: 1.3em;
}

/* панель «Отправка»: PDF, ссылка для клиента, статус, «в инвойс» */
.est-send__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.est-send__row form {
  margin: 0;
}

.est-send__title {
  margin: 20px 0 8px;
  font-size: 15px;
  line-height: 22px;
}

.est-send__link {
  display: flex;
  gap: 10px;
  margin: 0 0 10px;
}

.est-send__link .est-input {
  flex: 1;
  min-width: 0;
  color: #50575e;
}

.est-send__link {
  align-items: center;
}

/* «Копировать» / «Поделиться» - иконками маской цвета текста (web 2.59.8) */
.est-icon-btn--copy,
.est-icon-btn--share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f8db3;
  font-size: 0;
}

.est-icon-btn--copy[hidden],
.est-icon-btn--share[hidden] {
  display: none;
}

.est-icon-btn--copy::before,
.est-icon-btn--share::before {
  content: "";
  width: 22px;
  height: 22px;
  background-color: currentColor;
}

.est-icon-btn--copy::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-icon-btn--share::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v13'/%3E%3Cpath d='m7 8 5-5 5 5'/%3E%3Cpath d='M8 11H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v13'/%3E%3Cpath d='m7 8 5-5 5 5'/%3E%3Cpath d='M8 11H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-2'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* скопировали - галочка зелёным */
.est-icon-btn--copy.est-icon-btn--done {
  color: #2e9e5b;
}

.est-icon-btn--copy.est-icon-btn--done::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-icon-btn--copy:hover,
.est-icon-btn--share:hover {
  background: rgba(62, 189, 230, 0.12);
}

/* почта и «Отклонить ссылку» - в один ряд */
.est-send__row--nowrap {
  flex-wrap: nowrap;
}

.est-send__row--nowrap > * {
  flex: 0 1 auto;
  min-width: 0;
}

.est-send__row--nowrap .est-btn {
  white-space: nowrap;
}

.est-send__from {
  font-size: 14px;
  color: #3ebde6;
}

.est-send__row--status {
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

.est-doc-actions .est-send__row {
  margin: 0;
}

.est-send__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.est-send__status .est-label {
  margin: 0;
}

.est-send__status .est-input {
  width: auto;
}

.est-btn[hidden] {
  display: none;
}

/* итог - в карточке «Настройки» под депозитом, перед заметками (web 2.113.24) */
.est-totals-inline {
  margin: 4px 0 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

/* итог */
.est-totals__list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  margin: 0;
  font-size: 15px;
}

.est-totals__list dt {
  color: #6b6d70;
}

.est-totals__list dd {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.est-totals__list .est-totals__deposit {
  color: #1c1c1c;
  font-weight: 700;
}

.est-totals__list .est-totals__total {
  padding-top: 12px;
  border-top: 1px solid rgba(174, 174, 174, 0.5);
  color: #1c1c1c;
  font-size: 20px;
  font-weight: 700;
}

.est-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 0;
}

.est-actions .est-btn--danger,
.est-actions__icons {
  margin-left: auto;
}

/* предпросмотр и удаление - иконками справа (web 2.58.2) */
.est-actions__icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* статус черновика - своей строкой под кнопками */
.est-actions .est-autosave {
  flex-basis: 100%;
  order: 10;
}

@media (max-width: 900px) {
  .est-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  /* как у шапки, крошек и заголовка сайта (.head__wrapper, .breadcrumbs__wrapper) - иначе текст шире их линии */
  .est__wrapper {
    padding-left: 20px;
    padding-right: 20px;
  }

  .est-card {
    padding: 16px 16px;
  }

  .est-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .est-line__nums {
    flex-wrap: wrap;
  }

  .est-line__field,
  .est-line__field:nth-child(2) {
    flex: 1 1 90px;
    width: auto;
  }

  .est-line__amount {
    flex: 1 0 100%;
    height: auto;
    line-height: 22px;
  }

  .est-line__tools {
    justify-content: flex-end;
    padding-top: 0;
  }

  .est-line--item + .est-line--item .est-line__label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .est-line--item + .est-line--item .est-line__tools {
    padding-top: 0;
  }

  .est-line--section {
    grid-template-columns: minmax(0, 1fr);
  }

  .est-list__link,
  .est-list__item--doc {
    padding: 12px 16px;
  }

  .est-list__item--doc .est-list__link {
    padding: 0;
  }
}

/* ------------------------------ лендинг /tools/invoice ------------------------------ */

.est-message[hidden] {
  display: none;
}

.est-hero {
  margin: 0 0 28px;
}

.est-hero__lead {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 28px;
}

.est-hero__points {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  columns: 2 320px;
  column-gap: 32px;
}

.est-hero__points li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 26px;
  break-inside: avoid;
  font-size: 15px;
  line-height: 22px;
}

.est-hero__points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #3ebde6;
  font-weight: 700;
}

.est-quick__lead {
  margin: -8px 0 16px;
}

.est-card__title--small {
  margin: 4px 0 12px;
  font-size: 16px;
}

/* гостевая форма: разделы - своими карточками, общей рамки нет */
.est-card.est-quick {
  padding: 0;
  border: 0;
  background: none;
}

.est-quick .est-quick__lead {
  margin: 0 0 16px;
}

.est-quick__lines,
.est-quick__bottom {
  margin-top: 20px;
}

/* под итогом - втрое больше места, чем перед кнопками (16px) */
.est-quick__look {
  margin-top: 48px;
}

/* .est-flat (гостевая форма и все страницы раздела с формами - редактор, настройки, бизнес, работы, клиенты...): на телефоне вместо рамок - белые разделы
   с одинаковыми отступами, между ними линия от края до края экрана; поля шириной как заголовок
   страницы (.est__wrapper - 20px). Списки (строки клиентов и событий, .est-card--list) - карточками, как были
   (просьба автора: заполнять не мешают) */
@media (max-width: 767px) {
  .est-flat .est-card:not(.est-clients__item):not(.est-card--list) {
    margin: 0 -20px;
    padding: 20px;
    border: 0;
    border-top: 1px solid #e3e4e6;
    border-radius: 0;
  }

  /* ровно 20px сверху и снизу: без отступов у первого и последнего элемента раздела */
  .est-flat .est-card:not(.est-clients__item):not(.est-card--list) > :first-child {
    margin-top: 0;
  }

  .est-flat .est-card:not(.est-clients__item):not(.est-card--list) > :last-child {
    margin-bottom: 0;
  }

  .est-flat .est-grid {
    gap: 0;
  }

  .est-flat .est-card--list {
    margin-bottom: 20px;
  }

  .est-flat .est-grid + .est-card,
  .est-flat .est-card:not(.est-clients__item):not(.est-card--list) + .est-grid,
  .est-quick__lines,
  .est-quick__bottom {
    margin-top: 0;
  }
}

.est-quick .est-actions {
  margin-top: 16px;
}

.est-quick__save a {
  color: #3ebde6;
}

/* низ гостевых страниц: «Войти» / «Зарегистрироваться» (web 2.59.17) */
.est-guest-auth {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

.est-guest-auth__text {
  margin: 0 0 14px;
  color: #6b6d70;
}

.est-guest-auth__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ------------------------------ настройки и способы оплаты (этап 4) ------------------------------ */

.est-new__settings {
  margin-left: auto;
}

.est-settings__hint {
  margin: -8px 0 16px;
}

.est-settings__inline {
  margin: 10px 0 0;
}

/* в ряду кнопок - без своего отступа, иначе ниже соседей («Убрать подпись», web 2.141.2) */
.est-actions .est-settings__inline {
  margin: 0;
}

.est-file {
  max-width: 100%;
  font-size: 14px;
}

/* выбор картинки (web 2.59.10) - кнопка как .input-form__file--button сайта, input прозрачный поверх */
.est-file-pick {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 0 0;
  cursor: pointer;
}

.est-file-pick__btn {
  padding: 8px 24px;
  border-radius: 999px;
  background: #3ebde6;
  color: #fff;
  font-size: 15px;
  text-transform: uppercase;
  transition-duration: 0.2s;
}

.est-file-pick:hover .est-file-pick__btn {
  background: #1f8db3;
}

/* «Выбрать лого» и рядом «Убрать» (web 2.90.1) */
.est-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 0 0;
}

.est-file-row .est-file-pick {
  margin: 0;
}

.est-file-pick__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.est-file-pick__input:focus-visible + .est-file-pick__btn,
.est-file-pick:focus-within .est-file-pick__btn {
  box-shadow: 0 0 0 3px rgba(62, 189, 230, 0.3);
}

/* чекбоксы и радио - общие для сайта, assets/css/base.css (web 2.113.15) */

.est-check--block {
  display: flex;
  margin: 0 0 6px;
}

.est-hint-inline {
  color: #8a8f94;
  font-size: 13px;
}

.est-pay-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.est-pay-list__item {
  padding: 10px 0;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

.est-pay-list__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.est-pay-list__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.est-pay-list__type {
  flex: 0 0 90px;
  font-weight: 700;
}

.est-pay-list__form .est-input {
  flex: 1 1 180px;
  width: auto;
}

/* кнопки способа - одной группой: помещаются - в строку, нет - под полем целиком */
.est-pay-list__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.est-pay-list__url {
  display: block;
  margin: 4px 0 0 98px;
  overflow: hidden;
  color: #3ebde6;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.est-pay-add__type {
  flex: 0 0 170px !important;
}

/* ---------- команда (этап 4.5) ---------- */
.est-new__settings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* профили шапки на странице «Бизнес» (web 2.2.0) */
.est-bizprofiles {
  margin: 28px 0 0;
  scroll-margin-top: 16px;
}

.est-section-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
}

/* настройки бизнеса (web 2.6.0) */
.est-bizsettings {
  scroll-margin-top: 16px;
}

.est-bizheaders {
  margin: 0;
  padding: 0;
  list-style: none;
}

.est-bizheaders__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e5e5e5;
}

/* управление бизнесом: передать, удалить, другие шапки (web 2.3.0 / 2.4.0 / 2.6.0) */
.est-bizmanage {
  margin: 28px 0 0;
}

/* лимит в месяц (web 2.1.0) */
.est-month-limit {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: -8px 0 16px;
}

.est-month-limit__item--full {
  color: #b3261e;
  font-weight: 600;
}

/* бизнесы на странице «Бизнес» (web 2.0.0) */
.est-bizbar {
  margin: 0 0 24px;   /* было 12 (с формой внутри - 16): подсказка под выбором бизнеса прилипала (web 2.171.0, скриншот автора) */
}

.est-bizbar > .est-company {
  margin-bottom: 0;
}

/* переключатель из двух-трёх вкладок с числом - как «Работа / Ищу работу» (jobs.css, .jobs__kinds);
   корзина: «Документы / Записи» (web 2.172.1, просьба автора) */
.est-seg {
  display: flex;
  max-width: 480px;
  margin: 0 0 16px;
  padding: 3px;
  border-radius: 10px;
  background-color: #eef3f6;
}

.est-seg__link {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #5b6168;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.est-seg__link:hover {
  color: #1c1c1c;
}

.est-seg__link--on {
  background-color: #ffffff;
  color: #1c1c1c;
  box-shadow: 0 2px 6px rgba(30, 50, 90, 0.12);
}

.est-seg__count {
  min-width: 20px;
  padding: 0 8px;
  border-radius: 10px;
  background-color: #dbe5eb;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  color: #5b6168;
}

.est-seg__link--on .est-seg__count {
  background-color: #3ebde6;
  color: #ffffff;
}

.est-bizbar__name {
  margin: 0;
}

.est-bizbar__name .est-label {
  display: inline;
}

.est-newbiz {
  margin: 0 0 20px;
}

.est-newbiz__toggle {
  display: inline-flex;
  list-style: none;
  cursor: pointer;
}

.est-newbiz__toggle::-webkit-details-marker {
  display: none;
}

.est-newbiz[open] .est-newbiz__toggle {
  margin-bottom: 12px;
}

.est-newbiz__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0 24px;
}

.est-company {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}

.est-company__label {
  margin: 0;
}

.est-company__select {
  width: auto;
  max-width: 100%;
  min-width: 220px;
}

.est-list__author {
  overflow: hidden;
  color: #8a8f94;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.est-invites__item + .est-invites__item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

.est-invites__text {
  margin: 0 0 10px;
}

.est-team {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.est-team__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

.est-team__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.est-team__who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
}

.est-team__name {
  overflow-wrap: anywhere;
}

.est-team__tag {
  padding: 1px 8px;
  border-radius: 10px;
  background: #eef8fc;
  color: #2a8fb3;
  font-size: 12px;
}

.est-team__tag--warn {
  background: #fff3d6;
  color: #a86b00;
}

.est-team__email {
  flex-basis: 100%;
  color: #8a8f94;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.est-team__rights {
  color: #6b6d70;
  font-size: 14px;
}

.est-team__form,
.est-team__checks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.est-team__form .est-check,
.est-team__checks .est-check {
  margin: 0;
}

.est-team__checks {
  margin: 0 0 16px;
}

/* «Права нового участника» над галочками приглашения */
.est-team__perms-title {
  margin: 0 0 2px;
}

.est-hint.est-team__perms-hint {
  margin: 0 0 8px;
  font-size: 13px;
}

.est-team__tools {
  display: flex;
  gap: 6px;
}

.est-team__input {
  flex: 1 1 200px;
  width: auto;
}

.est__wrapper--narrow {
  max-width: 740px;
}

.est-invite__text {
  margin: 0 0 8px;
  font-size: 17px;
}

.est-invite .est-message {
  margin-top: 16px;
}

@media (max-width: 767px) {
  .est-new__settings {
    margin-left: 0;
  }

  .est-pay-list__url {
    margin-left: 0;
  }
}

/* ------------------------------ профили шапки (web 1.90.0) ------------------------------ */

.est-profiles {
  margin: 0;
  padding: 0;
  list-style: none;
}

.est-profiles__item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(174, 174, 174, 0.35);
}

.est-profiles__item:last-child {
  border-bottom: 0;
}

.est-profiles__logo {
  width: 64px;
  height: auto;
  border-radius: 6px;
}

.est-profiles__text {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.est-profiles__text .est-status {
  align-self: flex-start;
}

.est-profiles__color {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  border-radius: 50%;
  vertical-align: -1px;
}

.est-profiles__intro {
  max-width: 720px;
  margin: 0 0 16px;
}

/* кнопки - всегда отдельной строкой под текстом профиля */
.est-profiles__tools {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* галочка «обновить и в документах» (web 2.17.0) */
.est-sync {
  margin: 4px 0 16px;
}

/* редактор: от кого - только название (web 2.14.0) */
.est-from__name {
  margin: 0 0 8px;
  font-size: 17px;
}

/* «назад» - под заголовком страницы (web 2.11.0) */
.est-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  color: #6b6d70;
  font-size: 15px;
  text-decoration: none;
}

.est-back:hover,
.est-back:focus-visible {
  color: #3ebde6;
}

/* «назад» слева, ✕ «Закрыть» справа (редактор документа, web 2.58.1) */
.est-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
}

.est-topbar .est-back {
  margin: 0;
}

.est-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #1c1c1c;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
}

.est-close:hover {
  background: rgba(45, 46, 48, 0.08);
}

/* ------------------------------ главный экран: плитки (web 1.91.0) ------------------------------ */

/* на ПК - по три в ряд (web 2.59.20, просьба автора; было auto-fill - выходило по четыре), уже - по две */
.est-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.est-tiles__item {
  display: flex;
  min-width: 0;
  margin: 0;
}

/* цвета плиток и строк «Ещё» (web 2.60.0, по макету автора): --tone - иконка и счётчик,
   --tone-soft / --tone-soft2 - подложка иконки плитки, --tone-solid* - подложка в строках «Ещё» */
.est-tile,
.est-more__link {
  --tone: #2aa6d0;
  --tone-soft: #e9f7fc;
  --tone-soft2: #cfeefa;
  --tone-solid: #4cc7ee;
  --tone-solid2: #2aa6d0;
}

.est-tone--blue   { --tone: #2f6fe4; --tone-soft: #e6efff; --tone-soft2: #c7d9fd; --tone-solid: #5c9cff; --tone-solid2: #1f5fd8; }
.est-tone--green  { --tone: #1f9d55; --tone-soft: #e2f7e9; --tone-soft2: #bcebcc; --tone-solid: #48d07c; --tone-solid2: #1c9d50; }
.est-tone--orange { --tone: #e8541c; --tone-soft: #ffeadc; --tone-soft2: #ffc9a6; --tone-solid: #ff9a5c; --tone-solid2: #e8541c; }
.est-tone--purple { --tone: #7a3fe0; --tone-soft: #f0e8ff; --tone-soft2: #d8c6ff; --tone-solid: #9e72ff; --tone-solid2: #6a32d4; }
.est-tone--amber  { --tone: #d27d00; --tone-soft: #fff4d4; --tone-soft2: #ffdf8a; --tone-solid: #ffc23d; --tone-solid2: #e89400; }
.est-tone--violet { --tone: #6a48d6; --tone-soft: #eeeaff; --tone-soft2: #d6cdff; --tone-solid: #8a6cf0; --tone-solid2: #4b2fb2; }
.est-tone--gray   { --tone: #6b6f77; --tone-soft: #f0f1f3; --tone-soft2: #dcdfe4; --tone-solid: #b3b7be; --tone-solid2: #7c8189; }
/* web 2.63.3 (просьба автора): свои цвета у «Расписания» (было как «Команда») и «Журнала» (было как «Настройки») */
.est-tone--teal   { --tone: #0f8f83; --tone-soft: #dcf6f2; --tone-soft2: #aee9df; --tone-solid: #3fd0bd; --tone-solid2: #0f9486; }
.est-tone--rose   { --tone: #d6336c; --tone-soft: #ffe6ef; --tone-soft2: #ffc2d6; --tone-solid: #ff7aa6; --tone-solid2: #d6336c; }

/* плитка: иконка сверху, под ней название со счётчиком, подпись и «+ Добавить» (web 2.60.0).
   На главной это div, кликабельный целиком через растянутую ссылку est-tile__link; у гостя - сама ссылка */
.est-tile {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-height: 96px;
  padding: 20px;
  border: 1px solid rgba(30, 50, 90, 0.06);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(30, 50, 90, 0.12);
  color: #1c1c1c;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}

.est-tile:hover,
.est-tile:focus-within {
  box-shadow: 0 6px 18px rgba(30, 50, 90, 0.16);
  transform: translateY(-1px);
}

.est-tile__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(30, 50, 90, 0.12);
  font-size: 26px;
  line-height: 1;
}

/* иконка (web 2.60.1) - цветной SVG целиком: подложка с градиентом и значок внутри файла */
.est-tile__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.est-tile__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.est-tile__title {
  color: inherit;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

/* растянутая ссылка: клик в любом месте плитки, кроме «+ Добавить» */
.est-tile__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.est-tile__link:focus-visible {
  outline: none;
}

.est-tile__link:focus-visible::after {
  outline: 2px solid var(--tone);
  outline-offset: 2px;
}

/* число в кружке (web 2.113.19, просьба автора): одна цифра - круг, больше - растягивается */
.est-tile__count {
  display: inline-block;
  box-sizing: border-box;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--tone-solid2, #6b6d70);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  vertical-align: 2px;
}

.est-tile__sub {
  display: block;
  color: #5d6068;
  font-size: 14px;
}

.est-tile__sub::first-letter {
  text-transform: uppercase;
}

/* «сегодня: N» в «Расписании» - плашкой */
.est-tile__sub--chip {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 13px;
  font-weight: 600;
}

.est-tile__alert {
  color: #a12a2a;
  font-size: 13px;
  font-weight: 600;
}

.est-tile__add {
  position: relative;
  z-index: 1;
  color: var(--tone);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.est-tile__add:hover,
.est-tile__add:focus-visible {
  text-decoration: underline;
}

/* «Ещё» на главной (web 2.10.0; вид - web 2.60.0): одна карточка, строки с отступом-разделителем */
.est-more__title {
  margin: 32px 0 12px;
  font-size: 22px;
  font-weight: 700;
}

.est-more {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(30, 50, 90, 0.06);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(30, 50, 90, 0.12);
  list-style: none;
}

.est-more__item {
  position: relative;
}

.est-more__item + .est-more__item::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 70px;
  border-top: 1px solid rgba(30, 50, 90, 0.08);
}

.est-more__link {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  color: #1c1c1c;
  text-decoration: none;
}

.est-more__link:hover,
.est-more__link:focus-visible {
  background: #f5f8fc;
}

.est-more__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 2px 6px rgba(30, 50, 90, 0.12);
  font-size: 20px;
  line-height: 1;
}

.est-more__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.est-more__name {
  flex: 0 1 auto;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.est-more__name .est-tile__count {
  background: var(--tone-soft2);
  color: var(--tone);
}

.est-more__sub {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #5d6068;
  font-size: 14px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.est-more__sub::first-letter {
  text-transform: uppercase;
}

.est-more__arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: #9a9ca0;
  font-size: 20px;
}

.est-more__sub + .est-more__arrow {
  margin-left: 0;
}

/* ------------------------------ «Бизнес»: цифры и график ------------------------------ */

.est-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.est-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border: 1px solid rgba(174, 174, 174, 0.45);
  border-radius: 12px;
  background: #fff;
}

.est-stat__label {
  color: #6b6d70;
  font-size: 13px;
}

.est-stat__value {
  color: #1c1c1c;
  font-size: 24px;
}

.est-stat__sub {
  color: #8a8f94;
  font-size: 12px;
}

/* один ряд столбиков: толщина по месяцу, скругление 4px сверху, 2px зазор между столбиками */
.est-chart {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 220px;
  padding-top: 24px;
  border-bottom: 1px solid #c9cbce;
}

.est-chart__col {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  outline: none;
  cursor: default;
}

.est-chart__bar {
  width: min(70%, 34px);
  border-radius: 4px 4px 0 0;
  background: #2a9fd0;
}

.est-chart__col:hover .est-chart__bar,
.est-chart__col:focus-visible .est-chart__bar {
  background: #1f8db3;
}

/* сумма над столбиком: видна у лучшего и текущего месяца, у остальных - при наведении / фокусе */
.est-chart__value {
  margin-bottom: 4px;
  color: #1c1c1c;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  visibility: hidden;
}

.est-chart__value--shown,
.est-chart__col:hover .est-chart__value,
.est-chart__col:focus-visible .est-chart__value {
  visibility: visible;
}

.est-chart__month {
  position: absolute;
  top: 100%;
  margin-top: 8px;
  color: #6b6d70;
  font-size: 11px;
  white-space: nowrap;
}

.est-chart__table {
  margin-top: 32px;
}

.est-chart__table summary {
  color: #1f8db3;
  cursor: pointer;
}

.est-chart__table table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 14px;
}

.est-chart__table th,
.est-chart__table td {
  padding: 8px 8px;
  border-bottom: 1px solid rgba(174, 174, 174, 0.35);
  text-align: right;
}

.est-chart__table th:first-child,
.est-chart__table td:first-child {
  text-align: left;
}

@media (max-width: 900px) {
  .est-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .est-tiles {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .est-tile {
    gap: 12px;
    padding: 16px 16px;
    border-radius: 12px;
  }

  .est-tile__icon {
    width: 50px;
    height: 50px;
    border-radius: 12.5px;
  }

  .est-tile__title {
    font-size: 16px;
  }

  .est-tile__sub,
  .est-tile__add {
    font-size: 13px;
  }

  .est-more__sub {
    font-size: 13px;
  }

  /* на телефоне подписи месяцев - через один, суммы над столбиками - только при касании */
  .est-chart__col:nth-child(even) .est-chart__month {
    visibility: hidden;
  }

  .est-chart__value--shown {
    visibility: hidden;
  }

  .est-stat__value {
    font-size: 20px;
  }
}

/* ------------------------------ клиент: подсказки из сохранённых (web 1.92.0) ------------------------------ */

.est-field--suggest {
  position: relative;
}

.est-suggest {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 20;
  max-height: 280px;
  margin: 4px 0 0;
  padding: 4px;
  overflow-y: auto;
  border: 1px solid rgba(174, 174, 174, 0.6);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
  list-style: none;
}

.est-suggest[hidden] {
  display: none;
}

.est-suggest__item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.est-suggest__item span {
  color: #6b6d70;
  font-size: 13px;
}

.est-suggest__item:hover,
.est-suggest__item--active {
  background: #e9f7fc;
}

.est-linked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -4px 0 12px;
  color: #2e9e5b;
  font-size: 14px;
}

.est-linked[hidden] {
  display: none;
}

.est-linked__unlink {
  padding: 0;
  border: 0;
  background: none;
  color: #1f8db3;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ------------------------------ оплаты инвойса, расходы работы (web 1.94.0) ------------------------------ */

.est-paid__sum {
  margin: 0 0 12px;
  font-size: 15px;
}

.est-paid__list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(174, 174, 174, 0.45);
  border-radius: 12px;
}

.est-paid__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 16px;
  font-size: 14px;
}

.est-paid__item + .est-paid__item {
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

/* итог под списком расходов / возвратов (web 2.97.1): подпись слева, сумма справа, на сером фоне */
.est-paid__total {
  justify-content: space-between;
  background: #f6f7f8;
  font-weight: 600;
}

.est-paid__total:last-child {
  border-radius: 0 0 12px 12px;
}

/* web 2.41.0: подпись (способ, заметка) сжимается и переносится внутри, а не уводит кнопку на новую строку -
   всё влезает - строка в одну линию, корзина справа по центру */
.est-paid__item .est-hint-inline {
  flex: 1 1 0;
  min-width: 0;
}

.est-paid__item form {
  margin: 0 0 0 auto;
}

/* ✎ рядом с корзиной (web 2.82.5); строка, которую правят в форме ниже, - подсвечена */
.est-paid__item .est-icon-btn--edit {
  margin-left: auto;
}

.est-paid__item .est-icon-btn--edit:not([hidden]) + form {
  margin-left: -8px;
}

.est-paid__item--editing {
  background: #f3f9fc;
}

/* правка - нажатием на строку, без карандашей (web 2.174.2, просьба автора; assets/js/estimator.js) */
.est-paid__item--editable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  /* тем же голубым, что и открытая правка под строкой (просьба автора, web 2.174.3) */
  .est-paid__item--editable:hover {
    background: #f3f9fc;
  }
}

.est-paid__item--editable:focus-visible {
  outline: 2px solid #3ebde6;
  outline-offset: -2px;
}

.est-paid__item--editable.est-paid__item--editing {
  background: #f3f9fc;
}

/* корзина записи - в раскрытой правке, прижата вправо (web 2.174.4); кнопки формы стоят в строку (форма - блок),
   поэтому float; иконка 36px против 40px у кнопок - на 2px ниже, по центру */
.est-addform__delete {
  float: right;
  margin-top: 2px;
}

/* фон строки (правка, итог) - по скруглению рамки списка: правили первую строку - голубой фон
   торчал прямым углом за рамку (web 2.170.81, скриншот автора). 11px = 12px рамки минус её толщина */
.est-paid__list > li:first-child {
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.est-paid__list > li:last-child {
  border-bottom-left-radius: 11px;
  border-bottom-right-radius: 11px;
}

/* поля правки - под строкой списка (web 2.84.2): тот же голубой фон, что у строки */
.est-paid__edit-slot {
  padding: 0 14px;
  background: #f3f9fc;
  list-style: none;
}

.est-paid__edit-slot .est-addform__inner {
  padding: 4px 4px 14px;
}

.est-paid__edit-slot + .est-paid__item {
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

/* часы: дата, под ней работник - одной колонкой (web 2.82.12) */
.est-paid__when-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

/* телефон (web 2.82.11): с ✎ строка часов не влезала - корзина уезжала вниз; не переносим, иконки и отступы
   поменьше, подпись и имя переносятся внутри */
@media (max-width: 480px) {
  .est-paid__item:has(> .est-icon-btn--edit:not([hidden])) {
    flex-wrap: nowrap;
    gap: 4px 8px;
  }

  .est-paid__item:has(> .est-icon-btn--edit:not([hidden])) > b {
    min-width: 0;
  }

  .est-paid__item:has(> .est-icon-btn--edit:not([hidden])) .est-hint-inline {
    flex: 1 1 64px;
  }

  .est-paid__item:has(> .est-icon-btn--edit:not([hidden])) .est-icon-btn--edit,
  .est-paid__item:has(> .est-icon-btn--edit:not([hidden])) .est-icon-btn--danger {
    width: 32px;
  }
}

.est-paid__form {
  margin: 0 0 8px;
}

/* «...пока нет.» над формой - отступ, иначе подпись поля прилипает к тексту */
.est-hint + .est-paid__form {
  margin-top: 12px;
}

/* подсказка над списком, формой, сводкой или фильтрами - тот же отступ: без него рамка прилипала к тексту
   («Работники и совладельцы», «Премии и удержания», баланс фирмы, журнал, поле после «Клиента» в работе) */
.est-hint + :is(form, ul, ol, table, .est-stats, .est-filters, .est-field) {
  margin-top: 12px;
}

/* «На баланс фирмы»: форма % - отступ от подсказки сверху и от списка отправок снизу */
.est-reserve__pct {
  margin: 12px 0 16px;
}

.est-stat--profit .est-stat__value { color: #2e9e5b; }
.est-stat--loss .est-stat__value { color: #a12a2a; }

/* расходы работы - красным с минусом, возвраты - зелёным с плюсом */
.est-money--neg,
.est-stats--rows .est-stat__value.est-money--neg { color: #c8442f; }
.est-money--pos { color: #2e9e5b; }

/* доли совладельцев в работе (web 1.95.0) */
.est-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.est-share__input {
  width: 80px;
}

/* строка работника / совладельца: поле, сумма и ✕ - неразрывной группой справа от имени, всё в одну строку;
   не влезает - переносится само имя (фамилия уходит вниз), сумма под стрелку не сползает, ✕ - справа */
.est-paid__item:has(> .est-share-row) {
  flex-wrap: nowrap;
}

.est-paid__item:has(> .est-share-row) > b {
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.est-share-row {
  display: inline-flex;
  flex: 1 0 auto;
  align-items: center;
  gap: 12px;
}

.est-share-row .est-hint-inline {
  flex: 0 0 auto;
  white-space: nowrap;
}

.est-share-row > .est-icon-btn {
  margin-left: auto;
}

/* телефон: поле % - под 3 цифры */
@media (max-width: 480px) {
  .est-share__input--pct {
    width: calc(3ch + 26px);
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
  }
}

/* работники и совладельцы (web 2.33.0): ✕ в строке - справа (кнопка своей формы, атрибут form) */
#crew .est-paid__item > .est-icon-btn {
  margin-left: auto;
}

/* «Добавить в работу» - отступ от кнопки «Сохранить» */
.est-crew__add {
  margin-top: 16px;
}

.est-paytype {
  border: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* баланс фирмы (web 1.96.0) */
.est-balance--in { color: #2e9e5b; }
.est-balance--out { color: #a12a2a; }

/* язык интерфейса (web 2.107.0) - узкий выбор, не на всю ширину */
.est-uilang {
  margin-bottom: 20px;
}
.est-uilang__row {
  display: flex;
  gap: 12px;
  max-width: 260px;
  margin: 4px 0 8px;
}

/* что показывать (web 1.97.0) */
.est-prefs {
  margin-bottom: 20px;
}

/* строка: галочка с названием, сразу за ним подсказка - по центру строки (web 2.60.7; по базовой
   линии подсказка съезжала вниз - базовой линией подписи считался низ галочки) */
.est-prefs__list {
  display: flex;
  flex-direction: column;
  gap: 16px;   /* просторнее (web 2.113.23, просьба автора; было 10) */
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}

.est-prefs__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.est-prefs__item .est-check {
  margin: 0;
}

.est-prefs__item--sub {
  padding-left: 28px;
}

.est-prefs__item--off {
  opacity: 0.5;
}

/* на узком экране подсказка - под названием, на уровне текста (после галочки) */
@media (max-width: 600px) {
  .est-prefs__list {
    gap: 16px;
  }

  .est-prefs__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .est-prefs__item .est-hint-inline {
    margin-left: 24px;
  }
}

/* предпросмотр оформления (web 1.98.0): мини-копия view/estimator/v_document.php,
   цвет - переменная --est-look; лист всегда белый, как бумага */

.est-look {
  margin: 0 0 16px;
}

.est-look__sheet {
  --est-look: #3ebde6;
  max-width: 380px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #e3e4e6;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(30, 50, 90, 0.12);
  color: #1c1c1c;
  font-family: 'DejaVu Sans', 'Open Sans', Arial, sans-serif;
  font-size: 9px;
  line-height: 1.4;
}

.est-look__band {
  display: none;
}

/* шапка как в документе (web 2.53.0): слева «От» и «Клиент», справа лого, название, номер и дата */
.est-look__head {
  display: grid;
  /* «От» - до 40% ширины, как имя фирмы в документе (web 2.113.30): длинное название переносится */
  grid-template-columns: minmax(0, 40%) 1fr;
  gap: 12px;
  margin: 0 0 12px;
}

.est-look__mid {
  justify-self: end;   /* колонка шире содержимого - блок у правого края, подписи рядом со значениями */
  text-align: right;
}

.est-look__from {
  min-width: 0;
  overflow-wrap: anywhere;
}

.est-look__from div:empty {
  display: none;
}

.est-look__logo {
  display: block;
  max-width: 70px;
  max-height: 36px;
  margin: 0 0 4px auto;
}

.est-look__logo[hidden],
.est-look__muted:empty {
  display: none;
}

.est-look__biz {
  font-size: 10.5px;
  font-weight: bold;
  text-transform: uppercase;
}

.est-look__head .est-look__label {
  color: var(--est-look);
  font-weight: bold;
}

.est-look__label--to {
  margin-top: 8px;
}

.est-look__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: bold;
}

.est-look__meta span {
  color: var(--est-look);
}

.est-look__sheet--simple .est-look__head .est-look__label,
.est-look__sheet--simple .est-look__meta span {
  color: #1c1c1c;
}

.est-look__muted {
  color: #6b6d70;
}

.est-look__title {
  color: var(--est-look);
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.est-look__label {
  color: #8a8f94;
  font-size: 7px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.est-look__lines,
.est-look__totals {
  border-collapse: collapse;
}

.est-look__lines {
  width: 100%;
}

.est-look__lines th {
  padding: 4px 4px;
  font-size: 7px;
  text-align: left;
  text-transform: uppercase;
}

.est-look__lines td {
  padding: 4px 4px;
  border-bottom: 1px solid #e3e4e6;
}

.est-look__lines .est-look__num,
.est-look__totals .est-look__num {
  text-align: right;
  white-space: nowrap;
}

.est-look__section td {
  padding-top: 8px;
  border-bottom-color: var(--est-look);
  color: var(--est-look);
  font-weight: bold;
}

.est-look__totals {
  width: 52%;
  margin: 8px 0 0 48%;
}

.est-look__totals td {
  padding: 2px 4px;
}

.est-look__grand td {
  padding-top: 4px;
  border-top: 1.5px solid var(--est-look);
  font-size: 10px;
  font-weight: bold;
}

/* classic: полоса сверху, шапка таблицы залита цветом */
.est-look__sheet--classic .est-look__band {
  display: block;
  height: 5px;
  margin: -14px -14px 12px;
  background: var(--est-look);
}

.est-look__sheet--classic .est-look__lines th {
  background: var(--est-look);
  color: #fff;
}

/* modern: крупное название цветом, тонкие линии */
.est-look__sheet--modern .est-look__title {
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
}

.est-look__sheet--modern .est-look__lines th {
  border-bottom: 1.5px solid var(--est-look);
  color: var(--est-look);
}

.est-look__sheet--modern .est-look__head {
  padding-bottom: 8px;
  border-bottom: 1px solid #e3e4e6;
}

/* simple: почти без цвета */
.est-look__sheet--simple .est-look__title,
.est-look__sheet--simple .est-look__section td {
  color: #1c1c1c;
}

.est-look__sheet--simple .est-look__section td,
.est-look__sheet--simple .est-look__lines th {
  border-bottom: 1px solid #2d2e30;
}

.est-look__sheet--simple .est-look__grand td {
  border-top-color: #2d2e30;
}

/* business: линия цветом под шапкой, серые подписи, светлая шапка таблицы */
.est-look__sheet--business .est-look__head {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--est-look);
}

.est-look__sheet--business .est-look__title {
  color: #1f2937;
}

.est-look__sheet--business .est-look__head .est-look__label,
.est-look__sheet--business .est-look__meta span {
  color: #6b7280;
}

.est-look__sheet--business .est-look__lines th {
  background: #f1f4f8;
}

.est-look__sheet--business .est-look__lines tbody tr:nth-child(odd) td {
  background: #f7f9fb;
}

.est-look__sheet--business .est-look__lines tbody tr.est-look__section td {
  background: none;
}

/* table (web 2.62.0): всё в рамках, шапки таблиц залиты цветом, название серым */
.est-look__sheet--table .est-look__title {
  color: #8a8f94;
  text-transform: none;
  letter-spacing: 0;
}

.est-look__sheet--table .est-look__head .est-look__label,
.est-look__sheet--table .est-look__meta span {
  color: #1c1c1c;
}

.est-look__sheet--table .est-look__lines {
  border-collapse: collapse;
}

.est-look__sheet--table .est-look__lines th,
.est-look__sheet--table .est-look__lines td {
  border: 1px solid #1d1f23;
}

.est-look__sheet--table .est-look__lines th {
  background: var(--est-look);
  color: #fff;
  text-transform: none;
}

.est-look__sheet--table .est-look__section td {
  background: #f1f3f5;
  color: #1c1c1c;
}

.est-look__sheet--table .est-look__grand td {
  border-top-color: #1d1f23;
}

/* bold (web 2.115.0): шапка тёмно-синяя во всю ширину листа, под ней полоса цветом; итог - на тёмной плашке */
.est-look__sheet--bold .est-look__head {
  margin: -14px -14px 10px;
  padding: 12px 14px 10px;
  border-bottom: 3px solid var(--est-look);
  background: #1e3a5f;
  color: #fff;
}

.est-look__sheet--bold .est-look__head .est-look__label,
.est-look__sheet--bold .est-look__meta span {
  color: #9fb3cc;
}

.est-look__sheet--bold .est-look__title {
  color: #fff;
}

.est-look__sheet--bold .est-look__lines th {
  background: #eef2f7;
  color: #1e3a5f;
}

.est-look__sheet--bold .est-look__section td {
  border-bottom-color: #1e3a5f;
  color: #1e3a5f;
}

.est-look__sheet--bold .est-look__grand td {
  border-top: 0;
  background: #1e3a5f;
  color: #fff;
}

/* шаблоны 2.116.0 в миниатюре; тёмный и светлый оттенки цвета документа - color-mix, как в документе */
.est-look__sheet--sidebar {
  border-left: 44px solid color-mix(in srgb, var(--est-look) 65%, #000);
}

.est-look__sheet--sidebar .est-look__title,
.est-look__sheet--sidebar .est-look__grand td {
  color: color-mix(in srgb, var(--est-look) 65%, #000);
}

.est-look__sheet--sidebar .est-look__lines th {
  border-bottom: 1.5px solid color-mix(in srgb, var(--est-look) 65%, #000);
  color: color-mix(in srgb, var(--est-look) 65%, #000);
}

.est-look__sheet--cards .est-look__from {
  padding: 6px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--est-look) 10%, #fff);
}

.est-look__sheet--cards .est-look__title {
  color: color-mix(in srgb, var(--est-look) 22%, #000);
}

.est-look__sheet--cards .est-look__grand td {
  border-top: 0;
  background: color-mix(in srgb, var(--est-look) 22%, #000);
  color: #fff;
}

.est-look__sheet--elegant .est-look__title,
.est-look__sheet--elegant .est-look__grand td {
  font-family: 'DejaVu Serif', Georgia, 'Times New Roman', serif;
  font-weight: normal;
}

.est-look__sheet--elegant .est-look__title {
  letter-spacing: 3px;
  color: color-mix(in srgb, var(--est-look) 65%, #000);
}

.est-look__sheet--elegant .est-look__grand td {
  border-bottom: 3px double color-mix(in srgb, var(--est-look) 65%, #000);
}

.est-look__sheet--hero .est-look__head {
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--est-look) 10%, #fff);
}

.est-look__sheet--hero .est-look__title {
  color: color-mix(in srgb, var(--est-look) 65%, #000);
}

.est-look__sheet--geometric {
  background: linear-gradient(225deg, var(--est-look) 0 26px, #1f2328 26px 48px, transparent 48px) right top / 90px 90px no-repeat, #fff;
}

.est-look__sheet--geometric .est-look__title {
  color: #1f2328;
}

.est-look__sheet--geometric .est-look__mid {
  padding-top: 34px;   /* ниже треугольников в углу */
}

.est-look__sheet--geometric .est-look__lines th {
  background: #1f2328;
  color: #fff;
}

.est-look__sheet--geometric .est-look__grand td {
  border-top: 0;
  background: var(--est-look);
  color: #fff;
}


/* отчёт по работе (web 2.38.0): на странице - в карточке; при печати - только отчёт */
.est-report {
  overflow-x: auto;
}

.est-actions + .est-report {
  margin-top: 16px;
}

@media print {
  header,
  footer,
  .breadcrumbs,
  .est-back,
  .est-actions {
    display: none !important;
  }

  .est-report {
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  /* отчёты на бумаге (web 2.89.1): голубой бренда в ч/б - бледно-серый, берём тёмный голубой (#1f8db3 - серый
     средней плотности, в цвете - тот же бренд); цвета и плашки статусов печатать как на экране */
  .rep {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .rep .rep__title {
    color: #1f8db3;
  }

  .rep .rep__h {
    border-bottom-color: #1f8db3;
  }
}

/* выплаты: «Записать выплату» (аванс) под списком (web 2.39.0) */
.est-payouts__add {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

.est-payouts__add-title {
  margin: 0 0 12px;
  font-size: 15px;
}

/* цифры работы - компактным списком (web 2.42.0, просьба автора): строка «название — сумма», подпись под ней,
   строки через одну на полупрозрачном фоне (первая - без) */
.est-stats--rows {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(174, 174, 174, 0.45);
  border-radius: 12px;
  background: #fff;
}

.est-stats--rows .est-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 12px;
  padding: 8px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.est-stats--rows .est-stat:nth-child(even) {
  background: rgba(62, 189, 230, 0.08);
}

.est-stats--rows .est-stat__value {
  font-size: 18px;
  text-align: right;
}

.est-stats--rows .est-stat__sub {
  grid-column: 1 / -1;
}

.est-stats--rows .est-stat__label {
  font-size: 15px;
}

/* клиенты (web 2.47.0, просьба автора): каждый клиент - своим блоком, справа иконки «править» и «удалить» */
.est-clients__title {
  margin: 24px 0 8px;
  font-size: 20px;
}

.est-clients {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.est-card.est-clients__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 16px 16px;
}

.est-clients__tools {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: auto;
}

/* «править» - карандаш маской цвета текста, как корзина */
.est-icon-btn--edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0;
  text-decoration: none;
}

.est-icon-btn--edit::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-clients__form,
.est-clients__docs {
  max-width: 640px;
}

/* документы клиента под формой (web 2.113.20) */
.est-clients__docs {
  margin-top: 20px;
}

/* web 2.48.0 (просьба автора): иконки «удалить» и «править» - без кружка, чуть крупнее; при наведении - цвет насыщеннее */
.est-icon-btn--danger,
.est-icon-btn--edit {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.est-icon-btn--danger::before,
.est-icon-btn--edit::before {
  width: 22px;
  height: 22px;
}

.est-icon-btn--danger:hover,
.est-icon-btn--danger:focus-visible {
  background: rgba(209, 67, 67, 0.1);
  color: #a12a2a;
}

.est-icon-btn--edit {
  color: #6b6d70;
}

.est-icon-btn--edit:hover,
.est-icon-btn--edit:focus-visible {
  background: rgba(62, 189, 230, 0.12);
  color: #1f8db3;
}

/* «предпросмотр» - глаз маской цвета текста (web 2.58.2) */
.est-icon-btn--preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b6d70;
  font-size: 0;
}

.est-icon-btn--preview::before {
  content: "";
  width: 22px;
  height: 22px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-icon-btn--preview:hover,
.est-icon-btn--preview:focus-visible {
  background: rgba(62, 189, 230, 0.12);
  color: #1f8db3;
}

/* «Печать» в отчётах - иконкой принтера (web 2.90.3, просьба автора), как «Копировать» / «Поделиться» */
.est-icon-btn--print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f8db3;
  font-size: 0;
}

.est-icon-btn--print::before {
  content: "";
  width: 26px;
  height: 26px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-icon-btn--print:hover,
.est-icon-btn--print:focus-visible {
  background: rgba(62, 189, 230, 0.12);
}

/* ------------------------------ «Расписание» (web 2.51.0) ------------------------------ */

.est-cal {
  position: relative;
  max-width: 640px;
}

.est-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.est-cal__title {
  margin: 0;
  font-size: 20px;
}

.est-cal__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #3ebde6;
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
}

.est-cal__nav:hover {
  background: rgba(62, 189, 230, 0.12);
}

.est-cal__today {
  display: inline-block;
  margin: 4px 0 0;
  padding: 4px 0;
  color: #3ebde6;
  font-size: 14px;
}

.est-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 12px;
}

.est-cal__wd {
  padding: 4px 0;
  color: #8a8f94;
  font-size: 12px;
  text-align: center;
}

.est-cal__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  border-radius: 10px;
  color: #1c1c1c;
  text-decoration: none;
}

a.est-cal__cell:hover {
  background: rgba(62, 189, 230, 0.1);
}

.est-cal__cell--today .est-cal__num {
  color: #3ebde6;
  font-weight: 700;
}

.est-cal__cell--on {
  background: #3ebde6;
}

.est-cal__cell--on .est-cal__num,
.est-cal__cell--on.est-cal__cell--today .est-cal__num {
  color: #fff;
  font-weight: 700;
}

a.est-cal__cell--on:hover {
  background: #1f8db3;
}

.est-cal__num {
  font-size: 15px;
  line-height: 1;
}

.est-cal__dots {
  display: flex;
  gap: 3px;
  height: 5px;
}

.est-cal__dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3ebde6;
}

.est-cal__cell--on .est-cal__dots i {
  background: #fff;
}

/* правка - клик по карточке (web 2.95.5, вместо ✎) */
.est-event--edit {
  cursor: pointer;
  transition: border-color 0.15s;
}

.est-event--edit:hover {
  border-color: #3ebde6;
}

/* название - обычным текстом, не ссылкой (web 2.95.6) */
.est .est-event a.est-event__open,
.est .est-event a.est-event__open:hover {
  color: #1c1c1c;
  text-decoration: none;
}

.est-event__delete {
  display: contents;
}

/* адрес в две строки: улица, ниже «город, штат индекс» (web 2.95.8, docAddressLines) */
.est-event__addr-line {
  display: block;
}

/* ссылки адреса / телефона / название - только по своему тексту, не на всю ширину карточки (web 2.95.9):
   мимо них клик открывает правку */
.est-event .est-profiles__text > a {
  align-self: flex-start;
  max-width: 100%;
}

/* «позвонить» - трубка маской цвета текста, как корзина (web 2.95.6) */
.est-icon-btn--call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f8db3;
  font-size: 0;
  text-decoration: none;
}

.est-icon-btn--call::before {
  content: "";
  width: 22px;
  height: 22px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-icon-btn--call:hover,
.est-icon-btn--call:focus-visible {
  background: rgba(62, 189, 230, 0.12);
  color: #176f8d;
}

.est-event__time {
  flex: 0 0 auto;
  min-width: 72px;
  color: #8a8f94;   /* «С» и «До» одним цветом и начертанием (web 2.95.13-2.95.14, просьба автора) */
  font-size: 13px;
  font-weight: 500;
  align-self: flex-start;
  padding-top: 2px;
}

/* событие на весь день (web 2.95.12): вместо «весь день» в колонке времени - короткая голубая полоска у названия */
.est-event__allday {
  flex: 0 0 4px;
  align-self: flex-start;
  width: 4px;
  height: 20px;
  margin-top: 2px;
  border-radius: 2px;
  background: #3ebde6;
}

.est-event__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* «С 8:30 AM» / «До 9:30 AM» друг под другом на любой ширине (web 2.95.10, с подписями - 2.95.14) */
.est-event__from,
.est-event__to {
  display: block;
  white-space: nowrap;
}

.est-card.est-event {
  align-items: flex-start;
}

.est-event .est-clients__tools {
  align-self: center;
}

.est-cal__today {
  text-decoration: none;
}

.est-event-form__hint {
  margin: 0 0 12px;
}

/* «Расписание» без перезагрузки (web 2.60): заголовок дня с «+ Добавить», прошедшие дни бледнее,
   «Ближайший месяц» под календарём, окно нового / правки события (<dialog>, assets/js/estimator.js) */
.est-cal__cell--past .est-cal__num {
  color: #a3a5a8;
}

.est-cal__cell--on.est-cal__cell--past .est-cal__num {
  color: #fff;
}

/* «Добавить на этот день» - всегда под датой, и на широком экране (web 2.95.1, просьба автора) */
.est-sched__day-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 640px;
  scroll-margin-top: 90px;
}

.est-sched__day-head .est-clients__title {
  margin-bottom: 0;
}

.est-btn.est-sched__add {
  padding: 8px 16px;
  font-size: 14px;
}

.est-sched .est-clients,
.est-sched .est-empty {
  max-width: 640px;
}

.est-upcoming {
  max-width: 640px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e3e8ef;
}

.est-upcoming__date {
  margin: 16px 0 8px;
  color: #5c5e61;
  font-size: 14px;
  font-weight: 600;
}

.est-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  overflow: auto;
}

.est-dialog::backdrop {
  background: rgba(20, 22, 25, 0.45);
}

/* .est-flat на телефоне делает карточки плоскими во всю ширину - в окне карточка остаётся карточкой */
.est-dialog .est-dialog__form,
.est-flat .est-dialog .est-card.est-dialog__form {
  margin: 0;
  max-width: none;
  padding: 20px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

/* короткое сообщение окном (приглашение отправлено, web 2.61): уже, длинный email переносится */
.est-dialog--note {
  width: min(420px, calc(100vw - 32px));
}

.est-dialog--note .est-card__title {
  overflow-wrap: anywhere;
}

.est-dialog--note .est-actions {
  margin-top: 16px;
}

.est-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.est-dialog__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: -8px -8px 0 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a8f94;
  font-size: 18px;
  cursor: pointer;
}

.est-dialog__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1c1c1c;
}


/* предпросмотр поверх редактора (assets/js/estimator.js): фрейм на весь экран, страница под ним не прокручивается */
.est-preview-open,
.est-preview-open body {
  overflow: hidden;
}

.est-preview-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #eceef0;
}

.est-preview-layer__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* журнал действий команды (view/user/estimator/v_log.php, web 2.63.0): по дням, строка - время и «кто что где» */
.est-log__day {
  margin: 20px 0 8px;
  color: #6b6d70;
  font-size: 14px;
  font-weight: 600;
}

.est-log__day:first-child {
  margin-top: 0;
}

.est-log__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.est-log__item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
}

.est-log__item:first-child {
  border-top: 0;
}

.est-log__time {
  flex: 0 0 64px;
  color: #8a8f94;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}

.est-log__text {
  margin: 0;
  min-width: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.est-log__where,
.est-log__detail,
.est-log__amount {
  color: #6b6d70;
}

/* ------------------------------ категории расходов и доходов в «Настройках» (web 2.91.0) ------------------------------ */

.est-cats__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 8px;
}

.est-cats__title {
  margin: 0 0 4px;
  font-size: 17px;
}

.est-cats__list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.est-cats__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.est-cats__row .est-input {
  flex: 1 1 auto;
  min-width: 0;
}

.est-cats__row .est-btn {
  flex: 0 0 auto;
}

.est-cats__row--add {
  margin-top: 16px;
}

/* «Сохранить» название - круглой кнопкой с галочкой высотой с поле (web 2.95.20, просьба автора). Рамка как у est-btn;
   пока название не меняли - неактивна (data-est-dirty, серая), поменяли - голубая, при наведении - заливка.
   Значок ✓ в разметке скрыт (font-size: 0), галочка - маской цвета текста. */
.est-cats__row .est-cats__save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 0;
  border-color: #3ebde6;
  color: #3ebde6;
}

.est-cats__save::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-cats__row .est-cats__save:hover,
.est-cats__row .est-cats__save:focus-visible {
  background: #3ebde6;
  border-color: #3ebde6;
  color: #fff;
}

.est-cats__row .est-cats__save:disabled,
.est-cats__row .est-cats__save:disabled:hover {
  background: #fff;
  border-color: rgba(174, 174, 174, 0.6);
  color: #6b6d70;
}

@media (max-width: 767px) {
  .est-cats__cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* прибыль работы в списке работ (web 2.95.23) - цвета как у «Прибыль» в работе (.est-stat--profit / --loss) */
.est-list__total--profit { color: #2e9e5b; }
.est-list__total--loss { color: #a12a2a; }

/* Позиции коротко, правка окном (web 2.102.0, редактор: ol[data-est-compact] -> .est-lines--compact из JS).
   Короткая строка: название и «кол-во × цена», сумма, ↑ ↓; удалить - в окне. Окно - сама строка (.est-line--open). */
.est-line__sum,
.est-line__foot {
  display: none;
}

.est-lines--compact .est-line--item:not(.est-line--open) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.est-lines--compact .est-line--item:first-child:not(.est-line--open) {
  padding-top: 0;
}

.est-lines--compact .est-line--item:not(.est-line--open) > .est-line__desc,
.est-lines--compact .est-line--item:not(.est-line--open) > .est-line__nums,
.est-lines--compact .est-line--item .est-line__tools [data-est-remove] {
  display: none;
}

.est-lines--compact .est-line--item:not(.est-line--open) > .est-line__sum {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.est-line__sum-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.est-line__sum-name {
  overflow: hidden;
  font-weight: 600;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.est-line__sum-name--empty {
  color: #8a8f94;
  font-weight: 400;
}

.est-line__sum-meta {
  color: #6b6d70;
  font-size: 13px;
  line-height: 18px;
}

.est-line__sum-amount {
  flex: 0 0 auto;
  font-weight: 700;
  white-space: nowrap;
}

.est-lines--compact .est-line--item:not(.est-line--open) .est-line__tools {
  padding-top: 0;
}

/* окно позиции */
.est-lines--compact .est-line--open {
  position: fixed;
  box-sizing: border-box;
  z-index: 1100;
  top: max(16px, 8vh);
  left: 50%;
  display: block;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px - 8vh);
  padding: 20px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
  overflow: auto;
  transform: translateX(-50%);
}

.est-lines--compact .est-line--open .est-line__tools {
  display: none;
}

.est-lines--compact .est-line--open .est-line__nums {
  margin-top: 12px;
}

/* в окне подписи полей - всегда */
.est-lines--compact .est-line--open .est-line__label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

.est-lines--compact .est-line--open .est-line__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.est-line__foot-remove {
  color: #a12a2a;
}

.est-line-backdrop {
  position: fixed;
  z-index: 1099;
  inset: 0;
  background: rgba(20, 22, 25, 0.45);
}

.est-sheet-open,
.est-sheet-open body {
  overflow: hidden;
}

/* заголовок раздела в коротком списке - и на телефоне одной строкой с кнопками */
.est-lines--compact .est-line--section {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

/* ползунок порядка (web 2.103.0, вместо ↑ ↓): тянуть мышью или пальцем; touch-action - палец не прокручивает страницу */
.est-line__handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #8a8f94;
  cursor: grab;
  touch-action: none;
}

.est-line__handle:hover,
.est-line__handle:focus-visible {
  background: #e9f7fc;
  color: #1c1c1c;
}

.est-lines--dragging {
  user-select: none;
  -webkit-user-select: none;
}

.est-lines--dragging,
.est-lines--dragging * {
  cursor: grabbing;
}

.est-line--drag {
  position: relative;
  z-index: 2;
  border-radius: 2px;
  background: #fff;
  /* белое кольцо 10px - карточка шире строки без сдвига содержимого (отступы строки задают другие правила) */
  box-shadow: 0 0 0 10px #fff, 0 6px 24px 10px rgba(20, 22, 25, 0.16);
}

/* плавное перетаскивание (web 2.103.2): offsetTop строк - от списка; тянутая строка - отдельным слоем */
.est-lines {
  position: relative;
}

.est-line--drag {
  will-change: transform;
  border-top-color: transparent;
}

/* описание к позиции в короткой строке (web 2.103.3): под названием, серым, не больше двух строк */
.est-line__sum-details {
  display: -webkit-box;
  overflow: hidden;
  color: #50575e;
  font-size: 14px;
  line-height: 20px;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* документ в списке (web 2.103.4, просьба автора): клиент - главной строкой, чуть мельче, чем был номер; номер - под ним серым */
.est-list__client--main {
  color: #1c1c1c;
  font-size: 14px;
  font-weight: 700;
}

.est-list__number--sub {
  overflow: hidden;
  color: #6b6d70;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* карточка клиента (web 2.104.0): вся карточка - ссылка на правку (имя растянуто ::after), адрес, документы и иконки - поверх */
.est-clients__item--link {
  position: relative;
  transition: border-color 0.15s ease;
}

.est-clients__item--link:hover {
  border-color: #3ebde6;
}

.est-clients__name {
  color: inherit;
  text-decoration: none;
}

.est-clients__name::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.est-clients__item--link .est-profiles__text a:not(.est-clients__name),
.est-clients__item--link .est-clients__tools {
  position: relative;
  z-index: 1;
}

/* адрес в две строки: улица, ниже город, штат, индекс */
.est-clients__address {
  display: inline-flex;
  flex-direction: column;
  align-self: flex-start;
  margin-top: 4px;
  max-width: 100%;
  text-decoration: none;
}

.est-clients__address:hover {
  text-decoration: underline;
}

/* «позвонить» - трубка маской цвета, как корзина */
.est-icon-btn--phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f8db3;
  font-size: 0;
  text-decoration: none;
}

.est-icon-btn--phone::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.est-icon-btn--phone:hover {
  background: #e9f7fc;
}

/* число документов клиента кружком перед именем (web 2.104.1) - цвет плитки «Клиенты» (.est-tone--amber) */
.est-clients__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.est-clients__count {
  flex: 0 0 auto;
  margin-left: 0;
  background: #e89400;
  text-decoration: none;
  vertical-align: 0;
}

.est-clients__count:hover {
  background: #d27d00;
}

/* работник: по каким работам должны и где выплачено вперёд (web 2.105.0) - строка на работу, ссылкой на неё */
.est-worker-jobs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
  list-style: none;
  font-size: 14px;
}

.est-worker-jobs__item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
}

.est-worker-jobs__title {
  min-width: 0;
  overflow: hidden;
  color: #1f8db3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.est-worker-jobs__due {
  color: #1c1c1c;
  font-weight: 600;
  white-space: nowrap;
}

.est-worker-jobs__ahead {
  color: #a12a2a;
  white-space: nowrap;
}

.est-worker-jobs__item--total {
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px dashed rgba(174, 174, 174, 0.5);
  color: #6b6d70;
}

/* список работ - отдельной строкой под именем и кнопками, во всю ширину карточки */
.est-card.est-clients__item:has(> .est-worker-jobs) {
  flex-wrap: wrap;
}

.est-clients__item > .est-worker-jobs {
  flex: 1 0 100%;
  margin-top: 2px;
}

/* «Всего»: к выплате и выплачено вперёд - столбиком справа */
.est-worker-jobs__sums {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
}

/* работник - карточка-ссылка, как клиент (web 2.105.1): ссылки на работы - поверх растянутой ссылки на правку */
.est-clients__item--link > .est-worker-jobs a {
  position: relative;
  z-index: 1;
}

/* к форме работника по якорю #worker-form (нажали на карточку) - не под шапкой сайта */
.est-worker-form {
  scroll-margin-top: 90px;
}

/* правка работника - форма сразу под его карточкой (web 2.105.2); правой колонки нет - список шириной до 720px */
.est-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
}

.est-card.est-clients__item--editing {
  border-color: #3ebde6;
}

.est-workers__edit > .est-card,
.est-flat .est-workers__edit > .est-card:not(.est-clients__item):not(.est-card--list) {
  margin: 0;
  padding: 16px;
  border: 1px solid #3ebde6;
  border-radius: 12px;
  background: #f3f9fc;
}

/* к карточке работника по якорю #w{id} (правка / отмена) - не под шапкой сайта */
.est-workers__list .est-clients__item {
  scroll-margin-top: 90px;
}

/* подытог в позициях (web 2.106.0): подпись (необязательна) во всю ширину, справа сумма позиций выше, кнопки */
.est-line--subtotal,
.est-lines--compact .est-line--subtotal {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #2d2e30;
}

.est-line--subtotal .est-line__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.est-line__subtotal {
  border-color: transparent;
  background: #f4f5f7;
  text-align: right;
  font-weight: 600;
}

.est-line__subtotal-amount {
  min-width: 90px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.est-line--subtotal .est-line__tools {
  padding-top: 0;
}

/* «!» у работы в списке (web 2.106.2): работникам не доплачено или выплачено вперёд - красный знак перед названием;
   с 2.113.17 без кружка (просьба автора) */
.est-pay-alert {
  display: inline-block;
  margin-right: 8px;
  color: #d93025;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

/* работы карточками, как клиенты (web 2.106.3): справа прибыль, «ждём», статус столбиком */
/* «позвонить» клиенту в карточке работы (web 2.107.2) - по центру по высоте, между текстом и суммой */
.est-jobs-cards__call {
  align-self: center;
}

.est-jobs-cards__side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-left: auto;
  text-align: right;
}

.est-jobs-cards__due {
  color: #6b6d70;
  font-size: 13px;
  white-space: nowrap;
}

.est-clients__head .est-pay-alert {
  flex: 0 0 auto;
  margin-right: 0;
  vertical-align: 0;
}

/* «+ Новый работник» сверху (web 2.106.4): кнопка-summary, под ней форма карточкой (как форма правки под работником) */
.est-worker-new {
  max-width: 720px;
  margin: 0 0 16px;
}

.est-worker-new__toggle {
  display: inline-flex;
  list-style: none;
  cursor: pointer;
}

.est-worker-new__toggle::-webkit-details-marker {
  display: none;
}

.est-worker-new[open] > .est-worker-new__toggle {
  margin-bottom: 12px;
}

.est-worker-new > .est-card,
.est-flat .est-worker-new > .est-card:not(.est-clients__item):not(.est-card--list) {
  margin: 0;
  padding: 16px;
  border: 1px solid #3ebde6;
  border-radius: 12px;
  background: #f3f9fc;
}

/* страница работника (web 2.106.5): итоги и каждая работа - строки «подпись слева, сумма справа» */
.est-worker-page {
  max-width: 720px;
}

.est-worker-page > .est-card.est-clients__item {
  flex-wrap: wrap;
}

.est-worker-sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  flex: 1 0 100%;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(174, 174, 174, 0.35);
  font-size: 15px;
}

.est-worker-sum dt {
  color: #50575e;
}

.est-worker-sum dd {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.est-worker-sum .est-worker-sum__bold {
  color: #1c1c1c;
  font-weight: 600;
}

.est-worker-sum .est-worker-sum__sub {
  padding-left: 12px;
  color: #6b6d70;
  font-size: 14px;
}

.est-worker-sum .est-worker-sum__total {
  padding-top: 8px;
  border-top: 1px dashed rgba(174, 174, 174, 0.5);
  font-weight: 700;
}

.est-worker-sum__ok {
  color: #2e9e5b;
  font-weight: 600;
}

.est-worker-job {
  margin: 0;
  padding: 16px 16px;
}

.est-worker-job--due {
  border-left: 4px solid #2d2e30;
}

.est-worker-job--ahead {
  border-left: 4px solid #a12a2a;
}

.est-worker-job__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.est-worker-job__title {
  color: #1f8db3;
  font-weight: 700;
}

.est-worker-page__edit {
  margin-top: 24px;
}

.est-worker-page__edit > .est-card,
.est-flat .est-worker-page__edit > .est-card:not(.est-clients__item):not(.est-card--list) {
  margin: 0;
  padding: 16px;
  border: 1px solid #3ebde6;
  border-radius: 12px;
  background: #f3f9fc;
}

.est-worker-page__delete {
  margin-top: 12px;
}

/* карточки работ на странице работника - и на телефоне карточками с рамкой (.est-flat делает карточки плоскими) */
.est-flat .est-clients .est-card.est-worker-job {
  margin: 0;
  padding: 16px 16px;
  border: 1px solid rgba(174, 174, 174, 0.6);
  border-radius: 12px;
}

.est-flat .est-clients .est-card.est-worker-job--due {
  border-left: 4px solid #2d2e30;
}

.est-flat .est-clients .est-card.est-worker-job--ahead {
  border-left: 4px solid #a12a2a;
}

/* корзина (web 2.110.0): справа «Восстановить» и ✕; внизу «Очистить корзину» */
.est-trash__tools {
  align-items: center;
  align-self: center;
}

.est-trash__left {
  margin-top: 2px;
  font-size: 13px;
}

.est-trash__empty {
  margin-top: 24px;
}

/* «В архиве» рядом с кнопкой в блоке действий документа */
.est-doc-actions .est-status--archived {
  margin-right: 8px;
}

/* к «О работе» по якорю #about после «Сохранить» / «В архив» (web 2.112.3) - не под шапкой сайта */
.est-job-about {
  scroll-margin-top: 90px;
}

/* иконка архива (assets/icons/estimator/archive-box.svg) на кнопках «В архив» и в меню статусов (web 2.113.3) */
.est-archive-icon,
.est-menu svg {
  display: inline-flex;
  vertical-align: -0.15em;
  margin-right: 8px;
  color: #3ebde6;
  font-size: 1.15em;
}

/* меню статусов как в приложении (select[data-est-menu], assets/js/estimator.js) */
.est-menu {
  position: relative;
  display: inline-block;
  min-width: 0;
}

.est-menu__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.est-menu__btn::after {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid #8a8f98;
  border-bottom: 2px solid #8a8f98;
  transform: rotate(45deg);
}

.est-menu__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.est-menu__list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  max-width: calc(100vw - 32px);
  padding: 8px 0;
  border-radius: 12px;
  background: #fafafa;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.est-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 20px 12px 16px;
  border: 0;
  background: none;
  color: #1c1c1c;
  font: inherit;
  font-size: 17px;
  text-align: left;
  cursor: pointer;
}

.est-menu__item:hover,
.est-menu__item:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  outline: none;
}

.est-menu__check {
  flex: none;
  width: 26px;
  font-weight: 600;
  visibility: hidden;
}

.est-menu__item[aria-selected="true"] .est-menu__check {
  visibility: visible;
}

.est-menu__item--icon svg {
  margin-right: 12px;
  font-size: 1.2em;
}

.est-menu__sep {
  height: 1px;
  margin: 8px 20px 8px 40px;
  background: #e1e1e3;
}

/* «В архив» / «Вернуть из архива» внизу редактора документа (web 2.113.4) */
.est-archive-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 8px;
  scroll-margin-top: 90px;
}


/* подпись исполнителя в настройках (web 2.118.0): текущая подпись и холст (assets/js/sign_pad.js) */
.est-bizsign__current {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #2d2e30;
}

.est-bizsign__current img {
  max-width: 220px;
  max-height: 70px;
}

.est-bizsign__form {
  margin-top: 16px;
}

.est-sign-pad {
  position: relative;
  margin: 0 0 12px;
  border: 1px dashed #b8bcc2;
  border-radius: 6px;
  background: #fafbfc;
}

.est-sign-pad canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;   /* палец рисует, а не листает страницу */
  cursor: crosshair;
}

.est-sign-pad__hint {
  position: absolute;
  left: 12px;
  bottom: 8px;
  color: #9a9ea3;
  font-size: 12px;
  pointer-events: none;
}

.est-sign-pad__clear {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: #2a8fc0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* подпись уже есть - «Заменить подпись» раскрывает холст */
.est-bizsign__replace {
  margin-top: 10px;
}

.est-bizsign__replace > summary {
  display: inline-block;
  list-style: none;
}

.est-bizsign__replace > summary::-webkit-details-marker {
  display: none;
}

/* «Поделиться» без ссылки (web 2.118.2): значок слева от подписи */
.est-share-create {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.est-share-create__icon,
.est-share-create__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

/* образец «Сменить тариф» (web 2.139.0): карточки тарифов, оплата, таблица */
.est-plan__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.est-plan__change {
  padding: 6px 16px;
  font-size: 14px;
}

.est-upgrade__sample {
  background: #fff3d6;
}

.est-upgrade__h2 {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.3;
}

.est-upgrade__plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}

.est-upgrade__plan {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid rgba(174, 174, 174, 0.5);
  border-top: 4px solid #d5d9df;
  border-radius: 12px;
  background: #fff;
}

.est-upgrade__plan--basic {
  border-top-color: #4fb3d6;
}

.est-upgrade__plan--pro {
  border-top-color: #f0b429;
}

.est-upgrade__plan.is-current {
  background: #f1f9fc;
}

.est-upgrade__plan.is-selected {
  box-shadow: 0 0 0 2px #3ebde6;
}

.est-upgrade__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.est-upgrade__top .est-plan-table__yours {
  margin: 0;
}

.est-upgrade__name {
  font-size: 20px;
  font-weight: 700;
  color: #1d2733;
}

.est-upgrade__tagline {
  margin: 2px 0 14px;
  color: #8a8f94;
  font-size: 13px;
}

.est-upgrade__price {
  margin: 0 0 16px;
  color: #1d2733;
}

.est-upgrade__price b {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.est-upgrade__price span {
  margin-left: 4px;
  color: #8a8f94;
  font-size: 14px;
}

.est-upgrade__btn {
  margin: 0 0 18px;
  text-align: center;
}

.est-upgrade__btn.is-disabled,
.est-upgrade__btn.is-disabled:hover {
  border-color: transparent;
  background: #e8eef3;
  color: #6b6d70;
  cursor: default;
}

.est-upgrade__plus {
  margin: 0 0 8px;
  color: #6b6d70;
  font-size: 13px;
  font-weight: 600;
}

.est-upgrade__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.est-upgrade__list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  line-height: 20px;
}

.est-upgrade__list .est-plan-table__yes {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.est-upgrade__list .est-plan-table__yes svg {
  width: 12px;
  height: 12px;
}

/* оплата */
.est-upgrade__pay {
  max-width: 560px;
  padding: 24px;
}

.est-upgrade__summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f3;
  font-size: 15px;
}

.est-upgrade__summary--total {
  margin-bottom: 18px;
  font-size: 17px;
  font-weight: 700;
}

.est-upgrade__form .est-input {
  margin-bottom: 14px;
}

.est-upgrade__form .est-input[readonly] {
  background: #f6f7f9;
  color: #6b6d70;
}

.est-upgrade__element {
  margin: 0 0 16px;
}

.est-upgrade__element:empty {
  display: none;
}

.est-upgrade__mock[hidden] {
  display: none;
}

.est-upgrade__card {
  position: relative;
}

.est-upgrade__card .est-input {
  padding-right: 130px;
}

.est-upgrade__brands {
  position: absolute;
  top: 9px;
  right: 10px;
  display: flex;
  gap: 4px;
}

.est-upgrade__brands i {
  padding: 1px 5px;
  border: 1px solid #dfe3e8;
  border-radius: 4px;
  color: #6b6d70;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
}

.est-upgrade__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.est-upgrade__submit {
  width: 100%;
  margin-top: 4px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
}

.est-upgrade__secure {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  color: #8a8f94;
  font-size: 12px;
  line-height: 18px;
}

.est-upgrade__secure svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .est-upgrade__plans {
    grid-template-columns: 1fr;
  }

  .est-upgrade__pay {
    padding: 18px 16px;
  }
}

/* помесячно / за год (web 2.140.0) */
.est-upgrade__period {
  display: flex;
  width: fit-content;
  margin: 0 auto 20px;
  padding: 4px;
  border-radius: 999px;
  background: #eef1f4;
}

.est-upgrade__period-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  color: #4a525c;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.est-upgrade__period-btn:hover {
  color: #1d2733;
}

.est-upgrade__period-btn.is-active {
  background: #fff;
  color: #1d2733;
  box-shadow: 0 2px 6px rgba(30, 50, 90, 0.12);
}

.est-upgrade__save {
  padding: 1px 7px;
  border-radius: 999px;
  background: #e3f6ea;
  color: #2e9e5b;
  font-size: 12px;
  font-weight: 700;
}

.est-upgrade__per {
  margin: -10px 0 16px;
  color: #6b6d70;
  font-size: 13px;
}

.est-upgrade__per b {
  color: #2e9e5b;
}

.est-upgrade__summary--save {
  color: #2e9e5b;
}

/* Ошибка поля до отправки (assets/js/form-check.js, web 2.170.32): как на сайте - красная рамка без фона
   (1px + внутренняя тень 1px, поле не сдвигается) и текст под полем */
.est-input.is-error {
  border-color: #d14343;
  box-shadow: inset 0 0 0 1px #d14343;
}

.est-field__error {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: #d14343;
}

/* окна Estimator на ПК шире: 560 → 720px, короткие сообщения 420 → 540px (web 2.170.43, просьба автора) */
@media (min-width: 768px) {
  .est-dialog {
    width: min(720px, calc(100vw - 32px));
  }

  .est-dialog--note {
    width: min(540px, calc(100vw - 32px));
  }
}

/* ↑ ↓ (порядок категорий и способов оплаты): в Open Sans стрелок нет - браузер брал цветной emoji-шрифт, одна
   стрелка выходила красной, другая зелёной. Обычный шрифт со стрелками; недоступная (первая ↑, последняя ↓) - бледная
   (web 2.170.58) */
.est-icon-btn {
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-variant-emoji: text;
}
.est-icon-btn:disabled,
.est-icon-btn:disabled:hover {
  opacity: 0.35;
  border-color: rgba(174, 174, 174, 0.6);
  color: #6b6d70;
  cursor: default;
}

/* премии и удержания в работе (web 2.170.59): премия - зелёным, удержание - красным */
.est-adjust--plus {
  color: #2e9e5b;
}
.est-adjust--minus {
  color: #d14343;
}

/* Порядок категорий перетаскиванием (web 2.170.62): ручка ⋮⋮ слева, поднятая строка - с тенью поверх соседей.
   touch-action: none - палец на ручке не листает страницу (иначе не перетащить); листать можно за любым другим местом */
.est-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 40px;
  margin: 0 -4px 0 -6px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8a8f94;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.est-drag:hover,
.est-drag:focus-visible {
  color: #1f8db3;
  background: #e9f7fc;
}
.est-cats__item {
  position: relative;
  border-radius: 6px;
  background: #fff;
}
.est-cats__item--drag {
  z-index: 2;
  box-shadow: 0 6px 18px rgba(30, 50, 90, .16);
  transition: box-shadow .15s;
}
.est-cats__item--drag .est-drag {
  cursor: grabbing;
  color: #1f8db3;
}
.est-cats__list--dragging,
.est-cats__list--dragging * {
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- графики «Бизнеса» (web 2.174.0, view/user/estimator/v_business_charts.php) ----------
   Палитра проверена валидатором (dataviz): получено - синий, расходы - оранжевый, прибыль - бирюзовый
   (дальтонизм: худшая пара ΔE 9.2; бирюзовый 2.82:1 к белому - поэтому подписи и таблица). Текст - не цветом ряда. */
.est-viz {
  --viz-received: #2a78d6;
  --viz-expenses: #eb6834;
  --viz-profit: #1baf7a;
  --viz-grid: #e6e9ec;
  --viz-axis: #8a8f94;
  --viz-track: #eef1f4;
}

/* плитки «Бизнеса» на телефоне - по две в ряд (по одной занимали целый экран) */
@media (max-width: 480px) {
  .est-stats--biz {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .est-stats--biz .est-stat {
    padding: 12px;
  }

  .est-stats--biz .est-stat__value {
    font-size: 20px;
  }

  .est-stats--biz .est-spark {
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
  }
}

.est-stats .est-stat--trend {
  position: relative;
  padding-bottom: 40px;
}

.est-spark {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  width: calc(100% - 32px);
  height: 24px;
}

.est-spark polyline {
  stroke: #2a78d6;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.est-delta {
  font-weight: 600;
  white-space: nowrap;
}

.est-delta--up { color: #2e9e5b; }
.est-delta--down { color: #c8442f; }

.est-biz__range {
  margin: 4px 0 16px;
}

.est-viz__totals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  color: #5b6168;
  font-size: 14px;
}

.est-viz__totals b {
  color: #1c1c1c;
}

.est-viz__key {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: -1px;
}

.est-viz__key--received { background: var(--viz-received); }
.est-viz__key--expenses { background: var(--viz-expenses); }
.est-viz__key--profit { height: 3px; border-radius: 2px; vertical-align: 3px; background: var(--viz-profit); }

.est-viz__chart {
  padding: 4px 0 26px 48px;   /* слева - подписи шкалы, снизу - месяцы */
}

.est-viz__plot {
  position: relative;
  height: 220px;
}

/* линия сетки и подпись шкалы слева от неё */
.est-viz__gl {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid var(--viz-grid);
}

.est-viz__gl--zero { border-top-color: #c9ced3; }

.est-viz__axis {
  position: absolute;
  right: calc(100% + 8px);
  top: -8px;
  color: var(--viz-axis);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

/* месяц: вся высота поля - зона наведения; столбики от нуля, ширина - пикселями (не тянутся на широком экране) */
.est-viz__m {
  position: absolute;
  top: 0;
  bottom: 0;
  outline: none;
}

.est-viz__m:hover,
.est-viz__m:focus-visible {
  background: rgba(42, 120, 214, 0.06);
}

.est-viz__bar {
  position: absolute;
  width: min(14px, 36%);
  min-height: 2px;
  border-radius: 4px 4px 0 0;
}

.est-viz__bar--received { right: calc(50% + 1px); background: var(--viz-received); }
.est-viz__bar--expenses { left: calc(50% + 1px); background: var(--viz-expenses); }
.est-viz__chart--single .est-viz__bar--received { right: auto; left: 50%; width: min(26px, 60%); transform: translateX(-50%); }

.est-viz__ml {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  color: var(--viz-axis);
  font-size: 11px;
  line-height: 14px;
  white-space: nowrap;
}

.est-viz__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.est-viz__line polyline {
  fill: none;
  stroke: var(--viz-profit);
  stroke-width: 2;
  stroke-linejoin: round;
}

.est-viz__dot {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--viz-profit);
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}

/* узкий экран: подписи месяцев через один, если их больше 6 */
@media (max-width: 480px) {
  .est-viz__chart { padding-left: 40px; }
  .est-viz__plot { height: 180px; }
  .est-viz__chart:not(.est-viz__few) .est-viz__m:nth-child(even of .est-viz__m) .est-viz__ml { visibility: hidden; }
}

/* две колонки карточек на компьютере, одна на телефоне */
.est-viz__grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin: 0 0 20px;
}

.est-viz__grid2 > .est-card {
  margin: 0;
}

/* горизонтальные полоски: подпись и сумма сверху, полоса под ними */
.est-hbars {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.est-hbars__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  outline: none;
}

.est-hbars__label {
  overflow: hidden;
  color: #1c1c1c;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
}

a.est-hbars__label:hover { color: #1f8db3; }

.est-hbars__value {
  color: #1c1c1c;
  font-size: 14px;
  font-weight: 600;
}

.est-hbars__track {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 4px;
  background: var(--viz-track);
  overflow: hidden;
}

.est-hbars__fill {
  display: block;
  height: 100%;
  border-radius: 4px;
}

.est-hbars__fill--received { background: var(--viz-received); }
.est-hbars__fill--expenses { background: var(--viz-expenses); }

.est-hbars__sub {
  grid-column: 1 / -1;
  color: #8a8f94;
  font-size: 12px;
}

/* кольцо «принято клиентами» */
.est-ring {
  display: flex;
  align-items: center;
  gap: 20px;
}

.est-ring__svg {
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
}

.est-ring__track { fill: none; stroke: var(--viz-track); stroke-width: 9; }
.est-ring__fill { fill: none; stroke: var(--viz-received); stroke-width: 9; stroke-linecap: round; }
.est-ring__value { fill: #1c1c1c; font-size: 16px; font-weight: 700; }

.est-ring__list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #1c1c1c;
  font-size: 14px;
}

.est-ring__caption {
  color: #8a8f94;
  font-size: 13px;
}

/* подсказка при наведении / касании (data-est-tip, assets/js/estimator.js) */
.est-viz-tip {
  position: fixed;
  z-index: 1000;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(28, 28, 28, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 18px;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.est-viz-tip[hidden] { display: none; }

/* «Остаток $36.00» под суммой отправки на баланс (web 2.174.6): нажатие подставляет сумму */
.est-fill {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 10px;     /* web 2.174.7: воздух между кнопкой и пояснением (просьба автора) */
  margin: 4px 0 20px;  /* под рядом полей, над «Отправить» / «Отмена» */
}

.est-fill__btn {
  padding: 4px 12px;
  border: 1px solid rgba(62, 189, 230, 0.6);
  border-radius: 999px;
  background: #e9f7fc;
  color: #1f8db3;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.est-fill__btn:hover,
.est-fill__btn:focus-visible {
  border-color: #3ebde6;
  background: #d8f1fa;
  outline: none;
}
