/* ==========================================================================
   components.css — переиспользуемые элементы интерфейса
   ========================================================================== */

/* ==========================================================================
   Карточка
   ========================================================================== */
.card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 14px;
}

.card__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card__title .icon { color: var(--text-3); }

.card__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.card__foot {
  margin-top: auto;
  padding-top: 12px;
}

/* Ссылка-подвал карточки */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
}
.card-link:hover { color: var(--brand-hover); }
/* Тот же вид на кнопке: «показать больше» меняет содержимое таблицы,
   а не ведёт по адресу, и ссылкой быть не должно */
button.card-link {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
button.card-link[disabled] { color: var(--text-3); cursor: default; }
.card-link .icon { width: 15px; height: 15px; }

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover { background: var(--brand-hover); }

.btn--ghost {
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-2);
}
.btn--ghost:hover { border-color: #cddbec; color: var(--text); }

.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

/* Переключатель-сегмент (таб-кнопки) */
.seg { display: flex; gap: 8px; }

.seg__btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.seg__btn:hover { border-color: #cddbec; color: var(--text); }

.seg__btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

/* Кнопка «ещё» / kebab */
.kebab {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: background .14s ease, color .14s ease;
}
.kebab:hover { background: var(--surface-2); color: var(--text-2); }

/* ==========================================================================
   Поля ввода
   ========================================================================== */
.field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 104, 255, .12);
}

.field__input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}
.field__input::placeholder { color: var(--text-3); }

.field__icon { color: var(--text-3); }

.field--search .field__icon { order: -1; }

/* Селект */
/* Поле без выбора: показывает значение, которое задано и меняться не
   может — вида кнопки у него быть не должно */
.select--static {
  border-style: dashed;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: default;
}

.select {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  transition: border-color .14s ease;
}
.select:hover { border-color: #cddbec; }
.select__chevron { margin-left: auto; color: var(--text-3); }
.select__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.select-group__label {
  display: block;
  margin-bottom: 5px;
  font-size: 11.5px;
  color: var(--text-3);
}

/* ==========================================================================
   Бейджи статусов
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge--ok      { background: var(--green-soft); color: var(--green); }
.badge--err     { background: var(--red-soft);   color: var(--red); }
.badge--wait    { background: var(--brand-soft); color: var(--brand); }
.badge--warn    { background: var(--amber-soft); color: var(--amber); }
.badge--neutral { background: var(--surface-2);  color: var(--text-2); }

/* ==========================================================================
   Чипы (похожие запросы)
   ========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.chip:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.chip--more { padding: 0 10px; color: var(--text-3); }

/* ==========================================================================
   Таблицы
   ========================================================================== */
.tbl { font-size: 12.5px; }

.tbl th {
  padding: 0 0 9px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.tbl td {
  padding: 9px 0;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.tbl tbody tr:first-child td { border-top: 1px solid var(--border); }

.tbl--hover tbody tr { transition: background .12s ease; }
.tbl--hover tbody tr:hover { background: var(--surface-2); }

.tbl .num {
  text-align: right;
  white-space: nowrap;
  font-weight: 500;
  padding-left: 14px;
}

.tbl .cell-url {
  max-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Сайт с иконкой глобуса */
.site-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.site-cell__ico { color: var(--brand); flex: none; }
.site-cell__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* ==========================================================================
   Прогресс-бар (квоты)
   ========================================================================== */
.quota__label {
  display: block;
  margin-bottom: 3px;
  font-size: 11.5px;
  color: var(--text-3);
}

.quota__value {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.quota__value span { color: var(--text-3); font-weight: 500; }

.progress {
  height: 5px;
  margin-top: 8px;
  border-radius: var(--r-pill);
  background: #e3ebf6;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--brand);
}

/* ==========================================================================
   Переключатель (toggle)
   ========================================================================== */
.toggle {
  position: relative;
  width: 38px;
  height: 21px;
  flex: none;
  border-radius: var(--r-pill);
  background: #cfd9e6;
  transition: background .16s ease;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 30, 54, .28);
  transition: transform .16s ease;
}
.toggle.is-on { background: var(--brand); }
.toggle.is-on::after { transform: translateX(17px); }

/* ==========================================================================
   Плитка с иконкой (список действий/опций)
   ========================================================================== */
.opt-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.opt-row:first-child { border-top: 0; }

.opt-row__ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
}

.opt-row__title { font-size: 12.5px; font-weight: 600; }
.opt-row__sub   { font-size: 11.5px; color: var(--text-3); line-height: 1.35; }
.opt-row__ctrl  { margin-left: auto; }

/* ==========================================================================
   Панель быстрых действий (иконка + подпись в ряд)
   ========================================================================== */
.actions-bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

.actions-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px 2px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
  transition: background .14s ease, color .14s ease;
}
.actions-bar__item:hover { background: var(--surface-2); color: var(--brand); }
.actions-bar__item .icon { width: 19px; height: 19px; }

/* ==========================================================================
   Каркас графика: ось слева · поле · ось справа
   ========================================================================== */
.chart-frame {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 46px;
  gap: 6px;
}

.chart-frame--tight { grid-template-columns: 26px minmax(0, 1fr); }

.chart-plot { min-width: 0; }

.chart-plot--interactive { position: relative; cursor: crosshair; }

/* Подсказка при наведении на график */
.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 128px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transform: translate(-50%, -100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease;
  white-space: nowrap;
}

.chart-tip.is-visible { opacity: 1; visibility: visible; }

.chart-tip__title {
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}

.chart-tip__row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  line-height: 1.7;
}

.chart-tip__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
}

.chart-tip__name { color: var(--text-2); }

.chart-tip__value {
  margin-left: auto;
  padding-left: 12px;
  font-weight: 600;
  color: var(--text);
}

.chart-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0 4px;
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
}

.chart-axis--left  { text-align: right; }
.chart-axis--right { text-align: left; }

.chart-xlabels {
  display: flex;
  justify-content: space-between;
  margin: 6px 46px 0 40px;
  font-size: 10.5px;
  color: var(--text-3);
}

.chart-xlabels--offset { margin: 6px 0 0 26px; }

/* ==========================================================================
   Плитка показателя (круглая иконка + значение + подпись)
   ========================================================================== */
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.stat-card__ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
}
.stat-card__ico .icon { width: 22px; height: 22px; }

.stat-card__ico--blue  { background: var(--brand-soft); color: var(--brand); }
.stat-card__ico--green { background: var(--green-soft); color: var(--green); }
.stat-card__ico--red   { background: var(--red-soft);   color: var(--red); }

.stat-card__label { font-size: 12.5px; color: var(--text-2); }

.stat-card__value {
  margin: 1px 0 2px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stat-card__note { font-size: 11.5px; font-weight: 500; }
.stat-card__note--green { color: var(--green); }
.stat-card__note--red   { color: var(--red); }
.stat-card__note--muted { color: var(--text-3); }

/* ==========================================================================
   Табы с подчёркиванием
   ========================================================================== */
.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.tabs__item {
  position: relative;
  padding: 0 0 9px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .14s ease;
}
.tabs__item:hover { color: var(--text); }

.tabs__item.is-active { color: var(--brand); font-weight: 600; }

.tabs__item.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--brand);
}

/* ==========================================================================
   Полоса быстрых действий (иконка + подпись в строку, с разделителями)
   ========================================================================== */
.action-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.action-strip__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background .14s ease, color .14s ease;
}
.action-strip__item + .action-strip__item { box-shadow: -1px 0 0 var(--border); }
.action-strip__item:hover { background: var(--surface-2); color: var(--brand); }
.action-strip__item .icon { width: 19px; height: 19px; color: var(--brand); }

/* ==========================================================================
   Флаги стран
   ========================================================================== */
.flag {
  position: relative;
  width: 18px;
  height: 13px;
  flex: none;
  border-radius: 3px;
  border: 1px solid rgba(16, 30, 54, .12);
  overflow: hidden;
}

.flag--ru { background: linear-gradient(#fff 0 33.3%, #0039a6 33.3% 66.6%, #d52b1e 66.6%); }
.flag--de { background: linear-gradient(#161616 0 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6%); }

.flag--us {
  background: repeating-linear-gradient(#b22234 0 1.9px, #fff 1.9px 3.8px);
}
.flag--us::after {
  content: '';
  position: absolute;
  inset: 0 auto 46% 0;
  width: 46%;
  background: #3c3b6e;
}

/* ==========================================================================
   Легенда графиков
   ========================================================================== */
.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--text-2);
}

.legend__item { display: inline-flex; align-items: center; gap: 6px; }

.legend__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

/* ==========================================================================
   Мини-KPI (компактный показатель в рамке)
   ========================================================================== */
.kpi {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.kpi.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 104, 255, .1);
}

.kpi__label {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}

.kpi__row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 3px;
}

.kpi__value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.kpi__delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.kpi__delta .icon { width: 11px; height: 11px; stroke-width: 2.4; }

/* Показатель без рамки (левая колонка блоков «Ссылки», «Обход») */
.stat__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-3);
}
.stat__value {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Селектор сайта в верхней панели
   ========================================================================== */
.topbar__site {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(16, 30, 54, .04);
  transition: border-color .14s ease;
}
.topbar__site:hover { border-color: #cddbec; }
.topbar__site .country__globe { width: 22px; height: 22px; }
.topbar__site .country__globe .icon { width: 13px; height: 13px; }
.topbar__site .select__chevron { color: var(--text-3); }

/* ==========================================================================
   Список «поле — значение»
   ========================================================================== */
.deflist { display: flex; flex-direction: column; }

.deflist__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  font-size: 12.5px;
}
.deflist__row + .deflist__row { border-top: 1px solid var(--border); }

.deflist__key {
  flex: none;
  width: 150px;
  color: var(--text-2);
}

.deflist__val {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.deflist--wide .deflist__key { width: 175px; }

/* ==========================================================================
   Радиокнопки
   ========================================================================== */
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 12.5px;
  cursor: pointer;
}

.radio__mark {
  position: relative;
  width: 17px;
  height: 17px;
  flex: none;
  border: 1.5px solid #c3cfdf;
  border-radius: 50%;
  transition: border-color .14s ease;
}
.radio:hover .radio__mark { border-color: var(--brand); }

.radio.is-on .radio__mark { border-color: var(--brand); border-width: 5px; }

/* ==========================================================================
   Пагинация
   ========================================================================== */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.pagination__btn {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  transition: background .14s ease, color .14s ease;
}
.pagination__btn:hover { background: var(--surface-2); color: var(--text); }

.pagination__btn.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.pagination__dots { color: var(--text-3); padding: 0 2px; }

/* ==========================================================================
   Сортируемый заголовок таблицы
   ========================================================================== */
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font: inherit;
}
.th-sort .icon { width: 13px; height: 13px; color: var(--text-3); }
.th-sort:hover { color: var(--text); }

/* ==========================================================================
   Список событий (лента с иконками)
   ========================================================================== */
.events { display: flex; flex-direction: column; }

.events__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 12px;
}
.events__item + .events__item { border-top: 1px solid var(--border); }

.events__ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
}
.events__ico .icon { width: 13px; height: 13px; }
.events__ico--ok   { background: var(--green-soft); color: var(--green); }
.events__ico--info { background: var(--brand-soft); color: var(--brand); }
.events__ico--warn { background: var(--amber-soft); color: var(--amber); }
.events__ico--err  { background: var(--red-soft);   color: var(--red); }

.events__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
}

.events__date { flex: none; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* ==========================================================================
   Состояния загрузки, пустоты и ошибок
   ========================================================================== */
.skeleton-group { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }

.skeleton {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef2f8 25%, #f6f9fc 37%, #eef2f8 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
.skeleton:nth-child(even) { width: 82%; }
.skeleton:nth-child(3n) { width: 64%; }

@keyframes skeleton-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Уважаем системную настройку: анимация может мешать */
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 16px;
  text-align: center;
}

.state-box__ico { width: 26px; height: 26px; color: var(--text-3); }
.state-box--error .state-box__ico { color: var(--red); }

.state-box__text { font-size: 13px; color: var(--text-2); max-width: 420px; line-height: 1.5; }
.state-box__hint { font-size: 11.5px; color: var(--text-3); max-width: 420px; }

/* ==========================================================================
   Всплывающие уведомления
   ========================================================================== */
.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  font-size: 13px;
  color: var(--text);
  pointer-events: auto;
  animation: toast-in .18s ease;
}

.toast__ico { width: 18px; height: 18px; flex: none; }
.toast--error   { border-color: #f7d9d6; }
.toast--error .toast__ico   { color: var(--red); }
.toast--success .toast__ico { color: var(--green); }
.toast--info .toast__ico    { color: var(--brand); }

.toast.is-hiding { opacity: 0; transform: translateY(6px); transition: all .2s ease; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Модальное окно
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 30, 54, .45);
  backdrop-filter: blur(2px);
}

.modal {
  width: 100%;
  max-width: 460px;
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.modal__title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.modal__desc  { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.modal__body  { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  font: inherit;
  font-size: 13px;
  resize: vertical;
  outline: 0;
}
.modal textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 104, 255, .12); }

/* Кнопка в состоянии ожидания ответа сервера */
.btn.is-busy { opacity: .7; pointer-events: none; }

/* ==========================================================================
   Выпадающий список сайтов в верхней панели
   ========================================================================== */
.site-picker {
  position: fixed;
  z-index: 80;
  width: 320px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.site-picker__search { height: 36px; margin-bottom: 8px; }

.site-picker__list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-picker__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 12.5px;
  text-align: left;
  transition: background .12s ease, color .12s ease;
}
.site-picker__item:hover { background: var(--surface-2); color: var(--text); }
.site-picker__item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.site-picker__item .icon { flex: none; }

.site-picker__host {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-picker__empty {
  padding: 12px 10px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

/* ==========================================================================
   Выпадающий список
   ========================================================================== */
.dropdown {
  position: fixed;
  z-index: 85;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 12.5px;
  text-align: left;
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.dropdown__item:hover { background: var(--surface-2); color: var(--text); }
.dropdown__item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.dropdown__label { flex: 1; }
.dropdown__hint { font-size: 11px; color: var(--text-3); }

/* Скелет внутри таблицы: ширину варьируем по строкам, иначе получается
   ровный частокол одинаковых полос */
tbody tr:nth-child(even) .skeleton { width: 82%; }
tbody tr:nth-child(3n)   .skeleton { width: 64%; }
tbody td > .skeleton { margin: 3px 0; }
