* {
  box-sizing: border-box;
}

:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: #f5f7fa;
  background: #151515;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.025),
      transparent 34%
    ),
    #151515;
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;

  padding: 24px 16px;

  background: #101010;
  border-right: 1px solid #242424;
}

.brand {
  display: flex;
  align-items: center;

  gap: 12px;

  padding: 0 8px 32px;
}

.brand-mark {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  border-radius: 10px;

  background: #f1f1f1;
  color: #111111;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.brand-name {
  color: #f4f4f4;

  font-size: 14px;
  font-weight: 700;
}

.brand-subtitle {
  margin-top: 3px;

  color: #6e6e6e;

  font-size: 11px;
}

.nav {
  display: flex;
  flex-direction: column;

  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;

  gap: 11px;

  width: 100%;

  padding: 10px 11px;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: #777777;

  text-align: left;

  cursor: pointer;

  transition:
    background 120ms ease,
    color 120ms ease;
}

.nav-item:hover {
  background: #181818;
  color: #d9d9d9;
}

.nav-item.active {
  background: #1d1d1d;
  color: #ffffff;
}

.nav-icon {
  width: 18px;

  color: #666666;

  text-align: center;
  font-size: 14px;
}

.nav-item.active .nav-icon {
  color: #bcbcbc;
}

.sidebar-bottom {
  margin-top: auto;

  padding-top: 20px;
}

.environment {
  display: flex;
  align-items: center;

  gap: 10px;

  padding: 10px;
}

.environment-name {
  color: #b8b8b8;

  font-size: 12px;
  font-weight: 600;
}

.environment-detail {
  margin-top: 2px;

  color: #5f5f5f;

  font-size: 10px;
}

.main {
  min-width: 0;
}

.topbar {
  height: 70px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 36px;

  border-bottom: 1px solid #242424;

  background: rgba(21, 21, 21, 0.88);

  backdrop-filter: blur(16px);
}

.product-switcher {
  display: flex;

  gap: 3px;

  padding: 3px;

  border: 1px solid #292929;
  border-radius: 8px;

  background: #111111;
}

.product-tab {
  padding: 7px 13px;

  border: 0;
  border-radius: 6px;

  background: transparent;
  color: #6e6e6e;

  font-size: 12px;

  cursor: pointer;
}

.product-tab:hover {
  color: #c8c8c8;
}

.product-tab.active {
  background: #222222;
  color: #ffffff;
}

.user {
  display: flex;
  align-items: center;

  gap: 10px;
}

.user-avatar {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border: 1px solid #2c2c2c;
  border-radius: 50%;

  background: #1b1b1b;

  color: #d8d8d8;

  font-size: 12px;
  font-weight: 700;
}

.user-name {
  color: #dedede;

  font-size: 12px;
  font-weight: 600;
}

.user-role {
  margin-top: 2px;

  color: #686868;

  font-size: 10px;
}

.content {
  width: min(
    1320px,
    calc(100% - 72px)
  );

  margin: 0 auto;

  padding: 48px 0 72px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 8px;

  color: #646464;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;

  color: #f4f4f4;

  font-size: 30px;
  font-weight: 650;

  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;

  color: #e8e8e8;

  font-size: 17px;
  font-weight: 600;

  letter-spacing: -0.02em;
}

.page-description {
  margin-bottom: 0;

  color: #747474;

  font-size: 12px;
}

.last-updated,
.section-meta {
  color: #676767;

  font-size: 11px;
}

.health-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 32px;

  margin-bottom: 34px;
  padding: 24px 26px;

  border: 1px solid #262626;
  border-radius: 12px;

  background: #181818;
}

.health-primary {
  display: flex;
  align-items: center;

  gap: 13px;
}

.health-title {
  color: #efefef;

  font-size: 17px;
  font-weight: 600;
}

.health-description {
  margin-top: 4px;

  color: #666666;

  font-size: 11px;
}

.health-metrics {
  display: flex;
  align-items: center;

  gap: 44px;
}

.metric {
  display: flex;
  flex-direction: column;

  min-width: 72px;
}

.metric-value {
  color: #ececec;

  font-size: 21px;
  font-weight: 600;

  letter-spacing: -0.03em;
}

.metric-label {
  margin-top: 4px;

  color: #626262;

  font-size: 10px;
}

.status-dot {
  display: inline-block;

  width: 7px;
  height: 7px;

  flex-shrink: 0;

  border-radius: 50%;

  background: #737373;
}

.status-dot-large {
  width: 9px;
  height: 9px;
}

.status-dot.healthy,
.status-dot.running {
  background: #39c98b;

  box-shadow:
    0 0 9px
    rgba(57, 201, 139, 0.32);
}

.status-dot.warning,
.status-dot.update {
  background: #e7a63a;

  box-shadow:
    0 0 9px
    rgba(231, 166, 58, 0.25);
}

.status-dot.error {
  background: #e65c5c;

  box-shadow:
    0 0 9px
    rgba(230, 92, 92, 0.25);
}

.services-section {
  padding-top: 4px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin-bottom: 13px;
}

.service-list {
  overflow: hidden;

  border-top: 1px solid #252525;
}

.service-group {
  border-bottom: 1px solid #252525;
}

.service-main {
  display: grid;

  grid-template-columns:
    minmax(240px, 1.5fr)
    minmax(140px, 0.8fr)
    110px
    36px;

  align-items: center;

  min-height: 64px;

  padding: 0 10px;

  transition: background 120ms ease;
}

.service-main:hover {
  background: #191919;
}

.service-identity {
  display: flex;
  align-items: center;

  gap: 11px;

  min-width: 0;
}

.service-copy {
  min-width: 0;
}

.service-title {
  overflow: hidden;

  color: #dfdfdf;

  font-size: 13px;
  font-weight: 600;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-subtitle {
  overflow: hidden;

  margin-top: 4px;

  color: #656565;

  font-size: 10px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-count {
  color: #666666;

  font-size: 10px;
}

.service-status {
  display: flex;
  align-items: center;

  gap: 7px;

  font-size: 11px;
}

.service-status.healthy,
.service-status.running {
  color: #58d49e;
}

.service-status.warning {
  color: #e7a63a;
}

.service-status.error {
  color: #e96d6d;
}

.expand-button {
  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;

  border: 0;
  border-radius: 6px;

  background: transparent;
  color: #777777;

  font-size: 17px;
  line-height: 1;

  cursor: pointer;
}

.expand-button:hover {
  background: #232323;
  color: #dddddd;
}

.expand-button.hidden {
  visibility: hidden;
}

.service-children {
  display: none;

  padding:
    0 10px
    10px 40px;
}

.service-group.open
.service-children {
  display: block;
}

.child-row {
  display: grid;

  grid-template-columns:
    minmax(220px, 1.5fr)
    minmax(180px, 1fr)
    110px
    120px;

  align-items: center;

  min-height: 42px;

  padding: 0 8px;

  border-radius: 6px;
}

.child-row:hover {
  background: #181818;
}

.child-name {
  display: flex;
  align-items: center;

  gap: 9px;

  color: #a9a9a9;

  font-size: 11px;
}

.child-image,
.child-uptime {
  overflow: hidden;

  color: #5f5f5f;

  font-size: 9px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.child-state {
  font-size: 10px;
}

.child-state.healthy,
.child-state.running {
  color: #55c995;
}

.child-state.warning {
  color: #df9e35;
}

.child-state.error {
  color: #df6868;
}

@media (max-width: 1000px) {

  .health-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .health-metrics {
    width: 100%;
    justify-content: space-between;
  }

  .service-main {
    grid-template-columns:
      minmax(200px, 1fr)
      100px
      36px;
  }

  .service-count {
    display: none;
  }

  .child-row {
    grid-template-columns:
      1fr
      100px;
  }

  .child-image,
  .child-uptime {
    display: none;
  }
}

@media (max-width: 760px) {

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    padding: 0 18px;
  }

  .content {
    width: calc(100% - 32px);
    padding-top: 30px;
  }

  .user-role {
    display: none;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .health-metrics {
    gap: 18px;
  }
}
