.system-hero,
.system-summary-grid,
.system-detail-grid,
.system-files-grid,
.system-api-grid,
.system-process-grid,
.system-kv-grid,
.system-run-result {
  display: grid;
  gap: 16px;
}

.system-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.system-hero.is-ok {
  border-left: 5px solid #22c55e;
}

.system-hero.is-warning {
  border-left: 5px solid #f59e0b;
}

.system-hero.is-error {
  border-left: 5px solid #ef4444;
}

.system-hero-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.system-hero-icon {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
}

.system-hero h2,
.system-section-head h2 {
  margin: 4px 0 0;
}

.system-hero h2 {
  color: #ffffff;
  font-size: clamp(24px, 3vw, 34px);
}

.system-hero p {
  margin: 7px 0 0;
  color: #cbd5e1;
}

.system-hero-side {
  display: grid;
  justify-items: end;
  gap: 5px;
  padding-left: 24px;
  color: #cbd5e1;
  font-size: 13px;
}

.system-hero-side strong {
  color: #ffffff;
  font-size: 14px;
}

.system-hero-side .button {
  margin-top: 8px;
}

.system-eyebrow {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.system-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.system-summary-card,
.system-detail-card,
.system-data-card,
.system-file-card,
.system-error-card,
.system-clear-card,
.system-technical-card {
  min-width: 0;
}

.system-summary-card {
  display: grid;
  align-content: start;
  gap: 9px;
}

.system-summary-card > strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.system-summary-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.system-card-head,
.system-section-head,
.system-process-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.system-card-head > span:first-child {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.system-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.system-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.system-badge.is-ok {
  background: #dcfce7;
  color: #15803d;
}

.system-badge.is-warning,
.system-badge.is-waiting {
  background: #fef3c7;
  color: #b45309;
}

.system-badge.is-error {
  background: #fee2e2;
  color: #b91c1c;
}

.system-badge.is-running {
  background: #dbeafe;
  color: #1d4ed8;
}

.system-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.system-detail-card {
  display: grid;
  align-content: start;
  gap: 18px;
}

.system-section-head {
  align-items: flex-start;
}

.system-section-head h2 {
  font-size: 20px;
}

.system-kv-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-kv {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.system-kv span,
.system-process > span,
.system-file-meta,
.system-log-list span,
.system-run-result span,
.system-api-grid span {
  color: #64748b;
  font-size: 12px;
}

.system-kv strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.system-process-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-process {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 12px;
  background: #ffffff;
}

.system-process.is-ok {
  border-left-color: #22c55e;
}

.system-process.is-warning,
.system-process.is-waiting {
  border-left-color: #f59e0b;
}

.system-process.is-error {
  border-left-color: #ef4444;
}

.system-process.is-running {
  border-left-color: #3b82f6;
}

.system-process > span {
  overflow-wrap: anywhere;
}

.system-run-result,
.system-api-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-run-result > div,
.system-api-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.system-run-result strong,
.system-api-grid strong {
  overflow-wrap: anywhere;
  font-size: 20px;
}

.system-note {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
}

.system-note span {
  font-size: 13px;
}

.system-data-card {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.system-files-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.system-file-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.system-file-card > strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.system-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.system-path {
  display: block;
  overflow: hidden;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-error-card,
.system-technical-card {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.system-error-block {
  display: grid;
  gap: 8px;
}

.system-error-block pre {
  max-width: 100%;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-radius: 12px;
  background: #111827;
  color: #fecaca;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.system-clear-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.system-clear-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 22px;
  font-weight: 800;
}

.system-clear-card strong {
  display: block;
  margin-bottom: 4px;
}

.system-clear-card p,
.system-technical-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.system-log-list {
  display: grid;
  gap: 10px;
}

.system-log-list > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
}

.system-log-list strong {
  font-size: 13px;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

@media (max-width: 1180px) {
  .system-summary-grid,
  .system-files-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .system-run-result,
  .system-api-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .system-hero,
  .system-detail-grid {
    grid-template-columns: 1fr;
  }

  .system-hero-side {
    justify-items: start;
    padding: 0;
  }

  .system-process-grid {
    grid-template-columns: 1fr;
  }

  .system-log-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .system-hero {
    padding: 18px;
  }

  .system-hero-main {
    align-items: flex-start;
  }

  .system-hero-icon {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 24px;
  }

  .system-summary-grid,
  .system-files-grid,
  .system-kv-grid,
  .system-run-result,
  .system-api-grid {
    grid-template-columns: 1fr;
  }

  .system-card-head,
  .system-section-head {
    align-items: flex-start;
  }

  .system-summary-card > strong,
  .system-kv strong {
    font-size: 13px;
  }

  .system-run-result strong,
  .system-api-grid strong {
    font-size: 18px;
  }

  .system-path {
    display: none;
  }

  .system-file-meta {
    display: grid;
    gap: 3px;
  }

  .system-clear-card {
    align-items: flex-start;
  }
}

.system-monitor-card {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  border-left: 4px solid #22c55e;
}

.system-monitor-card.is-warning {
  border-left-color: #f59e0b;
}

.system-monitor-card.is-error {
  border-left-color: #ef4444;
}

.system-monitor-message {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.system-monitor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.system-monitor-grid > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
}

.system-monitor-grid span,
.system-monitor-grid small {
  color: #64748b;
  font-size: 12px;
}

.system-monitor-grid strong,
.system-monitor-grid small {
  overflow-wrap: anywhere;
}

.system-monitor-grid strong {
  font-size: 14px;
}

.system-monitor-issues {
  display: grid;
  gap: 8px;
}

.system-monitor-issues > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.system-monitor-issues > div.is-warning {
  background: #fffbeb;
}

.system-monitor-issues > div.is-error {
  background: #fef2f2;
}

@media (max-width: 1180px) {
  .system-monitor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .system-monitor-grid {
    grid-template-columns: 1fr;
  }

  .system-monitor-issues > div {
    display: grid;
  }
}
