:root {
  --dashboard-gap: 1.5rem;
}

.dashboard-header {
  align-items: center;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-metrics {
  display: grid;
  gap: var(--dashboard-gap);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-card h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.metric-caption {
  color: var(--color-text-subtle);
  font-size: 0.85rem;
}

.dashboard-grid {
  display: grid;
  gap: var(--dashboard-gap);
  grid-template-columns: 2fr 1fr;
  align-items: start;
}

.grid-main {
  display: grid;
  gap: var(--dashboard-gap);
}

.grid-sidebar {
  display: grid;
  gap: var(--dashboard-gap);
}

.table-link {
  color: var(--brand-2);
  text-decoration: none;
}

.table-link:hover,
.table-link:focus {
  text-decoration: underline;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-label {
  font-size: 0.85rem;
  color: var(--color-text-subtle);
  display: block;
  margin-bottom: 0.35rem;
}

.alerts-list,
.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.alerts-list li {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(209, 75, 75, 0.16);
  border: 1px solid rgba(209, 75, 75, 0.3);
}

.links-list a {
  color: var(--brand-3);
  text-decoration: none;
}

.links-list a:hover,
.links-list a:focus {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .grid-sidebar {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .metric-card {
    padding: 1.25rem;
  }

  .metric-value {
    font-size: 1.75rem;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
