/* ============================================================================
   status.css — страница /status. Опирается на app.css (токены, .card, .badge),
   здесь только то, чего в дизайн-системе нет: сводная плашка, шкала на 90 суток
   и лента инцидентов.
   ========================================================================== */

.st-wrap { max-width: 760px; margin: 0 auto; }

/* ------------------------------------------------------------ сводная плашка */

.st-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.st-hero__icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--faint);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.st-hero__icon svg { width: 22px; height: 22px; }

/* галочка «всё работает»: в наборе icons.js её нет, рисуем как в макете — двумя гранями */
.st-check {
  width: 16px;
  height: 9px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.st-hero__body { flex: 1; min-width: 0; }
.st-hero__title { font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.st-hero__sub { font-size: 14px; color: var(--text-2); }

.st-hero.is-ok { background: var(--ok-tint); border-color: #C6E7D2; }
.st-hero.is-ok .st-hero__icon { background: var(--ok); }
.st-hero.is-ok .st-hero__title { color: #14532D; }
.st-hero.is-ok .st-hero__sub { color: #256B45; }

.st-hero.is-degraded { background: var(--warn-tint); border-color: var(--warn-border); }
.st-hero.is-degraded .st-hero__icon { background: var(--warn); }
.st-hero.is-degraded .st-hero__title,
.st-hero.is-degraded .st-hero__sub { color: #7C3D06; }

.st-hero.is-down { background: var(--danger-tint); border-color: var(--danger-border); }
.st-hero.is-down .st-hero__icon { background: var(--danger); }
.st-hero.is-down .st-hero__title,
.st-hero.is-down .st-hero__sub { color: #8F1D1D; }

/* ------------------------------------------------------------ карточка компонента */

.st-list { display: flex; flex-direction: column; gap: 12px; }

.st-comp {
  border: 1px solid #E9E9E7;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
}

.st-comp__head { display: flex; align-items: center; gap: 10px; }
.st-comp__name { font-size: 16px; font-weight: 600; color: var(--ink); }
.st-comp__hint { font-size: 13px; color: var(--faint); }

/* шкала: одна клетка — одни сутки, 90 клеток */

.st-bar {
  display: grid;
  grid-template-columns: repeat(90, minmax(0, 1fr));
  gap: 3px;
}

.st-cell {
  height: 26px;
  border-radius: 2px;
  background: var(--border-2);   /* нет данных — честно серый */
}

.st-cell--ok { background: #22A06B; }
.st-cell--degraded { background: #E0A82E; }
.st-cell--fail { background: #DC2626; }

.st-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--faint);
}

.st-scale__mid { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ инциденты */

.st-incidents {
  border-left: 2px solid var(--border-2);
  padding: 4px 0 4px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.st-inc__title { font-size: 14px; font-weight: 600; color: var(--text); }
.st-inc__text { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

.st-note { font-size: 13px; color: var(--faint); line-height: 1.55; }

.st-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 13px; color: var(--muted); }
.st-meta b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ узкие экраны */

@media (max-width: 720px) {
  .st-bar { gap: 1px; }
  .st-cell { height: 22px; border-radius: 1px; }
  .st-hero { padding: 18px; gap: 12px; }
  .st-comp { padding: 14px 16px; }
}
