.monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.monitor-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.monitor-card h6 {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.monitor-big-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.monitor-sub-value {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.monitor-sub-value {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.monitor-detail-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 0;
  font-size: 0.9rem;
}
.monitor-detail-row:last-child {
  border-bottom: none;
}
.monitor-detail-label {
  color: var(--text-muted);
}
.monitor-detail-val {
  font-weight: 600;
  color: #fff;
}

.progress-custom {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  margin-top: auto; /* Pousse en bas de la card */
  overflow: hidden;
}

.progress-bar-custom {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.cpu-bar {
  background: linear-gradient(90deg, #c87743, #9c5a2c);
}
.ram-bar {
  background: linear-gradient(90deg, #a94c60, #8e3d50);
}
.swap-bar {
  background: linear-gradient(90deg, #d9963c, #d97706);
}
.disk-bar {
  background: linear-gradient(90deg, #4f9d69, #059669);
}

.monitor-table {
  width: 100%;
  font-size: 0.8rem;
}
.monitor-table th {
  color: var(--text-muted);
  padding: 5px;
  text-align: left;
}
.monitor-table td {
  padding: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mon-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
}
.bg-ok {
  background: rgba(91, 155, 112, 0.2);
  color: #4f9d69;
}
.bg-warn {
  background: rgba(154, 138, 78, 0.2);
  color: #d9963c;
}
.bg-crit {
  background: rgba(184, 70, 92, 0.2);
  color: #c0455a;
}

.monitor-pid {
  color: var(--warning);
  font-family: monospace;
}
.monitor-user {
  color: var(--info);
}

/* DB Grid */
.db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.db-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}
.db-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.db-size {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Status Dot */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.dot-green {
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
}
.dot-red {
  background-color: var(--danger);
  box-shadow: 0 0 10px var(--danger);
}
