:root {
  --re-primary: #2549e0;
  --re-primary-strong: #1d3bb5;
  --re-primary-soft: #e5eafa;
  --re-primary-rgb: 37, 73, 224;
  --bs-primary: var(--re-primary);
  --bs-primary-rgb: var(--re-primary-rgb);
  --bs-link-color: var(--re-primary);
  --bs-link-color-rgb: var(--re-primary-rgb);
  --bs-link-hover-color: var(--re-primary-strong);
  --bs-link-hover-color-rgb: 29, 59, 181;
  --bs-focus-ring-color: rgba(var(--re-primary-rgb), .25);
  --re-bg: #f2f5fb;
  --re-surface: #ffffff;
  --re-surface-soft: #e9effa;
  --re-text: #101828;
  --re-text-muted: #46556d;
  --re-border: #c8d3e8;
  /* таблицы: тонкие, но заметные линии и контрастная шапка; плоский фон вместо градиентов */
  --re-line: #a9b5cc;
  --re-line-strong: #8492ac;
  --re-table-head-bg: #e1e7f3;
  --re-sort-accent: 2px;
  --re-surface-tint: #f4f7fd;
  --re-success: #1d8e5f;
  --re-warning: #9b6700;
  --re-danger: #b3261e;
  --re-radius-sm: 12px;
  --re-radius-md: 16px;
  --re-radius-lg: 20px;
  --re-shadow-sm: 0 10px 24px rgba(18, 35, 75, 0.1);
  --re-shadow-md: 0 20px 44px rgba(20, 44, 102, 0.16);
  --re-sidebar-width: 272px;
  --re-sidebar-collapsed-width: 92px;
  --re-content-max-width: 1680px;
  /* шрифты — static/css/fonts.css. Моноширинный — только для кодов и ID, системный (не скачивается) */
  --re-font-sans: "Inter", -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --re-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bs-font-sans-serif: var(--re-font-sans);
  --bs-body-font-family: var(--re-font-sans);
  --bs-font-monospace: var(--re-font-mono);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--re-font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--re-text);
  background: var(--re-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--re-primary);
  text-decoration: none;
}

a:hover {
  color: var(--re-primary-strong);
}

input,
select,
textarea,
button {
  font: inherit;
  color: inherit;
}

/* Три начертания Inter: 400 — текст и строки таблиц, 500 — заголовки, кнопки, шапки таблиц, 600 — редкий акцент
   в тексте. Тяжелее 600 ничего нет: умолчания Bootstrap, DataTables и браузера (b, strong, th, dt, .fw-bold — 700)
   переопределены здесь. */
b,
strong {
  font-weight: 600;
}

th,
dt {
  font-weight: 500;
}

.fw-bold,
.fw-bolder,
.fw-semibold {
  font-weight: 600 !important;
}

.alert-link {
  font-weight: 600;
}

.badge {
  --bs-badge-font-weight: 500;
}

/* Цифры в таблицах и в столбцах значений — одной ширины, иначе столбцы «пляшут».
   Крупные отдельные числа (плитки показателей, итоги) остаются пропорциональными — см. после .re-value-mono */
td,
dd {
  font-variant-numeric: tabular-nums;
}

/* иконки: шрифт, настройки и размер по умолчанию (20px) — в static/css/fonts.css; здесь — выравнивание по строке */
.material-symbols-outlined,
.mi {
  vertical-align: middle;
}

button,
a,
.nav-link,
.re-side-link,
.btn,
.dropdown-item {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 120ms ease;
}

button:focus-visible,
a:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
.re-side-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--re-primary) 40%, transparent);
  outline-offset: 2px;
}

.re-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--re-sidebar-width) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.re-shell.sidebar-collapsed {
  grid-template-columns: var(--re-sidebar-collapsed-width) minmax(0, 1fr);
}

.re-shell.sidebar-collapsed .re-side-top {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 4px;
}

.re-shell.sidebar-collapsed .re-side-brand {
  width: 100%;
  justify-content: center;
}

.re-shell.sidebar-collapsed .re-side-brand-copy,
.re-shell.sidebar-collapsed .re-side-link span:not(.material-symbols-outlined, .mi),
.re-shell.sidebar-collapsed .re-side-user-copy,
.re-shell.sidebar-collapsed .re-side-logout span:not(.material-symbols-outlined, .mi) {
  display: none;
}

.re-shell.sidebar-collapsed .re-side-link {
  justify-content: center;
  padding: 0;
}

.re-shell.sidebar-collapsed .re-side-user {
  justify-content: center;
}

.re-shell.sidebar-collapsed .re-side-bottom {
  width: 100%;
  padding: 8px 6px;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.re-shell.sidebar-collapsed .re-side-logout {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  margin-top: 0;
  display: inline-grid;
  place-items: center;
}

.re-shell.sidebar-collapsed .re-side-user-copy {
  display: none !important;
}

.re-shell.sidebar-collapsed .re-side-user {
  width: 100%;
  justify-content: center;
}

.re-shell.sidebar-collapsed .re-side-logout .material-symbols-outlined {
  margin: 0;
  display: block;
  font-size: 20px;
  line-height: 1;
}

.re-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--re-border);
  background: var(--re-surface-tint);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.re-side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 6px;
}

.re-side-brand {
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: var(--re-text);
  text-decoration: none;
}

.re-side-brand:hover {
  color: var(--re-text);
}

.re-side-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
  order: 0;
}

.re-side-brand-copy {
  min-width: 0;
  order: 1;
}

.re-side-brand-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.05;
  white-space: nowrap;
}

.re-side-brand-sub {
  display: block;
  color: var(--re-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.re-side-toggle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--re-border);
  background: #fff;
  display: inline-grid;
  place-items: center;
  color: var(--re-text-muted);
  cursor: pointer;
}

.re-side-toggle:hover {
  background: color-mix(in srgb, var(--re-primary) 9%, white);
  color: var(--re-primary-strong);
}

.re-side-menu {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.re-side-link {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 13px;
  min-height: 38px;
  background: transparent;
  color: var(--re-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 500;
}

.re-side-link:hover {
  border-color: color-mix(in srgb, var(--re-primary) 22%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 8%, white);
  color: var(--re-text);
}

.re-side-link.is-active {
  border-color: color-mix(in srgb, var(--re-primary) 34%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 13%, white);
  color: var(--re-primary-strong);
}

.re-side-link .material-symbols-outlined {
  font-size: 20px;
  flex: 0 0 auto;
}

.re-side-link-disabled {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
}

.re-side-bottom {
  margin-top: auto;
  flex: 0 0 auto;
  border: 0;
  border-radius: 14px;
  padding: 10px;
  background: transparent;
}

.re-side-user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.re-side-user-copy {
  min-width: 0;
}

.re-side-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: color-mix(in srgb, var(--re-primary) 14%, white);
  color: var(--re-primary-strong);
  font-size: 14px;
  font-weight: 500;
  flex: 0 0 auto;
}

.re-side-user-name {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.re-side-user-role {
  margin-top: 1px;
  font-size: 13px;
  color: var(--re-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.re-side-logout {
  width: 100%;
  margin-top: 9px;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--re-danger) 28%, var(--re-border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--re-danger) 4%, white);
  color: #8f4742;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.re-side-logout:hover {
  background: color-mix(in srgb, var(--re-danger) 8%, white);
}

.re-side-logout .material-symbols-outlined {
  font-size: 20px;
}

.re-main {
  min-width: 0;
  padding: 0;
}

.re-page-wrap {
  border: 0;
  border-radius: 0;
  background: var(--re-surface);
  min-height: 100vh;
  padding: 14px;
}

.re-breadcrumb-wrap {
  margin-bottom: 10px;
}

.re-breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 13px;
}

.breadcrumb-item,
.breadcrumb-item a {
  color: var(--re-text-muted);
}

.breadcrumb-item.active {
  color: var(--re-text);
  font-weight: 500;
}

.container,
.container-fluid {
  width: 100%;
  max-width: min(var(--re-content-max-width), 100%);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* шапка страницы — на белом фоне без рамки, как у страницы фида; до следующего ряда (поиск, вкладки) — заметный отступ */
.re-page-head,
.page-header {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.page-header h1,
.re-page-head h1,
.re-page-head .h1,
h1,
.h1 {
  margin: 0;
  font-size: clamp(30px, 2.1vw, 43px);
  line-height: 1.1;
  font-weight: 500;
}

h2,
.h2 {
  margin: 0;
  font-size: clamp(24px, 1.7vw, 34px);
  line-height: 1.12;
  font-weight: 500;
}

h3,
.h3 {
  font-size: clamp(20px, 1.4vw, 27px);
  font-weight: 500;
}

.re-page-subtitle {
  margin: 6px 0 0;
  font-size: 19px;
  color: var(--re-text-muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--re-border);
  margin: 12px 0;
}

.re-section,
.card,
.card-body,
.re-table-card,
.re-panel {
  border-radius: 14px;
}

.card,
.re-panel,
.re-section {
  border: 1px solid var(--re-border);
  background: var(--re-surface);
  box-shadow: var(--re-shadow-sm);
}

.card-head,
.card-header {
  border-bottom: 1px solid var(--re-border);
}

.card-body {
  padding: 12px;
}

.alert {
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid;
}

.alert-info {
  background: #edf4ff;
  border-color: #9cc0ff;
  color: #173f96;
}

.alert-warning {
  background: #fff7e6;
  border-color: #f0d397;
  color: #8a5e00;
}

.alert-danger {
  background: #fff1f0;
  border-color: #efb4b1;
  color: #8b2220;
}

.btn {
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  --bs-btn-bg: var(--re-primary);
  --bs-btn-border-color: var(--re-primary);
  --bs-btn-hover-bg: var(--re-primary-strong);
  --bs-btn-hover-border-color: var(--re-primary-strong);
  --bs-btn-active-bg: var(--re-primary-strong);
  --bs-btn-active-border-color: var(--re-primary-strong);
  --bs-btn-disabled-bg: var(--re-primary);
  --bs-btn-disabled-border-color: var(--re-primary);
  --bs-btn-focus-shadow-rgb: var(--re-primary-rgb);
  border-color: transparent;
  background: var(--re-primary);
  color: #fff;
  box-shadow: none;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff;
  background: var(--re-primary-strong);
}

.btn-outline-secondary {
  border-color: var(--re-border);
  color: var(--re-text);
  background: var(--re-surface);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
  border-color: color-mix(in srgb, var(--re-primary) 26%, var(--re-border));
  color: var(--re-primary-strong);
  background: color-mix(in srgb, var(--re-primary) 8%, white);
}

.btn-outline-primary {
  --bs-btn-color: var(--re-primary);
  --bs-btn-border-color: var(--re-primary);
  --bs-btn-hover-bg: var(--re-primary);
  --bs-btn-hover-border-color: var(--re-primary);
  --bs-btn-active-bg: var(--re-primary);
  --bs-btn-active-border-color: var(--re-primary);
  --bs-btn-disabled-color: var(--re-primary);
  --bs-btn-disabled-border-color: var(--re-primary);
  --bs-btn-focus-shadow-rgb: var(--re-primary-rgb);
  border-color: color-mix(in srgb, var(--re-primary) 35%, var(--re-border));
  color: var(--re-primary-strong);
  background: color-mix(in srgb, var(--re-surface-soft) 55%, white);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
  background: color-mix(in srgb, var(--re-primary) 12%, white);
  color: var(--re-primary-strong);
}

.btn-success {
  color: #0f6f46;
  background: color-mix(in srgb, var(--re-success) 14%, white);
  border-color: color-mix(in srgb, var(--re-success) 36%, var(--re-border));
}

.btn-success:hover,
.btn-success:focus-visible {
  color: #0d5d3d;
  background: color-mix(in srgb, var(--re-success) 20%, white);
}

.btn-danger {
  color: #fff;
  background: #bf3e3e;
  border-color: #a63131;
  box-shadow: none;
}

.btn-danger:hover,
.btn-danger:focus-visible {
  color: #fff;
  background: #aa3030;
  border-color: #972727;
}

.btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.re-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.re-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.re-actions-right .btn {
  white-space: nowrap;
}

.form-label {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--re-text-muted);
}

.form-control,
.form-select,
textarea {
  border-radius: 11px;
  border-color: var(--re-border);
  min-height: 42px;
  font-size: 13px;
  background: color-mix(in srgb, var(--re-surface-soft) 52%, white);
}

.form-control,
textarea {
  padding: 8px 12px;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 40px 8px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d6b85' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--re-primary) 35%, var(--re-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-primary) 16%, transparent);
  background: #fff;
}

.re-field {
  margin-bottom: 12px;
}

.re-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 16px;
}

.re-filter-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.re-filter-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--re-text-muted);
}

.re-filter-grid .re-field {
  min-width: 0;
  margin-bottom: 0;
}

.re-filter-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.re-filter-actions-between {
  justify-content: space-between;
  flex-wrap: wrap;
}

.re-range-group {
  margin-bottom: 0;
  min-width: 0;
  display: grid;
  gap: 7px;
}

.re-field.range-field,
.re-range-group.range-field {
  grid-column: span 3;
}

.re-range-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 16px minmax(170px, 1fr);
  gap: 6px;
  align-items: center;
}

.re-range-row .form-control {
  min-width: 170px;
}

.re-range-sep {
  text-align: center;
  color: var(--re-text-muted);
  font-weight: 500;
}

.re-select-multiple {
  display: none;
}

.re-multi {
  position: relative;
}

.re-multi-trigger {
  width: 100%;
  border: 1px solid var(--re-border);
  border-radius: 11px;
  background: color-mix(in srgb, var(--re-surface-soft) 56%, white);
  min-height: 44px;
  text-align: left;
  padding: 8px 38px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--re-text);
  display: flex;
  align-items: center;
}

.re-multi-trigger::after {
  content: "expand_more";
  font-family: "Material Symbols Rounded";
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  font-feature-settings: "liga";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5d6b85;
  pointer-events: none;
}

.re-multi-trigger:hover {
  border-color: color-mix(in srgb, var(--re-primary) 24%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 7%, white);
}

.re-multi-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  padding-right: 4px;
}

.re-multi-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid var(--re-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--re-shadow-sm);
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  display: none;
}

.re-multi.open .re-multi-menu {
  display: block;
}

.re-multi-option {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  font-size: 13px;
  text-align: left;
}

.re-multi-option:hover {
  background: color-mix(in srgb, var(--re-primary) 8%, white);
}

.re-multi-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid var(--re-border);
  background: #fff;
  display: inline-grid;
  place-items: center;
  position: relative;
}

.re-multi-option input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform 120ms ease;
}

.re-multi-option input[type="checkbox"]:checked {
  border-color: var(--re-primary);
  background: var(--re-primary);
}

.re-multi-option input[type="checkbox"]:checked::after {
  transform: rotate(-45deg) scale(1);
}

.re-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.re-kpi-card {
  border: 1px solid var(--re-border);
  border-radius: 13px;
  background: var(--re-surface);
  padding: 11px;
}

.re-kpi-label {
  font-size: 12px;
  color: var(--re-text-muted);
}

.re-kpi-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.05;
}

.re-kpi-delta {
  margin-top: 4px;
  font-size: 12px;
}

.re-kpi-delta.pos {
  color: #10744a;
}

.re-kpi-delta.neg {
  color: #972724;
}

.re-table-card {
  border: 1px solid var(--re-line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.re-table-toolbar {
  border-bottom: 1px solid var(--re-line);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  position: static;
  top: auto;
  z-index: auto;
}

.re-search {
  min-width: 260px;
  flex: 1;
  border: 1px solid color-mix(in srgb, var(--re-text-muted) 28%, var(--re-border));
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  min-height: 40px;
  box-shadow: inset 0 1px 0 rgba(16, 24, 40, 0.03);
}

.re-search:focus-within {
  border-color: color-mix(in srgb, var(--re-primary) 62%, white);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--re-primary) 16%, transparent),
    inset 0 1px 0 rgba(16, 24, 40, 0.03);
}

.re-search .material-symbols-outlined {
  color: #5d6b85;
}

.re-search input {
  border: 0;
  outline: none;
  width: 100%;
  background: transparent;
  min-height: 36px;
  padding: 0;
  color: var(--re-text);
}

.re-search input::placeholder {
  color: color-mix(in srgb, var(--re-text-muted) 86%, white);
}

.re-table-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.re-filter-toggle {
  background: #171a21;
  border-color: #171a21;
  color: #fff;
}

.re-filter-toggle:hover,
.re-filter-toggle:focus-visible {
  background: #0f1218;
  border-color: #0f1218;
  color: #fff;
}

.re-filter-toggle.has-active-filters {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18) inset;
}

.re-filter-indicator {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f4f7ff;
  color: #111827;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

.re-toolbar-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(420px, 92vw);
  border: 1px solid var(--re-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--re-shadow-md);
  z-index: 75;
  display: none;
}

.re-toolbar-popover.open {
  display: block;
}

.re-toolbar-popover-head {
  padding: 11px 12px;
  border-bottom: 1px solid var(--re-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.re-toolbar-popover-head strong {
  font-weight: 500;
}

.re-toolbar-popover-body {
  padding: 10px 12px;
  max-height: 340px;
  overflow: auto;
}

.re-col-list {
  display: grid;
  gap: 6px;
}

.re-col-item {
  border: 1px solid var(--re-border);
  border-radius: 10px;
  min-height: 36px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
}

.re-col-item input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--re-primary);
}

/* поиск по названиям столбцов (16.10) — над списком, список прокручивается под ним */
.re-columns-search {
  margin: 10px 12px 0;
}

.re-columns-search-empty {
  padding: 10px 12px 0;
}

.re-columns-panel {
  max-height: 440px;
  overflow: auto;
}

.re-columns-group {
  padding: 10px 12px;
}

.re-columns-group + .re-columns-group {
  border-top: 1px solid var(--re-border);
}

/* при поиске по столбцам первой видимой может оказаться группа «Остальные» — без разделителя над ней (класс ставит скрипт) */
.re-columns-group.is-first-shown {
  border-top: 0;
}

/* без капса: обычный регистр читается легче (аббревиатуры пишем заглавными в самом тексте) */
.re-columns-group-title {
  margin: 0 0 10px;
  font-size: 13px;
  color: #626b76;
  font-weight: 500;
}

.re-sortable-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.re-sortable-item {
  border: 1px solid var(--re-border);
  border-radius: 10px;
  background: #fff;
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px 22px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: grab;
}

.re-sortable-item.dragging {
  opacity: 0.5;
}

.re-sortable-item.pinned {
  background: #f7f9fd;
}

.re-sortable-item:hover {
  border-color: color-mix(in srgb, var(--re-primary) 24%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 6%, white);
}

.re-sortable-dots {
  color: #808896;
  font-weight: 500;
  user-select: none;
}

.re-sortable-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--re-border);
  display: grid;
  place-items: center;
  background: #fff;
  color: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
}

.re-sortable-check.active {
  border-color: var(--re-primary);
  background: var(--re-primary);
  color: #fff;
}

.re-columns-note {
  margin: 8px 12px 10px;
  min-height: 16px;
  font-size: 12px;
  color: #8b2220;
}

/* 11.10: столбец, неприменимый к фиду или режиму, скрыт сам — серый, с пометкой; галочку здесь не переключают */
.re-sortable-item.is-auto-hidden {
  background: var(--re-surface-tint);
  color: var(--re-text-muted);
}

.re-sortable-item.is-auto-hidden .re-sortable-check {
  opacity: 0.45;
  cursor: not-allowed;
}

.re-sortable-label {
  min-width: 0;
}

.re-sortable-auto {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--re-text-muted);
}

.re-columns-auto-note {
  margin: -4px 12px 10px;
  font-size: 12px;
  line-height: 16px;
  color: var(--re-text-muted);
}

.re-lots-summary {
  border-bottom: 1px solid var(--re-border);
  background: #fff;
  padding: 0 0 20px;
  position: static;
  top: auto;
  z-index: auto;
}

.re-lots-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.re-lots-summary-table th,
.re-lots-summary-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--re-border);
  text-align: left;
}

.re-lots-summary-table thead th {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  background: #eef2fa;
  position: static;
}

.re-lots-summary-table thead th:first-child {
  min-width: 320px;
}

.re-lots-summary-table thead th:first-child strong {
  margin: 0 6px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.re-lots-summary-table tbody td:first-child {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  background: #f6f8fe;
}

.re-lots-summary-table tbody td {
  font-size: 14px;
  font-weight: 400;
  background: #fff;
}

.re-lots-summary-table .re-summary-total-col {
  background: #eaf0ff !important;
  color: #163681;
  font-weight: 600;
  min-width: 130px;
  width: 130px;
  white-space: nowrap;
}

.re-lots-summary-table tbody tr:last-child td {
  border-bottom: 0;
}

.re-summary-head-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.re-summary-source-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--re-primary-strong);
  font-size: 16px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

/* Align summary values with header text start (not icon start) */
.re-lots-summary-table tbody td:nth-child(3),
.re-lots-summary-table tbody td:nth-child(4),
.re-lots-summary-table tbody td:nth-child(5),
.re-lots-summary-table tbody td:nth-child(6) {
  padding-left: 46px;
}

.re-filter-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.26);
  z-index: 78;
}

.re-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 94vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--re-border);
  /* тень только у открытой панели: у закрытой она заходила в окно серой полосой у правого края */
  box-shadow: none;
  z-index: 79;
  transform: translateX(100%);
  transition: transform 220ms ease, box-shadow 220ms ease;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.re-filter-drawer.open {
  transform: translateX(0);
  box-shadow: -24px 0 56px rgba(16, 24, 40, 0.2);
}

.re-filter-drawer-head {
  padding: 14px;
  border-bottom: 1px solid var(--re-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* поиск по полям фильтра (16.10) — отдельная полоса под шапкой, тело шторки прокручивается под ней */
.re-filter-drawer-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--re-border);
}

.re-filter-drawer-search .re-chip-search {
  margin-bottom: 0;
}

.re-filter-drawer-search .re-chip-search-empty {
  padding: 8px 2px 0;
}

.re-filter-drawer-head h4 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.re-filter-drawer-body {
  overflow: auto;
  padding: 12px;
}

.re-filter-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.re-filter-drawer-span-2 {
  grid-column: span 2;
}

.re-filter-drawer .form-label {
  font-size: 13px;
}

.re-filter-drawer-item .re-field {
  margin-bottom: 0;
}

.re-chip-single,
.re-chip-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.re-chip-btn,
.re-chip-check {
  border: 1px solid var(--re-border);
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.re-chip-btn {
  cursor: pointer;
}

.re-chip-btn.is-active,
.re-chip-check.is-active {
  border-color: color-mix(in srgb, var(--re-primary) 46%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 14%, white);
  color: var(--re-primary-strong);
}

.re-chip-check {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.re-chip-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.re-chip-scroll {
  max-height: 176px;
  overflow: auto;
  padding: 2px;
}

/* поиск по длинному списку чипов в панели фильтра (16.10): поле над списком, как поиск над таблицей (.re-search) */
.re-chip-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0 10px;
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--re-text-muted) 28%, var(--re-border));
  border-radius: 10px;
  background: #fff;
}

.re-chip-search:focus-within {
  border-color: color-mix(in srgb, var(--re-primary) 62%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-primary) 16%, transparent);
}

.re-chip-search .material-symbols-outlined {
  font-size: 18px;
  color: #5d6b85;
}

.re-chip-search-input {
  border: 0;
  outline: none;
  width: 100%;
  min-height: 32px;
  padding: 0;
  background: transparent;
  font-size: 13px;
  color: var(--re-text);
}

.re-chip-search-input::placeholder {
  color: color-mix(in srgb, var(--re-text-muted) 86%, white);
}

.re-chip-search-empty {
  font-size: 13px;
  color: var(--re-text-muted);
  padding: 2px 0;
}

.re-select-multiple-native {
  display: block !important;
  min-height: 140px;
  padding: 8px 10px !important;
  background-image: none !important;
  white-space: normal;
}

.re-select-multiple-native option {
  padding: 6px 8px;
  border-radius: 8px;
}

.re-screen-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(17, 24, 39, 0.28);
  display: grid;
  place-items: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.re-screen-loader[hidden] { display: none; }

.re-screen-loader-box {
  min-width: 220px;
  max-width: 92vw;
  border-radius: 16px;
  border: 1px solid var(--re-border);
  background: #fff;
  box-shadow: var(--re-shadow-md);
  padding: 14px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.re-screen-loader-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d6deef;
  border-top-color: var(--re-primary);
  border-radius: 50%;
  animation: re-spin 0.9s linear infinite;
}

.re-lots-loading {
  display: grid;
  place-items: center;
  min-height: clamp(240px, 50vh, 480px);
}

.re-lots-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #d6deef;
  border-top-color: var(--re-primary);
  border-radius: 50%;
  animation: re-spin 0.9s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .re-lots-loading-spinner { animation: none; }
}

@keyframes re-spin {
  to {
    transform: rotate(360deg);
  }
}

.re-filter-drawer-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 12px;
  padding-top: 12px;
  padding-bottom: 4px;
  border-top: 1px solid var(--re-border);
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* слева в подвале панели — сколько лотов подойдёт под выбранный фильтр */
.re-filter-drawer-count {
  margin-right: auto;
  color: var(--re-text-muted);
  font-size: 13px;
  line-height: 1.3;
}

.re-filter-drawer-count b {
  color: var(--re-text);
  font-size: 17px;
  font-weight: 600;
}

.re-filter-drawer-count small {
  display: block;
  font-size: 12px;
}

.re-filter-drawer-count.is-empty b {
  color: var(--re-danger);
  font-size: 14px;
}

/* группы полей: лоты, ставки и бюджет, показатели */
.re-filter-group + .re-filter-group {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--re-line);
}

/* при поиске по полям первой видимой может оказаться не первая группа — без разделителя над ней (класс ставит скрипт) */
.re-filter-group.is-first-shown {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.re-filter-group-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 500;
}

/* диапазоны — по два в ряд; у длинных подписей поля всё равно на одной линии */
.re-filter-group .re-filter-drawer-grid {
  align-items: end;
}

/* в половине ширины панели поля «от» и «до» сжимаются (общие правила держат их не уже 170px) */
.re-filter-group .re-range-row {
  grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr);
  gap: 4px;
}

.re-filter-group .re-range-row .form-control {
  min-width: 0;
  padding-left: 10px;
  padding-right: 8px;
  -moz-appearance: textfield;
}

.re-filter-group .re-range-row .form-control::-webkit-outer-spin-button,
.re-filter-group .re-range-row .form-control::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.re-no-scroll {
  overflow: hidden;
}

.re-strategy-under-lots {
  margin: 20px 0 0;
  padding: 0 14px 30px;
}

.re-strategy-inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.re-strategy-inline-row .re-actions-right {
  flex: 0 0 auto;
  padding-right: 2px;
}

.re-strategy-inline-select {
  flex: 1 1 auto;
  min-width: 320px;
}

.re-strategy-inline-group .input-group-text {
  background: #eef2fa;
  color: #1f2937;
  border-color: var(--re-border);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  min-height: 38px;
  padding: 6px 12px;
}

.re-strategy-inline-group .form-select {
  min-height: 38px;
  font-size: 14px;
  line-height: 1.2;
  border-color: var(--re-border);
}

.re-table-scroll {
  width: 100%;
  overflow: auto;
  max-height: min(98vh, 1128px);
  position: relative;
}

.re-table-scroll table,
table.dataTable,
table.display {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 !important;
}

/* ширина — по столбцам: по умолчанию их 15 (05.10), раньше было видно 30+ и стояло min-width: 3550px — с малым числом
   столбцов вся лишняя ширина уходила в «ID · Объект» */
.re-table-scroll #lotsTable {
  min-width: 100%;
}

.re-table-scroll #dt_main {
  min-width: 3550px;
}

.re-table-scroll #dt_lots_simple {
  min-width: 1180px;
}

.re-strategies-table {
  width: 100% !important;
  min-width: 1120px;
  table-layout: fixed;
}

.re-strategies-table th,
.re-strategies-table td {
  white-space: normal !important;
  vertical-align: top;
}

.re-strategies-table .re-strategies-col-description {
  min-width: 300px;
}

.re-strategy-description-cell {
  line-height: 1.4;
  color: #3d4c64;
  word-break: break-word;
}

.re-strategies-table .re-strategies-col-actions {
  width: 1%;
  white-space: nowrap !important;
  text-align: right;
}

.re-strategies-table .re-strategies-col-actions .btn {
  margin-left: auto;
}

table.dataTable thead th,
table.dataTable thead td,
.re-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 22;
  background: var(--re-table-head-bg);
  color: var(--re-text);
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 10px;
  border-bottom: 1px solid var(--re-line-strong) !important;
  border-right: 1px solid #c3cde0;
  white-space: nowrap;
  background-clip: padding-box;
}

.re-table-scroll thead {
  position: sticky;
  top: 0;
  z-index: 21;
}

.re-table-scroll #lotsTable thead th {
  position: sticky !important;
  top: 0 !important;
}

.re-strategy-page .tab-content {
  margin-top: 8px;
}

.re-strategy-page .re-strategy-tabs {
  margin-bottom: 14px !important;
}

.re-strategy-pane-stack {
  display: grid;
  gap: 14px;
}

.re-strategy-subhead {
  margin: 2px 0 12px;
}

.re-strategy-page .card-body {
  padding: 16px;
}

.re-strategy-page .re-range-group {
  gap: 8px;
}

.re-strategy-filter-form {
  display: grid;
  gap: 14px;
}

.re-strategy-ranges-grid {
  column-gap: 12px;
  row-gap: 14px;
}

table.dataTable tbody td,
.re-table-scroll tbody td {
  font-size: 14px;
  line-height: 1.5;
  padding: 10px;
  border-bottom: 1px solid var(--re-line);
  border-right: 1px solid #edf2fb;
  vertical-align: middle;
  white-space: nowrap;
  background: #fff;
}

/* DataTables (класс display) даёт каждой ячейке border-top и красит чётные строки, отсортированный столбец и строку
   под курсором через inset box-shadow: из-за этого между строками были двойные линии, а первый столбец выглядел серым.
   Строки разделяет одна тонкая линия (border-bottom выше), подсветка при наведении — ниже, обычным фоном. */
table.dataTable.display > tbody > tr > td,
table.dataTable.display > tbody > tr > th {
  border-top: 0;
  box-shadow: none !important;
}

/* последняя строка не рисует линию: под ней рамка карточки, иначе внизу получится двойная */
.re-table-card tbody tr:last-child > td {
  border-bottom-color: transparent;
}

/* у последнего столбца нет правой линии: справа рамка карточки, иначе там получалась двойная */
.re-table-card tr > :last-child {
  border-right: 0;
}

.re-user-row + .re-user-row {
  margin-top: 4px;
}

.re-feed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 720px;
  white-space: normal;
}

.re-feed-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 12px 4px 6px;
  border: 1px solid var(--re-border);
  border-radius: 999px;
  background: #fff;
  color: var(--re-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.re-feed-chip:hover {
  border-color: color-mix(in srgb, var(--re-primary) 46%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 8%, white);
  color: var(--re-primary-strong);
}

.re-feed-chip-logo {
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

span.re-feed-chip-logo {
  font-size: 20px;
  line-height: 1;
  color: var(--re-text-muted);
}

.re-feed-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* «Добавить фид» в списке аккаунтов: без рамки, чтобы не спорить с чипами фидов */
.btn.re-add-feed-btn,
.btn.re-add-feed-btn:active {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.btn.re-add-feed-btn:hover,
.btn.re-add-feed-btn:focus-visible {
  border-color: transparent;
  background: color-mix(in srgb, var(--re-primary) 10%, white);
  color: var(--re-primary-strong);
}

/* строка поиска и пресеты площадок — над таблицей, вне её контейнера */
.re-list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.re-list-toolbar .re-search {
  flex: 1 1 320px;
}

.re-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.re-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--re-border);
  border-radius: 999px;
  background: #fff;
  color: var(--re-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.re-preset-chip:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--re-primary) 46%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 8%, white);
}

.re-preset-chip[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--re-primary) 46%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 14%, white);
  color: var(--re-primary-strong);
}

/* чип без строк при текущем поиске не нажимается: клик не приведёт к пустой выдаче */
.re-preset-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.re-preset-chip-logo {
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.re-preset-chip-count {
  min-width: 1ch;
  color: var(--re-text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.re-preset-chip[aria-pressed="true"] .re-preset-chip-count {
  color: inherit;
}

/* Страница фида: компактная шапка (без хлебных крошек и карточки) */
.re-feed-sync { margin: -4px 0 14px; color: var(--re-text-muted); font-size: 12px; }
.re-feed-sync > summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; cursor: pointer; list-style: none; }
.re-feed-sync > summary::-webkit-details-marker { display: none; }
.re-feed-sync > summary:focus-visible { outline: 2px solid var(--re-primary, #2549e0); outline-offset: 3px; border-radius: 4px; }
.re-feed-sync-label { font-weight: 600; }
.re-feed-sync-current { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.re-feed-sync-current[hidden] { display: none; }
.re-feed-sync-stamp { white-space: nowrap; font-variant-numeric: tabular-nums; }
.re-feed-sync-more { text-decoration: underline; text-underline-offset: 3px; }
.re-feed-sync-body { max-width: 620px; padding: 12px 14px; margin-top: 8px; border: 1px solid var(--re-border, #ccd5ee); border-radius: 12px; background: var(--re-surface, #fff); }
.re-feed-sync-body p { margin: 0 0 8px; }
.re-feed-sync-body p:last-child { margin-bottom: 0; }
.re-feed-sync-body dl { margin: 8px 0 12px; }
.re-feed-sync-body dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 3px 0; }
.re-feed-sync-body dt { font-weight: 500; }
.re-feed-sync-body dd { margin: 0; font-variant-numeric: tabular-nums; }

.re-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin: 2px 0 14px;
}

.re-feed-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.re-feed-head-logo {
  flex: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.re-feed-head-copy {
  min-width: 0;
}

.re-feed-head-title {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.re-feed-head-title h1 {
  font-size: 26px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.re-feed-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 2px;
  color: var(--re-text-muted);
  font-size: 13px;
}

/* карандаш «редактировать» рядом с заголовком или подписью */
.re-icon-edit {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--re-text-muted);
  cursor: pointer;
}

.re-icon-edit .material-symbols-outlined {
  font-size: 20px;
}

.re-icon-edit:hover,
.re-icon-edit:focus-visible {
  background: color-mix(in srgb, var(--re-primary) 10%, white);
  color: var(--re-primary-strong);
}

.re-icon-edit-sm {
  width: 24px;
  height: 24px;
  margin: -4px 0;
  border-radius: 6px;
}

.re-icon-edit-sm .material-symbols-outlined {
  font-size: 16px;
}

/* Полоса показателей над таблицей лотов. Разделители — тенью справа и снизу у каждой ячейки:
   у краёв их обрезает overflow, поэтому линии остаются верными при любом переносе на узком экране. */
.re-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--re-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 20px;
}

@media (min-width: 1200px) {
  .re-metrics {
    /* лоты и итог не уже своего содержимого: на 1200–1300px «все лоты фида» и «101% бюджета — превышение» обрезались.
       Бюджет фида — не плиткой, а первым блоком формулы под плитками */
    grid-template-columns: minmax(max-content, 0.8fr) minmax(max-content, 1.5fr) repeat(3, minmax(0, 1fr));
  }
}

.re-metric {
  min-width: 0;
  padding: 10px 14px;
  box-shadow: 1px 0 0 #d9e0ee, 0 1px 0 #d9e0ee;
}

.re-metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  color: var(--re-text-muted);
  font-size: 12px;
  font-weight: 500;
}

.re-metric-icon {
  font-size: 16px;
}

.re-metric-source-feed .re-metric-icon {
  color: #6b7a99;
}

.re-metric-source-manual .re-metric-icon {
  color: #c27c00;
}

.re-metric-source-strategy .re-metric-icon {
  color: var(--re-primary);
}

.re-metric-source-ai .re-metric-icon {
  color: #7a4fe0;
}

/* Бюджет по шагам — последняя строка карточки показателей, во всю ширину; линию сверху дают нижние границы плиток.
   На ≥1200px колонки плиток не уже своего содержимого, и строка во всю ширину растянула бы их своим текстом:
   width: 0 убирает её из расчёта ширины колонок, min-width: 100% растягивает на всю карточку.
   Формула из блоков: бюджет фида − зафиксировано = делит стратегия → распределено; в узкой карточке — сетка 2 × 2 */
.re-budget-chain {
  grid-column: 1 / -1;
  width: 0;
  min-width: 100%;
  padding: 8px 14px 10px;
  container-type: inline-size;
}

.re-budget-flow {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

/* «Весь фид · как делится бюджет» — слева в той же строке, чтобы строка не добавляла высоты */
.re-budget-flow-title {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 4px;
  color: var(--re-text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.re-budget-flow-title b {
  color: var(--re-text);
  font-size: 13px;
  font-weight: 500;
}

.re-budget-flow-title .re-help-trigger {
  vertical-align: -3px;
}

.re-budget-step {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--re-surface-tint);
}

.re-budget-step.is-key {
  background: color-mix(in srgb, var(--re-primary) 9%, white);
}

/* «вручную N + из фида M» — чуть шире, чтобы пояснение уместилось в строку */
.re-budget-step.is-held {
  flex-grow: 1.25;
}

.re-budget-step-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--re-text-muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

/* карандаш бюджета в подписи блока — меньше, чтобы не раздувал строку */
.re-budget-step-label .re-icon-edit {
  width: 22px;
  height: 22px;
  margin: -3px 0;
}

.re-budget-step-label .re-icon-edit .material-symbols-outlined {
  font-size: 16px;
}

.re-budget-step-value {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.re-budget-step.is-key .re-budget-step-value {
  color: var(--re-primary-strong);
}

.re-budget-step-note {
  display: block;
  color: var(--re-text-muted);
  font-size: 11.5px;
  line-height: 1.3;
}

.re-budget-step-note.is-warn {
  color: var(--re-warning);
}

.re-budget-op {
  flex: 0 0 auto;
  align-self: center;
  color: var(--re-text-muted);
  font-size: 20px;
  font-weight: 500;
}

.re-budget-chain-warn {
  margin: 8px 0 0;
  color: var(--re-danger);
  font-size: 13px;
  font-weight: 600;
}

/* Ошибки и предупреждения Циана в таблице лотов: ошибки красным, предупреждения обычным текстом, мелко */
.re-cian-issues {
  display: grid;
  gap: 2px;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.re-cian-issues .is-error {
  color: var(--re-danger);
  font-weight: 500;
}

/* Тень «Единого пула» под разбивкой бюджета — одна приглушённая строка (libs/strategy_pool.py, решение 05.10) */
.re-pool-shadow {
  grid-column: 1 / -1;
  width: 0;
  min-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding: 8px 14px 10px;
  border-top: 1px dashed var(--re-line);
  color: var(--re-text-muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.re-pool-shadow b {
  color: var(--re-text);
  font-weight: 500;
}

.re-pool-shadow-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.re-pool-shadow-title b {
  font-size: 13px;
}

.re-pool-shadow-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--re-surface-tint);
  font-size: 11px;
}

/* «Единый пул» включён в стратегии: его план основной — метка заметнее, чем «тень» */
.re-pool-shadow.is-on .re-pool-shadow-tag {
  background: var(--re-primary-soft, #e8f0fe);
  color: var(--re-primary-strong);
  font-weight: 500;
}

.re-pool-shadow-show {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--re-primary-strong);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}


.re-pool-shadow-show:hover {
  text-decoration: underline;
}

@container (max-width: 700px) {
  .re-budget-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .re-budget-op {
    display: none;
  }

  .re-budget-flow-title {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
  }

  /* знак шага — в подписи: «− Зафиксировано», «= Делит стратегия» */
  .re-budget-step-label[data-op]::before {
    content: attr(data-op) "\00a0";
  }
}

.re-metric-value {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.re-metric-sub {
  color: var(--re-text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.re-metric-bar {
  height: 4px;
  margin-top: 6px;
  border-radius: 2px;
  background: #dfe5f1;
  overflow: hidden;
}

.re-metric-bar > i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--re-primary);
  transition: width 200ms ease;
}

.re-metric-bar > i.is-over {
  background: var(--re-danger);
}

/* Таблица лотов прокручивается вместе со страницей: своей вертикальной прокрутки у неё нет (иначе колесо над таблицей
   прокручивало только её, а всё, что выше, стояло на месте). У верхнего края окна держится копия шапки — .re-float-head. */
#lotsTableScroll,
.re-table-scroll-page {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}

.re-lots-more {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  color: var(--re-text-muted);
  font-size: 13px;
}
.re-lots-more[hidden], .re-lots-more [hidden] { display: none !important; }

.re-float-head {
  position: fixed;
  top: 0;
  z-index: 60;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.12);
}

.re-float-head > .re-float-head-scroll {
  max-height: none;
  overflow: hidden;
}

.re-float-head table {
  table-layout: fixed;
}

.re-float-head th.is-pinned-edge {
  border-right: 1px solid color-mix(in srgb, #4d576a 52%, var(--re-border)) !important;
  box-shadow: 1px 0 0 rgba(16, 24, 40, 0.08);
}

/* горизонтальная полоса прокрутки внизу окна, пока родная полоса таблицы ниже края экрана */
.re-float-scroll {
  position: fixed;
  bottom: 0;
  z-index: 60;
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid var(--re-line);
  background: rgba(255, 255, 255, 0.92);
}

.re-float-scroll > div {
  height: 1px;
}

.re-float-scroll::-webkit-scrollbar {
  height: 12px;
}

.re-float-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 6px;
  background: #a9b5cc;
  background-clip: content-box;
}

.re-confirm-warn {
  color: var(--re-danger);
  font-weight: 600;
}

/* метка правила позиций у ставки по стратегии: ↓ — снижена, ‖ — держим текущую */
.re-rule-mark {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: help;
  vertical-align: 1px;
}

.re-rule-mark.is-cut {
  background: #e3f4ea;
  color: #14724a;
}

.re-rule-mark.is-hold {
  background: #eef0f4;
  color: #5d6b85;
}

/* «нет Топа»: стратегия ставит ставки только лотам в Топе */
.re-rule-mark.is-notop {
  background: #fff3e0;
  color: #8a5a00;
  font-weight: 600;
  white-space: nowrap;
}

/* Окно «Отправка ставок»: пояснение с иллюстрацией, итоги по всему фиду, фид, в который запишутся ставки */
.re-send-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--re-primary) 22%, var(--re-border));
  border-radius: 14px;
  background: var(--re-surface-tint);
}

.re-send-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.re-send-art {
  display: block;
  flex: 0 0 auto;
  width: 280px;
  max-width: 46%;
  height: auto;
}

.re-send-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 0;
  border: 1px solid var(--re-line);
  border-radius: 12px;
  overflow: hidden;
}

.re-send-stats > div {
  min-width: 0;
  padding: 10px 14px;
  box-shadow: 1px 0 0 #d9e0ee;
}

.re-send-stats dt {
  color: var(--re-text-muted);
  font-size: 12px;
  font-weight: 500;
}

.re-send-stats dd {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.re-send-stats small {
  display: block;
  color: var(--re-text-muted);
  font-size: 12px;
}

.re-send-stats .is-over small {
  color: var(--re-danger);
  font-weight: 600;
}

/* бюджет по шагам: бюджет фида − зафиксировано = делит стратегия → ставки по стратегии */
.re-send-chain {
  margin: 10px 0 0;
  padding: 4px 14px;
  border: 1px solid var(--re-border);
  border-radius: 12px;
  font-size: 13px;
}

.re-send-chain > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

.re-send-chain > div + div {
  border-top: 1px dashed var(--re-border);
}

.re-send-chain dt {
  min-width: 0;
  font-weight: 500;
  color: var(--re-text-muted);
}

.re-send-chain dd {
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
}

.re-send-chain .is-total dt,
.re-send-chain .is-total dd {
  color: var(--re-text);
  font-weight: 600;
}

.re-send-stats ~ .re-confirm-warn,
.re-send-chain ~ .re-confirm-warn {
  margin: 8px 0 0;
}

.re-send-feed {
  margin: 16px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--re-line);
  border-radius: 12px;
}

.re-send-feed-label {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

.re-send-feed-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--re-primary-strong);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.re-send-feed-link .material-symbols-outlined {
  flex: none;
  font-size: 20px;
}

.re-send-feed-url {
  min-width: 0;
  overflow-wrap: anywhere;
}

.re-send-feed-link:hover .re-send-feed-url,
.re-send-feed-link:focus-visible .re-send-feed-url {
  text-decoration: underline;
}

.re-send-feed-note {
  margin: 8px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff6e0;
  color: #6b4e00;
  font-size: 13px;
}

/* 15.10 (В2-1): какой фид грузит кабинет Циана — зелёным, когда это фид REA; адрес фида переносится по символам;
   под текстом — когда Циан обработал фиды кабинета */
.re-send-feed-note.is-ok {
  background: #e6f4ec;
  color: #14724a;
}

.re-send-feed-note .re-send-feed-addr {
  overflow-wrap: anywhere;
}

.re-send-feed-meta {
  margin: 6px 0 0;
  color: var(--re-text-muted);
  font-size: 12px;
}

/* иллюстрация: пунктир «течёт» к площадке, от логотипа расходятся волны, ракета и ставки чуть покачиваются */
.re-send-art .art-flow {
  animation: re-art-flow 1.4s linear infinite;
}

.re-send-art .art-ping {
  transform-box: fill-box;
  transform-origin: center;
  animation: re-art-ping 2.4s ease-out infinite;
}

.re-send-art .art-ping-late {
  animation-delay: 1.2s;
}

.re-send-art .art-rocket {
  animation: re-art-bob 2.4s ease-in-out infinite;
}

.re-send-art .art-coins {
  animation: re-art-bob 2.4s ease-in-out 0.4s infinite;
}

@keyframes re-art-flow {
  to {
    stroke-dashoffset: -20;
  }
}

@keyframes re-art-ping {
  from {
    transform: scale(0.85);
    opacity: 0.45;
  }

  to {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes re-art-bob {
  50% {
    transform: translate(3px, -2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .re-send-art * {
    animation: none !important;
  }
}

@media (max-width: 760px) {
  .re-send-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .re-send-art {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  /* три цифры остаются в ряд — поуже поля и шрифт */
  .re-send-stats > div {
    padding: 8px 10px;
  }

  .re-send-stats dd {
    font-size: 15px;
  }

  .re-send-art {
    max-width: 320px;
    margin: 0 auto;
  }

}

/* Под показателями: слева стратегия со справкой в одной рамке, справа — отправка ставок на площадку.
   Ниже отдельным рядом — поиск и действия с таблицей. Поля и кнопки обоих рядов одной высоты. */
.re-lots-controls,
.re-lots-toolbar {
  --re-lots-control-h: 44px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Панель на светлом фоне: показатели, стратегия и отправка ставок — отдельно от работы с таблицей под ней */
.re-lots-panel {
  margin: 0 0 40px;
  padding: 16px;
  border-radius: var(--re-radius-md);
  background: var(--re-bg);
}

.re-lots-panel > .re-metrics {
  margin-bottom: 16px;
}

.re-lots-controls {
  gap: 12px 24px;
}

/* отправка — у правого края ряда; под кнопкой — когда отправляли в прошлый раз (кнопку не сдвигает) */
.re-lots-controls > .re-send-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-left: auto;
}

.re-send-col > .btn {
  min-height: var(--re-lots-control-h);
  padding: 0 20px;
}

/* ряд по верхнему краю: подпись под кнопкой отправки не опускает выбор стратегии */
.re-lots-controls {
  align-items: flex-start;
}

/* выбор стратегии и «Как работает» — один компонент (кнопки «Пересчитать» с 11.10 нет: выбор сам пересчитывает) */
.re-strategy-group {
  display: inline-flex;
  align-items: stretch;
  min-width: 0;
  max-width: 480px;   /* 18.10: уже прежнего (владелец: «в два раза»), длинное название — с многоточием (.re-strategy-combo-value) */
  min-height: var(--re-lots-control-h);
  margin: 0;
  border: 1px solid var(--re-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.re-strategy-group:focus-within {
  border-color: color-mix(in srgb, var(--re-primary) 62%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-primary) 16%, transparent);
}

.re-strategy-group-select {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding-left: 14px;
}

.re-strategy-select-label {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.re-strategy-group .form-select {
  min-width: 0;
  min-height: calc(var(--re-lots-control-h) - 2px);
  padding-left: 10px;
  border: 0;
  background-color: transparent;
  box-shadow: none;
  font-size: 13px;
  text-overflow: ellipsis;
}

/* «? Как работает» — справка по алгоритму ставок, второй сегмент блока стратегии */
.re-strategy-group-help {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-left: 1px solid var(--re-border);
  color: var(--re-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.re-strategy-group-help .material-symbols-outlined {
  font-size: 20px;
}

.re-strategy-group-help:hover,
.re-strategy-group-help:focus-visible {
  background: color-mix(in srgb, var(--re-primary) 10%, white);
  color: var(--re-primary-strong);
}

@media (max-width: 1279px) {
  .re-strategy-group-help {
    padding: 0 12px;
  }

  .re-strategy-group-help-text {
    display: none;
  }
}

/* ссылка на справку для телефона: на остальных экранах скрыта (специфичнее, чем общее .re-link-action ниже) */
.re-lots-controls > .re-strategy-help-mobile {
  display: none;
}

@media (max-width: 480px) {
  .re-strategy-group-help {
    display: none;
  }

  .re-lots-controls > .re-strategy-help-mobile {
    display: inline-flex;
    flex: 1 1 100%;
    min-height: 32px;
    margin-top: -4px;
  }
}

/* строка над таблицей: поиск, выгрузка, столбцы, фильтр */
.re-lots-toolbar {
  gap: 12px 16px;
  margin-bottom: 16px;
}

.re-lots-toolbar .re-search {
  flex: 1 1 220px;
  min-width: 200px;
  min-height: var(--re-lots-control-h);
  padding: 0 14px;
  gap: 10px;
}

.re-lots-toolbar .re-search input {
  min-height: calc(var(--re-lots-control-h) - 2px);
}

.re-lots-toolbar .re-table-actions {
  gap: 12px;
}

/* прямые потомки: кнопки во всплывающей панели столбцов остаются своего размера */
.re-lots-toolbar .re-table-actions > .btn {
  min-height: var(--re-lots-control-h);
  padding: 0 16px;
  font-size: 13px;
}

/* действие-ссылка без рамки: иконка и подпись */
.re-link-action {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  color: #0f6f46;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.re-link-action:disabled { opacity: .6; cursor: progress; }

.re-lots-toolbar .re-link-action {
  min-height: var(--re-lots-control-h);
  padding: 0 10px;
  border-radius: 12px;
  font-size: 13px;
}

.re-link-action .material-symbols-outlined {
  font-size: 20px;
}

.re-link-action:hover,
.re-link-action:focus-visible {
  background: color-mix(in srgb, var(--re-success) 10%, white);
  color: #0d5d3d;
}

/* Широкий экран: у двух рядов общие колонки — «Отправить ставки» у правого края над «Фильтром». Выбор стратегии —
   не шире 480px (18.10, владелец: «уменьшить по ширине в два раза»; «Автоматическая · на фиде» помещается целиком,
   длинное название — с многоточием, в списке — полностью) и прижат влево. Уже 1280px — обычные ряды (стратегия своей ширины, отправка справа). */
@media (min-width: 1280px) {
  @supports (grid-template-columns: subgrid) {
    .re-lots-bar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      column-gap: 16px;
    }

    /* панель — тоже подсетка: внутренняя граница колонок у ряда стратегии и ряда поиска общая,
       отступ панели (16px) лишь сдвигает внешние края её рядов внутрь */
    .re-lots-panel,
    .re-lots-controls,
    .re-lots-toolbar {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: subgrid;
      /* normal — промежуток между колонками берётся у .re-lots-bar, иначе края рядов разъедутся */
      column-gap: normal;
    }

    .re-lots-panel > .re-metrics {
      grid-column: 1 / -1;
    }

    .re-strategy-group {
      justify-self: start;
      width: 100%;
      max-width: 480px;
    }

    .re-lots-controls > .re-send-col {
      justify-self: end;
      margin-left: 0;
    }

    .re-lots-toolbar .re-search {
      min-width: 0;
    }

    .re-lots-toolbar .re-table-actions {
      justify-content: flex-end;
    }
  }
}

@media (max-width: 768px) {
  /* на телефоне панель — во всю ширину экрана (поля страницы здесь 8px): ряд стратегии не теряет ширину,
     и названию стратегии хватает места */
  .re-lots-panel {
    margin: 0 -8px 28px;
    padding: 12px 8px;
    border-radius: 0;
  }

  .re-lots-panel > .re-metrics {
    margin-bottom: 12px;
  }

  .re-strategy-group {
    flex: 1 1 100%;
    max-width: none;
  }

  .re-lots-controls > .re-send-col {
    width: 100%;
    margin-left: 0;
    align-items: stretch;
  }

  .re-send-col > .re-last-send {
    text-align: center;
  }

  .re-lots-toolbar .re-search {
    flex-basis: 100%;
  }
}

@media (max-width: 480px) {
  /* на узком экране подпись «Стратегия» убираем — место нужно названию стратегии */
  .re-strategy-select-label {
    display: none;
  }

  /* три действия помещаются в один ряд: подпись выгрузки короче («XLSX»), отступы чуть меньше */
  .re-link-action-verb {
    display: none;
  }

  .re-lots-toolbar .re-table-actions {
    gap: 8px;
  }

  .re-lots-toolbar .re-table-actions > .btn {
    padding: 0 12px;
  }

  .re-lots-toolbar .re-link-action {
    padding: 0 6px;
  }
}

/* «Наверх» — после нескольких экранов прокрутки (порог в ui.js). Выше плавающей полосы прокрутки таблицы (14px),
   ниже выезжающих панелей, меню и модалок */
.re-to-top {
  position: fixed;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 65;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--re-border);
  border-radius: 999px;
  background: #fff;
  color: var(--re-text);
  box-shadow: var(--re-shadow-sm);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
}

.re-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.re-to-top .material-symbols-outlined {
  font-size: 20px;
}

.re-to-top:hover,
.re-to-top:focus-visible {
  border-color: color-mix(in srgb, var(--re-primary) 45%, white);
  color: var(--re-primary-strong);
}

@media (max-width: 768px) {
  .re-to-top {
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .re-to-top {
    transition: none;
  }
}

@media print {
  .re-to-top {
    display: none;
  }
}

/* Таблица без собственной прокрутки: страница скроллится целиком, а шапка таблицы клеится к верхней границе окна.
   Карточка обрезает содержимое по скруглению через clip: в отличие от hidden он не делает её контейнером
   прокрутки, иначе sticky-шапка клеилась бы к карточке, а не к окну. */
.re-table-card-flow {
  overflow: hidden;
  overflow: clip;
}

.re-table-scroll-flow {
  overflow: visible;
  max-height: none;
}

/* Shared page scrolling for billing, lists, journals and analytics tables.
   The component adds this class only outside dialogs. It also supersedes old
   inline height limits and mobile overflow rules. */
.re-table-scroll-page {
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

/* Категории и классы REA: длинные названия переносятся, столбец не шире своего заголовка */
.re-cell-wrap {
  max-width: 200px;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Столбцы «Объект» (15.10: район, метро, ЖК / посёлок…): длинное название переносится по пробелам, слово не рвётся
   («Одинцовский г. о.», а не «Одинцовски / й г. о.»); столбец не шире 220px */
.re-cell-text {
  max-width: 220px;
  white-space: normal;
}

/* «ID · Объект»: «ID · адрес» одной строкой с переносом (адрес — ссылка на объявление). 300px: на фиде 4 средняя строка
   79px вместо 99px — почти все строки высотой с фото */
.re-table-scroll #lotsTable th[data-col="id"] {
  min-width: 300px !important;
}

.re-table-scroll #lotsTable td[data-col="id"] {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.re-lot-ident {
  display: block;
}

.re-lot-ident-sep {
  color: var(--re-text-muted);
}

/* Ссылки CRM и «Анализ ↗» — в правом нижнем углу ячейки «ID · Объект», снизу у ячейки запас,
   чтобы адрес не наезжал на ссылку. Опора — сама ячейка: закреплённая (sticky) уже позиционирована, незакреплённой даём
   relative */
.re-table-scroll #lotsTable tbody td[data-col="id"] {
  padding-bottom: 24px;
}

.re-table-scroll #lotsTable tbody td[data-col="id"]:not(.is-pinned) {
  position: relative;
}

.re-lot-ident-actions {
  position: absolute;
  right: 10px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.re-lot-open,
.re-lot-crm-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--re-success);
  white-space: nowrap;
  text-decoration: none;
}

.re-lot-open-arrow {
  width: 11px;
  height: 11px;
  flex: none;
}

.re-lot-open:hover,
.re-lot-open:focus-visible {
  color: #156b47;
  text-decoration: underline;
}

.re-lot-crm-link { color: #931F2B; }
.re-lot-crm-link:hover,
.re-lot-crm-link:focus-visible { color: #931F2B; text-decoration: underline; }

.re-lot-ident-id {
  font-family: var(--re-font-mono);
  font-size: 13px;
  color: var(--re-text);
  white-space: nowrap;
  /* цель касания шире текста: на телефоне тап по номеру притягивался к соседней ссылке адреса и открывал объявление
     вместо панели лота (проверка 16.10) */
  display: inline-block;
  padding: 6px 4px;
  margin: -6px -4px;
}

.re-table-scroll #lotsTable tbody td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.col-hidden {
  display: none !important;
}

.is-pinned {
  position: sticky;
  left: 0;
  background: color-mix(in srgb, var(--re-surface) 86%, #eef4ff);
}

tbody td.is-pinned {
  z-index: 18;
}

thead th.is-pinned {
  z-index: 32;
  box-shadow: 1px 0 0 var(--re-border);
}

.re-table-scroll #lotsTable tbody td.is-pinned {
  z-index: 19;
}

.re-table-scroll #lotsTable thead th.is-pinned {
  z-index: 34 !important;
}

.re-table-scroll #lotsTable th.is-pinned-edge,
.re-table-scroll #lotsTable td.is-pinned-edge {
  border-right: 1px solid color-mix(in srgb, #4d576a 52%, var(--re-border)) !important;
  box-shadow: 1px 0 0 rgba(16, 24, 40, 0.08);
}

.re-table-scroll #lotsTable tbody tr:hover td.is-pinned {
  background: color-mix(in srgb, var(--re-primary) 10%, white);
}

.re-table-empty {
  text-align: center;
  color: var(--re-text-muted);
  padding: 18px 12px !important;
}

.re-lots-empty-state {
  padding: 24px 16px;
  text-align: center;
}

.re-lots-empty-state p {
  margin: 0 0 12px;
}

table.dataTable tbody tr:hover td,
.re-table-scroll tbody tr:hover td {
  background: color-mix(in srgb, var(--re-primary) 6%, white);
}

table.dataTable.no-footer {
  border-bottom: 0;
}

table.dataTable tbody tr.exclusive-row td {
  background: #fff;
}

table.dataTable tbody tr.missing-row td {
  color: #96a1b5;
}

.re-sort-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.re-sort-trigger:hover .re-sort-label {
  color: var(--re-primary-strong);
}

.re-sort-trigger:disabled {
  cursor: default;
  opacity: 0.8;
}

.re-sort-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.re-sort-icon {
  font-size: 16px;
  color: #8e99ad;
  flex: 0 0 auto;
}

thead th.sorted-asc .re-sort-icon,
thead th.sorted-desc .re-sort-icon {
  color: var(--re-primary-strong);
}

/* Столбец, по которому идёт сортировка: подпись синяя, а серая линия под шапкой заменена тонкой синей
   (толщина — переменная --re-sort-accent). Линия заменяет границу, а не лежит поверх неё, поэтому полоска тонкая.
   sorting_asc/desc ставит DataTables, sorted-asc/desc — таблица лотов. */
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc,
.re-table-scroll thead th.sorted-asc,
.re-table-scroll thead th.sorted-desc {
  color: var(--re-primary-strong);
  border-bottom: var(--re-sort-accent) solid var(--re-primary) !important;
}

/* заголовок столбца: кнопка сортировки + «?» с подсказкой */
.re-th-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.re-th-head .re-sort-trigger {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.re-help-trigger {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--re-text-muted) 40%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--re-text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  cursor: help;
}

.re-help-trigger::before {
  content: "?";
}

/* зона нажатия больше значка (под палец); влево почти не выходит, чтобы не перекрывать сортировку */
.re-help-trigger::after {
  content: "";
  position: absolute;
  inset: -10px -10px -10px -3px;
}

/* 15.10 (правило Г1): значок серый; при наведении, фокусе и открытой подсказке — синеет (контур и «?»), без заливки */
.re-help-trigger:hover,
.re-help-trigger[aria-expanded="true"] {
  border-color: var(--re-primary);
  background: var(--re-primary-soft);
  color: var(--re-primary-strong);
}

/* «?» в подписи плитки и в названии шага разбивки бюджета — не раздувает строку */
.re-metric-label .re-help-trigger {
  margin: -2px 0;
}

.re-budget-step-label .re-help-trigger {
  width: 16px;
  height: 16px;
  margin: -3px 0;
  font-size: 10px;
}

.re-help-trigger:focus-visible {
  outline: 2px solid var(--re-primary);
  outline-offset: 2px;
}

.re-help-tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1090;
  width: max-content;
  max-width: min(320px, calc(100vw - 16px));
  padding: 10px 12px;
  border-radius: 12px;
  background: #101828;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  box-shadow: var(--re-shadow-md);
}

.re-help-tip-title {
  margin-bottom: 4px;
  font-weight: 500;
}

/* подсказка списком (data-help-lines): каждая строка текста — с новой строки (значок ошибок у строки лота, 13.10) */
.re-help-tip.is-lines .re-help-tip-text {
  white-space: pre-line;
}

.re-help-tip-note {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.re-help-tip-arrow {
  position: absolute;
  left: calc(var(--re-help-arrow-left, 50%) - 5px);
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
}

.re-help-tip[data-placement="bottom"] .re-help-tip-arrow {
  top: -5px;
}

.re-help-tip[data-placement="top"] .re-help-tip-arrow {
  bottom: -5px;
}

table.dataTable thead > tr > th.sorting::before,
table.dataTable thead > tr > th.sorting::after,
table.dataTable thead > tr > th.sorting_asc::before,
table.dataTable thead > tr > th.sorting_asc::after,
table.dataTable thead > tr > th.sorting_desc::before,
table.dataTable thead > tr > th.sorting_desc::after {
  display: none !important;
}

.re-lot-photo {
  width: 94px;
  height: 56px;
  border-radius: 9px;
  border: 1px solid var(--re-border);
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.re-lot-photo-fallback {
  width: 94px;
  height: 56px;
  border-radius: 9px;
  border: 1px dashed var(--re-border);
  display: grid;
  place-items: center;
  color: #8290ab;
  background: #f5f8ff;
  margin: 0 auto;
}

/* числа в ячейках таблиц: Inter с цифрами одной ширины (раньше — моноширинный шрифт; имя класса оставлено) */
.re-value-mono {
  font-variant-numeric: tabular-nums;
}

/* крупные отдельные числа — плитки показателей и итоги — с пропорциональными цифрами */
.re-kpi-value,
.re-metric-value,
.re-budget-step-value,
.re-send-stats dd,
.re-auto-budget-value,
.re-help-chain b {
  font-variant-numeric: proportional-nums;
}

.re-icon-button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--re-primary) 30%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 10%, white);
  color: var(--re-primary-strong);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.re-icon-button:hover {
  background: color-mix(in srgb, var(--re-primary) 16%, white);
}

table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc {
  padding-right: 26px;
}

table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting:after,
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > th.sorting_desc:before,
table.dataTable thead > tr > th.sorting_desc:after {
  top: 50%;
  transform: translateY(-52%);
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
  margin: 10px 0;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 10px;
  border: 1px solid var(--re-border);
  min-height: 34px;
  padding: 4px 10px;
  background: #fff;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  margin-top: 10px;
  font-size: 13px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 10px !important;
  border: 1px solid var(--re-border) !important;
  background: #fff !important;
  color: var(--re-text) !important;
  margin-left: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  border-color: color-mix(in srgb, var(--re-primary) 35%, var(--re-border)) !important;
  background: color-mix(in srgb, var(--re-primary) 12%, white) !important;
  color: var(--re-primary-strong) !important;
}

.table {
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--re-border);
  padding: 8px;
}

.nav-tabs {
  border-bottom: 1px solid var(--re-border);
  gap: 6px;
}

.nav-tabs .nav-link {
  border-radius: 12px 12px 0 0;
  border: 1px solid transparent;
  color: var(--re-text-muted);
  font-weight: 500;
  font-size: 13px;
  padding: 8px 12px;
}

.nav-tabs .nav-link:hover {
  border-color: color-mix(in srgb, var(--re-primary) 18%, var(--re-border));
  background: color-mix(in srgb, var(--re-primary) 7%, white);
  color: var(--re-text);
}

.nav-tabs .nav-link.active {
  color: var(--re-primary-strong);
  background: color-mix(in srgb, var(--re-primary) 11%, white);
  border-color: color-mix(in srgb, var(--re-primary) 30%, var(--re-border));
}

.modal-backdrop.show {
  opacity: 1;
  background: rgba(121, 134, 162, 0.24);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.re-modal-dialog {
  width: min(100% - 32px, 686px);
  max-width: 686px;
}

.modal-content {
  border: 1px solid #b8c7e4;
  border-radius: 24px;
  overflow: hidden;
  background: var(--re-surface);
  box-shadow: 0 28px 64px rgba(26, 44, 84, 0.26);
}

.modal-header,
.modal-footer {
  border-color: #c0cde4;
  padding: 16px 18px;
}

.modal-header {
  background: #fff;
}

.modal-title {
  font-size: 34px;
  font-size: clamp(27px, 2.1vw, 34px);
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.modal-body {
  max-height: min(72vh, 700px);
  overflow: auto;
  padding: 14px 18px 18px;
}

.modal-footer {
  justify-content: flex-end;
  gap: 10px;
}



.re-edit-lot-dialog {
  max-width: 686px;
}

.re-edit-lot-dialog .modal-content { max-height: calc(100dvh - 32px); }
.re-edit-lot-dialog form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.re-edit-lot-dialog .modal-body { min-height: 0; }
.re-edit-lot-dialog .modal-header, .re-edit-lot-dialog .modal-footer { flex-shrink: 0; }

/* окно лота (11.10): что уйдёт сейчас (со строки таблицы), подпись о переходе в «Вручную», ошибка сохранения */
.re-lot-now {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--re-surface-tint);
  font-size: 13px;
  color: var(--re-text);
}

.re-lot-now[hidden],
.re-lot-why[hidden],
.re-field-note[hidden],
.re-modal-error[hidden] {
  display: none;
}

.re-lot-why {
  border: 1px solid var(--re-border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.re-lot-why h2 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.re-lot-why p { margin: 0 0 8px; }
.re-lot-why summary { cursor: pointer; color: var(--re-primary, #2549e0); }
.re-lot-why-details { margin-bottom: 12px; }
.re-lot-why-details > summary { min-height: 44px; padding: 10px 0; box-sizing: border-box; }
.re-lot-why .re-lot-why-methodology { margin: 0; }
.re-lot-why-methodology > a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; box-sizing: border-box; }
.re-lot-why dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 12px; margin: 12px 0; }
.re-lot-why dt { font-weight: 400; color: var(--re-text-muted); }
.re-lot-why dd { margin: 0; min-width: 0; white-space: pre-line; overflow-wrap: anywhere; }
.re-lot-why .re-why-variants { grid-column: 1 / -1; overflow-x: auto; white-space: normal; }
.re-why-variants table { width: 100%; min-width: 520px; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 12px; }
.re-why-variants th, .re-why-variants td { padding: 8px; border-bottom: 1px solid var(--re-border); text-align: left; vertical-align: top; }
.re-why-variants th { font-weight: 600; }
.re-why-variants th:first-child, .re-why-variants td:first-child { white-space: nowrap; }
.re-why-variants .is-selected { background: var(--re-surface-tint); font-weight: 600; }
.re-why-variants caption { caption-side: top; color: var(--re-text-muted); padding: 8px 0; }
.re-lot-why .re-field-note { margin-top: 10px; }
@media (max-width: 480px) {
  .re-lot-why dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .re-lot-why dd { margin-bottom: 8px; }
}

.re-field-note {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #b45309;
}

.re-modal-error {
  margin: 4px 0 0;
  font-size: 13px;
  color: #b42318;
}

.re-help-dot,
.re-help-dot-btn {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid var(--re-border);
  color: var(--re-text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: default;
}

.re-help-dot-btn {
  margin-left: 6px;
  padding: 0;
  background: #fff;
  cursor: help;
}

.re-help-tooltip .tooltip-inner {
  max-width: 310px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.3;
}

.re-lot-meta {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

.re-lot-meta-copy {
  margin: 0;
  max-width: min(100%, 460px);
}

.re-edit-lot-dialog .re-lot-meta-copy { min-width: 0; max-width: none; }
.re-lot-kind { margin-top: 4px; font-size: 12px; }
.re-lot-characteristics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0 0 16px;
}
.re-lot-characteristics > div { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 28px; }
.re-lot-characteristics > div:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 3px; border-radius: 3px; }
.re-lot-characteristics dt { display: inline-flex; flex: none; margin: 0; color: var(--re-text-muted); }
.re-lot-characteristics dt svg { display: block; width: 20px; height: 20px; }
.re-lot-characteristics dd { min-width: 0; margin: 0; color: var(--re-text); font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
@media (max-width: 575px) {
  .re-lot-characteristics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .re-lot-characteristics > div:first-child { grid-column: 1 / -1; }
}

.re-lot-preview,
.re-lot-preview-fallback {
  width: 86px;
  height: 58px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.re-lot-preview {
  border: 1px solid var(--re-border);
  object-fit: cover;
  display: block;
}

.re-lot-preview-fallback {
  border: 1px dashed var(--re-border);
  display: grid;
  place-items: center;
  color: #8290ab;
  background: #f5f8ff;
}


.re-manual-bid-input {
  background: #fff !important;
  border-color: color-mix(in srgb, var(--re-primary) 28%, var(--re-border));
}

.re-confirm-dialog,
.re-confirm-danger-dialog {
  max-width: 740px;
}

.re-confirm-note,
.re-confirm-danger-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--re-primary) 24%, var(--re-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--re-primary) 8%, #fff);
  padding: 12px;
  justify-content: space-between;
}

.re-confirm-icon,
.re-confirm-danger-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--re-primary) 14%, white);
  color: var(--re-primary-strong);
  display: inline-grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
}

.re-confirm-copy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.re-confirm-title,
.re-confirm-danger-title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 500;
  color: #111827;
}

.re-confirm-text,
.re-confirm-danger-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: #364152;
}

.re-confirm-art {
  width: 210px;
  max-width: 42%;
  height: auto;
  border-radius: 12px;
  border: 0;
  flex: 0 0 auto;
}

.re-confirm-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #111827;
}

.re-confirm-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--re-primary);
}

@media (max-width: 760px) {
  .re-confirm-note,
  .re-confirm-danger-note {
    flex-direction: column;
  }

  .re-confirm-art {
    max-width: 100%;
    width: 100%;
  }
}

.dropdown-menu {
  border: 1px solid var(--re-border);
  border-radius: 12px;
  box-shadow: var(--re-shadow-sm);
}

.dropdown-item {
  font-size: 13px;
}

.dropdown-item:hover {
  background: color-mix(in srgb, var(--re-primary) 8%, white);
  color: var(--re-primary-strong);
}

.re-auth-page {
  background: var(--re-bg);
}

.re-auth-shell {
  min-height: 100vh;
  padding: 26px;
  display: grid;
  place-items: center;
}

.re-login-card {
  width: min(520px, 96vw);
  border: 1px solid var(--re-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--re-shadow-md);
  padding: 22px;
}

.re-login-title {
  margin: 0;
  font-size: 37px;
  font-weight: 500;
}

.re-login-subtitle {
  margin: 8px 0 16px;
  color: var(--re-text-muted);
  font-size: 13px;
}

.re-hidden {
  display: none !important;
}

.re-inline-note {
  font-size: 12px;
  color: var(--re-text-muted);
}

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

.re-form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.re-section-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 500;
}

.re-section-text {
  margin: 0;
  color: var(--re-text-muted);
  font-size: 13px;
}

.re-state-card {
  border: 1px dashed var(--re-border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  background: color-mix(in srgb, var(--re-surface-soft) 42%, white);
}

.re-state-title {
  margin-top: 8px;
  font-size: 23px;
  font-weight: 500;
}

@media (max-width: 1260px) {
  .re-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .re-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .re-field.range-field,
  .re-range-group.range-field {
    grid-column: span 2;
  }

  .re-range-row {
    grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
  }

  .re-range-row .form-control {
    min-width: 0;
  }

  .re-lots-summary-table {
    min-width: 940px;
  }
}

@media (max-width: 1080px) {
  .re-shell {
    grid-template-columns: var(--re-sidebar-collapsed-width) minmax(0, 1fr);
  }

  .re-side-brand-copy,
  .re-side-link span:not(.material-symbols-outlined, .mi),
  .re-side-user-copy,
  .re-side-logout span:not(.material-symbols-outlined, .mi) {
    display: none;
  }

  .re-side-user {
    justify-content: center;
  }

  .re-side-user-copy {
    display: none !important;
  }

  .re-side-logout {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .re-side-logout .material-symbols-outlined {
    margin: 0;
  }

  .re-side-bottom {
    padding: 8px 6px;
  }
}

@media (max-width: 900px) {
  .re-filter-grid,
  .re-filter-drawer-grid,
  .re-form-grid-2,
  .re-form-grid-3 {
    grid-template-columns: 1fr;
  }

  .re-page-head,
  .page-header {
    flex-direction: column;
  }

  .re-main {
    padding: 0;
  }

  .re-page-wrap {
    min-height: auto;
    padding: 10px;
  }

  .re-range-row {
    grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
  }

  .re-field.range-field,
  .re-range-group.range-field {
    grid-column: span 1;
  }

  .re-filter-drawer-span-2 {
    grid-column: span 1;
  }

  .re-lots-summary-table {
    min-width: 860px;
  }

  .re-strategy-inline-row {
    flex-direction: column;
    align-items: stretch;
  }

  .re-strategy-inline-select {
    min-width: 0;
  }

  .re-strategy-inline-group .input-group-text,
  .re-strategy-inline-group .form-select {
    font-size: 16px;
  }
}

body.re-sidebar-open-no-scroll {
  overflow: hidden;
}

.re-mobile-menu-btn {
  display: none;
}

.re-sidebar-backdrop {
  display: none;
}

@media (max-width: 1024px) {
  .re-table-scroll #lotsTable,
  .re-table-scroll #dt_main {
    min-width: 2300px;
  }

  .re-table-scroll #dt_lots_simple {
    min-width: 980px;
  }

  .re-lots-summary-table {
    min-width: 780px;
  }

  .re-search {
    min-width: 0;
  }

  .re-table-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .re-shell,
  .re-shell.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .re-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    width: min(84vw, 320px);
    height: 100dvh;
    transform: translateX(calc(-100% - 12px));
    transition: transform 220ms ease, box-shadow 220ms ease;
    /* тень только у открытого меню: у закрытого она заходила в окно серой полосой у левого края */
    box-shadow: none;
  }

  .re-shell.mobile-sidebar-open .re-sidebar {
    transform: translateX(0);
    box-shadow: 0 14px 42px rgba(16, 24, 40, 0.22);
  }

  .re-side-toggle {
    display: none;
  }

  .re-side-brand-copy,
  .re-side-link span:not(.material-symbols-outlined, .mi),
  .re-side-user-copy,
  .re-side-logout span:not(.material-symbols-outlined, .mi) {
    display: initial;
  }

  .re-side-user {
    justify-content: flex-start;
  }

  .re-side-user-copy {
    display: block !important;
  }

  .re-side-logout {
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
  }

  .re-main {
    min-width: 0;
  }

  .re-page-wrap {
    padding: 8px;
  }

  .re-breadcrumb-wrap {
    margin-top: 2px;
    padding-right: 52px;
  }

  .re-mobile-menu-btn {
    position: static;
    z-index: 81;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--re-border);
    border-radius: 12px;
    background: #fff;
    color: var(--re-text-muted);
    box-shadow: var(--re-shadow-sm);
    margin: 0 0 10px;
  }

  .re-mobile-menu-btn .material-symbols-outlined {
    font-size: 24px;
  }

  .re-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 85;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.32);
    display: block;
  }

  .re-page-head,
  .page-header {
    gap: 8px;
    margin-bottom: 24px;
  }

  .re-page-subtitle {
    font-size: 15px;
  }

  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
  }

  .nav-tabs .nav-link {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .nav-tabs .nav-item {
    flex: 0 0 auto;
  }

  .re-table-toolbar {
    align-items: stretch;
    gap: 10px;
  }

  .re-search {
    width: 100%;
    min-width: 0;
  }

  .re-search input {
    min-width: 0;
    text-overflow: ellipsis;
  }

  .re-table-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .re-table-actions .btn {
    min-height: 38px;
  }

  .re-filter-actions {
    justify-content: flex-start;
    gap: 8px;
  }

  .re-filter-actions .btn {
    flex: 1 1 auto;
  }

  .re-range-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .re-range-sep {
    display: none;
  }

  .re-range-row .form-control {
    min-width: 0;
  }

  .re-filter-drawer {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    border-left: 0;
  }

  .re-filter-drawer-head {
    padding: 12px;
  }

  .re-filter-drawer-body {
    padding: 10px;
  }

  .re-filter-drawer-actions {
    justify-content: flex-start;
  }

  .re-filter-drawer-actions .btn {
    flex: 1 1 auto;
  }

  .re-filter-drawer-count {
    flex: 1 1 100%;
  }

  .modal-title {
    font-size: clamp(22px, 6.3vw, 30px);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-footer .btn {
    flex: 1 1 100%;
  }

  .re-confirm-title,
  .re-confirm-danger-title {
    font-size: 17px;
  }

  .re-confirm-text,
  .re-confirm-danger-text {
    font-size: 14px;
  }

  .re-strategy-inline-group {
    flex-wrap: wrap;
  }

  .re-strategy-inline-group .input-group-text,
  .re-strategy-inline-group .form-select {
    width: 100%;
  }

  .re-strategy-inline-group .input-group-text {
    justify-content: flex-start;
  }

  .re-strategy-page {
    min-width: 0;
    overflow-x: hidden;
  }

  .re-strategy-page .re-page-head h1 {
    overflow-wrap: anywhere;
  }

  .re-strategy-page .re-strategy-tabs,
  .re-strategy-page #categoryTab .nav-tabs {
    width: 100%;
    max-width: 100%;
  }

  .re-strategy-page .tab-content,
  .re-strategy-page .tab-pane,
  .re-strategy-page .re-panel,
  .re-strategy-page .card-body,
  .re-strategy-page .re-strategy-filter-form {
    min-width: 0;
    max-width: 100%;
  }

  .re-strategy-page .re-multi,
  .re-strategy-page .re-multi-trigger,
  .re-strategy-page .re-multi-label,
  .re-strategy-page .form-control,
  .re-strategy-page .form-select {
    min-width: 0;
    max-width: 100%;
  }

  .re-strategy-page .re-multi-trigger {
    min-height: 46px;
    height: auto;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .re-strategy-page .re-multi-trigger::after {
    top: 14px;
    transform: none;
  }

  .re-strategy-page .re-multi-label {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }

  .re-strategy-page .re-filter-actions {
    justify-content: flex-start;
  }

  .re-strategy-page .re-filter-actions .btn {
    width: 100%;
    max-width: 100%;
  }

  .re-strategy-under-lots {
    padding: 0 12px 18px;
  }

  .re-strategy-under-lots .re-strategy-inline-group {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--re-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
  }

  .re-strategy-under-lots .re-strategy-inline-group .form-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 42px;
    border: 0;
    border-radius: 0 !important;
    background-color: transparent;
  }

  .re-strategy-under-lots .re-strategy-inline-group .input-group-text {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    border: 0;
    border-bottom: 1px solid var(--re-border);
    border-radius: 0 !important;
    background: transparent;
  }

  .re-strategy-under-lots .re-actions-right {
    width: 100%;
  }

  #btnApplyStrategy {
    width: 100%;
    min-height: var(--re-lots-control-h, 42px);
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
  }

  #btnApplyStrategy .material-symbols-outlined {
    font-size: 20px;
  }

  #btnApplyStrategy span:last-child {
    white-space: nowrap;
  }

  .re-lots-head {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .re-lots-head .re-actions-right {
    width: 100%;
  }

  .re-table-actions {
    align-items: stretch;
  }

  .re-toolbar-popover {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 10px;
    width: auto;
    max-width: none;
    max-height: min(72vh, 620px);
    z-index: 115;
    overflow: hidden;
  }

  .re-toolbar-popover.open {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .re-toolbar-popover-head {
    gap: 8px;
  }

  .re-toolbar-popover-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .re-toolbar-popover-head .btn {
    flex: 0 0 auto;
  }

  .re-columns-panel {
    max-height: none;
    overflow: auto;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) {
    max-height: none;
    overflow: visible;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) table,
  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) table.dataTable,
  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) table.display {
    min-width: 0 !important;
    width: 100% !important;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) thead {
    display: none;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tbody,
  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tr,
  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) td {
    display: block;
    width: 100%;
    /* datatables ставит ячейкам content-box — с width: 100% и отступами они вылезали за карточку */
    box-sizing: border-box;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tbody tr {
    border: 1px solid var(--re-border);
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(18, 35, 75, 0.07);
    overflow: hidden;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tbody td {
    border-right: 0;
    border-bottom: 1px dashed #e6ecf8;
    white-space: normal !important;
    padding: 8px 14px 8px 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tbody tr td:last-child {
    border-bottom: 0;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--re-text-muted);
    font-size: 12px;
    font-weight: 500;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tbody td a {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-right: 10px;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tbody td .btn {
    max-width: 100%;
    white-space: normal;
  }

  /* длинные названия фидов не должны распирать карточку — обрезаются многоточием */
  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) .re-feed-chips {
    contain: inline-size;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) tbody td a.re-feed-chip {
    display: inline-flex;
    width: auto;
    padding-right: 12px;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) .re-strategies-table .re-strategies-col-actions {
    width: auto;
    text-align: left;
    white-space: normal !important;
  }

  .re-table-scroll:not(.re-table-scroll-wide):not(.re-float-head-scroll) .re-strategies-table .re-strategies-col-actions .btn {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .re-table-scroll.re-table-scroll-wide {
    overflow: auto;
    max-height: none;
  }

  .re-table-scroll.re-table-scroll-wide #lotsTable,
  .re-table-scroll.re-table-scroll-wide #dt_main {
    min-width: 1680px;
  }

  .re-table-scroll.re-table-scroll-wide #dt_lots_simple {
    min-width: 920px;
  }

  .re-lots-summary {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .re-lots-summary-table {
    min-width: 640px;
  }

  .re-lots-summary-table th,
  .re-lots-summary-table td {
    padding: 10px 10px;
  }

  .re-lots-summary-table thead th,
  .re-lots-summary-table tbody td {
    white-space: normal;
  }

  .re-lots-summary-table tbody td:nth-child(3),
  .re-lots-summary-table tbody td:nth-child(4),
  .re-lots-summary-table tbody td:nth-child(5),
  .re-lots-summary-table tbody td:nth-child(6) {
    padding-left: 10px;
  }
}

/* Справка «Как считается ставка» (templates/help/bids.html) */
.re-help {
  max-width: 1260px;
  padding-bottom: 60px;
}

/* текст слева, оглавление «На этой странице» справа — держится при прокрутке */
.re-help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 48px;
  align-items: start;
}

.re-help-aside {
  position: sticky;
  top: 24px;
}

.re-help-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 500;
}

.re-help-lead {
  margin: 0 0 12px;
  color: var(--re-text-muted);
  font-size: 15px;
}

.re-help-toc {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--re-border);
}

.re-help-toc-title {
  margin: 0 0 8px;
  padding-left: 16px;
  color: var(--re-text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* полоска слева у текущего раздела ложится поверх общей линии */
.re-help-toc a {
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  color: var(--re-text);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.re-help-toc a:hover {
  color: var(--re-primary-strong);
}

.re-help-toc a.is-active {
  border-left-color: var(--re-primary);
  color: var(--re-primary-strong);
  font-weight: 500;
}

/* узкий экран: оглавление над текстом, разделы — кнопками в строку */
@media (max-width: 1100px) {
  .re-help-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .re-help-aside {
    position: static;
    order: -1;
    margin: 0 0 20px;
  }

  .re-help-toc {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    border-left: 0;
  }

  .re-help-toc-title {
    display: none;
  }

  .re-help-toc a {
    margin-left: 0;
    padding: 4px 12px;
    border: 1px solid var(--re-border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
  }

  .re-help-toc a.is-active {
    border-color: var(--re-primary);
  }
}

.re-help-sec {
  margin: 0 0 32px;
  scroll-margin-top: 16px;
}

.re-help-sec h2 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 500;
}

.re-help-h3 {
  margin: 16px 0 8px;
  font-size: 16px;
  font-weight: 500;
}

.re-help-muted {
  color: var(--re-text-muted);
  font-weight: 400;
}

.re-help-note {
  margin: 10px 0 0;
  color: #364152;
  font-size: 14px;
}

.re-help-steps,
.re-help-formula,
.re-help-list {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.55;
}

.re-help-steps li,
.re-help-formula li,
.re-help-list li {
  margin: 0 0 6px;
}

.re-help-chain {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border: 1px solid var(--re-line);
  border-radius: 12px;
  overflow: hidden;
}

.re-help-chain > div {
  padding: 10px 14px;
  box-shadow: 1px 0 0 #d9e0ee, 0 1px 0 #d9e0ee;
}

.re-help-chain span {
  display: block;
  color: var(--re-text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.re-help-chain b {
  font-weight: 500;
  font-size: 17px;
}

.re-help-table td,
.re-help-table th {
  white-space: normal !important;
  vertical-align: top !important;
}

.re-help-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.re-help-card {
  padding: 14px 16px;
  border: 1px solid var(--re-line);
  border-radius: 12px;
  background: #fff;
}

.re-help-card h3 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 500;
}

.re-help-card p {
  margin: 8px 0 0;
  font-size: 14px;
}

.re-help-calc {
  margin: 10px 0 0;
}

.re-help-calc > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid #edf1f8;
  font-size: 13.5px;
}

.re-help-calc dt {
  color: var(--re-text-muted);
  font-weight: 500;
}

.re-help-calc dd {
  margin: 0;
  font-size: 13px;
}

@media (max-width: 600px) {
  .re-help-calc > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* Окно фида: автоматический бюджет по баллам кабинета Циана (templates/modals/edit_feed.html) */
#edit_feed .re-feed-details { margin-top: 8px; border-top: 1px solid var(--re-border); }
#edit_feed .re-feed-details > summary { padding: 12px 0; color: var(--re-text-muted); font-size: 13px; font-weight: 500; cursor: pointer; }
#edit_feed .re-feed-details > summary:hover { color: var(--re-primary-strong); }
#edit_feed .re-feed-details > summary:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; border-radius: 4px; }
#edit_feed .re-feed-details[open] > summary { color: var(--re-text); }
#edit_feed .re-feed-details-body { padding: 0 0 4px; }
#edit_feed .re-feed-source { margin-top: 0; }
#edit_feed .re-auto-budget-inputs { margin-top: 14px; }
.re-auto-budget {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--re-border);
  border-radius: 12px;
  background: var(--re-surface-tint);
}

.re-auto-budget-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--re-text-muted);
  font-size: 13px;
  font-weight: 500;
}

.re-auto-budget-value {
  margin: 2px 0 0;
  font-size: 24px;
  font-weight: 500;
}

.re-auto-budget-value small {
  color: var(--re-text-muted);
  font-size: 13px;
  font-weight: 400;
}

.re-auto-budget-when {
  margin: 2px 0 10px;
  color: var(--re-text-muted);
  font-size: 12.5px;
}

.re-auto-budget-warn {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.re-auto-budget-warn.is-bad {
  background: color-mix(in srgb, var(--re-danger) 8%, white);
  color: var(--re-danger);
}

.re-auto-budget-warn.is-warn {
  background: color-mix(in srgb, var(--re-warning) 10%, white);
  color: var(--re-warning);
}

.re-auto-budget-rows {
  margin: 0 0 10px;
  font-size: 13px;
}

.re-auto-budget-rows > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  padding: 4px 0;
  border-top: 1px dashed var(--re-border);
}

.re-auto-budget-rows > div:first-child {
  border-top: 0;
}

.re-auto-budget-rows dt {
  color: var(--re-text-muted);
  font-weight: 500;
}

.re-auto-budget-rows dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.re-auto-budget-rows small {
  grid-column: 1 / -1;
  color: var(--re-text-muted);
  font-size: 12px;
}

.re-auto-budget-rows .is-total dt,
.re-auto-budget-rows .is-total dd {
  color: var(--re-text);
  font-weight: 600;
}

.re-auto-budget-info {
  margin: 0 0 12px;
  font-size: 12.5px;
}

.re-auto-budget-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.re-auto-budget-hint {
  margin: 6px 0 10px;
  color: var(--re-text-muted);
  font-size: 12.5px;
}

.re-auto-budget-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
}

.re-auto-budget-note {
  margin: 0;
  color: var(--re-text-muted);
  font-size: 12.5px;
}

.re-auto-budget-why {
  margin: -8px 0 12px;
  color: var(--re-text-muted);
  font-size: 12.5px;
}

/* подпись под «Бюджет в день»: устаревшие данные кабинета, сгоревшие баллы, Топ дороже баллов */
.re-metric-sub.is-warn {
  color: var(--re-warning);
  font-weight: 600;
}

.re-metric-sub.is-bad {
  color: var(--re-danger);
  font-weight: 600;
}

.re-flash {
  margin: 0 0 12px;
}


/* ===== Таблица лотов, 04.10: путь ставки, числа на одной вертикали, строка «Итого» во второй строке шапки ===== */
/* числовые столбцы: значение по правому краю, справа слот 20px (в шапке «?», в итогах «₽», в строках — метки) */
#lotsTable th.re-col-num, #lotsTable td.re-col-num, .re-float-head th.re-col-num { text-align: right; }
.re-th-head-num { justify-content: flex-end; gap: 6px; }
.re-th-head-num .re-sort-trigger { flex: 1 1 auto; width: auto; justify-content: flex-end; gap: 4px; }
.re-num-cell { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.re-num-lead { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; min-width: 24px; }
.re-num-lead .re-bid-evidence { white-space: nowrap; }
.re-num-slot { flex: 0 0 20px; width: 20px; display: inline-flex; align-items: center; justify-content: center; }
.re-num-v { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.re-num-cell.is-dim .re-num-v, .re-num-none { color: #5d6b85; }
td.re-col-key .re-num-v { font-weight: 600; min-width: 8ch; }
th.re-col-key .re-sort-label { font-weight: 600; }
/* граница после группы столбцов (путь ставки, расчёт стратегии) — по классу, чтобы была и у приклеенной копии шапки */
#lotsTable .re-group-end, .re-float-head .re-group-end { border-right: 2px solid #c3cde0 !important; }

/* значок источника — внутри «К отправке», вплотную к ставке */
.re-src-btn { flex: 0 0 auto; width: 24px; height: 24px; padding: 0; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--re-border)); border-radius: 7px;
  background: color-mix(in srgb, var(--c) 8%, white); color: var(--c); display: inline-grid; place-items: center; cursor: pointer; }
.re-src-btn:hover, .re-src-btn:focus-visible { background: color-mix(in srgb, var(--c) 16%, white); }
.re-src-btn .material-symbols-outlined { font-size: 16px; }
.re-sent-src { display: inline-flex; align-items: center; justify-content: center; cursor: help; }
.re-src-text { border: 0; background: none; padding: 0; font: inherit; color: var(--re-text); cursor: pointer; }
.re-src-text:hover, .re-src-text:focus-visible { color: var(--re-primary-strong); text-decoration: underline; }

/* метки правил в слоте «К отправке»: одной ширины, числа не сдвигают */
.re-num-slot .re-rule-mark { margin-left: 0; min-width: 18px; padding: 0; vertical-align: 0; }
.re-rule-mark.is-hold { font-size: 0; }
.re-rule-mark.is-hold::before { content: ''; width: 5px; height: 9px; border-left: 1.5px solid currentColor; border-right: 1.5px solid currentColor; }
.re-num-slot .re-rule-mark.is-notop { position: relative; width: 18px; font-size: 12px; }
.re-num-slot .re-rule-mark.is-notop::after { content: ''; position: absolute; left: 4px; right: 4px; top: 8px; height: 1.5px; background: currentColor; }
/* «Фид REA» изменится после отправки — точка в слоте (заливка половины столбца перетягивала взгляд с «К отправке») */
.re-change-dot { width: 7px; height: 7px; border-radius: 50%; background: #d97706; display: inline-block; }

/* строка «Итого» — вторая строка шапки: светлее строки подписей, числа на тех же вертикалях, снизу — граница шапки */
#lotsTable thead tr:first-child th, .re-float-head thead tr:first-child th { border-bottom: 1px solid #c3cde0 !important; }
#lotsTable thead tr.re-totals-row th, .re-float-head thead tr.re-totals-row th {
  background: #eef2f9; padding-top: 5px; padding-bottom: 5px; font-size: 14px; font-weight: 400; vertical-align: top;
  border-bottom: 1px solid var(--re-line-strong) !important; }
#lotsTable thead tr.re-totals-row th.sorted-asc, #lotsTable thead tr.re-totals-row th.sorted-desc,
.re-float-head thead tr.re-totals-row th.sorted-asc, .re-float-head thead tr.re-totals-row th.sorted-desc {
  border-bottom: var(--re-sort-accent) solid var(--re-primary) !important; }
.re-tot-main .re-num-v { font-weight: 500; color: var(--re-text); }
th.re-col-key .re-tot-main .re-num-v { font-weight: 600; }
.re-unit { color: var(--re-text-muted); justify-content: flex-start; font-weight: 400; }
.re-tot-sub { font-size: 12px; line-height: 16px; color: var(--re-text-muted); }
.re-tot-sub.is-warn .re-num-v { color: #b54708; }
.re-tot-sub.is-bad .re-num-v { color: #b42318; font-weight: 500; }
.re-tot-title { font-weight: 500; } .re-tot-muted { color: var(--re-text-muted); }
.re-tot-note { font-size: 12px; color: var(--re-text-muted); white-space: normal; }
/* итог текстового столбца — «сколько лотов» (09.10): по левому краю, как значения; пояснение не расширяет столбец, а переносится */
.re-tot-fit { contain: inline-size; }
.re-tot-wrap { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
.re-tot-text, .re-tot-text.re-tot-wrap { white-space: normal; text-align: left; }
.re-columns-head-actions { display: inline-flex; align-items: center; gap: 6px; }

/* оценка цены Топа (тариф или медиана), а не цена этого объявления */
.re-num-estimate { color: #5d6b85; }

/* Тип продвижения под ставкой (11.10): «Фид CRM», «К отправке», «Фид REA» — мелкой строкой на вертикали чисел */
.re-num-promo { margin-top: 1px; }
.re-num-promo .re-num-v, td.re-col-key .re-num-promo .re-num-v { min-width: 0; font-size: 12px; line-height: 15px; font-weight: 400; color: var(--re-text-muted); }
/* у «К отправке» тип с продвижением — темнее: это решение, которое уйдёт */
td.re-col-key .re-num-promo.is-on .re-num-v { color: var(--re-text); font-weight: 500; }
/* 15.10 (В1-1): под «Ставкой на Циане» — продвижение, которое Циан оплатил по факту, и до какого дня: так же темнее */
.re-num-promo.re-num-fact .re-num-v { color: var(--re-text); font-weight: 500; }
/* вся ячейка «К отправке» открывает окно лота: источник, ставка и тип меняются там */
#lotsTable td[data-col="auction_auto"] { cursor: pointer; }
/* Главный шаг пути ставки: выделение сохраняется в шапке и строке итогов. */
#lotsTable tbody td[data-col="auction_auto"],
#lotsTable thead tr th[data-col="auction_auto"],
.re-float-head thead tr th[data-col="auction_auto"] {
  background-color: #edf4ff;
}
#lotsTable th[data-col="auction_auto"], .re-float-head th[data-col="auction_auto"] { color: #234d87; }
/* Подписи итогов переносятся, не раздвигая три ставки за край экрана. */
:is(#lotsTable, .re-float-head) :is([data-col="auction_bet"], [data-col="auction_auto"], [data-col="auction_final"]) .re-tot-sub {
  contain: inline-size;
}
:is(#lotsTable, .re-float-head) :is([data-col="auction_bet"], [data-col="auction_auto"], [data-col="auction_final"]) .re-tot-sub .re-num-v {
  white-space: normal;
  min-width: 0;
}
#lotsTable td[data-col="auction_auto"]:hover .re-num-promo .re-num-v { text-decoration: underline; text-underline-offset: 2px; }
/* softRefresh (11.10): пока страница берёт свежие цифры — таблица и разбивка бледнее, внизу «Обновляем таблицу…» */
#lotsTableCard.is-refreshing tbody, .re-lots-calc.is-refreshing { opacity: .6; transition: opacity .15s ease; }
#lotsTableCard.is-refreshing td[data-col="auction_auto"] { cursor: progress; }
.re-bulk-progress { display: inline-flex; align-items: center; gap: 8px; }
.re-bulk-spinner { width: 14px; height: 14px; flex: none; border: 2px solid #d6deef; border-top-color: var(--re-primary); border-radius: 50%; animation: re-spin .9s linear infinite; }

/* справка «Как считается ставка»: как включить единый пул и как вернуть классы (блок в «Коротко») */
.re-help-howto {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--re-surface-tint);
}

.re-help-howto p {
  margin: 0 0 6px;
}

.re-help-howto p:last-child {
  margin-bottom: 0;
}


/* у «Отправить ставки»: когда и каким распределением ушла прошлая отправка (migrate_0016) */
.re-last-send {
  color: var(--re-text-muted);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}


/* ===== Переключатель разделов фида «Лоты · Аналитика · Чаты и звонки» (templates/partials/feed_switch.html; вкладка «Аналитика» — static/js/feed_analytics.js, 09.10) ===== */
/* 17.10 (замечание владельца): один и тот же заметный сегментный контрол на странице фида и на «Чатах и звонках» — в строке
   шапки справа, на уровне заголовка (на узком экране переносится под название). Пункты — ссылки: «Лоты» и «Аналитика» на
   странице фида — вкладки (.re-feed-tab), «Чаты и звонки» — переход; активный пункт залит основным цветом, остальные — на
   светлом фоне контейнера */
.re-feed-tabs { display: inline-flex; flex: none; gap: 3px; padding: 3px; border: 1px solid var(--re-border); border-radius: 13px; background: var(--re-surface-tint); }
.re-feed-tabs > a { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 10px; font-size: 14.5px; line-height: 16px; font-weight: 600; color: var(--re-text); text-decoration: none; white-space: nowrap; }
.re-feed-tabs > a:hover { color: var(--re-primary-strong); background: var(--re-primary-soft); text-decoration: none; }
.re-feed-tabs > a:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-feed-tabs > a.is-on { background: var(--re-primary); color: #fff; }
.re-feed-tabs > a.is-on:hover { background: var(--re-primary-strong); color: #fff; }
/* в шапке .re-page-head («Чаты и звонки») над заголовком стоит кикер «← Фид …»: контрол опускаем на уровень заголовка;
   когда шапка в столбик (≤ 900 px, контрол под подзаголовком) — без этого отступа */
.re-page-head > .re-feed-tabs { margin-top: 16px; }
@media (max-width: 900px) { .re-page-head > .re-feed-tabs { margin-top: 0; } }

/* цвета серий — проверенная палитра (dataviz: slots 1–4, light, ΔE CVD ≥ 9,1); у 3-й и 4-й контраст < 3:1 — есть «Таблица» */
.re-analytics {
  --an-surface: #ffffff;
  --an-text: #101828;
  --an-text-secondary: #46556d;
  --an-text-muted: #6b7890;
  --an-grid: #e6ebf3;
  --an-axis: #c9d2e3;
  --an-series-1: #2a78d6;
  --an-series-2: #eb6834;
  --an-series-3: #1baf7a;
  --an-series-4: #eda100;
  --an-good: #1d8e5f;
  --an-bad: #b3261e;
  color: var(--an-text);
}
.re-analytics.is-loading .an-grid, .re-analytics.is-loading .an-kpis { opacity: .55; transition: opacity .15s; }
.re-analytics .an-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--an-surface); border: 1px solid var(--re-border); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.re-analytics .an-filters-host { display: flow-root; }
.re-analytics .an-filters.is-floating {
  position: fixed; top: 12px; z-index: 1030; margin: 0; box-sizing: border-box;
  background: #fff; box-shadow: 0 8px 28px rgba(26, 40, 82, .12);
  transform: translateY(calc(-100% - 24px)); visibility: hidden; pointer-events: none;
  transition: transform .18s ease, visibility .18s;
}
.re-analytics .an-filters.is-floating.is-revealed { transform: translateY(0); visibility: visible; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .re-analytics .an-filters.is-floating { transition: none; } }
/* Даты, сравнение и загрузка меняют ширину: кнопки графиков занимают отдельную колонку. */
.re-analytics .an-filters-with-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.re-analytics .an-filters-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.re-analytics .an-filter-actions { display: flex; align-items: start; gap: 10px; position: relative; }
.re-analytics .an-filter-actions > * { flex: none; }
.re-analytics .an-filter-actions .an-drop { position: static; }
.re-analytics .an-filter-actions > .an-add, .re-analytics .an-filter-actions > .an-drop > button { white-space: nowrap; }
.re-analytics .an-filter-actions .an-charts-n { display: inline-block; min-width: 7ch; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .re-analytics .an-filters-with-actions { grid-template-columns: minmax(0, 1fr); }
  .re-analytics .an-filter-actions { grid-row: 1; justify-content: flex-end; }
  .re-analytics .an-filters-main { grid-row: 2; }
}
@media (max-width: 480px) {
  .re-analytics .an-filter-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 8px; }
  .re-analytics .an-filter-actions > .an-add, .re-analytics .an-filter-actions > .an-drop > button { width: 100%; height: 100%; white-space: normal; padding: 6px 8px; }
  .re-analytics .an-filters-main .an-seg { width: 100%; }
  .re-analytics .an-filters-main .an-seg button { flex: 1; min-width: 0; padding: 6px 4px; font-size: 12px; }
  .re-analytics .an-filters-main .an-dates { flex-wrap: wrap; }
  .re-analytics .an-filters-main .an-toggle { flex-wrap: wrap; }
  .re-analytics .an-filters-main .an-group, .re-analytics .an-filters-main select { max-width: 100%; }
}
.re-analytics .an-seg { display: inline-flex; border: 1px solid var(--re-border); border-radius: 10px; overflow: hidden; }
.re-analytics .an-seg button { border: 0; background: transparent; padding: 6px 12px; font-size: 13.5px; color: var(--an-text-secondary); }
.re-analytics .an-seg button + button { border-left: 1px solid var(--re-border); }
.re-analytics .an-seg button.is-on { background: var(--re-primary-soft); color: var(--re-primary-strong); font-weight: 600; }
/* группировка графиков (18.10): селект рядом с периодом, той же высоты и рамки, что сегменты периода */
/* блок «Объект» на странице лота (18.10): характеристики слева, эксперт и экспозиция справа */
.re-lot-object { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin: 0 0 18px; }
.re-lot-object-main, .re-lot-object-card { background: #fff; border: 1px solid var(--re-border); border-radius: 14px; padding: 14px 16px; }
.re-lot-object-side { display: grid; gap: 12px; align-content: start; }
.re-lot-object-head { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.re-lot-object-sub { margin: 0 0 10px; color: var(--re-text-muted); font-size: 13px; }
.re-lot-object-group { font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--re-text); }
.re-lot-object-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 18px; margin: 0; }
.re-lot-object-fact dt { font-size: 12px; font-weight: 400; color: var(--re-text-muted); margin: 0; }
.re-lot-object-fact dd { font-size: 13.5px; margin: 1px 0 0; }
.re-lot-object-card h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.re-lot-object-card p { margin: 0 0 4px; font-size: 13px; }
.re-lot-object-strong { font-size: 14.5px !important; font-weight: 600; }
.re-lot-object-muted { color: var(--re-text-muted); }
@media (max-width: 900px) { .re-lot-object { grid-template-columns: minmax(0, 1fr); } }
/* CRM идёт отдельными секциями на всю ширину: длинный список заявок не оставляет
   пустую колонку рядом со сделками и не отодвигает аналитику вниз. */
.re-lot-crm { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 18px; }
.re-lot-crm > * { min-width: 0; }
.re-lot-crm-leads > h3 { font-size: 16px; }
.re-lot-crm-leads > .re-lot-object-muted { max-width: 85ch; }
.re-lot-crm-count { display: inline-block; min-width: 22px; padding: 0 7px; margin-left: 4px; border-radius: 999px; background: var(--re-surface-soft); color: var(--re-text-muted); font-size: 12px; font-weight: 500; line-height: 20px; text-align: center; vertical-align: 2px; }
.re-lot-crm-table-wrap { position: relative; overflow-x: auto; margin: 0 -4px; }  /* relative — скрытая подпись столбца ссылки (visually-hidden) не выходит за прокрутку на телефоне */
.re-lot-crm-deals { width: 100%; border-collapse: collapse; font-size: 13px; }
.re-lot-crm-deals th { font-size: 12px; font-weight: 400; color: var(--re-text-muted); text-align: left; padding: 4px 8px 6px; border-bottom: 1px solid var(--re-border); white-space: nowrap; }
.re-lot-crm-deals td { padding: 7px 8px; border-bottom: 1px solid var(--re-border); vertical-align: top; }
.re-lot-crm-deals tr:last-child td { border-bottom: 0; }
.re-lot-crm-deals .is-num { text-align: right; white-space: nowrap; }
.re-lot-crm-deals td small { display: block; color: var(--re-text-muted); font-size: 12px; margin-top: 2px; }
.re-lot-crm-deals td:first-child, .re-lot-crm-deals td:last-child { white-space: nowrap; }
.re-lot-crm-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 24px; font-size: 13px; }
/* Дата и ссылка остаются в первой строке, длинная стадия занимает вторую. */
.re-lot-crm-list li { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-content: start; align-items: baseline; gap: 2px 8px; min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--re-border); }
.re-lot-crm-list li > .re-value-mono { grid-column: 1; grid-row: 1; }
.re-lot-crm-list li > a { grid-column: 2; grid-row: 1; }
.re-lot-crm-more { margin-top: 6px; font-size: 13px; }
.re-lot-crm-more summary { cursor: pointer; color: var(--re-primary); }
.re-analytics .an-group { display: inline-flex; margin: 0; }
.re-analytics .an-group select { height: 32px; padding: 0 30px 0 12px; border: 1px solid var(--re-border); border-radius: 10px; background-color: #fff;
  font-size: 13.5px; color: var(--re-text); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.re-analytics .an-group select:focus-visible { outline: none; border-color: color-mix(in srgb, var(--re-primary) 62%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-primary) 16%, transparent); }
.re-analytics .an-dates { display: none; align-items: center; gap: 6px; font-size: 13.5px; color: var(--an-text-secondary); }
.re-analytics .an-dates.is-on { display: inline-flex; }
.re-analytics .an-dates input { border: 1px solid var(--re-border); border-radius: 8px; padding: 4px 8px; font-size: 13.5px; }
.re-analytics .an-dates-note { font-size: 12.5px; color: var(--re-text-muted); white-space: nowrap; } /* «не больше года · данные с …» (17.10) */
.re-analytics .an-range { font-size: 13px; color: var(--an-text-muted); font-variant-numeric: tabular-nums; }
.re-analytics .an-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--an-text-secondary); cursor: pointer; user-select: none; margin: 0; }
.re-analytics .an-spacer { flex: 1; }
.re-analytics .an-drop { position: relative; }
.re-analytics .an-drop > button { border: 1px solid var(--re-border); background: #fff; border-radius: 10px; padding: 6px 12px; font-size: 13.5px; color: var(--an-text); }
.re-analytics .an-drop-n { color: var(--an-text-muted); }
/* «Графики» — как «Столбцы» таблицы: шапка «Сбросить / Закрыть» (.re-toolbar-popover-head), карточки с ⋮⋮ (.re-sortable-item) */
.re-analytics .an-pop { display: none; position: absolute; top: calc(100% + 6px); right: 0; width: min(400px, 92vw); background: #fff; border: 1px solid var(--re-border); border-radius: 16px; box-shadow: var(--re-shadow-md); z-index: 30; }
.re-analytics .an-drop.is-open .an-pop { display: block; }
.re-analytics .an-pop-body { padding: 10px 12px; max-height: min(440px, 60vh); overflow: auto; }
.re-analytics .an-pop-row { grid-template-columns: 18px minmax(0, 1fr) auto; font-size: 13.5px; }
.re-analytics .an-pop-row label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; margin: 0; }
.re-analytics .an-pop-own { font-size: 11.5px; color: var(--an-text-muted); }
.re-analytics .an-pop-note { margin: 0 12px 10px; font-size: 12px; color: var(--an-text-muted); }
/* чекбоксы — как галочки в «Столбцах» таблицы (.re-sortable-check), но настоящий input: клавиатура и клик по подписи работают */
.re-analytics .an-pop-row input[type="checkbox"], .re-analytics .an-toggle input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0; width: 20px; height: 20px; border: 1px solid var(--re-border); border-radius: 6px; background: #fff; cursor: pointer;
}
.re-analytics .an-pop-row input[type="checkbox"]:checked, .re-analytics .an-toggle input[type="checkbox"]:checked {
  border-color: var(--re-primary);
  background: var(--re-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.3 8.3l2.4 2.7 5.1-6.3' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.re-analytics .an-pop-row input[type="checkbox"]:focus-visible, .re-analytics .an-toggle input[type="checkbox"]:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-analytics .an-add { border: 0; background: var(--re-primary); color: #fff; border-radius: 10px; padding: 7px 14px; font-size: 13.5px; font-weight: 500; }
.re-analytics .an-filter-actions > .an-ai-open,
.re-analytics .an-filter-actions > .an-add,
.re-analytics .an-filter-actions > .an-drop > button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-sizing: border-box; height: 36px; padding: 0 12px; font-size: 13.5px; line-height: 1.2;
  white-space: nowrap; cursor: pointer;
}
.re-analytics .an-filter-actions .an-ai-open {
  border: 1px solid var(--re-border); border-radius: 10px; background: #fff; color: var(--an-text);
}
.re-analytics .an-ai-open .material-symbols-outlined { color: var(--re-primary); font-size: 20px; }
.re-analytics .an-filter-actions .an-ai-open:hover { background: var(--re-surface-tint); border-color: var(--re-primary); }
.re-analytics .an-filter-actions button:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-analytics .an-filters-main .an-seg { box-sizing: border-box; height: 36px; }
.re-analytics .an-filters-main .an-group select { height: 36px; }
@media (max-width: 640px) {
  .re-analytics .an-filter-actions > .an-add { grid-column: 1 / -1; }
}
/* ряд плиток — сетка, а каждая плитка — подсетка из трёх её строк (подпись, число, подстрока; grid-template-rows: subgrid):
   высота строки общая на весь ряд, поэтому числа во всех плитках ряда на одной высоте, даже когда одна подпись переносится
   на две строки, а другая нет. Зазор между рядами — отступом плитки, не gap: зазор сетки попал бы и между строками плитки */
/* Число колонок зависит от ширины самой сетки: боковые панели и масштаб браузера
   не должны сжимать суммы. На очень узком экране карточка занимает всю строку. */
.re-analytics .an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 0 12px; margin-bottom: 2px; }
/* Восемь показателей располагаются 4 + 4, пока хватает места на полный ряд.
   Контейнер ограничен плитками: закреплённые фильтры остаются привязаны к окну. */
.re-analytics .an-kpi-container { container: analytics-kpis / inline-size; }
@container analytics-kpis (min-width: 876px) {
  .re-analytics .an-kpis.is-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container analytics-kpis (min-width: 1604px) {
  .re-analytics .an-kpis.is-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
/* 25.10: «Заявки кабинета без объекта» — пометка сверху карточки: ни к одному объекту не отнесены */
.re-analytics .an-nolot-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #fff6e0; color: #6b4a00; font-size: 12.5px; line-height: 1.4; }
/* «?» — в правом верхнем углу плитки, а не в конце подписи (16.10: значки шли неровно и раздвигали строку подписи, числа
   съезжали); подпись не заходит под значок */
.re-analytics .an-kpi { position: relative; display: grid; grid-template-rows: subgrid; grid-row: span 3; align-content: start; margin-bottom: 12px;
  background: var(--an-surface); border: 1px solid var(--re-border); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.re-analytics .an-kpi-label { font-size: 12.5px; line-height: 1.3; color: var(--an-text-secondary); padding-right: 22px; }
.re-analytics .an-kpi-label .re-help-trigger { position: absolute; top: 11px; right: 11px; margin: 0; }
.re-analytics .an-kpi-value { font-size: 24px; font-weight: 600; margin-top: 4px; white-space: nowrap; align-self: end; }
.re-analytics .an-kpi-delta { font-size: 12.5px; color: var(--an-text-muted); margin-top: 2px; min-height: 18px; overflow-wrap: anywhere; }
/* Общий индикатор сравнения, в том числе в подсказках вне контейнера аналитики. */
.an-period-delta { font-weight: 600; white-space: nowrap; }
.an-period-delta.is-up { color: #14724a; }
.an-period-delta.is-down { color: #b42318; }
.an-period-delta.is-flat { color: #6b7890; font-weight: 400; }
.re-analytics .an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; overflow-anchor: none; }
.re-analytics .an-card { background: var(--an-surface); border: 1px solid var(--re-border); border-radius: 14px; padding: 14px 16px 12px; min-width: 0; }
.re-analytics .an-card.is-wide { grid-column: 1 / -1; }
.re-analytics .an-card-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.re-analytics .an-card-title { font-size: 15.5px; font-weight: 600; margin: 0; }
@media (max-width: 640px) {
  #feedAnalytics .an-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  #feedAnalytics .an-card-head > div:first-child { display: contents; }
  #feedAnalytics .an-card-title { grid-column: 1; grid-row: 1; overflow-wrap: anywhere; }
  #feedAnalytics .an-card-tools { grid-column: 2; grid-row: 1; }
  #feedAnalytics .an-card-head .an-src { grid-column: 1 / -1; justify-self: start; }
}
.re-analytics .an-card-tools { margin-left: auto; display: flex; gap: 2px; flex-shrink: 0; }
.re-analytics .an-icon { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 8px; color: var(--an-text-muted); display: inline-grid; place-items: center; font-size: 13px; }
.re-analytics .an-icon:hover { background: var(--re-surface-tint); color: var(--an-text); }
.re-analytics .an-icon.is-on { background: var(--re-primary-soft); color: var(--re-primary-strong); }
.re-analytics .an-card-tools [hidden] { display: none; }
.re-analytics .an-icon:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
@media (max-width: 1100px) { .re-analytics .an-width-toggle { display: none; } }
.re-analytics .an-help { cursor: help; border: 1px solid var(--re-border); border-radius: 999px; width: 18px; height: 18px; font-size: 11px; display: inline-grid; place-items: center; color: var(--an-text-muted); margin-left: 6px; vertical-align: 1px; font-weight: 400; }
/* пометка у графика: текст бывает в две строки — скругление умеренное и отступы сверху и снизу, точка — у первой строки */
.re-analytics .an-src { display: inline-flex; align-items: flex-start; gap: 6px; max-width: 100%; font-size: 11.5px; line-height: 1.4; border-radius: 8px; padding: 3px 9px; margin-top: 4px; }
.re-analytics .an-src::before { content: ''; width: 7px; height: 7px; margin-top: calc((1.4em - 7px) / 2); border-radius: 999px; background: currentColor; flex-shrink: 0; }
.re-analytics .an-src.is-ok { background: #e6f4ec; color: #14724a; }
.re-analytics .an-src.is-wait { background: #fff4dc; color: #8a5a00; }
.re-analytics .an-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--an-text-secondary); margin: 2px 0 4px; }
.re-analytics .an-legend span { display: inline-flex; align-items: center; gap: 6px; }
.re-analytics .an-chart { position: relative; }
.re-analytics .an-chart svg { display: block; width: 100%; overflow: visible; }
.an-hover-band { fill: var(--re-primary); fill-opacity: .07; pointer-events: none; }
.an-hover-outline { fill: none; stroke: var(--re-primary); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.re-analytics .an-axis-text { fill: var(--an-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.re-analytics .an-label { fill: var(--an-text-secondary); font-size: 11.5px; }
.re-analytics .an-label-strong { fill: var(--an-text); font-size: 12px; font-weight: 600; }
.re-analytics .an-empty { padding: 36px 8px; text-align: center; color: var(--an-text-muted); font-size: 13px; }
.re-analytics .an-table { width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; border-collapse: collapse; }
.re-analytics .an-table th, .re-analytics .an-table td { padding: 3px 8px; border-bottom: 1px solid var(--an-grid); text-align: right; white-space: nowrap; }
.re-analytics .an-table th:first-child, .re-analytics .an-table td:first-child { text-align: left; }
.re-analytics .an-table thead th { color: var(--an-text-secondary); font-weight: 600; position: sticky; top: 0; background: #fff; }
.re-analytics .an-table-box { max-height: 260px; overflow: auto; border: 1px solid var(--an-grid); border-radius: 10px; }
/* срезы по объектам (16.10): выбор признака и метрики; полосы — подпись | полоса | значение; таблица шире и выше остальных */
.re-analytics .an-slices-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 2px 0 12px; font-size: 12.5px; color: var(--an-text-secondary); }
.re-analytics .an-slices-bar label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.re-analytics .an-slices-bar select { width: auto; max-width: 280px; border: 1px solid var(--re-border); border-radius: 8px; padding: 4px 30px 4px 9px; font-size: 13px; color: var(--an-text); background-color: #fff; }
.re-analytics .an-slices-bar label { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.re-analytics .an-slices-bar select { min-width: 0; max-width: 100%; }
.re-analytics .an-slices-save { margin-left: auto; border: 1px solid var(--re-border); background: #fff; color: var(--re-primary-strong); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.re-analytics .an-slices-save:hover { border-color: color-mix(in srgb, var(--re-primary) 40%, var(--re-border)); background: color-mix(in srgb, var(--re-primary) 6%, white); }
.re-analytics .an-slices-own { margin-left: auto; font-size: 12px; color: var(--an-text-muted); }
.re-analytics .an-bars { display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr) auto; gap: 7px 12px; align-items: center; font-size: 12.5px; }
.re-analytics .an-bar { display: contents; }
.re-analytics .an-bar-label { min-width: 0; display: flex; align-items: baseline; gap: 6px; color: var(--an-text); }
.re-analytics .an-bar-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-analytics .an-bar-n { flex: none; color: var(--an-text-muted); font-size: 11.5px; white-space: nowrap; }
.re-analytics .an-bar-track { height: 14px; border-radius: 4px; background: var(--re-surface-tint); overflow: hidden; }
.re-analytics .an-bar-fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--an-series-1); }
.re-analytics .an-bar.is-thin .an-bar-fill { opacity: .45; }
.re-analytics .an-bar.is-none .an-bar-fill { background: var(--an-axis); }
.re-analytics .an-bar.is-hovered > * { background-color: var(--re-primary-soft); }
.re-analytics .an-bar.is-hovered .an-bar-track { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-analytics .an-bar-value { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.re-analytics .an-deal-stages { grid-template-columns: minmax(100px, 1fr) minmax(50px, 1fr) auto; margin: 14px 0; }
.re-analytics .an-deal-stages .an-bar-value small { display: block; color: var(--an-text-muted); font-weight: 400; }
.re-analytics .an-slices-table { max-height: 420px; }
.re-analytics .an-slices-table td:first-child { min-width: 170px; max-width: 280px; white-space: normal; }
.re-analytics .an-note { font-size: 12px; color: var(--an-text-muted); margin-top: 6px; }
/* Восемь шагов воронки — 4 × 2; узкие карточки и боковая панель учитываются по ширине контейнера. */
.re-analytics .an-multi-container { container: analytics-multiples / inline-size; }
.re-analytics .an-multi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
@container analytics-multiples (max-width: 960px) {
  .re-analytics .an-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container analytics-multiples (max-width: 480px) {
  .re-analytics .an-multi { grid-template-columns: minmax(0, 1fr); }
}
.re-analytics .an-multi > div { min-width: 0; overflow-wrap: anywhere; }
.re-analytics .an-multi-title { font-size: 12.5px; color: var(--an-text-secondary); }
.re-analytics .an-multi-value { font-size: 18px; font-weight: 600; }
.re-analytics .an-multi-delta { font-size: 11.5px; color: var(--an-text-muted); min-height: 16px; }
.re-analytics .an-multi .an-empty { padding: 20px 4px; font-size: 12px; }
.re-analytics .an-modal-back { display: none; position: fixed; inset: 0; background: rgba(16, 24, 40, .35); z-index: 1060; }
.re-analytics .an-modal-back.is-on { display: block; }
.re-analytics .an-modal { position: fixed; z-index: 1061; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(980px, 96vw); max-height: 92vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: var(--re-shadow-md); padding: 18px 20px; display: none; }
.re-analytics .an-modal.is-on { display: block; }
.re-analytics .an-modal h2 { font-size: 19px; font-weight: 600; margin: 0 0 12px; }
.re-analytics .an-form { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; }
.re-analytics .an-f { display: block; font-size: 12.5px; color: var(--an-text-secondary); margin: 0 0 10px; }
.re-analytics .an-form select, .re-analytics .an-form input[type=text] { width: 100%; border: 1px solid var(--re-border); border-radius: 8px; padding: 6px 8px; font-size: 13.5px; margin-top: 3px; background: #fff; }
.re-analytics .an-form-def { font-size: 12px; color: var(--an-text-muted); background: var(--re-surface-tint); border-radius: 10px; padding: 8px 10px; }
.re-analytics .an-preview { border: 1px solid var(--an-grid); border-radius: 12px; padding: 10px 12px; min-height: 280px; }
.re-analytics .an-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.re-analytics .an-btn { border: 1px solid var(--re-border); background: #fff; border-radius: 10px; padding: 7px 14px; font-size: 13.5px; }
.re-analytics .an-btn-primary { border-color: var(--re-primary); background: var(--re-primary); color: #fff; font-weight: 500; }
/* подсказка при наведении — в body: значение главное, название второстепенное */
.an-tip { position: fixed; z-index: 1070; pointer-events: none; background: #fff; border: 1px solid var(--re-border); border-radius: 10px; box-shadow: var(--re-shadow-sm); padding: 8px 10px; font-size: 12.5px; min-width: 160px; max-width: calc(100vw - 16px); box-sizing: border-box; display: none; }
.an-tip-title { color: #6b7890; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.an-tip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; line-height: 1.6; overflow-wrap: anywhere; }
.an-tip-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.an-tip-name { color: #46556d; }
.an-tip-prev { color: #6b7890; margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums; }
.an-key-line { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.an-key-dash { width: 16px; height: 0; border-top: 2px dashed; display: inline-block; opacity: .55; }
.an-key-rect { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 1100px) { .re-analytics .an-grid { grid-template-columns: minmax(0, 1fr); } .re-analytics .an-form { grid-template-columns: minmax(0, 1fr); } }

/* ===== Массовые действия с лотами (10.10): колонка галочек слева и панель действий внизу окна ===== */
#lotsTable th.re-col-select, #lotsTable td.re-col-select, .re-float-head th.re-col-select {
  width: 40px; min-width: 40px; max-width: 40px; padding-left: 10px !important; padding-right: 4px !important; text-align: center;
}
#lotsTable td.re-col-select { cursor: pointer; }
/* галочки — как в «Столбцах» (.re-sortable-check): 20×20, скругление 6, отмеченная — заливка и белая галочка; «выбраны не все» — черта */
.re-col-select input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; display: inline-block; width: 20px; height: 20px; margin: 0; vertical-align: middle;
  border: 1px solid var(--re-border); border-radius: 6px; background: #fff; cursor: pointer;
}
.re-col-select input[type="checkbox"]:hover { border-color: color-mix(in srgb, var(--re-primary) 55%, var(--re-border)); }
.re-col-select input[type="checkbox"]:checked {
  border-color: var(--re-primary);
  background: var(--re-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.3 8.3l2.4 2.7 5.1-6.3' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.re-col-select input[type="checkbox"]:indeterminate {
  border-color: var(--re-primary);
  background: var(--re-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8h7' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.re-col-select input[type="checkbox"]:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
/* Ошибки и предупреждения площадки (13.10): значок у галочки выбора — красный (ошибки, блокировка) или серый (только
   предупреждения); строка с ошибкой — мягко подсвечена. Значок — кнопка подсказки (.re-help-trigger) без «?» */
.re-help-trigger.re-issue-mark { display: flex; width: 18px; height: 18px; margin: 6px auto 0; border: 0; border-radius: 50%;
  background: transparent; color: #8a96ab; cursor: help; }
.re-help-trigger.re-issue-mark::before { content: none; }
.re-help-trigger.re-issue-mark::after { inset: -3px; }
.re-help-trigger.re-issue-mark.is-error { color: var(--re-danger); }
.re-help-trigger.re-issue-mark:hover, .re-help-trigger.re-issue-mark[aria-expanded="true"] { background: transparent; color: #5d6b85; }
.re-help-trigger.re-issue-mark.is-error:hover, .re-help-trigger.re-issue-mark.is-error[aria-expanded="true"] { color: #8c1d18; }
.re-issue-mark svg { display: block; width: 16px; height: 16px; margin: auto; }
.re-table-scroll #lotsTable tbody tr.is-issue-error:not(.is-selected) td,
.re-table-scroll #lotsTable tbody tr.is-issue-error:not(.is-selected) td.is-pinned { background: color-mix(in srgb, var(--re-danger) 5%, white); }
.re-table-scroll #lotsTable tbody tr.is-issue-error:not(.is-selected):hover td,
.re-table-scroll #lotsTable tbody tr.is-issue-error:not(.is-selected):hover td.is-pinned { background: color-mix(in srgb, var(--re-danger) 9%, white); }
/* выделенная строка — заметнее, чем строка под курсором; закреплённые ячейки — тем же цветом */
.re-table-scroll #lotsTable tbody tr.is-selected td,
.re-table-scroll #lotsTable tbody tr.is-selected td.is-pinned { background: color-mix(in srgb, var(--re-primary) 12%, white); }
.re-bulk-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  width: max-content; max-width: min(1120px, calc(100vw - 32px)); padding: 10px 16px;
  background: #fff; border: 1px solid var(--re-border); border-radius: 14px; box-shadow: var(--re-shadow-md); font-size: 13.5px;
}
.re-bulk-bar[hidden] { display: none; }
.re-bulk-count b { font-weight: 600; }
.re-bulk-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.re-bulk-muted { color: var(--re-text-muted); }
.re-bulk-notice { color: #14724a; }
.re-bulk-notice.is-error { color: #b42318; }
.re-bulk-field { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.re-bulk-field input { width: 110px; }
.re-bulk-field select { width: auto; }
.re-bulk-clear { margin-left: auto; padding: 0; border: 0; background: none; color: var(--re-primary-strong); font: inherit; white-space: nowrap; }
.re-bulk-clear:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .re-bulk-bar { left: 8px; right: 8px; bottom: 12px; transform: none; width: auto; max-width: none; }
}
.re-bulk-bar.is-status {
  left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
  z-index: 120; width: max-content; max-width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow: auto; flex-wrap: nowrap;
  padding: 20px 24px; gap: 18px; border-radius: 20px; font-size: 16px; line-height: 1.5;
  box-shadow: 0 16px 64px rgba(17, 24, 39, .24);
}
.re-bulk-status-content { display: flex; align-items: center; gap: 12px; min-width: 0; overflow-wrap: anywhere; }
.re-bulk-status-content .re-bulk-spinner { flex: 0 0 22px; width: 22px; height: 22px; }
.re-bulk-status-icon { flex-shrink: 0; font-size: 28px; color: #14724a; }
.re-bulk-status-icon.is-error { color: #b42318; }
.re-bulk-status-close {
  display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px;
  appearance: none; padding: 0; border: 0; border-radius: 50%; background: var(--re-surface-tint, #f0f2f7);
  color: var(--re-text); line-height: 1; cursor: pointer;
}
/* Draw the cross geometrically: a text glyph sits off-centre on its baseline. */
.re-bulk-status-close > span { position: relative; display: block; width: 20px; height: 20px; font-size: 0; }
.re-bulk-status-close > span::before, .re-bulk-status-close > span::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px;
  border-radius: 1px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg);
}
.re-bulk-status-close > span::after { transform: translate(-50%, -50%) rotate(-45deg); }
.re-bulk-status-close:hover { background: #e0e6f5; }
.re-bulk-status-close:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 3px; }

/* ===== Страница фида по макету (10.10): выбор стратегии с поиском, плитки-карточки, расчёт отдельным блоком ===== */
.re-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.re-strategy-combo { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; min-height: calc(var(--re-lots-control-h) - 2px); padding: 0 12px 0 10px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--re-text); text-align: left; cursor: pointer; }
.re-strategy-combo:focus-visible { outline: none; background: var(--re-surface-tint); }
.re-strategy-combo-value { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.re-strategy-combo-value > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-strategy-combo-value .material-symbols-outlined { font-size: 18px; color: var(--re-primary-strong); }
.re-strategy-combo.is-auto .re-strategy-combo-value { color: var(--re-primary-strong); font-weight: 600; }
.re-strategy-combo-chevron { font-size: 20px; color: var(--re-text-muted); margin-left: auto; }
.re-strategy-combo-tag { font-size: 11.5px; font-weight: 400; color: var(--re-text-muted); border: 1px solid var(--re-border); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.re-strategy-pop { display: none; position: absolute; z-index: 90; width: min(480px, calc(100vw - 16px)); background: #fff; border: 1px solid var(--re-border); border-radius: 16px; box-shadow: var(--re-shadow-md); }
.re-strategy-pop.is-open { display: block; }
.re-strategy-pop-search { padding: 10px 12px; border-bottom: 1px solid var(--re-border); }
.re-strategy-pop-search input { width: 100%; border: 1px solid var(--re-border); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.re-strategy-pop-search input:focus { outline: none; border-color: color-mix(in srgb, var(--re-primary) 62%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-primary) 16%, transparent); }
.re-strategy-pop-list { max-height: min(420px, 60vh); overflow: auto; margin: 0; padding: 6px; list-style: none; }
.re-strategy-pop-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; cursor: pointer; }
.re-strategy-pop-list li.is-active { background: var(--re-surface-tint); }
.re-strategy-pop-list li.is-current { font-weight: 600; color: var(--re-primary-strong); }
.re-strategy-pop-list li .re-strategy-combo-tag { margin-left: auto; }
.re-strategy-pop-list mark { padding: 0; background: #fff1b8; color: inherit; }
.re-strategy-pop-list li.re-strategy-pop-group { padding: 10px 10px 4px; font-size: 12px; color: var(--re-text-muted); cursor: default; }
.re-strategy-pop-list li.re-strategy-pop-none { color: var(--re-text-muted); }
.re-strategy-pop-list li.re-strategy-pop-empty { color: var(--re-text-muted); cursor: default; }
.re-strategy-pop-list li.re-strategy-pop-auto { display: grid; grid-template-columns: 32px 1fr; align-items: start; gap: 2px 10px; padding: 10px 12px; margin-bottom: 2px;
  border: 1px solid color-mix(in srgb, var(--re-primary) 28%, var(--re-border)); background: color-mix(in srgb, var(--re-primary) 5%, white); }
.re-strategy-pop-list li.re-strategy-pop-auto.is-active { background: color-mix(in srgb, var(--re-primary) 11%, white); }
.re-strategy-pop-list li.re-strategy-pop-auto.is-current { color: inherit; }
.re-strategy-pop-list li.re-strategy-pop-auto.is-disabled { cursor: default; opacity: .75; border-color: var(--re-border); background: var(--re-surface-tint); }
.re-strategy-pop-auto-icon { grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--re-primary-soft); color: var(--re-primary-strong); }
.re-strategy-pop-auto-icon .material-symbols-outlined { font-size: 20px; }
.re-strategy-pop-auto-title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--re-primary-strong); }
/* пояснение — обычным начертанием и когда «Автоматическая» — текущий пункт (у текущего пункта жирный шрифт) */
.re-strategy-pop-auto-text { font-size: 12.5px; font-weight: 400; color: var(--re-text-muted); line-height: 1.4; }
.re-strategy-pop-auto-meta { display: block; margin-top: 2px; }
.re-strategy-pop-auto-text a { color: var(--re-primary-strong); text-decoration: none; white-space: nowrap; }
.re-strategy-pop-auto-text a:hover { text-decoration: underline; }
.re-strategy-pop-foot { border-top: 1px solid var(--re-border); padding: 8px 14px; font-size: 12px; color: var(--re-text-muted); }

/* строка стратегии — над плитками; плитки — отдельными карточками; расчёт — своим блоком */
.re-lots-panel > .re-lots-controls { margin-bottom: 16px; }
.re-metrics.re-metrics-cards { border: 0; background: transparent; overflow: visible; gap: 12px; margin-bottom: 12px; }
.re-metrics-cards .re-metric { background: #fff; border: 1px solid var(--re-line); border-radius: 12px; box-shadow: none; padding: 12px 14px; }
/* «ставки … + Топ …» под суммой плитки (11.10) — переносится, а не обрезается многоточием */
.re-metrics-cards .re-metric-sub[id$="Split"] { white-space: normal; overflow: visible; text-overflow: clip; }
.re-lots-calc { background: #fff; border: 1px solid var(--re-line); border-radius: 12px; overflow: hidden; }
/* заголовок-кнопка свёрнутого блока «как делится бюджет» (16.10): строка-итог и шеврон; раскрытый — с линией снизу */
.re-calc-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; background: transparent; text-align: left; font: inherit; font-size: 13px; color: var(--re-text); cursor: pointer; }
.re-calc-toggle:hover { background: var(--re-surface-tint); }
.re-calc-toggle:focus-visible { outline: 2px solid var(--re-primary); outline-offset: -2px; }
.re-calc-toggle-title { flex: none; white-space: nowrap; }
.re-calc-toggle-title b { font-weight: 600; }
.re-calc-summary { flex: 1 1 auto; min-width: 0; color: var(--re-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.re-calc-chevron { flex: none; font-size: 20px; color: var(--re-text-muted); transition: transform 160ms ease; }
.re-lots-calc.is-open .re-calc-chevron { transform: rotate(180deg); }
.re-lots-calc.is-open .re-calc-toggle { border-bottom: 1px solid var(--re-line); }
@media (max-width: 768px) {
  .re-calc-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 9px 12px; }
  .re-calc-toggle-title { white-space: normal; }
  .re-calc-summary { grid-column: 1; grid-row: 2; white-space: normal; font-size: 12px; }
  .re-calc-summary:empty { display: none; }
  .re-calc-chevron { grid-column: 2; grid-row: 1; }
}
/* страница лота «Подробнее» (16.10): шапка — фото, ID и статус, адрес, ссылки; ниже — те же плитки и карточки, что во
   вкладке «Аналитика» (стили .re-analytics .an-*) */
.re-lot-page-head { display: flex; align-items: flex-start; gap: 16px; margin: 2px 0 16px; }
.re-lot-page-photo { width: 132px; height: 88px; border-radius: 12px; border: 1px solid var(--re-border); object-fit: cover; flex: none; }
.re-lot-page-photo.is-empty { display: grid; place-items: center; color: #8290ab; background: #f5f8ff; border-style: dashed; }
.re-lot-page-copy { min-width: 0; }
.re-lot-page-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--re-text-muted); }
.re-lot-page-kicker .re-value-mono { font-size: 13px; color: var(--re-text); }
.re-lot-page-platform { display: inline-flex; align-items: center; gap: 5px; }
.re-lot-page-platform img { width: 16px; height: 16px; }
.re-lot-page-title { margin: 4px 0 6px; font-size: 20px; font-weight: 600; line-height: 1.3; }
.re-lot-page-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
/* назад к фиду — крупно, первой строкой; справа в шапке — «Чаты и звонки по объекту» (17.10); узко — кнопка под заголовком */
.re-lot-page-back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px -8px; padding: 6px 12px 6px 8px; border-radius: 10px;
  font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--re-primary-strong); text-decoration: none; }
.re-lot-page-back:hover { background: var(--re-primary-soft); text-decoration: none; }
.re-lot-page-back:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-lot-page-head { flex-wrap: wrap; }
.re-lot-page-copy { flex: 1 1 320px; }
.re-lot-page-actions { flex: none; margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.re-lot-page-actions .btn { white-space: nowrap; font-weight: 600; }
.re-lot-page-links a { color: var(--re-primary-strong); text-decoration: none; }
.re-lot-page-links a:hover { text-decoration: underline; }
.re-lot-analytics .an-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.re-lot-analytics .an-lot-totals { margin: -4px 0 14px; }
/* звонки и чаты лота — вся таблица на странице, без внутреннего окна прокрутки: прокручивается страница, липкая только шапка
   таблицы (правило владельца; 17.10). Узко — только горизонтальная прокрутка широкой таблицы */
.re-lot-analytics .an-lot-calls, .re-lot-analytics .an-lot-chats { max-height: none; overflow: visible; }
@media (max-width: 760px) { .re-lot-analytics .an-lot-calls, .re-lot-analytics .an-lot-chats { overflow-x: auto; } }
.re-lot-analytics .an-lot-calls td.is-ok { color: #14724a; font-weight: 600; }
.re-lot-analytics .an-lot-calls td:nth-child(4) { font-variant-numeric: tabular-nums; }
.re-lot-analytics .an-lot-error { padding: 24px 8px; text-align: center; color: #b42318; font-size: 13px; }
@media (max-width: 640px) { .re-lot-page-photo { width: 96px; height: 68px; } .re-lot-page-title { font-size: 17px; } }
/* дашборд (16.10): итоги плитками (.re-kpi-*), тревоги списком, карточки кабинетов, таблица фидов */
.re-dash .re-page-subtitle { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.re-dash-refresh { font-size: 12.5px; }
.re-dash-section { margin-top: 18px; }
.re-dash-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.re-dash-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #fff4dc; color: #8a5a00; font-size: 12px; font-weight: 600; }
.re-dash-alert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.re-dash-alert { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--re-surface-tint); font-size: 13px; line-height: 1.4; }
.re-dash-alert .material-symbols-outlined { flex: none; font-size: 18px; color: #5d6b85; }
.re-dash-alert.is-points, .re-dash-alert.is-burn, .re-dash-alert.is-send { background: #fff8e8; }
.re-dash-alert.is-points .material-symbols-outlined, .re-dash-alert.is-burn .material-symbols-outlined, .re-dash-alert.is-send .material-symbols-outlined { color: var(--re-warning); }
.re-dash-alert a { color: var(--re-text); text-decoration: none; }
.re-dash-alert a:hover { color: var(--re-primary-strong); text-decoration: underline; }
.re-dash-more { padding-left: 0; margin-top: 4px; }
.re-dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.re-dash-card { border: 1px solid var(--re-border); border-radius: 13px; background: var(--re-surface); padding: 12px 14px; min-width: 0; }
.re-dash-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.re-dash-logo { width: 16px; height: 16px; flex: none; }
.re-dash-card-name { font-weight: 600; color: var(--re-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-dash-card-name:hover { color: var(--re-primary-strong); text-decoration: underline; }
.re-dash-card-sub { margin-top: 2px; font-size: 12px; color: var(--re-text-muted); }
.re-dash-card-value { margin-top: 8px; font-size: 22px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.re-dash-card-value small { font-size: 12px; font-weight: 400; color: var(--re-text-muted); }
.re-dash-card-lines { margin-top: 6px; display: grid; gap: 3px; font-size: 12.5px; }
.re-dash-line { display: flex; justify-content: space-between; gap: 10px; }
.re-dash-line span { color: var(--re-text-muted); }
.re-dash-line b { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.re-dash-line.is-warn b { color: #8a5a00; }
.re-dash-line.is-muted b { font-weight: 400; color: var(--re-text-muted); }
.re-dash-card-note { margin-top: 8px; font-size: 12.5px; color: var(--re-text-muted); }
/* таблица фидов дашборда — общая таблица страницы фида (.re-table-card, .re-table-scroll, плавающая шапка); числовые
   столбцы вправо, название фида переносится, чипы площадок — в панели над таблицей */
/* правила — по классу таблицы, не по id: копия шапки у верхнего края окна получает класс таблицы, а id с неё снимается,
   и при правилах по id шрифт копии был крупнее — подписи столбцов обрезались многоточием */
.re-dash-feeds th.re-col-num, .re-dash-feeds td.re-col-num { text-align: right; }
.re-dash-feeds td.re-dash-td-feed { white-space: normal; min-width: 240px; max-width: 360px; }
.re-dash-feeds tbody td { font-size: 13px; }
.re-dash-feeds thead th { font-size: 13px; }
.re-dash-td-feed .re-inline-note { margin-top: 1px; }
.re-table-toolbar .re-preset-chips { margin: 0; }
.re-dash-shown { font-size: 13px; font-weight: 500; color: var(--re-text-muted); }
.re-dash-empty { padding: 28px 10px; text-align: center; color: var(--re-text-muted); font-size: 13px; }
.re-dash-feed { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--re-text); text-decoration: none; }
.re-dash-feed:hover { color: var(--re-primary-strong); text-decoration: underline; }
.re-dash-delta { font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.re-dash-delta.is-good { color: #14724a; }
.re-dash-delta.is-bad { color: #b42318; }
.re-dash-delta.is-neutral { color: var(--re-text-muted); }
.re-dash-attn { font-size: 12.5px; color: #8a5a00; text-decoration: none; }
.re-dash-attn:hover { text-decoration: underline; }
.re-dash-ok { color: var(--re-text-muted); }
.re-dash-feeds td.is-warn { color: #8a5a00; }
.re-dash-note { margin: 8px 0 0; font-size: 12px; color: var(--re-text-muted); }
/* 25.10: шесть плиток дашборда (с «Квал. заявок») — в один ряд на широком экране (уже — как раньше: 2 и 3 в ряд) */
@media (min-width: 1261px) { .re-dash-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .re-dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* стратегия «только просмотр» (16.10): формы не реагируют на мышь, «Сохранить» скрыта (поля выключает скрипт страницы) */
.re-strategy-page.is-readonly form { pointer-events: none; }
.re-strategy-page.is-readonly form button[type=submit] { display: none; }
/* «Чаты и звонки» фида (17.10): фильтры, сводка, список по объектам, диалоги с текстом, звонки */
.re-conv-filters { flex-wrap: wrap; row-gap: 8px; }
.re-conv-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 0; cursor: pointer; }
.re-conv-check input { margin: 0; }
.re-conv-search { min-width: 260px; flex: 1 1 320px; }
.re-conv-insights { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #f1dfae; background: #fff7e3; border-radius: 12px; }
.re-conv-insights ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.re-conv-list { display: grid; gap: 12px; }
.re-conv-lot .an-card-title a { color: var(--re-primary-strong); text-decoration: none; font-family: var(--re-font-mono); font-size: 14px; }
.re-conv-addr { font-weight: 500; }
/* карточка объекта в шапке группы (17.10, просьба владельца): миниатюра фото, характеристики, локация */
.re-conv-lot .an-card-head { align-items: flex-start; }
.re-conv-obj { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 14px; align-items: start; min-width: 0; }
.re-conv-photo-link { display: block; border-radius: 8px; }
.re-conv-photo-link:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-conv-photo { display: block; width: 84px; height: 63px; border-radius: 8px; object-fit: cover; background: var(--re-surface-tint); border: 1px solid #dfe5f0; }
.re-conv-photo.is-empty { display: flex; align-items: center; justify-content: center; color: var(--re-text-muted); }
.re-conv-photo.is-empty .material-symbols-outlined { font-size: 22px; }
.re-conv-obj-body { min-width: 0; }
.re-conv-obj-body .an-card-title { margin: 0; }
.re-conv-facts { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--re-text); }
.re-conv-facts b { font-weight: 700; font-variant-numeric: tabular-nums; }
.re-conv-dot { color: var(--re-text-muted); }
.re-conv-place { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--re-text-muted); }
.re-conv-lot-note { margin: 4px 0 0; }
/* фильтр по объекту — чип над сводкой */
.re-conv-lotfilter { margin: 0 0 12px; }
.re-conv-chip { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 5px 5px 5px 14px; border-radius: 999px;
  background: var(--re-primary-soft); color: var(--re-primary-strong); font-size: 13.5px; }
.re-conv-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-conv-chip-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; color: var(--re-primary-strong); font-size: 13px; line-height: 1; cursor: pointer; }
.re-conv-chip-x:hover, .re-conv-chip-x:focus-visible { background: var(--re-primary); color: #fff; outline: none; }
.re-conv-chip.is-missing { background: #fff3d6; color: #8a5a00; }
.re-conv-chip.is-missing .re-conv-chip-x { color: #8a5a00; }
.re-conv-items { display: grid; gap: 4px; }
/* «Показать ещё» под списком (17.10): следующая порция объектов */
.re-conv-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 4px; }
.re-conv-more .an-note { margin: 0; }
/* строка диалога / звонка (17.10, замечания владельца): колонки по содержимому слева направо — иконка, когда, кто, что было
   и сразу за этим действие («Прослушать», «запись», «ответ через…»); остаток строки пустой, кнопка не уезжает к правому
   краю. Наведение — цветная подсветка и полоса слева: видно, какая строка под курсором */
.re-conv-chat, .re-conv-call { border: 1px solid var(--re-line); border-radius: 10px; padding: 6px 10px; font-size: 13px; background: #fff;
  transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease; }
.re-conv-chat:hover, .re-conv-call:hover { background: color-mix(in srgb, var(--re-primary) 5%, #fff); border-color: color-mix(in srgb, var(--re-primary) 45%, #fff);
  box-shadow: inset 3px 0 0 var(--re-primary); }
.re-conv-call.is-missed:hover, .re-conv-chat.is-unanswered:hover { box-shadow: inset 3px 0 0 #d08a00; }
.re-conv-chat[open] { border-color: color-mix(in srgb, var(--re-primary) 45%, #fff); }
/* колонки до кнопок — постоянной ширины (18.10, владелец: «Прослушать» и «ИИ-анализ» на строках — вертикально на одной линии,
   а то прыгают): кто — 170px, что было — 240px (длиннее — многоточием), «Прослушать» или ответ в чате — 170px, ИИ-анализ — своя
   колонка в первой строке, даже когда под звонком открыт плеер */
.re-conv-chat summary, .re-conv-call { display: grid; grid-template-columns: 22px 96px 170px 240px 170px max-content minmax(0, 1fr);
  column-gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.re-conv-chat summary > .re-conv-ai, .re-conv-call > .re-conv-ai { grid-column: 6; grid-row: 1; }
.re-conv-chat summary > .re-conv-state, .re-conv-call > .re-conv-rec:not(.is-player) { grid-column: 5; grid-row: 1; overflow: hidden; text-overflow: ellipsis; }
.re-conv-chat summary::-webkit-details-marker { display: none; }
.re-conv-chat summary:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 3px; border-radius: 6px; }
.re-conv-call { cursor: default; }
.re-conv-ico { font-size: 18px; color: var(--re-primary); }
.re-conv-call .re-conv-ico { color: #14724a; }
.re-conv-call.is-missed .re-conv-ico, .re-conv-chat.is-unanswered .re-conv-ico { color: #b26b00; }
.re-conv-at { color: var(--re-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.re-conv-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.re-conv-meta { color: var(--re-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-conv-state { white-space: nowrap; color: var(--re-text-muted); }
.re-conv-state.is-miss, .re-conv-chat.is-unanswered summary .re-conv-who { color: #8a5a00; }
.re-conv-call.is-missed .re-conv-who { color: #8a5a00; }
.re-conv-rec { justify-self: start; }
/* плеер записи — отдельной строкой во всю карточку, под строкой звонка (17.10) */
.re-conv-rec.is-player { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
.re-conv-rec.is-player .re-lp-call-audio { display: block; width: 100%; max-width: none; height: 32px; margin-top: 6px; }
.re-conv-thread { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--re-line); display: grid; gap: 6px; }
.re-conv-msg { display: grid; grid-template-columns: 96px 220px minmax(0, 1fr); column-gap: 10px; font-size: 13px; line-height: 1.45; padding: 4px 8px; border-radius: 8px; }
.re-conv-msg.is-in { background: #f4f7fd; }
.re-conv-msg.is-out { background: #eef8f2; }
.re-conv-msg-at { color: var(--re-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* кто написал (25.10, владелец: «слово видно не полностью»): столбец шире, сторона («агентство», «клиент», «Циан») видна всегда —
   сокращается только имя, полное — в подсказке */
.re-conv-msg-who { font-weight: 600; display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.re-conv-msg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.re-conv-msg-who .re-conv-role { flex: none; }
.re-conv-msg-text { white-space: pre-wrap; word-break: break-word; }
/* снижение цены под «Стоимостью» в таблице лотов (28.10, libs/price_history.py) */
.re-price-drop { margin-top: 2px; font-size: 12px; line-height: 1.3; color: #0d5d3d; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* раскладка строк — по ширине списка, а не окна (28.10; блок — после базовых правил строки и плеера, иначе они его перекрывают): с меню слева при окне 761–1240 px строка с колонками 18.10 была шире
   списка, и страница прокручивалась вбок. Колонки по-прежнему постоянной ширины — кнопки на одной вертикали: список уже 900 px —
   колонки уже (когда 84, кто 130, что было 170, действие 130), уже 730 px — строка в две строки */
.re-conv-items { container-type: inline-size; }
@container (width < 900px) {
  .re-conv-chat summary, .re-conv-call { grid-template-columns: 22px 84px 130px 170px 130px max-content minmax(0, 1fr); column-gap: 10px; }
}
@container (width < 730px) {
  /* узко: иконка, время и кто — первой строкой; что было и действие — под ними */
  .re-conv-chat summary, .re-conv-call { grid-template-columns: 22px minmax(0, auto) minmax(0, 1fr); row-gap: 2px; }
  .re-conv-meta, .re-conv-state, .re-conv-rec { grid-column: 2 / -1; }
  .re-conv-chat summary > .re-conv-state, .re-conv-call > .re-conv-rec:not(.is-player), .re-conv-chat summary > .re-conv-ai, .re-conv-call > .re-conv-ai { grid-column: 2 / -1; grid-row: auto; }
  .re-conv-rec.is-player { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 760px) {
  .re-conv-msg { grid-template-columns: 1fr; }
  .re-conv-obj { grid-template-columns: 64px minmax(0, 1fr); column-gap: 10px; }
  .re-conv-photo { width: 64px; height: 48px; }
}
/* Общий компонент выбора: размер не зависит от обёртки .form-check или высоты подписи.
   Не включать .form-check-input в стили текстовых полей с min-height/padding. */
.form-check { display: flex; align-items: flex-start; gap: 8px; padding-left: 0; margin-bottom: 8px; min-height: 0; }
/* Bootstrap shifts inputs left for its padded layout; our flex rows need no offset. */
.form-check .form-check-input { float: none; margin-left: 0; }
.form-check-input { box-sizing: border-box; float: none; flex: none; align-self: flex-start;
  width: 18px; height: 18px; min-width: 18px; min-height: 18px; margin: 2px 0 0; padding: 0;
  border: 1px solid var(--re-border); background: #fff; background-repeat: no-repeat;
  background-position: center; background-size: 100% 100%; appearance: none; -webkit-appearance: none; cursor: pointer; }
.form-check-input[type="checkbox"] { border-radius: 5px; }
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:checked, .form-check-input[type="checkbox"]:indeterminate { background-color: var(--re-primary); border-color: var(--re-primary); }
.form-check-input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.form-check-input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3ccircle cx='10' cy='10' r='4' fill='%23fff'/%3e%3c/svg%3e");
}
.form-check-input[type="checkbox"]:indeterminate {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath stroke='%23fff' stroke-linecap='round' stroke-width='3' d='M5 10h10'/%3e%3c/svg%3e");
}
.form-check-input:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-primary) 16%, transparent); }
.form-check-input:disabled { opacity: .5; cursor: default; }
.form-check .form-check-label { font-size: 13.5px; line-height: 1.45; cursor: pointer; }
/* «Настройки» (16.10): таблица пользователей, чипы роли, окно доступов двумя колонками; «Сменить пароль» в блоке меню */
.re-settings-users thead th { font-size: 13px; }
.re-settings-users tbody td { font-size: 13px; white-space: normal; vertical-align: top; }
.re-settings-users tr.is-off td { color: var(--re-text-muted); }
.re-settings-login { font-weight: 600; }
.re-settings-td-list { max-width: 360px; }
.re-settings-td-date { white-space: nowrap; }
.re-settings-users tbody td.re-settings-td-actions { white-space: nowrap; text-align: right; width: 1%; }
.re-settings-actions { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.re-settings-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--re-surface-tint); font-size: 12px; color: var(--re-text-muted); margin-right: 4px; }
.re-settings-chip.is-admin { background: var(--re-primary-soft); color: var(--re-primary-strong); }
.re-settings-chip.is-off { background: #fff4dc; color: #8a5a00; }
.re-settings-hint { margin: 8px 0 0; font-size: 12px; color: var(--re-text-muted); }
.re-modal-dialog-wide { max-width: 860px; }
.re-access-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.re-access-title { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.re-access-tools { display: flex; gap: 4px; margin-bottom: 4px; }
.re-access-tools .btn { padding-left: 0; padding-right: 6px; }
.re-access-list { max-height: 340px; overflow: auto; border: 1px solid var(--re-line); border-radius: 10px; padding: 6px 8px; }
.re-access-item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 13px; margin: 0; cursor: pointer; }
.re-access-item input { margin: 0; }
.re-access-item .re-inline-note { margin-left: auto; white-space: nowrap; }
.re-side-password { width: 100%; margin-top: 9px; min-height: 32px; border: 1px solid var(--re-border); border-radius: 10px; background: transparent; color: var(--re-text-muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; cursor: pointer; }
.re-side-password:hover { color: var(--re-primary-strong); border-color: color-mix(in srgb, var(--re-primary) 35%, var(--re-border)); }
.re-side-password .material-symbols-outlined { font-size: 16px; }
.re-shell.sidebar-collapsed .re-side-password span:last-child { display: none; }
.re-shell.sidebar-collapsed .re-side-password { width: 38px; min-width: 38px; min-height: 38px; padding: 0; margin-top: 0; display: inline-grid; place-items: center; }
.re-shell.sidebar-collapsed .re-side-password .material-symbols-outlined { margin: 0; display: block; font-size: 20px; line-height: 1; }
.re-password-result { margin: 0; font-size: 13px; color: #14724a; }
.re-password-result.is-error { color: #b42318; }
@media (max-width: 640px) { .re-access-cols { grid-template-columns: minmax(0, 1fr); } }
/* прелоадер вкладки «Аналитика» (16.10) */
.re-analytics .an-loading { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--an-text-secondary); }
.re-analytics .an-loading[hidden] { display: none; }
.re-analytics .an-spinner { width: 14px; height: 14px; border: 2px solid var(--an-grid); border-top-color: var(--re-primary); border-radius: 50%; animation: an-spin .8s linear infinite; }
@keyframes an-spin { to { transform: rotate(360deg); } }
.re-lots-calc .re-budget-chain { width: auto; min-width: 0; padding: 12px 14px; }
.re-lots-calc .re-pool-shadow { width: auto; min-width: 0; margin: 0; border-radius: 0; border: 0; border-top: 1px solid var(--re-line); background: var(--re-surface-tint); }
@media (min-width: 1280px) {
  @supports (grid-template-columns: subgrid) {
    .re-lots-panel > .re-lots-calc { grid-column: 1 / -1; }
  }
}

/* Очередь отделена от ссылок-фильтров собственной строкой. */
.re-pool-shadow-actions { flex: 1 1 100%; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--re-line); }
.re-pool-shadow-actions .re-pool-shadow-show { margin-left: 0; min-height: 44px; padding: 8px 12px; max-width: 100%; }
.re-pool-shadow-show { user-select: none; -webkit-user-select: none; }

/* Очередь «Автоматической» над таблицей (10.10): что показано и «Убрать очередь» */
.re-queue-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--re-primary) 30%, var(--re-border)); border-radius: 12px;
  background: color-mix(in srgb, var(--re-primary) 5%, white); font-size: 13px; line-height: 1.4; }
.re-queue-bar[hidden] { display: none; }
.re-queue-text { flex: 1 1 360px; min-width: 0; color: var(--re-text-muted); }
.re-queue-text b { color: var(--re-text); font-weight: 600; }
.re-queue-close { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--re-primary-strong); cursor: pointer; white-space: nowrap; }
.re-queue-close:hover { text-decoration: underline; }
/* столбцы очереди подсвечены, пока она включена */
#lotsTable.is-queue td[data-col^="pool_"] { background-color: color-mix(in srgb, var(--re-primary) 5%, white); }
#lotsTable.is-queue th[data-col^="pool_"] { color: var(--re-primary-strong); }

/* Строки над таблицей лотов (решения владельца 15.10, libs/feed_alerts.py). А2: «Требуют внимания» — между панелью показателей
   и поиском; числа — ссылки на фильтр, применённая причина подчёркнута. Панель над строкой — с обычным отступом ряда */
.re-lots-panel:has(+ .re-attn-bar) { margin-bottom: 16px; }
.re-attn-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 20px; padding: 10px 14px;
  border: 1px solid #f1dfae; border-radius: 12px; background: #fff7e3; color: var(--re-text); font-size: 13.5px; line-height: 1.4; }
.re-attn-title { display: inline-flex; align-items: center; gap: 6px; }
.re-attn-title b { font-weight: 600; }
.re-attn-icon { font-size: 18px; color: var(--re-warning); }
.re-attn-link, .re-shadow-link { color: var(--re-primary-strong); font-weight: 500; text-decoration: none; white-space: nowrap; }
.re-attn-link:hover, .re-shadow-link:hover, .re-attn-link.is-active, .re-shadow-link.is-active { text-decoration: underline; }
.re-attn-link.is-active, .re-shadow-link.is-active { text-decoration-thickness: 2px; }
/* Б1: «без ставки и Топа N: причины» в строке стратегии и предупреждение о настройке стратегии строкой ниже */
.re-pool-shadow .re-nomoney b { color: var(--re-text); }
.re-pool-shadow .re-nomoney { flex: 1 1 100%; min-width: 0; }
.re-nomoney-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 4px; }
.re-nomoney-links .re-shadow-link { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: 8px 0; white-space: normal; }
@media (max-width: 640px) {
  .re-pool-shadow-actions { justify-content: flex-start; }
  .re-pool-shadow-actions .re-pool-shadow-show { padding-left: 0; }
}
.re-lots-calc .re-strategy-warn { display: flex; align-items: flex-start; gap: 8px; padding: 9px 14px 10px; border-top: 1px solid var(--re-line);
  background: #fff8e8; color: #6b4e00; font-size: 13px; line-height: 1.45; }
.re-strategy-warn .material-symbols-outlined { flex: none; font-size: 18px; color: var(--re-warning); }
.re-strategy-warn a { color: var(--re-primary-strong); font-weight: 500; white-space: nowrap; }
@media (max-width: 768px) {
  .re-lots-panel:has(+ .re-attn-bar) { margin-bottom: 12px; }
  .re-attn-bar { margin-bottom: 16px; }
}

/* ===== Панель «Аналитика лота» (16.10, часть A): по клику на строку таблицы лотов справа выезжает панель поверх страницы
   с затемнением и без прокрутки страницы — как шторка фильтра (решение владельца 16.10: до этого страница сужалась под
   панель, и раскладка плиток и тулбара ломалась). Ниже шторки фильтра (79) и её затемнения (78), выше плавающей шапки (60)
   и панели массовых действий (70). На телефоне — на весь экран снизу ===== */
:root { --re-lot-panel-w: min(560px, 94vw); }
.re-lot-panel-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, 0.26); z-index: 76; }
/* страница под панелью не прокручивается (свой класс: re-no-scroll снимает шторка фильтра) */
body.re-lot-panel-lock { overflow: hidden; }
.re-lot-panel { position: fixed; top: 0; right: 0; width: var(--re-lot-panel-w); height: 100vh; height: 100dvh; background: #fff;
  border-left: 1px solid var(--re-border); box-shadow: none; z-index: 77; transform: translateX(100%); visibility: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, visibility 0s linear 220ms; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  outline: none; font-size: 13px; color: var(--re-text); }
.re-lot-panel.open { transform: translateX(0); visibility: visible; box-shadow: -24px 0 56px rgba(16, 24, 40, 0.2); transition: transform 220ms ease, box-shadow 220ms ease, visibility 0s; }
@media (prefers-reduced-motion: reduce) { .re-lot-panel { transition: none; } }
/* шапка: фото, адрес (ссылка на объявление), ID и статус; справа — соседний лот и закрыть */
.re-lot-panel-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--re-border); }
.re-lot-panel-photo, .re-lot-panel-photo-fallback { width: 86px; height: 58px; border-radius: 10px; flex: 0 0 auto; }
.re-lot-panel-photo { border: 1px solid var(--re-border); object-fit: cover; display: block; }
.re-lot-panel-photo-fallback { border: 1px dashed var(--re-border); display: grid; place-items: center; color: #8290ab; background: #f5f8ff; }
.re-lot-panel-copy { flex: 1 1 auto; min-width: 0; }
.re-lot-panel-kicker { font-size: 12px; color: var(--re-text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.re-lot-panel-kicker .re-lot-ident-id { font-size: 12px; }
.re-lot-panel-address { margin: 2px 0 0; font-size: 14px; font-weight: 500; line-height: 1.3; }
.re-lot-panel-address a { color: var(--re-text); text-decoration: none; }
.re-lot-panel-address a:hover { color: var(--re-primary-strong); text-decoration: underline; }
.re-lot-panel-status { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--re-surface-tint); font-size: 11.5px; line-height: 1.5; color: var(--re-text-muted); }
.re-lot-panel-status.is-error { color: var(--re-danger); background: color-mix(in srgb, var(--re-danger) 8%, white); }
.re-lot-panel-links { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.re-lot-panel-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--re-primary-strong); text-decoration: none; white-space: nowrap; }
.re-lot-panel-more:hover { text-decoration: underline; }
.re-lot-panel-more[data-panel="crm"] { color: #931F2B; }
.re-lot-panel-more[data-panel="more"] { color: var(--re-success); }
.re-lot-panel-nav { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.re-lot-panel-nav-row { display: flex; gap: 4px; }
.re-lot-panel-btn { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--re-border); border-radius: 8px;
  background: #fff; color: var(--re-text-muted); cursor: pointer; }
.re-lot-panel-btn .material-symbols-outlined { font-size: 18px; }
.re-lot-panel-btn:hover:not(:disabled), .re-lot-panel-btn:focus-visible { border-color: color-mix(in srgb, var(--re-primary) 35%, var(--re-border)); color: var(--re-primary-strong); background: color-mix(in srgb, var(--re-primary) 7%, white); }
.re-lot-panel-btn:disabled { opacity: 0.4; cursor: default; }
.re-lot-panel-btn:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-lot-panel-body { overflow: auto; overscroll-behavior: contain; padding: 16px 16px 28px; background: #f5f6fa; }
/* Действия вне прокручиваемой части: всегда видны и не перекрывают последние параметры. */
.re-lot-panel-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--re-border); background: #fff; }
.re-lot-panel-footer .re-lp-sec { padding: 0; margin: 0; border: 0; border-radius: 0; }
.re-lot-panel-footer .re-lp-title { margin: 0 0 10px; padding: 0; border: 0; font-size: 13px; }
.re-lot-panel-footer .re-lp-actions .btn { white-space: normal; max-width: 100%; }
.re-lot-panel-footer .re-lp-notice { max-height: 5em; overflow: auto; overflow-wrap: anywhere; }
.re-lot-panel-empty { padding: 20px 0; color: var(--re-text-muted); }
/* блоки: название с одним «?» (правило Г1), содержимое — плитки, путь ставки, список фактов. Отступы и колонки — проработка
   16.10 («чтобы были лучше отступы и информация лучше считывалась»): заголовок блока тёмный, блоки просторнее, подписи и
   значения в списках — в ровных колонках */
.re-lp-sec { padding: 16px; margin-bottom: 12px; border: 1px solid var(--re-line); border-radius: 14px; background: #fff; min-width: 0; }
.re-lp-sec:last-child { margin-bottom: 0; }
.re-lp-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--re-line); font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--re-text); }
.re-lp-title > span:first-child { min-width: 0; }
.re-lp-title .re-help-trigger { flex-shrink: 0; }
.re-lp-title .re-help-trigger { margin: -2px 0; }
.re-lp-title-note { margin-left: auto; font-weight: 400; white-space: nowrap; }
.re-lp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.re-lp-tiles.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.re-lp-tiles-after { margin-top: 12px; }
.re-lp-tile { min-width: 0; padding: 10px 12px; border: 1px solid var(--re-line); border-radius: 12px; }
.re-lp-tile-label { font-size: 12px; line-height: 1.3; color: var(--re-text-muted); }
.re-lp-tile-value { margin-top: 6px; font-size: 19px; line-height: 1.3; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.re-lp-tile-value .re-num-none, .re-lp-tile-value .re-num-estimate { font-weight: 500; }
.re-lp-tile-unit { font-size: 12px; font-weight: 400; color: var(--re-text-muted); }
.re-lp-tile-sub { margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--re-text-muted); overflow-wrap: anywhere; }
.re-lp-tile-sub.is-on { color: var(--re-text); font-weight: 500; }
/* тревоги: ошибки — красным, остальное — жёлтым (как строка «Требуют внимания») */
.re-lp-alert { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; margin-bottom: 6px; font-size: 13px; line-height: 1.4; background: #fff8e8; color: #6b4e00; }
.re-lp-alert:last-child { margin-bottom: 0; }
.re-lp-alert .material-symbols-outlined { flex: none; font-size: 18px; color: var(--re-warning); }
.re-lp-alert.is-error { background: color-mix(in srgb, var(--re-danger) 6%, white); color: #8c1d18; }
.re-lp-alert.is-error .material-symbols-outlined { color: var(--re-danger); }
.re-lp-alert.is-note { background: var(--re-surface-tint); color: var(--re-text-muted); }
.re-lp-alert.is-note .material-symbols-outlined { color: #5d6b85; }
.re-lp-alert div { min-width: 0; overflow-wrap: anywhere; }
/* путь ставки: исходный фид → к отправке → фид REA → на Циане — строками сверху вниз (четыре плитки в ряд резали текст, 16.10):
   подпись | ставка | тип продвижения (у «На Циане» под ним — расклад «= Топ + ставка») | метка правила позиций */
.re-lp-path { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.re-lp-step { display: grid; grid-template-columns: minmax(96px, auto) minmax(52px, auto) minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline;
  min-width: 0; padding: 7px 10px; border: 1px solid var(--re-line); border-radius: 10px; }
.re-lp-step.is-key { border-color: color-mix(in srgb, var(--re-primary) 45%, var(--re-line)); background: color-mix(in srgb, var(--re-primary) 4%, white); }
.re-lp-step.is-dim .re-lp-step-value { color: #5d6b85; font-weight: 500; }
.re-lp-step-label { font-size: 12.5px; color: var(--re-text-muted); white-space: nowrap; }
.re-lp-step-value { font-size: 15px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.re-lp-step-promo { grid-column: 3; font-size: 12.5px; line-height: 1.3; color: var(--re-text-muted); overflow-wrap: anywhere; }
.re-lp-step-split { grid-column: 3; font-size: 12px; line-height: 1.3; color: var(--re-text-muted); font-variant-numeric: tabular-nums; }
.re-lp-step-promo.is-on { color: var(--re-text); font-weight: 500; }
.re-lp-step-mark { grid-column: 4; grid-row: 1; }
.re-lp-source { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; line-height: 1.4; }
.re-lp-source .re-src-btn { cursor: default; flex: none; }
.re-lp-source b { font-weight: 600; }
/* список фактов: подпись — значение в ровных колонках; длинная подпись переносится, а не сдвигает колонку значений */
.re-lp-facts { display: grid; grid-template-columns: minmax(120px, 42%) minmax(0, 1fr); gap: 0 16px; margin: 10px 0 0; font-size: 13px; line-height: 1.5; }
.re-lp-facts > dt, .re-lp-facts > dd { padding: 8px 0; border-bottom: 1px solid var(--re-line); }
.re-lp-facts > dt:nth-last-child(2), .re-lp-facts > dd:last-child { border-bottom: 0; }
.re-lp-facts dt { color: var(--re-text-muted); font-weight: 400; }
.re-lp-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.re-lp-facts dd.is-warn { color: #8a5a00; }
.re-lp-note { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: var(--re-text-muted); }
/* ссылка-строка внизу секций «Звонки» и «Чаты» (17.10): в «Чаты и звонки» фида по этому объекту — заметная, полужирная,
   стрелка текстом; в узкой панели переносится по словам, а не режется */
.re-lp-section-link { margin: 10px 0 0; font-size: 12.5px; line-height: 1.4; font-weight: 600; }
.re-lp-section-link a { color: var(--re-primary-strong); text-decoration: none; overflow-wrap: anywhere; }
.re-lp-section-link a:hover, .re-lp-section-link a:focus-visible { text-decoration: underline; }
/* воронка за период: шаг | число (вплотную к подписи, выровнено вправо) | доля от предыдущего шага */
.re-lp-funnel { display: grid; font-size: 13px; }
.re-lp-funnel-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(52px, auto) minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--re-line); }
.re-lp-funnel-row:last-child { border-bottom: 0; }
.re-lp-funnel-label { color: var(--re-text-muted); }
.re-lp-funnel-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.re-lp-funnel-conv { font-size: 12px; color: var(--re-text-muted); font-variant-numeric: tabular-nums; }
.re-lp-funnel-sub { grid-column: 1 / -1; height: 4px; }
.re-lp-commission { margin-top: 12px; padding: 14px; border: 1px solid #e6d5d8; border-radius: 12px; background: #fcf8f9; }
.re-lp-commission > .re-lp-subtitle { color: #931F2B; }
.re-lp-commission-values { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
.re-lp-commission-values .re-lp-tile { padding: 0; border: 0; border-radius: 0; }
.re-lp-commission-values .re-lp-tile + .re-lp-tile { padding-left: 16px; border-left: 1px solid #e6d5d8; }
.re-lp-costs { margin-top: 18px; }
.re-lp-costs .re-lp-facts { margin-top: 0; grid-template-columns: minmax(0, 1fr) auto; }
.re-lp-costs dd { text-align: right; }
.re-lp-note[data-f="totals"] { padding: 10px 12px; background: var(--re-surface-tint); border-radius: 8px; line-height: 1.6; }
/* действия: окно лота и быстрые источники; сообщение об ошибке под кнопками */
/* часть B (16.10): ряды по дням и снимки по часам — строки «подпись | мини-график | итог»; звонки списком */
.re-lp-loading { padding: 4px 0 2px; font-size: 12.5px; color: var(--re-text-muted); }
.re-lp-loading.is-error { color: #b42318; }
.re-lp-sparks { display: grid; gap: 4px; }
.re-lp-spark-row { display: grid; grid-template-columns: minmax(96px, 118px) minmax(0, 1fr) auto; column-gap: 10px; align-items: center; }
.re-lp-spark-label { font-size: 12.5px; color: var(--re-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-lp-spark { display: block; width: 100%; height: 30px; }
.re-lp-spark.is-bars rect { fill: var(--re-primary); opacity: 0.85; }
.re-lp-spark.is-bars rect.is-neg { fill: #b42318; }
.re-lp-spark.is-line polyline { fill: none; stroke: var(--re-primary); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.re-lp-spark.is-line circle { fill: var(--re-primary); }
.re-lp-spark-hit { fill: transparent; }
.re-lp-spark-hit:hover { fill: color-mix(in srgb, var(--re-primary) 10%, transparent); }
.re-lp-spark-sum { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 48px; }
.re-lp-calls { display: grid; gap: 2px; font-size: 12.5px; }
/* строка звонка — гибкая с переносом: в узкой панели кнопка «Прослушать» уходит на вторую строку, а не режется; плеер —
   отдельной строкой во всю ширину, не наезжает на длительность и номер (17.10, замечания владельца) */
/* строка звонка в панели лота (18.10): сетка — время, статус, длительность, номер справа; вторым рядом справа — «Прослушать» и
   ИИ-анализ (только у состоявшегося разговора), третьим — плеер */
.re-lp-call { display: grid; grid-template-columns: 84px max-content minmax(0, 1fr) max-content; column-gap: 10px; row-gap: 5px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--re-line); min-width: 0; }
.re-lp-call > .re-lp-call-phone { grid-column: 4; justify-self: end; }
.re-lp-call-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.re-lp-call > .re-lp-call-norec { grid-column: 1 / -1; justify-self: end; }
.re-lp-call:last-child { border-bottom: 0; }
.re-lp-call-at { flex: 0 0 84px; color: var(--re-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.re-lp-call-status.is-ok { color: #14724a; font-weight: 600; }
.re-lp-call-status.is-miss { color: #8a5a00; }
.re-lp-call-dur { color: var(--re-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-lp-call-phone { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* запись звонка по запросу и чаты в панели (16.10) */
/* «Прослушать» (панель лота, страница лота, «Чаты и звонки»): заметная кнопка-«таблетка» с треугольником воспроизведения (17.10) */
.re-lp-call-play { display: inline-block; font: inherit; font-size: 12px; font-weight: 600; line-height: 16px; color: var(--re-primary-strong); background: var(--re-primary-soft);
  border: 1px solid transparent; border-radius: 999px; padding: 2px 11px 2px 9px; cursor: pointer; white-space: nowrap; transition: background-color .12s ease, color .12s ease; }
.re-lp-call-play::before { content: ''; display: inline-block; width: 0; height: 0; margin-right: 6px; border-style: solid; border-width: 4.5px 0 4.5px 7px;
  border-color: transparent transparent transparent currentColor; }
.re-lp-call-play:hover { background: var(--re-primary); color: #fff; }
.re-lp-call-play:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-lp-call-audio { height: 28px; max-width: 220px; }
.re-lp-call .re-lp-call-audio { grid-column: 1 / -1; width: 100%; max-width: none; min-width: 0; margin-top: 2px; } /* плеер — отдельной строкой под кнопками */
.re-lp-call-norec { color: var(--re-text-muted); font-size: 12px; white-space: nowrap; }
.re-lp-chats { display: grid; gap: 2px; font-size: 12.5px; }
.re-lp-chat { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto; column-gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--re-line); }
.re-lp-chat-ai:empty { display: none; }
.re-lp-chat:last-child { border-bottom: 0; }
.re-lp-chat-state { color: var(--re-text-muted); white-space: nowrap; }
.re-lp-chat.is-unanswered .re-lp-chat-state { color: #8a5a00; font-weight: 600; }
.re-lp-note .is-miss { color: #8a5a00; }
.an-lot-calls .re-lp-call-audio { height: 30px; width: 300px; max-width: 100%; vertical-align: middle; }
.an-lot-chats td.is-miss { color: #8a5a00; font-weight: 600; }
/* переписка на странице лота (17.10): «Читать» раскрывает сообщения строкой под диалогом; строка под курсором подсвечивается */
.an-lot-chat-read { font: inherit; font-size: 12px; font-weight: 600; line-height: 16px; color: var(--re-primary-strong); background: var(--re-primary-soft);
  border: 1px solid transparent; border-radius: 999px; padding: 2px 11px; cursor: pointer; white-space: nowrap; transition: background-color .12s ease, color .12s ease; }
.an-lot-chat-read:hover, .an-lot-chat-read[aria-expanded="true"] { background: var(--re-primary); color: #fff; }
.an-lot-chat-read:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.re-lot-analytics .an-lot-chats tr.an-lot-chat-row { cursor: pointer; }
.re-lot-analytics .an-lot-chats tr.an-lot-chat-row:hover td, .re-lot-analytics .an-lot-chats tr.an-lot-chat-row.is-open td,
.re-lot-analytics .an-lot-calls tbody tr:hover td { background: color-mix(in srgb, var(--re-primary) 5%, #fff); }
.re-lot-analytics .an-lot-chats tr.an-lot-chat-row:hover td:first-child, .re-lot-analytics .an-lot-chats tr.an-lot-chat-row.is-open td:first-child,
.re-lot-analytics .an-lot-calls tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--re-primary); }
.re-lot-analytics .an-lot-chats td.an-lot-chat-thread-cell { text-align: left; white-space: normal; padding: 2px 8px 10px; background: #fff; }
.re-lot-analytics .an-lot-chats td.an-lot-chat-thread-cell .re-conv-thread { margin-top: 0; }
.an-lot-conv-link { margin-top: 8px; } .an-lot-conv-link a { font-weight: 600; color: var(--re-primary-strong); text-decoration: none; } .an-lot-conv-link a:hover { text-decoration: underline; }
.re-lp-call-rec { font-size: 12px; white-space: nowrap; }
.re-lp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.re-lp-actions .btn { white-space: nowrap; }
.re-lp-notice { margin: 8px 0 0; font-size: 12.5px; color: #14724a; }
.re-lp-notice.is-error { color: #b42318; }
.re-lp-notice[hidden] { display: none; }
/* открытая в панели строка таблицы — мягко подсвечена, у галочки — синяя полоса */
.re-table-scroll #lotsTable tbody tr.is-open:not(.is-selected) td,
.re-table-scroll #lotsTable tbody tr.is-open:not(.is-selected) td.is-pinned { background: color-mix(in srgb, var(--re-primary) 7%, white); }
.re-table-scroll #lotsTable tbody tr.is-open td.re-col-select { box-shadow: inset 3px 0 0 var(--re-primary); }
#lotsTable tbody tr[data-lot-id] { cursor: pointer; }
#lotsTable tbody tr[data-lot-id]:focus { outline: none; }
@media (max-width: 768px) {
  .re-lot-panel { width: 100vw; max-width: 100vw; border-left: 0; transform: translateY(100%); }
  .re-lot-panel.open { transform: translateY(0); box-shadow: 0 -14px 42px rgba(16, 24, 40, 0.22); }
  .re-lot-panel-head { padding: 12px 14px; }
  .re-lot-panel-body { padding: 12px 10px 24px; }
  .re-lot-panel-footer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .re-lot-panel-footer .re-lp-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .re-lot-panel-footer .re-lp-actions .btn-primary { grid-column: 1 / -1; }
  .re-lp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .re-lot-panel-photo, .re-lot-panel-photo-fallback { width: 64px; height: 48px; }
  .re-lp-tile-value { font-size: 16px; }
  .re-lp-sec { padding: 12px; }
  .re-lp-funnel-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  .re-lp-funnel-conv { grid-column: 1 / -1; }
  .re-lp-funnel-conv:empty { display: none; }
  .re-lot-panel-head { gap: 8px; }
  .re-lot-panel-nav-row { flex-direction: column; }
}

/* ===== ИИ-анализ звонков и чатов (17.10, static/js/ai_analysis.js): кнопка у звонка и чата и окно с разбором ===== */
.re-ai-btn { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap;
  color: #5b3bb8; background: #efe9ff; border: 1px solid transparent; border-radius: 999px; padding: 2px 11px 2px 8px; cursor: pointer;
  transition: background-color .12s ease, color .12s ease; }
.re-ai-btn::before { content: 'auto_awesome'; font-family: 'Material Symbols Rounded'; font-weight: 300; font-size: 15px; line-height: 1; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; }
.re-ai-btn:hover { background: #5b3bb8; color: #fff; }
.re-ai-btn:focus-visible { outline: 2px solid #5b3bb8; outline-offset: 2px; }
.re-ai-btn.is-completed { background: #5b3bb8; color: #fff; }
.re-ai-btn.is-completed:hover { background: #47289e; }
.re-ai-btn.is-queued, .re-ai-btn.is-processing { background: #f4f1fb; color: #6b5aa6; cursor: progress; }
/* пока идёт разбор — кольцо вместо значка (18.10: без процентов) */
.re-ai-btn.is-queued::before, .re-ai-btn.is-processing::before { content: ''; width: 11px; height: 11px; box-sizing: border-box; border: 2px solid #d8cdf6; border-top-color: #5b3bb8;
  border-radius: 50%; animation: re-bell-spin .9s linear infinite; flex: none; }
@media (prefers-reduced-motion: reduce) { .re-ai-btn.is-queued::before, .re-ai-btn.is-processing::before { animation: none; } }
.re-ai-btn.is-failed { background: #fff3d6; color: #8a5a00; }
.re-ai-btn.is-failed:hover { background: #8a5a00; color: #fff; }
.re-ai-btn.is-off { background: #f2f4f8; color: #8a94a8; cursor: not-allowed; }
.re-ai-btn.is-off:hover { background: #f2f4f8; color: #8a94a8; }
.re-ai-lot-control { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 300px; text-align: left; }
.re-ai-threshold, .re-ai-lot-count, .re-ai-lot-history { font-size: 12px; line-height: 1.4; }
.re-ai-threshold, .re-ai-lot-count { color: var(--re-text-muted); }
.re-ai-threshold { overflow-wrap: anywhere; }
/* окно разбора: поверх страницы, прокручивается само окно (длинная расшифровка) */
.re-ai-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; }
.re-ai-dialog { width: min(820px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); }
.re-ai-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 10px; border-bottom: 1px solid #e8ecf3; }
.re-ai-head h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; flex: 1 1 auto; }
.re-ai-body { padding: 12px 20px 20px; overflow-y: auto; font-size: 14px; line-height: 1.5; }
.re-ai-meta { margin: 0 0 10px; color: var(--re-text-muted); font-size: 13px; }
.re-ai-sec { margin: 0 0 14px; }
.re-ai-sec h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.re-ai-sec p { margin: 0; }
.re-ai-sec ul { margin: 0; padding-left: 18px; }
.re-ai-sec li { margin: 0 0 4px; }
.re-ai-muted { color: var(--re-text-muted); }
/* кто обработал — local или OpenAI (28.10): метка в строке под заголовком разбора и у «Расшифровки» */
.re-ai-engine { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 20px;
  background: #eef2f7; color: var(--re-text); vertical-align: 1px; }
.re-ai-engine[data-engine="local"] { background: #e6f4ec; color: #0d5d3d; }
.re-ai-sec h3 .re-ai-engine { margin-left: 8px; }
.re-ai-turns { display: grid; gap: 4px; }
.re-ai-turn { display: grid; grid-template-columns: 48px minmax(90px, 160px) minmax(0, 1fr); column-gap: 10px; padding: 4px 8px; border-radius: 8px; background: #f7f8fc; font-size: 13px; }
.re-ai-time { color: var(--re-text-muted); font-variant-numeric: tabular-nums; }
.re-ai-who { font-weight: 600; overflow-wrap: anywhere; }
.re-ai-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.re-ai-pre { white-space: pre-wrap; font: inherit; font-size: 13px; margin: 0; }
@media (max-width: 640px) { .re-ai-turn { grid-template-columns: 1fr; } .re-ai-modal { padding: 0; } .re-ai-dialog { max-height: 100vh; border-radius: 0; } }
.re-ai-turn.is-out { background: #eef3ff; }
.re-ai-body p + p { margin-top: 8px; }
/* низ окна (18.10): основа разбора, «с тех пор новое» и «Проанализировать заново», история, кнопки окна запуска */
.re-ai-foot { padding: 12px 20px 16px; border-top: 1px solid #e8ecf3; font-size: 13px; line-height: 1.5; }
.re-ai-foot p { margin: 0 0 6px; }
.re-ai-foot p:last-child { margin-bottom: 0; }
.re-ai-foot .btn-sm { margin-left: 6px; }
.re-ai-check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 2px; font-weight: 600; cursor: pointer; }
.re-ai-check input { margin-top: 4px; flex: none; }
.re-ai-body .re-ai-check-note { margin: 0 0 10px 22px; font-size: 13px; }

/* ИИ-анализ коммуникаций по объекту (18.10): кнопка у объекта — в «Чатах и звонках», в панели лота и на странице лота */
.re-conv-lot .an-card-head { flex-wrap: wrap; }
.re-conv-lot .re-conv-obj { flex: 1 1 320px; }
.re-conv-lot-ai { flex: none; margin-left: auto; max-width: 100%; }
.re-conv-lot-ai .re-ai-lot-control { max-width: min(300px, 100%); }
/* панель лота (18.10): звонки и чаты — одной секцией «Коммуникации», подблоками со своим подзаголовком (без капслока). Кнопки
   разбора объекта в панели нет: панель — за 30 дней, а разбор берёт все коммуникации объекта */
.re-lp-sub + .re-lp-sub { margin-top: 16px; }
.re-lp-subtitle { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--re-text-muted); }
/* панель лота (23.10): заявки и сделки CRM — заявка строкой (день, ссылка), сделка — день, стадия, комиссия; второй строкой —
   эксперт, связь с лотом, источник заявки и ссылка на сделку */
.re-lp-crm-leads, .re-lp-crm-deals { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 12.5px; }
.re-lp-crm-lead { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--re-line); }
.re-lp-crm-deal { display: grid; grid-template-columns: 84px minmax(0, 1fr) max-content; column-gap: 10px; row-gap: 3px; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--re-line); min-width: 0; }
.re-lp-crm-lead:last-child, .re-lp-crm-deal:last-child { border-bottom: 0; }
.re-lp-crm-sum { justify-self: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.re-lp-crm-facts { grid-column: 1 / -1; color: var(--re-text-muted); font-size: 12px; line-height: 1.4; }
.re-lp-crm-stage.is-won, .re-lot-crm-stage.is-won { color: #14724a; font-weight: 600; }
/* 25.10: стадия заявки в CRM — приглушённым текстом, «Квалифицирована» — зелёным */
.re-lp-crm-lead .re-lp-crm-stage, .re-lot-crm-list .re-lot-crm-stage { color: var(--re-text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-lp-crm-stage.is-qual, .re-lot-crm-stage.is-qual { color: #14724a; font-weight: 600; }
.re-lp-crm-lead .re-lp-crm-link, .re-lot-crm-list li > a { margin-left: auto; flex: none; white-space: nowrap; }
.re-lot-crm-list .re-lot-crm-stage { grid-column: 1 / -1; grid-row: 2; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.re-lot-crm-list li > .re-value-mono { flex: none; }
.re-lot-crm-qual { margin-left: 4px; font-size: 12px; font-weight: 600; color: #14724a; vertical-align: 2px; }
.re-lp-crm-link { color: var(--re-primary-strong); font-weight: 600; text-decoration: none; white-space: nowrap; }
.re-lp-crm-link:hover, .re-lp-crm-link:focus-visible { text-decoration: underline; }
@media (max-width: 420px) {
  .re-lp-crm-lead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 8px 0; }
  .re-lp-crm-lead .re-lp-crm-stage { grid-column: 1 / -1; grid-row: 2; white-space: normal; overflow-wrap: anywhere; }
  .re-lp-crm-lead .re-lp-crm-link { grid-column: 2; grid-row: 1; }
  .re-lp-crm-deal { grid-template-columns: minmax(0, 1fr) auto; }
  .re-lp-crm-deal .re-lp-crm-stage { grid-column: 1 / -1; grid-row: 2; }
  .re-lp-call { grid-template-columns: minmax(0, 1fr) auto; }
  .re-lp-call > .re-lp-call-phone { grid-column: 2; grid-row: 1; }
  .re-lp-chat { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
}
/* таблица лотов (23.10): номер объекта в CRM ссылкой */
.re-lot-page-actions .re-ai-btn { font-size: 14px; line-height: 20px; padding: 8px 15px 8px 12px; border-radius: 10px; }
.re-lot-page-actions .re-ai-btn::before { font-size: 18px; }
.re-lot-ai-slot:empty { display: none; }

/* страница разбора /ai/<kind>/<id> (18.10): объект и ссылки сверху, разбор ниже */
.re-ai-page { max-width: 980px; }
.re-ai-page-back { display: inline-flex; gap: 6px; margin: 4px 0 12px; font-weight: 600; text-decoration: none; }
.re-ai-page-obj { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 16px; border: 1px solid var(--re-border); border-radius: 16px; background: #fff; margin-bottom: 14px; }
.re-ai-page-photo { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: #f2f4f8; display: grid; place-items: center; color: var(--re-text-muted); }
.re-ai-page-kicker { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--re-text-muted); font-size: 13px; }
.re-ai-page-obj h1 { margin: 2px 0 6px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.re-ai-page-facts { margin: 0 0 6px; color: var(--re-text); font-size: 13.5px; }
.re-ai-page-expert { margin: 0 0 8px; font-size: 13.5px; }
.re-ai-page-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; font-weight: 600; }
.re-ai-page-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 16px; border: 1px solid var(--re-border); border-radius: 12px; background: #fff; margin-bottom: 14px; font-size: 13.5px; }
.re-ai-page-item .re-lp-call-audio { width: 100%; max-width: none; }
.re-ai-page-result { padding: 16px 20px; border: 1px solid var(--re-border); border-radius: 16px; background: #fff; font-size: 14px; line-height: 1.5; }
.re-ai-page-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.re-ai-page-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e8ecf3; font-size: 13px; }
.re-ai-page-foot p { margin: 0 0 6px; }
.re-ai-page-foot .btn-sm { margin-left: 6px; }
@media (max-width: 640px) { .re-ai-page-obj { grid-template-columns: 64px minmax(0, 1fr); padding: 12px; } .re-ai-page-photo { width: 64px; height: 48px; } .re-ai-page-result { padding: 12px; } }

/* сторона автора сообщения в переписке (18.10): «агентство» или «клиент» — имя одно не говорит, кто это */
.re-conv-role { font-size: 11px; font-weight: 600; color: var(--re-text-muted); background: #f2f4f7; border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.re-conv-msg.is-out .re-conv-role { background: #eef2ff; color: var(--re-primary-strong); }
/* служебное сообщение площадки (23.10): «персональное предложение» Циана и напоминания — серым, без имени */
.re-conv-msg.is-service { background: #f7f7f8; color: var(--re-text-muted); }
.re-conv-msg.is-service .re-conv-role { background: #e9eaec; color: var(--re-text-muted); }

/* подтверждение действия (18.10: удаление стратегии в списке стратегий) */
.re-confirm-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 14vh 16px; }
.re-confirm-dialog { width: min(520px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); padding: 18px 20px 16px; }
.re-confirm-dialog h2 { margin: 0 0 10px; font-size: 18px; font-weight: 700; line-height: 1.35; }
.re-confirm-body { font-size: 14px; line-height: 1.5; color: #344054; } .re-confirm-body p { margin: 0 0 8px; }
.re-confirm-msg:empty { display: none; } .re-confirm-msg.is-error { color: #b42318; font-weight: 600; }
.re-confirm-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.re-strategies-col-actions .btn + .btn { margin-left: 6px; }

/* доли бюджета кабинета (18.10, static/js/cabinet_shares.js): строка под бюджетом фида и окно «Распределить доли» */
.re-budget-share { margin: -2px 0 0; padding: 0 14px 10px; font-size: 13px; color: #344054; }
.re-lots-calc.is-open .re-budget-share { padding-top: 10px; border-bottom: 1px solid var(--re-line); margin: 0; }
@media (max-width: 768px) { .re-budget-share { padding: 0 12px 9px; } }
.re-link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--re-primary-strong); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.re-link-btn:hover { color: var(--re-primary); } .re-link-btn:disabled { opacity: .6; cursor: progress; }
.re-share-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; }
.re-share-dialog { width: min(1080px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); }
.re-share-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 10px; border-bottom: 1px solid #e8ecf3; }
.re-share-head h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; flex: 1 1 auto; }
.re-share-body { padding: 12px 20px 14px; overflow-y: auto; font-size: 13.5px; line-height: 1.5; }
.re-share-body p { margin: 0 0 8px; } .re-share-body .muted, .re-share-table .muted { color: var(--re-text-muted); }
.re-share-warn { color: #8a5a00; }
.re-share-scroll { overflow-x: auto; margin-top: 6px; }
.re-share-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.re-share-table th { text-align: left; font-weight: 600; color: #475467; border-bottom: 2px solid #e4e7ec; padding: 6px 8px; white-space: nowrap; }
.re-share-table td { border-bottom: 1px solid #eef1f6; padding: 7px 8px; vertical-align: top; }
.re-share-table .t-right { text-align: right; } .re-share-table tr.is-own td { color: var(--re-text-muted); }
.re-share-name { font-weight: 600; color: var(--re-text); min-width: 160px; }
.re-share-this { display: inline-block; font-size: 11.5px; font-weight: 600; background: #eef2ff; color: var(--re-primary-strong); border-radius: 6px; padding: 0 6px; margin-left: 4px; }
.re-share-input { width: 132px; } .re-share-cap { font-size: 12px; margin-top: 2px; } .re-share-reason { font-size: 12px; margin-top: 2px; max-width: 280px; }
.re-share-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px 16px; border-top: 1px solid #e8ecf3; }
.re-share-sum { flex: 1 1 320px; font-size: 13px; color: #475467; } .re-share-sum.is-error { color: #b42318; font-weight: 600; }
.re-share-sum.is-warn { color: #8a5a00; } .re-share-sum.is-ok { color: #14724a; font-weight: 600; }
.re-share-actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 640px) { .re-share-modal { padding: 0; } .re-share-dialog { max-height: 100vh; border-radius: 0; } }

/* колокольчик «Уведомления» в меню (18.10, static/js/ai_bell.js): ИИ-разборы в работе и готовые */
.re-side-link.re-bell { font-family: inherit; text-align: left; cursor: pointer; }
.re-bell-icon { position: relative; display: inline-flex; flex: 0 0 auto; }
.re-shell .re-sidebar .re-side-link.re-bell span.re-bell-icon { display: inline-flex; }
.re-bell-badge { position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #d93a3a; color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--re-surface-tint); }
.re-shell .re-sidebar .re-side-link.re-bell span.re-bell-badge:not([hidden]) { display: block; }
.re-bell.is-busy .re-bell-icon::after { content: ''; position: absolute; top: -2px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: #5b3bb8;
  box-shadow: 0 0 0 2px var(--re-surface-tint); animation: re-bell-pulse 1.4s ease-in-out infinite; }
.re-bell.has-new { color: var(--re-text); }
.re-bell.is-ringing .re-bell-icon .material-symbols-outlined { animation: re-bell-ring .9s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes re-bell-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-6deg); } }
@keyframes re-bell-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes re-bell-spin { to { transform: rotate(360deg); } }
.re-bell-panel { position: fixed; z-index: 1900; width: 390px; max-width: calc(100vw - 16px); max-height: min(72vh, 580px); display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--re-border); border-radius: 14px; box-shadow: 0 18px 48px rgba(16, 24, 40, .22); }
.re-bell-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--re-line); }
.re-bell-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.re-bell-sub { flex: 1 1 auto; color: var(--re-text-muted); font-size: 12px; }
.re-bell-list { overflow-y: auto; padding: 6px; display: grid; gap: 2px; }
.re-bell-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--re-text); text-decoration: none; font-size: 13px; line-height: 1.35; }
.re-bell-item:hover { background: #f4f6fb; color: var(--re-text); }
.re-bell-item.is-new { background: #f4f1fb; }
.re-bell-new { margin-left: 4px; padding: 0 6px; border-radius: 6px; background: #5b3bb8; color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
/* значок задачи — квадрат 20 × 20 у первой строки (элемент сетки растягивался на всю высоту строки уведомления) */
.re-bell-ico { width: 20px; height: 20px; font-size: 20px; line-height: 20px; align-self: start; color: #5b3bb8; }
.re-bell-item.is-completed .re-bell-ico { color: #14724a; }
.re-bell-item.is-failed .re-bell-ico { color: #b42318; }
/* в работе — кольцо 16 × 16, крутится вокруг своего центра (18.10, владелец: значок-дуга крутился и ходил по кругу) */
.re-bell-spin { width: 16px; height: 16px; margin: 2px; box-sizing: border-box; align-self: start; border: 2px solid #ddd5f5; border-top-color: #5b3bb8;
  border-radius: 50%; animation: re-bell-spin .9s linear infinite; }
.re-bell-copy { display: grid; gap: 1px; min-width: 0; }
.re-bell-title { font-weight: 600; }
.re-bell-obj { color: var(--re-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-bell-state { color: var(--re-text-muted); font-size: 12px; }
.re-bell-item.is-failed .re-bell-state { color: #8a5a00; }
.re-bell-empty { margin: 10px; color: var(--re-text-muted); font-size: 13px; }
.re-bell-foot { flex: none; padding: 12px 16px; border-top: 1px solid var(--re-line); }
.re-bell-foot a { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; text-decoration: none; }
.re-bell-head { flex: none; }
.re-notifications { max-width: 1200px; }
.re-notifications-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.re-notifications-input { position: relative; flex: 1 1 260px; min-width: 0; }
.re-notifications-input > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--re-text-muted); pointer-events: none; font-size: 20px; }
.re-notifications-input .form-control { padding-left: 42px; min-height: 44px; }
.re-notifications-search .btn { min-height: 44px; }
.re-notifications-count { font-size: 13px; color: var(--re-text-muted); margin: 16px 0 10px; }
.re-notifications-list { border: 1px solid var(--re-border); border-radius: 16px; overflow: hidden; }
.re-notification { display: flex; align-items: flex-start; gap: 16px; padding: 20px; color: var(--re-text); text-decoration: none; background: var(--re-surface,#fff); }
.re-notification + .re-notification { border-top: 1px solid var(--re-line); }
.re-notification.is-unread { background: var(--re-surface-tint); }
.re-notification:hover { background: #eef2ff; color: var(--re-text); }
.re-notification:focus-visible { outline: 2px solid var(--re-primary); outline-offset: -3px; }
.re-notification-icon { color: var(--re-primary); background: #e8edff; border-radius: 10px; padding: 9px; font-size: 22px; flex: none; }
.re-notification-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.re-notification-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--re-text-muted); }
.re-notification-new { padding: 1px 7px; border-radius: 6px; background: var(--re-primary); color: #fff; font-size: 11px; }
.re-notification-subject { font-size: 16px; margin-top: 4px; }
.re-notification-object { margin-top: 4px; font-size: 14px; }
.re-notification-details { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--re-text-muted); margin-top: 8px; }
.re-notification-status.is-completed { color: #14724a; }
.re-notification-status.is-failed { color: #b42318; }
.re-notification-arrow { align-self: center; font-size: 20px; color: var(--re-text-muted); flex: none; }
.re-notifications-empty { padding: 40px 20px; text-align: center; color: var(--re-text-muted); }
.re-notifications-empty > span { font-size: 32px; }
.re-notifications-empty p { margin: 12px 0 0; }
.re-notifications-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 20px 0; font-size: 14px; }
@media (max-width: 480px) {
  .re-notification { gap: 10px; padding: 16px 12px; }
  .re-notification-icon { padding: 6px; font-size: 20px; border-radius: 8px; }
  .re-notification-arrow { display: none; }
}
.re-mobile-menu-btn.has-new { position: relative; }
.re-mobile-menu-btn.has-new::after { content: ''; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #d93a3a; box-shadow: 0 0 0 2px #fff; }
@media (prefers-reduced-motion: reduce) {
  .re-bell.is-ringing .re-bell-icon .material-symbols-outlined, .re-bell.is-busy .re-bell-icon::after, .re-bell-spin { animation: none; }
}
/* место кнопки в строках: «Чаты и звонки» — своя колонка по ширине кнопки сразу за действием, панель лота — в строке звонка и
   чата, страница лота — в ячейке «Запись» под «Прослушать» */
.an-lot-ai { margin-top: 4px; }
.re-conv-ai { justify-self: start; }
@media (max-width: 760px) { .re-conv-ai { grid-column: 2 / -1; } }

/* Компактное подтверждение отправки. Изоляция от .re-confirm-dialog других окон. */
#applyMlsConfirmModal .re-send-dialog {
  width: min(680px, calc(100% - 32px));
  max-width: 680px;
  margin: 24px auto;
  min-height: calc(100% - 48px);
}
#applyMlsConfirmModal .modal-content { max-height: calc(100dvh - 48px); border-radius: 20px; }
#applyMlsConfirmModal .modal-header { padding: 20px 24px; }
#applyMlsConfirmModal .modal-title { margin: 0; font-size: 23px; line-height: 1.25; }
#applyMlsConfirmModal .modal-body { padding: 16px 24px 20px; max-height: none; min-height: 0; }
#applyMlsConfirmModal .modal-footer { padding: 14px 24px; flex-shrink: 0; gap: 8px; }
#applyMlsConfirmModal .modal-footer .btn { margin: 0; font-size: 14px; min-height: 42px; }
#applyMlsConfirmModal .re-send-hero { padding: 16px 18px; gap: 18px; flex-direction: row; border: 0; border-radius: 14px; background: #F3F5FC; }
#applyMlsConfirmModal .re-confirm-title { margin-bottom: 6px; font-size: 17px; font-weight: 600; line-height: 1.3; }
#applyMlsConfirmModal .re-confirm-text { font-size: 13px; line-height: 1.5; }
#applyMlsConfirmModal .re-send-art { width: 168px; max-width: 32%; margin: 0; }
#applyMlsConfirmModal .re-send-stats { grid-template-columns: .8fr 1.1fr 1.1fr; margin-top: 18px; border: 0; border-radius: 0; }
#applyMlsConfirmModal .re-send-stats > div { padding: 0 16px; box-shadow: none; }
#applyMlsConfirmModal .re-send-stats > div:first-child { padding-left: 0; }
#applyMlsConfirmModal .re-send-stats > div + div { border-left: 1px solid #E3E7F0; }
#applyMlsConfirmModal .re-send-stats dt { font-size: 12px; margin-bottom: 4px; }
#applyMlsConfirmModal .re-send-stats dd { font-size: 25px; line-height: 1.3; font-weight: 600; font-variant-numeric: tabular-nums; }
#applyMlsConfirmModal .re-send-stats small { font-size: 11px; margin-top: 3px; line-height: 1.4; }
#applyMlsConfirmModal .re-send-strategy { font-size: 12px; line-height: 1.5; color: var(--re-text-muted); margin: 16px 0 0; }
#applyMlsConfirmModal .re-send-strategy b { font-weight: 500; color: var(--re-text); }
#applyMlsConfirmModal .re-send-details { margin-top: 14px; border-top: 1px solid #E3E7F0; border-bottom: 1px solid #E3E7F0; }
#applyMlsConfirmModal .re-send-details summary { padding: 12px 0; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--re-text-muted); list-style: none; display: flex; align-items: center; justify-content: space-between; }
#applyMlsConfirmModal .re-send-details summary::-webkit-details-marker { display: none; }
#applyMlsConfirmModal .re-send-details summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-right: 4px; }
#applyMlsConfirmModal .re-send-details[open] summary::after { transform: rotate(225deg); }
#applyMlsConfirmModal .re-send-details summary:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; border-radius: 4px; }
#applyMlsConfirmModal .re-send-breakdown { margin: 0 0 12px; font-size: 13px; }
#applyMlsConfirmModal .re-send-breakdown > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
#applyMlsConfirmModal .re-send-breakdown dt { font-weight: 400; color: var(--re-text-muted); }
#applyMlsConfirmModal .re-send-breakdown dd { margin: 0; font-weight: 500; white-space: nowrap; }
#applyMlsConfirmModal .re-send-meta { font-size: 12px; color: var(--re-text-muted); margin-bottom: 12px; }
#applyMlsConfirmModal .re-send-chain { font-size: 12px; padding: 0; border: 0; margin: 0 0 12px; }
#applyMlsConfirmModal #applyMlsPoolCounts { margin-bottom: 12px; font-size: 12px; }
#applyMlsConfirmModal .re-confirm-warn:not([hidden]) { font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: #FFF1F0; margin: 12px 0 0; }
#applyMlsConfirmModal .re-send-feed { margin: 16px 0; padding: 0; border: 0; }
#applyMlsConfirmModal .re-send-feed-label { display: none; }
#applyMlsConfirmModal .re-send-feed-link { font-size: 12px; gap: 6px; display: inline-flex; }
#applyMlsConfirmModal .re-send-feed-link .material-symbols-outlined { font-size: 16px; }
#applyMlsConfirmModal .re-send-feed-note { padding: 10px 12px; font-size: 12px; line-height: 1.5; }
#applyMlsConfirmModal .re-send-feed-meta { font-size: 11px; }
#applyMlsConfirmModal .re-confirm-check { font-size: 13px; line-height: 1.4; margin: 0; }
#applyMlsConfirmModal .re-confirm-check input { flex: none; margin: 0; }
@media (max-width: 480px) {
  #applyMlsConfirmModal .re-send-dialog { width: calc(100% - 16px); margin: 8px auto; min-height: calc(100% - 16px); }
  #applyMlsConfirmModal .modal-content { max-height: calc(100dvh - 16px); border-radius: 16px; }
  #applyMlsConfirmModal .modal-header { padding: 16px; }
  #applyMlsConfirmModal .modal-title { font-size: 19px; }
  #applyMlsConfirmModal .modal-body { padding: 12px 16px 16px; }
  #applyMlsConfirmModal .modal-footer { padding: 12px 16px; }
  #applyMlsConfirmModal .re-send-hero { padding: 12px; gap: 10px; }
  #applyMlsConfirmModal .re-confirm-title { font-size: 15px; }
  #applyMlsConfirmModal .re-confirm-text { font-size: 12px; }
  #applyMlsConfirmModal .re-send-art { width: 100px; max-width: 30%; }
  #applyMlsConfirmModal .re-send-stats > div { padding: 0 8px; }
  #applyMlsConfirmModal .re-send-stats dd { font-size: clamp(17px, 5vw, 22px); }
  #applyMlsConfirmModal .re-send-stats dt { font-size: 11px; }
  #applyMlsConfirmModal .re-send-stats small { font-size: 10px; }
}

/* Column chooser: catalog and ordered selection, with a draft applied explicitly. */
.re-columns-modal .modal-dialog { width: min(1120px, calc(100% - 32px)); max-width: 1120px; margin-left: auto; margin-right: auto; }
.re-columns-modal .modal-content { height: min(850px, calc(100dvh - 48px)); }
.re-columns-modal .modal-title { font-size: 24px; }
.re-columns-modal .modal-header, .re-columns-modal .modal-footer, .re-columns-feedback { flex-shrink: 0; }
.re-columns-modal .modal-body { max-height: none; min-height: 0; padding: 0; overflow: hidden; }
.re-columns-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.re-columns-catalog-pane, .re-columns-selected-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 16px; }
.re-columns-catalog-pane { border-right: 1px solid var(--re-border); }
.re-columns-workspace h3 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
.re-columns-workspace h3 span, .re-columns-workspace h4 span { color: var(--re-text-muted); font-variant-numeric: tabular-nums; }
.re-columns-workspace h4 { font-size: 13px; margin: 0 0 8px; font-weight: 500; }
.re-columns-modal .re-columns-search { margin: 0 0 12px; flex-shrink: 0; }
.re-columns-catalog-scroll, .re-columns-selected-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.re-columns-instruction { font-size: 12px; color: var(--re-text-muted); margin: 0 0 12px; }
.re-columns-catalog-group { margin-bottom: 12px; }
.re-columns-catalog-group > summary { font-size: 13px; font-weight: 600; padding: 8px 4px; cursor: pointer; }
.re-columns-catalog-group > summary span { float: right; color: var(--re-text-muted); font-weight: 400; }
.re-columns-catalog-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; font-size: 13px; }
.re-columns-catalog-item:hover { background: var(--re-surface-tint); }
.re-columns-catalog-item > label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.re-columns-catalog-item input { flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--re-primary); }
.re-columns-catalog-item.is-auto-hidden { color: var(--re-text-muted); }
.re-columns-catalog-item .re-help-trigger, .re-columns-modal .re-sortable-item .re-help-trigger { flex-shrink: 0; }
.re-columns-catalog-item[hidden], .re-columns-catalog-group[hidden] { display: none; }
.re-columns-pinned-zone { padding: 12px; background: var(--re-surface-tint); border: 1px solid var(--re-border); border-radius: 12px; margin-bottom: 16px; }
.re-columns-regular-zone { padding: 0 4px; }
.re-columns-modal .re-sortable-list { min-height: 44px; }
.re-columns-modal .re-sortable-list:empty::after { content: 'Перетащите столбец сюда'; font-size: 12px; color: var(--re-text-muted); padding: 12px 4px; }
.re-columns-modal .re-sortable-item { grid-template-columns: 12px minmax(0, 1fr) 20px auto; gap: 6px; font-size: 13px; }
.re-columns-modal .re-sortable-label { overflow-wrap: anywhere; }
.re-column-controls { display: flex; gap: 2px; }
.re-column-control { display: grid; place-items: center; width: 26px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--re-text-muted); font-size: 17px; }
.re-column-control .material-symbols-outlined { font-size: 17px; }
.re-column-control:hover, .re-column-control:focus-visible { background: var(--re-primary-soft); color: var(--re-primary); }
.re-column-control:disabled { opacity: .3; cursor: default; }
.re-columns-modal .is-drop-target { outline: 2px dashed var(--re-primary); outline-offset: -2px; border-radius: 8px; }
.re-columns-feedback { padding: 0 16px; max-height: 130px; overflow: auto; }
.re-columns-feedback .re-columns-note { margin: 4px 0; min-height: 0; }
.re-columns-feedback .re-columns-auto-note { margin: 4px 0; }
.re-columns-modal .modal-footer { gap: 8px; }
.re-columns-modal #lotsColumnsCopy { margin-right: auto; }
@media (max-width: 700px) {
  .re-columns-modal .modal-dialog { width: calc(100% - 16px); margin: 8px auto; }
  .re-columns-modal .modal-content { height: calc(100dvh - 16px); }
  .re-columns-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(150px, 1fr) minmax(150px, 1.2fr); }
  .re-columns-catalog-pane { border-right: 0; border-bottom: 1px solid var(--re-border); }
  .re-columns-catalog-pane, .re-columns-selected-pane { padding: 10px; }
  .re-columns-modal .modal-title { font-size: 20px; }
  .re-columns-modal .modal-header, .re-columns-modal .modal-footer { padding: 10px; }
  .re-columns-modal .modal-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .re-columns-modal .modal-footer > .btn { margin: 0; font-size: 12px; }
  .re-columns-modal .re-sortable-item { grid-template-columns: 10px minmax(0, 1fr) 20px; }
  .re-columns-modal .re-column-controls { grid-column: 2 / -1; justify-content: flex-end; }
}

/* Опора на данные решения: не вероятность успеха ставки. */
.re-bid-evidence { flex: 0 0 auto; color: #5d6b85; font-size: 10px; line-height: 16px; font-weight: 400; }
.re-lot-why .re-why-brief { display: block; margin: 12px 0; }
.re-why-brief dt { margin-top: 10px; font-weight: 600; }
.re-why-brief dd { margin: 3px 0 0; color: var(--re-text-muted); }

/* One close control for modals, popovers and drawers. */
button.re-close-btn {
  appearance: none;
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  box-sizing: border-box;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f4f8;
  color: var(--re-text, #171c29);
  box-shadow: none;
  cursor: pointer;
}
button.re-close-btn::before { content: "✕"; font: 400 15px/1 Arial, sans-serif; }
button.re-close-btn:hover { background: #e3e8f1; }
button.re-close-btn:focus-visible { outline: 2px solid var(--re-primary, #2549e0); outline-offset: 2px; }
button.re-close-btn:disabled { opacity: .4; cursor: default; }
.re-dialog-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.re-dialog-head > h2 { flex: 1 1 auto; min-width: 0; margin: 0; }
.re-confirm-dialog .re-dialog-head > h2, .re-analytics .re-dialog-head > h2 { margin: 0; }

/* Report exceptions: keep zero, missing data and undefined cost distinct. */
.an-slice-exceptions { margin: .5rem 0; padding: .5rem .75rem; border: 1px solid var(--an-axis, #d8deee); border-radius: .6rem; }
.an-slice-exceptions summary { cursor: pointer; font-weight: 500; }
.an-slice-exceptions ul { margin: .5rem 0; padding-left: 1.2rem; max-height: 16rem; overflow: auto; }
.an-slices-table small { white-space: normal; min-width: 8rem; color: var(--an-text-secondary, #64708b); }
/* Cohorts: compare equal lot ages; unfinished periods have no numeric value. */
.an-cohort-controls { align-items: end; }
.an-cohort-controls label { flex: 0 1 auto; }
.an-cohort-scroll { max-width: 100%; max-height: 550px; overflow: auto; border: 1px solid var(--an-axis, #d8deee); border-radius: 10px; margin: 12px 0; }
.an-cohort-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.an-cohort-table th, .an-cohort-table td { padding: 10px 12px; min-width: 100px; text-align: right; border-bottom: 1px solid var(--an-grid, #e6ebf3); white-space: nowrap; }
.an-cohort-table thead th { position: sticky; top: 0; z-index: 2; background: var(--an-bg, #fff); }
.an-cohort-table th:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--an-bg, #fff); }
.an-cohort-table thead th:first-child { z-index: 3; }
.an-cohort-table td:nth-child(2) { min-width: 60px; }
.an-cohort-table .is-future { background: repeating-linear-gradient(135deg, transparent, transparent 5px, rgba(128,140,164,.07) 5px, rgba(128,140,164,.07) 10px); color: var(--an-text-secondary, #64708b); }
.an-cohort-table .is-missing, .an-cohort-table .is-partial { color: var(--an-text-secondary, #64708b); }
.an-cohort-table td:focus-visible { outline: 2px solid var(--re-primary); outline-offset: -2px; }
.an-cohort-members .modal-dialog { max-width: 1100px; }
.an-cohort-members-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.an-cohort-members-search { flex: 1 1 220px; min-width: 0; }
.an-cohort-members-count, .an-cohort-member-meta { color: var(--an-text-secondary, #64708b); font-size: 13px; }
.an-cohort-members .an-note { color: var(--an-text-secondary, #64708b); font-size: 13px; margin-top: 6px; }
.an-cohort-member-meta { margin-top: 4px; }
.an-cohort-member-object { display: flex; align-items: flex-start; gap: 10px; min-width: 240px; }
.an-cohort-member-details { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.an-cohort-member-photo { display: block; flex: 0 0 64px; width: 64px; height: 48px; object-fit: cover; border: 1px solid #d8deee; border-radius: 8px; }
.an-cohort-member-photo.is-empty { display: grid; place-items: center; background: #f5f8ff; color: #8290ab; }
.an-cohort-members-table td { vertical-align: top; }
.an-cohort-members-link { font: inherit; font-variant-numeric: tabular-nums; text-decoration: underline; text-underline-offset: 3px; }
/* Market portraits: compact groups, expandable explanation and horizontal lot list. */
.an-portrait-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 10px; margin: 12px 0; }
.an-portrait-group { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid #c7d1e9; border-radius: 12px; background: var(--an-bg, #fff); color: inherit; text-align: left; }
.an-portrait-group:hover, .an-portrait-group.is-selected { border-color: var(--re-primary); background: #f0f4ff; }
.an-portrait-group:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
.an-portrait-title { font-weight: 600; }
.an-portrait-count { font-size: 22px; font-variant-numeric: tabular-nums; }
.an-portrait-meta, .an-portrait-address, .an-portrait-table small { display: block; color: var(--an-text-secondary, #64708b); font-size: 13px; }
.an-portrait-description { border: 1px solid #d8deee; padding: 16px; border-radius: 12px; margin: 12px 0; }
.an-portrait-description h4 { font-size: 17px; margin: 0 0 10px; }
.an-portrait-traits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 4px 20px; }
.an-portrait-traits p { margin: 0 0 6px; }
.an-portrait-controls input[type=search] { width: min(100%, 330px); }
.an-portrait-controls label { display: flex; align-items: center; gap: 8px; }
.an-portrait-controls input[type=checkbox] { width: 18px !important; height: 18px !important; min-width: 18px; flex: 0 0 18px; appearance: auto; margin: 0; padding: 0; }
.an-portrait-table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.an-portrait-table th, .an-portrait-table td { padding: 10px 12px; text-align: right; vertical-align: top; border-bottom: 1px solid #e6ebf3; }
.an-portrait-table th { position: sticky; top: 0; background: var(--an-bg, #fff); white-space: nowrap; z-index: 1; }
.an-portrait-table th:first-child, .an-portrait-table td:first-child, .an-portrait-table td:nth-child(2) { text-align: left; min-width: 190px; }
.an-portrait-evidence { max-width: 430px; min-width: 220px; margin-top: 5px; }
.an-portrait-evidence summary { color: var(--re-primary); cursor: pointer; }
.an-portrait-evidence p { margin: 8px 0; white-space: normal; }
.an-nolot-list .an-portrait-table td { text-align: left; }

.re-analytics .an-legend-toggle {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 5px;
  padding: 3px 5px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.re-analytics .an-legend-toggle:hover { background: var(--re-surface-tint); }
.re-analytics .an-legend-toggle[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
.re-analytics .an-legend-toggle:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }
