/* ==========================================================================
   Компоненты интерфейса
   ========================================================================== */

/* ---------- Заголовок страницы ---------- */
.page-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.crumbs .icon { width: 14px; height: 14px; }
.page-head__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head__title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-2); font-size: var(--fs-md); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn .icon { width: 17px; height: 17px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--brass { background: var(--brass); border-color: var(--brass); color: var(--surface); }
.btn--brass:hover { filter: brightness(1.06); background: var(--brass); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--danger { color: var(--crit); border-color: var(--crit); background: transparent; }
.btn--danger:hover { background: var(--crit-soft); }
.btn--ok { color: var(--ok); border-color: var(--ok); background: transparent; }
.btn--ok:hover { background: var(--ok-soft); }
.btn--sm { height: 30px; padding: 0 10px; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; pointer-events: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  position: relative;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .icon { width: 19px; height: 19px; }
.icon-btn__dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crit);
  box-shadow: 0 0 0 2px var(--surface);
}

.icon { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- Метки ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge--plain::before { display: none; }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--crit { background: var(--crit-soft); color: var(--crit); }
.badge--brass { background: var(--brass-soft); color: var(--brass); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-align: left;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.chip .icon { width: 15px; height: 15px; }

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.avatar--sm { width: 26px; height: 26px; font-size: 0.68rem; }
.avatar--brass { background: var(--brass-soft); color: var(--brass); }

/* ---------- Панели ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.panel__head h3 { font-size: var(--fs-base); }
.panel__head .muted { font-size: var(--fs-sm); }
.panel__body { padding: 16px 18px; }
.panel__foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.panel--flush .panel__body { padding: 0; }
.panel--quiet { background: var(--surface-2); }

/* ---------- Показатели ---------- */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi__label { font-size: var(--fs-sm); color: var(--text-2); }
.kpi__value { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-2xl); line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi__delta { font-size: var(--fs-sm); color: var(--text-3); }
.kpi__delta.up { color: var(--ok); }
.kpi__delta.down { color: var(--crit); }

/* ---------- Доказательство цифры ---------- */
.proof {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-bottom: 1.5px dotted var(--brass);
  cursor: help;
}
.proof:hover { color: var(--brass); }
.proof-pop {
  position: fixed;
  z-index: 90;
  width: min(340px, calc(100vw - 32px));
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  font-size: var(--fs-sm);
}
.proof-pop__title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; color: var(--brass); }
.proof-pop__title .icon { width: 16px; height: 16px; }
.proof-pop dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.proof-pop dt { color: var(--text-3); }
.proof-pop dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
table.data th {
  padding: 10px 14px;
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.02em;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text); }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr.is-link { cursor: pointer; }
table.data tbody tr.is-link:hover td { background: var(--surface-2); }
table.data tbody tr.is-muted td { color: var(--text-3); }
table.data tbody tr.is-selected td { background: var(--accent-soft); }
table.data td.num, table.data th.num { text-align: right; }
table.data tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line-strong); }
table.data .cell-title { font-weight: 500; color: var(--text); }
.cell-sub { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; line-height: 1.35; }
table.data input.input { height: 32px; }

/* ---------- Вкладки ---------- */
.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--text-2);
  font-size: var(--fs-md);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab__count {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}
.tab__count--warn { background: var(--warn-soft); color: var(--warn); }
.tab__count--crit { background: var(--crit-soft); color: var(--crit); }

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.field__hint { font-size: var(--fs-xs); color: var(--text-3); }
.field__req { color: var(--crit); }
.input, .select, .textarea {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-md);
}
.textarea { height: auto; min-height: 88px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-invalid { border-color: var(--crit); }
.input.is-valid { border-color: var(--ok); }
.input--num { text-align: right; font-variant-numeric: tabular-nums; }
.affix { display: flex; align-items: stretch; }
.affix .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.affix__unit {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-md); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.seg { display: inline-flex; padding: 3px; border-radius: var(--radius-sm); background: var(--surface-3); gap: 2px; flex-wrap: wrap; }
.seg button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

.radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.radio-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  color: var(--text);
}
.radio-card:hover { border-color: var(--accent); }
.radio-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.radio-card .icon { width: 22px; height: 22px; color: var(--accent); }
.radio-card b { font-weight: 600; font-size: var(--fs-md); }
.radio-card span { font-size: var(--fs-xs); color: var(--text-3); line-height: 1.4; }

input[type="range"] { width: 100%; accent-color: var(--accent); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-md); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 0.15s; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform 0.15s; box-shadow: var(--shadow-1); }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--focus); outline-offset: 2px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters .input, .filters .select { width: auto; min-width: 150px; }
.filters .input--search { min-width: 220px; flex: 1 1 240px; }

/* ---------- Прогресс ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress__bar { height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.4s ease; }
.progress--ok .progress__bar { background: var(--ok); }
.progress--warn .progress__bar { background: var(--warn); }
.progress--crit .progress__bar { background: var(--crit); }
.progress--brass .progress__bar { background: var(--brass); }
.progress--thin { height: 5px; }

.conf { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.conf .progress { width: 56px; height: 5px; }

/* ---------- Шаги мастера ---------- */
.stepper { display: flex; gap: 6px; margin-bottom: 18px; counter-reset: step; flex-wrap: wrap; }
.stepper__item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 140px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: var(--fs-sm);
}
.stepper__item::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.stepper__item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.stepper__item.is-active::before { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.stepper__item.is-done { color: var(--text-2); }
.stepper__item.is-done::before { content: "✓"; border-color: var(--ok); color: var(--ok); }

/* ---------- Лента событий ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding-bottom: 14px; position: relative; }
.timeline li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin: 5px 4px 0;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
}
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.is-done::before { border-color: var(--ok); background: var(--ok); }
.timeline li.is-current::before { border-color: var(--accent); background: var(--accent-soft); }
.timeline__title { font-size: var(--fs-md); font-weight: 500; }
.timeline__meta { font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- Пары «ключ — значение» ---------- */
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 9px 16px; margin: 0; font-size: var(--fs-md); }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; } }

/* ---------- Подсказки и уведомления на странице ---------- */
.callout {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--info-soft);
  color: var(--text);
  font-size: var(--fs-md);
  border: 1px solid transparent;
}
.callout .icon { width: 18px; height: 18px; color: var(--info); margin-top: 1px; }
.callout--warn { background: var(--warn-soft); }
.callout--warn .icon { color: var(--warn); }
.callout--crit { background: var(--crit-soft); }
.callout--crit .icon { color: var(--crit); }
.callout--ok { background: var(--ok-soft); }
.callout--ok .icon { color: var(--ok); }
.callout--brass { background: var(--brass-soft); }
.callout--brass .icon { color: var(--brass); }

.severity { display: grid; grid-template-columns: 4px 1fr; gap: 12px; }
.severity::before { content: ""; border-radius: 4px; background: var(--line-strong); }
.severity--crit::before { background: var(--crit); }
.severity--warn::before { background: var(--warn); }
.severity--info::before { background: var(--info); }
.severity--ok::before { background: var(--ok); }

.empty { padding: 36px 20px; text-align: center; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .icon { width: 34px; height: 34px; color: var(--text-3); }

/* ---------- Загрузка файлов ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  text-align: center;
  font-size: var(--fs-md);
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dropzone .icon { width: 26px; height: 26px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-md); }
.file-row:last-child { border-bottom: 0; }
.file-row__icon { width: 34px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: 0.62rem; font-weight: 700; }

/* ---------- Модальное окно и шторка ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--overlay);
  animation: fade-in 0.15s ease;
}
.modal {
  width: min(640px, 100%);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  animation: rise 0.18s ease;
}
.modal--wide { width: min(920px, 100%); }
.modal--narrow { width: min(460px, 100%); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: var(--fs-xl); }
.modal__body { padding: 18px 20px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.drawer-overlay { place-items: stretch end; padding: 0; }
.drawer {
  width: min(440px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  animation: slide-in 0.2s ease;
  padding-top: env(safe-area-inset-top, 0px);
}
.drawer .modal__body { flex: 1; }

/* ---------- Всплывающие сообщения ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--surface);
  font-size: var(--fs-md);
  box-shadow: var(--shadow-2);
  animation: rise 0.2s ease;
}
.toast .icon { width: 18px; height: 18px; }
.toast--ok .icon { color: var(--ok-soft); }

/* ---------- Справка ---------- */
.help-fab {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: var(--fab-ink);
  box-shadow: var(--shadow-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
}
.help-fab:hover { transform: translateY(-1px); }
.help-fab[aria-expanded="true"] { background: var(--brass); }

.help-panel {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 75;
  width: min(420px, calc(100vw - 32px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  animation: rise 0.18s ease;
}
.help-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.help-panel__head h2 { font-size: var(--fs-lg); }
.help-panel__eyebrow { font-size: var(--fs-xs); color: var(--brass); font-weight: 600; margin-bottom: 2px; }
.help-panel__body { padding: 14px 18px 18px; overflow-y: auto; font-size: var(--fs-md); display: flex; flex-direction: column; gap: 14px; }
.help-panel__body h4 { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 6px; }
.help-panel__body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.help-panel__body li::marker { color: var(--brass); }
.help-panel__refs { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Поиск по платформе ---------- */
.search-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.search-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}
.search-list a:hover, .search-list a.is-focus { background: var(--accent-soft); }
.search-list .icon { width: 18px; height: 18px; color: var(--text-3); }
.search-list small { color: var(--text-3); margin-left: auto; font-size: var(--fs-xs); }

/* ---------- Уведомления ---------- */
.notice { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: 0; }
.notice__icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.notice__icon .icon { width: 16px; height: 16px; }
.notice.is-unread .notice__icon { background: var(--accent-soft); color: var(--accent); }
.notice__title { font-size: var(--fs-md); font-weight: 500; }
.notice__meta { font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- Графики ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--text-3); font-family: var(--font-ui); font-size: 11px; }
.chart .grid-line { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.chart .bar { fill: var(--chart-1); }
.chart .bar--2 { fill: var(--chart-2); }
.chart .bar--3 { fill: var(--chart-3); }
.chart .bar--4 { fill: var(--chart-4); }
.chart .bar--neg { fill: var(--crit); }
.chart .bar--pos { fill: var(--ok); }
.chart .line { fill: none; stroke: var(--chart-1); stroke-width: 2.2; }
.chart .line--2 { stroke: var(--chart-2); }
.chart .area { fill: var(--accent-soft); opacity: 0.8; }
.chart .dot { fill: var(--surface); stroke: var(--chart-1); stroke-width: 2; }
.chart .dot--end { fill: var(--chart-1); }
.chart .value-label { fill: var(--text-2); font-weight: 600; }
.chart .center-line { stroke: var(--text-3); stroke-dasharray: 3 3; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-xs); color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Анимации ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.is-working { animation: pulse 1s ease-in-out infinite; }
