:root {
  --avail-0: #d54941;
  --avail-1: #d96241;
  --avail-2: #e37318;
  --avail-3: #e89318;
  --avail-4: #d9a818;
  --avail-5: #b8b020;
  --avail-6: #8dba30;
  --avail-7: #6dba3f;
  --avail-8: #4dba50;
  --avail-9: #3dba60;
}

.dashboard {
  min-height: 100vh;
  background: var(--td-bg-color-page);
  width: 100%;
}

.dashboard-content {
  box-sizing: border-box;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--td-comp-paddingTB-xl) var(--td-comp-paddingLR-xl);
  width: 100%;
}

.dashboard-brand {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--td-comp-margin-s);
  line-height: 1.2;
}

.dashboard-logo {
  margin: 0;
  color: var(--td-text-color-primary);
  font-size: calc(var(--td-font-size-title-large) + 6px);
  font-weight: 700;
}

.dashboard-subtitle {
  color: var(--td-text-color-secondary);
  font-size: var(--td-font-size-body-medium);
  font-weight: 400;
}

.dashboard-version {
  color: var(--td-text-color-placeholder);
  font-size: var(--td-font-size-body-small);
  font-weight: 400;
}

.dashboard-header-controls {
  display: inline-flex;
  align-items: center;
  gap: var(--td-comp-margin-s);
  margin-right: var(--td-comp-margin-xxl);
}

.dashboard-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 4.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.refresh-countdown-flow {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--td-text-color-secondary);
}

.refresh-countdown-flow__number {
  line-height: 0.85;
  --number-flow-mask-height: 0.15em;
  --number-flow-mask-width: 0.25em;
}

.refresh-countdown-flow__unit {
  margin: 0 1px;
}

.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.status-dot--up {
  background: var(--td-success-color);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--td-success-color) 14%, transparent);
}

.status-dot--down {
  background: var(--td-error-color);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--td-error-color) 14%, transparent);
}

.status-bar {
  display: flex;
  gap: 2px;
  align-items: center;
  width: 100%;
}

.status-bar-block {
  flex: 1;
  min-width: 0;
  height: 16px;
  border-radius: 2px;
}

.status-bar-block--up {
  background: var(--td-success-color);
}

.status-bar-block--down {
  background: var(--td-error-color);
}

.status-bar-block--empty {
  background: var(--td-bg-color-component-disabled);
}

.trend-chart {
  width: 100%;
}

.trend-loading,
.trend-empty {
  padding: 24px;
  text-align: center;
  color: var(--td-text-color-placeholder);
  font-size: 0.85rem;
}

.tab-panel-padded {
  padding: 15px;
}

.t-table tr.row-down {
  border-left: 3px solid var(--td-error-color);
  background: color-mix(in srgb, var(--td-error-color) 6%, transparent);
}

.t-table--hoverable tbody tr.row-down:hover {
  background: color-mix(in srgb, var(--td-error-color) 10%, transparent);
}

.text-disabled {
  color: var(--td-text-color-disabled);
}

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

.latency-ok {
  color: var(--td-success-color);
}

.latency-warn {
  color: var(--td-warning-color);
}

.latency-error {
  color: var(--td-error-color);
}

.latency-value {
  display: inline-block;
  min-width: 7ch;
  white-space: nowrap;
}

.drawer-time-controls {
  display: flex;
  align-items: center;
  gap: var(--td-comp-margin-m);
  width: 100%;
}

.drawer-date-range {
  flex: 1;
  min-width: 360px;
}

.target-detail-drawer {
  --target-detail-drawer-width: calc(100vw - 16px);
}

@media (min-width: 640px) {
  .target-detail-drawer {
    --target-detail-drawer-width: 86vw;
  }
}

@media (min-width: 768px) {
  .target-detail-drawer {
    --target-detail-drawer-width: 82vw;
  }
}

@media (min-width: 1024px) {
  .target-detail-drawer {
    --target-detail-drawer-width: 68vw;
  }
}

@media (min-width: 1440px) {
  .target-detail-drawer {
    --target-detail-drawer-width: 58vw;
  }
}

@media (min-width: 1920px) {
  .target-detail-drawer {
    --target-detail-drawer-width: min(50vw, 960px);
  }
}

.overview-stat-card {
  background: var(--td-bg-color-container-hover);
  border-radius: var(--td-radius-default);
  padding: var(--td-comp-paddingTB-xl) var(--td-comp-paddingLR-xl);
}

.summary-stat-col {
  text-align: center;
}

@media (max-width: 768px) {
  .drawer-time-controls {
    flex-wrap: wrap;
  }

  .drawer-date-range {
    min-width: 100%;
  }
}

.full-width {
  width: 100%;
}

.clickable-table {
  cursor: pointer;
}

.summary-cards-row {
  margin-bottom: var(--td-comp-margin-xl);
}

.error-boundary-fallback {
  padding-top: 20vh;
  width: 100%;
}
