.monitoring-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.monitor-range-group {
  display: flex;
  background: var(--sidebar);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border);
}

.monitor-range-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--muted);
  background: transparent;
  transition: all 0.15s;
}

.monitor-range-btn.active {
  background: var(--accent);
  color: #fff;
}

.monitoring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.monitor-card {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1rem;
  height: 250px;
  position: relative;
}

.monitor-card canvas {
  width: 100% !important;
  height: calc(100% - 24px) !important;
}

.monitor-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

/* Alerts */
.alerts-section {
  margin-top: 1.5rem;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1.25rem;
}

.alerts-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.alerts-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text);
}

.alert-rule-label {
  min-width: 60px;
}

.alert-threshold {
  width: 60px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
  text-align: center;
}

.alerts-history-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.alerts-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.alert-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text);
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--red);
}

.alert-history-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

.alert-history-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

/* Resource logs table */
.resource-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.resource-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  background: var(--card);
}

.resource-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.resource-table tbody tr:hover {
  background: rgba(124, 106, 252, 0.05);
}

.resource-rank {
  font-weight: 700;
  color: var(--accent);
  width: 30px;
}

.resource-name {
  font-weight: 600;
  color: #fff;
}

.resource-high {
  color: var(--red);
  font-weight: 600;
}

.resource-mid {
  color: var(--orange);
  font-weight: 500;
}

.resource-io {
  font-size: 0.72rem;
  color: var(--muted);
}

.resource-time {
  text-align: right;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 8px;
}

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