.overview-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.dashboard-profile-section {
  margin-top: var(--space-8);
  padding-bottom: var(--space-4);
}

.dashboard-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.dashboard-profile-head h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: calc(var(--admin-font-size) + 2px);
  font-weight: 750;
}

.dashboard-profile-head > span,
.dashboard-distribution-card__head > span {
  color: var(--text-tertiary);
  font-size: var(--admin-font-size);
}

.dashboard-profile-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-profile-kpis .kpi-value {
  font-size: calc(var(--admin-font-size) * 1.7);
}

.dashboard-profile-state {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  color: var(--text-tertiary);
}

.dashboard-profile-skeleton {
  display: grid;
  gap: var(--space-4);
}

.dashboard-profile-skeleton__kpis,
.dashboard-profile-skeleton__charts {
  display: grid;
  gap: var(--space-4);
}

.dashboard-profile-skeleton__kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-profile-skeleton__charts {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.dashboard-profile-skeleton__kpi {
  height: 132px !important;
}

.dashboard-profile-skeleton__chart {
  height: 304px !important;
}

.dashboard-distribution-card__head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.dashboard-distribution-card__head .card-title {
  min-width: 0;
  flex: 1 1 180px;
  margin: 0;
}

.dashboard-distribution-card__head > span {
  flex: 0 1 auto;
  text-align: right;
}

.distribution-pie {
  display: grid;
  min-height: 216px;
  grid-template-columns: minmax(160px, 0.82fr) minmax(180px, 1fr);
  align-items: center;
  gap: var(--space-5);
}

.distribution-pie__chart {
  width: 100%;
  height: 216px;
  opacity: 0;
  animation: panel-enter 420ms var(--ease-emphasized) 120ms both;
}

.distribution-pie__legend {
  display: grid;
  max-height: 216px;
  overflow-y: auto;
  gap: var(--space-3);
  padding-right: var(--space-1);
}

.distribution-pie__legend-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--admin-font-size);
}

.distribution-pie__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
}

.distribution-pie__legend-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-pie__legend-row strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.distribution-pie-empty {
  display: grid;
  min-height: 216px;
  place-items: center;
  color: var(--text-tertiary);
}

.workspace-entry-section {
  margin-top: var(--space-4);
}

.workspace-entry-head {
  display: flex;
  margin-bottom: var(--space-3);
}

.workspace-entry-head h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: var(--admin-font-size-lg);
  font-weight: 750;
}

.workspace-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: var(--space-3);
}

.workspace-entry-card {
  display: grid;
  min-height: 128px;
  align-content: start;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-align: left;
  transition:
    border-color var(--motion-base) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.workspace-entry-card:hover,
.workspace-entry-card:focus-visible {
  border-color: var(--primary-border-strong);
  box-shadow: var(--shadow-panel);
  transform: translateY(-2px);
}

.workspace-entry-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.workspace-entry-card__icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  background: var(--primary-surface);
  color: var(--primary);
}

.workspace-entry-card__group {
  margin-top: var(--space-1);
  color: var(--text-tertiary);
  font-size: var(--admin-font-size-sm);
}

.workspace-entry-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: var(--admin-font-size);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-entry-empty {
  display: flex;
  min-height: 88px;
  align-items: center;
  padding: var(--space-4);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  color: var(--text-tertiary);
}

.chart-card {
  min-height: 304px;
  padding: var(--space-5);
  animation: panel-enter var(--motion-slow) var(--ease-emphasized) both;
  transition:
    border-color var(--motion-base) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.chart-card--compact {
  min-height: 150px;
}

.chart-card--compact .line-chart {
  height: 78px;
}

.chart-card--compact .card-head {
  margin-bottom: var(--space-2);
}

.chart-card--compact .segmented {
  display: none;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.segmented {
  display: inline-flex;
  height: 30px;
  padding: calc(var(--space-1) / 2);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--bg-card-strong);
}

.segment {
  min-width: 52px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: var(--admin-font-size);
  transition:
    background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.segment:hover {
  transform: translateY(-1px);
}

.segment--active {
  background: var(--primary-surface);
  color: var(--text-primary);
}

.line-chart {
  width: 100%;
  height: 216px;
  opacity: 0;
  animation: panel-enter 420ms var(--ease-emphasized) 120ms both;
}

.echart {
  width: 100%;
  min-width: 0;
}

.line-chart__grid {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

.line-chart__area {
  opacity: 0.18;
}

.line-chart__line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: var(--space-6);
  min-height: 216px;
}

.donut-echart {
  width: 140px;
  height: 140px;
  opacity: 0;
  animation: panel-enter 420ms var(--ease-emphasized) 120ms both;
}

.donut {
  display: grid;
  width: 140px;
  height: 140px;
  place-items: center;
  border-radius: var(--radius-pill);
}

.donut-core {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--admin-font-size);
}

.donut-core strong {
  display: block;
  color: var(--text-primary);
  font-size: var(--admin-font-size);
  line-height: 1;
}

.donut-legend {
  display: grid;
  gap: var(--space-3);
}

.legend-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--admin-font-size);
}

.legend-row strong {
  color: var(--text-primary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
}

.legend-dot--success {
  background: var(--success);
}

.legend-dot--danger {
  background: var(--danger);
}

.legend-dot--stopped {
  background: var(--stopped);
}

.bar-chart {
  display: block;
  width: 100%;
  height: 216px;
  opacity: 0;
  animation: panel-enter 420ms var(--ease-emphasized) 120ms both;
}

.alert-list {
  display: grid;
  gap: var(--space-3);
}

.alert-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 42px;
  animation: row-enter var(--motion-slow) var(--ease-emphasized) both;
  transition:
    background var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.alert-item:nth-child(2) {
  animation-delay: 50ms;
}

.alert-item:nth-child(3) {
  animation-delay: 100ms;
}

.alert-item:hover {
  transform: translateX(2px);
}

.alert-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
}

.alert-dot--danger {
  background: var(--danger);
}

.alert-dot--warning {
  background: var(--warning);
}

.alert-dot--info {
  background: var(--info);
}

.alert-name {
  color: var(--text-primary);
  font-size: var(--admin-font-size);
  font-weight: 620;
}

.alert-desc,
.alert-time {
  color: var(--text-tertiary);
  font-size: var(--admin-font-size);
}

.table-card {
  margin-top: var(--space-4);
  overflow: hidden;
  animation: panel-enter var(--motion-slow) var(--ease-emphasized) both;
  transition:
    border-color var(--motion-base) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.split-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.server-rail {
  overflow: hidden;
  animation: panel-enter var(--motion-slow) var(--ease-emphasized) both;
  transition:
    border-color var(--motion-base) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.server-list {
  display: grid;
  gap: 0;
  padding: var(--space-2);
}

.server-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 64px;
  padding: var(--space-3);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  animation: row-enter var(--motion-slow) var(--ease-emphasized) both;
  transition:
    background var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.server-item:hover {
  background: var(--bg-hover);
  transform: translateX(3px);
}

.server-item:nth-child(2) {
  animation-delay: 40ms;
}

.server-item:nth-child(3) {
  animation-delay: 80ms;
}

.server-item:nth-child(4) {
  animation-delay: 120ms;
}

.server-item strong,
.server-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-item small {
  margin-top: var(--space-1);
  color: var(--text-tertiary);
  font-size: var(--admin-font-size);
}

.server-status {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--stopped);
}

.server-status--running {
  background: var(--success);
}

.server-status--warning {
  background: var(--warning);
}

.server-status--error {
  background: var(--danger);
}

.link-button {
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: var(--admin-font-size);
}

.alert-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-bottom: var(--space-2);
}

@media (max-width: 1080px) {
  .dashboard-profile-skeleton__kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .distribution-pie {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .distribution-pie__chart {
    height: 180px;
  }

  .distribution-pie__legend {
    max-height: 120px;
  }
}

@media (max-width: 760px) {
  .dashboard-profile-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-profile-skeleton__kpis,
  .dashboard-profile-skeleton__charts {
    grid-template-columns: 1fr;
  }
}
