.monitor-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 16px;
  background: var(--white);
  border: 1px solid #edf2f7;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  overflow: hidden;
}

.monitor-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--white);
  pointer-events: none;
}

.monitor-hero::after {
  content: '';
  position: absolute;
  bottom: -70px; left: 30%;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: var(--white);
  pointer-events: none;
}

.monitor-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.monitor-hero-top .monitor-hero-title {
  margin: 0;
} 

.monitor-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.monitor-hero-icon {
  width: 56px; height: 56px;
  min-width: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.monitor-hero-body { flex: 1; min-width: 0; }

.monitor-hero-title {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -.3px;
}

.monitor-hero-desc {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

.monitor-hero .status.online-bg {
  background: #dcfce7; color: #166534; border: 1px solid #bbf7d0;
}
.monitor-hero .status.online-bg .status-dot  { background: #16a34a; }
.monitor-hero .status.offline-bg {
  background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0;
}
.monitor-hero .status.offline-bg .status-dot { background: #94a3b8; animation: none; }

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.d-card {
  background: var(--white);
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .2s, transform .2s;
}
.d-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.d-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.d-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.d-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.d-badge.safe   { background: #dcfce7; color: #166534; }
.d-badge.warn   { background: #fef9c3; color: #854d0e; }
.d-badge.danger { background: #fee2e2; color: #991b1b; }

.d-title { font-size: 11px; font-weight: 700; color: #64748b; }
.d-value { font-size: 28px; font-weight: 800; color: #334155; line-height: 1; }
.d-unit  { font-size: 12px; font-weight: 600; color: #94a3b8; }

.chart-section { margin-bottom: 20px; }

.chart-card {
  background: var(--white);
  border: 1px solid #edf2f7;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.chart-header { text-align: center; margin-bottom: 16px; }
.chart-header h3 { font-size: 14px; font-weight: 800; color: #334155; margin-bottom: 2px; }
.chart-header p  { font-size: 10px; color: #94a3b8; }

.chart-wrap { width: 100%; height: 260px; }

#btn-export { gap: 7px; }

.update-label {
  font-size: 10px;
  color: #9ca3af;
  margin-right: 4px;
}

@media (max-width: 900px) {
  .data-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .monitor-hero { padding: 16px 18px; gap: 10px; border-radius: 16px; }
  .monitor-hero-icon { width: 46px; height: 46px; min-width: 46px; font-size: 20px; border-radius: 13px; }
  .monitor-hero-title { font-size: 15px; }
  .monitor-hero-desc { font-size: 11px; }
}

@media (max-width: 480px) {
  .monitor-hero { padding: 14px 16px; gap: 8px; border-radius: 14px; }
  .monitor-hero::before { width: 130px; height: 130px; top: -35px; right: -35px; }
  .monitor-hero::after  { display: none; }
  .monitor-hero-main { gap: 12px; }
  .monitor-hero-icon { width: 40px; height: 40px; min-width: 40px; font-size: 18px; border-radius: 11px; }
  .monitor-hero-title { font-size: 13px; }
  .monitor-hero-desc { font-size: 10.5px; }

  .data-grid  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .d-card     { padding: 12px; gap: 8px; border-radius: 12px; }
  .d-icon     { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
  .d-value    { font-size: 22px; }
  .chart-wrap { height: 240px; }
  .chart-card { padding: 12px; }
}

@media (max-width: 375px) {
  .monitor-hero { padding: 10px 12px; gap: 6px; border-radius: 12px; }
  .monitor-hero-icon { width: 32px; height: 32px; min-width: 32px; font-size: 14px; border-radius: 9px; }
  .monitor-hero-title { font-size: 11px; }
  .monitor-hero-desc { display: none; }
  .monitor-hero .status { font-size: 10px; padding: 3px 7px; }

  .data-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .d-card    { padding: 10px; gap: 6px; border-radius: 10px; }
  .d-icon    { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
  .d-value   { font-size: 18px; }
  .d-title   { font-size: 10px; }
  .d-badge   { font-size: 9px; padding: 2px 6px; }
  .update-label { display: none; }
  .chart-wrap { height: 200px; }
  .chart-card { padding: 10px; }
}