/* Яснум — dashboard-service /app/ — «Главная — без данных» (Figma 3:52, Clarity 3.0) */

:root {
  /* Clarity 3.0 tokens (brandbook_03_main/tokens.css) */
  --ys-ink: #102C37;
  --ys-white: #FFFFFF;
  --ys-mist: #F6F9FB;
  --ys-ice: #E9F6FF;
  --ys-teal: #166F82;
  --ys-signal: #32A5BB;
  --ys-muted: #4D6370;
  --ys-line: #BFD4DE;
  /* Цветовое кодирование состояний (task-011, brandbook_03_main/tokens.css) */
  --ys-success: #176B59;
  --ys-success-bg: #DCF3E8;
  --ys-warning: #765015;
  --ys-warning-bg: #FFF0C8;
  --ys-error: #9A3A2D;
  --ys-error-bg: #FCE5DE;
  --ys-font: 'Manrope', -apple-system, system-ui, sans-serif;
  --ys-font-data: 'IBM Plex Mono', monospace;
  --ys-radius-card: 16px;
  --ys-radius-field: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--ys-font);
  background: var(--ys-mist);
  color: var(--ys-ink);
  display: flex;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============ Sidebar (288 px) ============ */
.sidebar {
  width: 288px;
  flex-shrink: 0;
  background: var(--ys-white);
  border-right: 1px solid var(--ys-line);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 20px;
}

/* Логотип */
.brand-logo {
  height: 52px;
  display: flex;
  align-items: center;
}

.brand-logo .logo {
  height: 32px;
  width: auto;
}

/* Рабочее пространство (248×48) */
.workspace-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 12px;
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-field);
  background: var(--ys-white);
  cursor: pointer;
  font-family: var(--ys-font);
  transition: background 0.15s;
}

.workspace-selector:hover {
  background: var(--ys-mist);
}

.workspace-selector .icon {
  flex-shrink: 0;
}

.ws-label {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-ink);
  text-align: left;
}

.workspace-selector .chevron {
  color: var(--ys-muted);
  flex-shrink: 0;
}

/* Навигация */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-section-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--ys-muted);
}

.nav-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 12px;
  border-radius: var(--ys-radius-field);
  text-decoration: none;
  color: var(--ys-ink);
  transition: background 0.15s;
}

.nav-item .icon {
  color: var(--ys-muted);
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.nav-item.active {
  background: var(--ys-ice);
}

.nav-item.active .nav-label {
  color: var(--ys-teal);
  font-weight: 600;
}

.nav-item.active .icon {
  color: var(--ys-teal);
}

.nav-item:not(.disabled):not(.active):hover {
  background: var(--ys-mist);
}

.nav-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nav-badge {
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  padding: 0 8px;
  border: 1px solid var(--ys-line);
  border-radius: 999px;
  color: var(--ys-muted);
  background: var(--ys-white);
  flex-shrink: 0;
}

.nav-divider {
  height: 1px;
  background: var(--ys-line);
  width: 100%;
}

.sidebar-spacer {
  flex: 1;
  min-height: 24px;
}

/* Нижняя навигация + профиль */
.bottom-nav {
  gap: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--ys-radius-field);
  cursor: pointer;
  transition: background 0.15s;
}

.user-profile:hover {
  background: var(--ys-mist);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ys-teal);
  color: var(--ys-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--ys-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-subtitle {
  font-size: 12px;
  line-height: 16px;
  color: var(--ys-muted);
}

.user-profile .exit-icon {
  color: var(--ys-muted);
  flex-shrink: 0;
}

/* ============ Main ============ */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar (72 px) */
.topbar {
  height: 72px;
  flex-shrink: 0;
  background: var(--ys-white);
  border-bottom: 1px solid var(--ys-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-ink);
}

.breadcrumb .separator {
  color: var(--ys-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.health {
  font-family: var(--ys-font-data);
  font-size: 12px;
  line-height: 20px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--ys-line);
  color: var(--ys-muted);
}

.health.ok {
  color: var(--ys-teal);
  border-color: var(--ys-teal);
}

/* Статусы проверки (task-011): ok / degraded / fail (ТЗ §3 п.6, §7) */
.health.degraded {
  color: var(--ys-warning);
  border-color: var(--ys-warning);
  background: var(--ys-warning-bg);
}

.health.fail {
  color: var(--ys-error);
  border-color: var(--ys-error);
  background: var(--ys-error-bg);
}

.help-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--ys-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.help-button:hover {
  background: var(--ys-mist);
}

/* Content (padding 40, gap 20) */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px;
  overflow-y: auto;
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--ys-muted);
}

.title {
  font-size: 40px;
  font-weight: 700;
  line-height: 48px;
  color: var(--ys-ink);
}

.subtitle {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: var(--ys-muted);
}

/* Первый график / Шаги (48 px) */
.onboarding-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--ys-white);
  border: 1px solid var(--ys-line);
  color: var(--ys-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  flex-shrink: 0;
}

.step.active .step-number {
  background: var(--ys-teal);
  border-color: var(--ys-teal);
  color: var(--ys-white);
}

.step-label {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--ys-muted);
}

.step.active .step-label {
  color: var(--ys-ink);
}

.step-separator {
  width: 80px;
  height: 1px;
  background: var(--ys-line);
  flex-shrink: 0;
}

/* Карточка (radius 16, border #bfd4de, padding 24, gap 16) */
.card {
  background: var(--ys-white);
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--ys-ink);
}

.card-description {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--ys-muted);
}

/* Область загрузки (304 px, Ice, рамка Signal 1 px, radius 12) */
.upload-area {
  height: 304px;
  background: var(--ys-ice);
  border: 1px solid var(--ys-signal);
  border-radius: var(--ys-radius-field);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--ys-radius-field);
  background: var(--ys-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upload-icon {
  color: var(--ys-teal);
}

.upload-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: var(--ys-ink);
}

.upload-hint {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--ys-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 228px;
  height: 48px;
  padding: 12px;
  border: none;
  border-radius: var(--ys-radius-field);
  background: var(--ys-ink);
  color: var(--ys-white);
  font-family: var(--ys-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}

.btn-primary:hover {
  background: var(--ys-teal);
}

.upload-formats {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
}

/* Ссылка «Скачать пример таблицы» (Appearance: Link) */
.download-example {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 292px;
  height: 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--ys-teal);
  text-decoration: none;
  cursor: pointer;
}

.download-example:hover {
  color: var(--ys-signal);
}

/* Что будет дальше (88 px, Ice, radius 16, padding 24, gap 20) */
.callout {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  background: var(--ys-ice);
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-card);
}

.callout-icon {
  color: var(--ys-teal);
  flex-shrink: 0;
}

.callout-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.callout-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--ys-ink);
}

.callout-description {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--ys-muted);
}

/* Empty status */
.empty-status {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
  text-align: center;
}

/* ============ Страница «Данные» (/app/data.html, Figma 45:705) ============ */

/* Токены статусов (brandbook_03_main/tokens.css) — добавочные */
:root {
  --ys-success: #176B59;
  --ys-success-bg: #DCF3E8;
}

/* Кнопка «Загрузить файл» в page-header (Primary, 236×48 по макету) */
.page-header-action {
  width: auto;
  min-width: 236px;
  margin-top: 0;
  margin-left: auto;
  flex-shrink: 0;
}

/* Карточка загруженного файла (горизонтальная: иконка, описание, статус, кнопка) */
.card-file {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  min-height: 128px;
}

.file-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--ys-radius-field);
  background: var(--ys-ice);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-icon-wrapper .icon {
  color: var(--ys-muted);
}

.file-description {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: var(--ys-ink);
}

.file-meta {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
}

/* Статус «Готово» (Badge / Success, Figma 4:143) */
.badge-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 72px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ys-success-bg);
  color: var(--ys-success);
  font-family: var(--ys-font);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  flex-shrink: 0;
}

/* Кнопка «Открыть график» (Button / Secondary, Figma 4:110) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  min-width: 216px;
  padding: 12px;
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-field);
  background: var(--ys-white);
  color: var(--ys-ink);
  font-family: var(--ys-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: var(--ys-mist);
}

/* Предпросмотр данных (Figma 44:1597) */
.preview {
  gap: 20px;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--ys-ink);
}

.preview-rows {
  margin-left: auto;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
}

.preview-table th,
.preview-table td {
  padding: 12px 16px;
  box-shadow: inset 0 -1px 0 var(--ys-line);
  text-align: left;
}

.preview-table th {
  background: var(--ys-mist);
  color: var(--ys-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
}

.preview-table td {
  font-family: var(--ys-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--ys-ink);
}

.preview-table th:last-child,
.preview-table td:last-child {
  width: 200px;
  text-align: right;
}

/* task-007: динамический предпросмотр (/app/ и /app/data.html) */
.preview[hidden] {
  display: none;
}

.preview.is-loading .preview-table {
  opacity: 0.4;
}

.preview-table td.preview-key {
  color: var(--ys-muted);
  font-family: var(--ys-font);
  font-weight: 500;
}

.preview-table tbody td {
  font-family: var(--ys-font-data);
}

.preview-error,
.preview-warnings {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--ys-radius-field);
  font-size: 14px;
  line-height: 20px;
}

.preview-error {
  background: #FDECEC;
  border: 1px solid #F0B4B4;
  color: #B00020;
}

.preview-warnings {
  list-style: none;
  background: #FFF7E6;
  border: 1px solid #F0D9A8;
  color: #8A5A00;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-warnings li::before {
  content: "! ";
  font-weight: 700;
}

.preview-error[hidden],
.preview-warnings[hidden] {
  display: none;
}

.preview-hint {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--ys-muted);
}

.upload-area.is-dragover {
  border-style: dashed;
  background: var(--ys-white);
}

/* ============ Форма сохранения таблицы (/app/data.html, task-008) ============ */

.card-onboard[hidden] {
  display: none;
}

.onboard-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--ys-muted);
}

.form-input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-field);
  background: var(--ys-white);
  font-family: var(--ys-font);
  font-size: 16px;
  color: var(--ys-ink);
}

.form-input::placeholder {
  color: var(--ys-muted);
  opacity: 0.7;
}

.form-input:focus {
  outline: 2px solid var(--ys-signal);
  outline-offset: 1px;
}

.form-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ys-ink);
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--ys-teal);
  flex: 0 0 auto;
}

.onboard-file {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--ys-muted);
}

.onboard-file[data-empty="true"] {
  color: #B00020;
}

.onboard-status {
  padding: 12px 16px;
  border-radius: var(--ys-radius-field);
  font-size: 14px;
  line-height: 20px;
}

.onboard-status[hidden] {
  display: none;
}

.onboard-status[data-kind="info"] {
  background: var(--ys-ice);
  border: 1px solid var(--ys-signal);
  color: var(--ys-teal);
}

.onboard-status[data-kind="success"] {
  background: #EAF7EE;
  border: 1px solid #A8D8B9;
  color: #1D6B36;
}

.onboard-status[data-kind="error"] {
  background: #FDECEC;
  border: 1px solid #F0B4B4;
  color: #B00020;
}

.onboard-submit {
  align-self: flex-start;
  min-width: 200px;
}

.onboard-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ============ Страница «Мои графики» (/app/charts.html, Figma 45:716) ============ */

/* Кнопка «Открыть данные» в page-header (Secondary, 236×48 по макету) */
.btn-secondary.page-header-action {
  min-width: 236px;
}

/* Карточка готового графика (1232×444, gap 12 по макету) */
.card-chart {
  gap: 12px;
}

/* Заголовок карточки: Title 20/700 + Subtitle 14/400 (gap 4) */
.chart-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: var(--ys-ink);
}

.chart-source {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
}

/* Итог периода: Metric 36/600 + Period 14/400 */
.chart-total {
  display: flex;
  flex-direction: column;
}

.kpi {
  font-size: 36px;
  font-weight: 600;
  line-height: 44px;
  color: var(--ys-ink);
}

.period {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
}

/* SVG-график (1184×228 в генераторе, масштабируется по ширине карточки) */
.chart-container {
  width: 100%;
}

.chart-container svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Линейный график (web/app/chart-line.js, task-013) */
.chart-svg { width: 100%; height: auto; display: block; }
.chart-y-label, .chart-x-label { font-family: var(--ys-font); }
.chart-line { transition: stroke-width 0.15s; }
.chart-line:hover { stroke-width: 3; }
.chart-point { transition: r 0.15s; }
.chart-point:hover { r: 5; }

/* Источник данных (иконка файла + подпись) */
.chart-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 24px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--ys-muted);
}

.chart-caption .icon {
  flex-shrink: 0;
}

/* ============ Страница «Дашборд» (/app/dashboard, task-009) ============ */

#dashboard-root[data-state="loading"] .card {
  opacity: 0.6;
}

.dashboard-error {
  padding: 12px 16px;
  border-radius: var(--ys-radius-field);
  background: #FDECEC;
  border: 1px solid #F0B4B4;
  color: #B00020;
  font-size: 14px;
  line-height: 20px;
}

.dashboard-error[hidden] {
  display: none;
}

/* Блок клиента (PII — только здесь, не в заголовках) */
.meta-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-list[hidden] {
  display: none;
}

.meta-row {
  display: flex;
  gap: 12px;
  font-size: 16px;
  line-height: 24px;
}

.meta-row dt {
  min-width: 120px;
  color: var(--ys-muted);
  font-weight: 500;
}

.meta-row dd {
  margin: 0;
  color: var(--ys-ink);
  font-family: var(--ys-font-data);
}

/* Список анализов */
.analyses-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analysis-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius-field);
  background: var(--ys-mist);
}

.analysis-file {
  font-size: 16px;
  font-weight: 500;
  color: var(--ys-ink);
}

.analysis-meta {
  font-size: 14px;
  font-family: var(--ys-font-data);
  color: var(--ys-muted);
}

.status-chip {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 20px;
  background: var(--ys-ice);
  color: var(--ys-teal);
  white-space: nowrap;
}

.status-chip[data-status="ready"],
.status-chip[data-status="published"] {
  background: #EAF7EE;
  color: #1D6B36;
}

.status-chip[data-status="ready_with_warnings"] {
  background: #FFF7E6;
  color: #8A5A00;
}

.status-chip[data-status="failed"] {
  background: #FDECEC;
  color: #B00020;
}

.list-empty,
.dashboard-pending {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--ys-muted);
}

/* Карточки дашбордов */
.dashboards-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-dashboard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: var(--ys-mist);
}

.dashboard-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: var(--ys-ink);
}

.dashboard-meta {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-family: var(--ys-font-data);
  color: var(--ys-muted);
}

.card-dashboard .btn-primary {
  margin-top: 8px;
}

/* ============ Страница «Разбор» (/app/analysis, task-010) ============ */

#analysis-root[data-state="loading"] .card {
  opacity: 0.6;
}

.analysis-error {
  padding: 12px 16px;
  border-radius: var(--ys-radius-field);
  background: #FDECEC;
  border: 1px solid #F0B4B4;
  color: #B00020;
  font-size: 14px;
  line-height: 20px;
}

.analysis-error[hidden] {
  display: none;
}

.preview-table th:first-child,
.preview-table td.analysis-key {
  width: 40%;
  font-weight: 500;
  color: var(--ys-ink);
}

.preview-table td.analysis-key[data-key] {
  font-family: var(--ys-font);
}

.preview-table td code {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--ys-ice);
  color: var(--ys-teal);
  font-family: var(--ys-font-data);
  font-size: 14px;
}

/* Блок предупреждений — красный (ТЗ §2/§7) */
.card-warnings {
  border-color: #F0B4B4;
  background: #FDECEC;
}

.card-warnings .card-title {
  color: #B00020;
}

.warnings-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #B00020;
  font-size: 16px;
  line-height: 24px;
}

.card-warnings[hidden] {
  display: none;
}

.card-mapped[hidden],
.card-types[hidden],
.card-aggregates[hidden] {
  display: none;
}

/* Страница «Проверка» (/app/checks.html, task-011) */
.checks-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checks-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 24px;
}

/* Бейджи-коды состояний (api/db/redis, детали задачи) — стиль .health */
.checks-list code {
  font-family: var(--ys-font-data);
  font-size: 12px;
  line-height: 20px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--ys-line);
  color: var(--ys-muted);
}

.checks-list code.ok {
  color: var(--ys-success);
  border-color: var(--ys-success);
  background: var(--ys-success-bg);
}

.checks-list code.degraded {
  color: var(--ys-warning);
  border-color: var(--ys-warning);
  background: var(--ys-warning-bg);
}

.checks-list code.fail {
  color: var(--ys-error);
  border-color: var(--ys-error);
  background: var(--ys-error-bg);
}

#job-detail .job-error {
  color: var(--ys-error);
}
