/* body {
    background-color: #f3f4f6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    display: flex;
    justify-content: center;
  } */

.card-nex {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
}

.header-nex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.device-name-nex {
    font-weight: 600;
    font-size: 1.25rem;
    color: #111827;
}

.status-online-nex {
    font-size: 0.75rem;
    background-color: #d1fae5;
    color: #065f46;
    padding: 4px 12px;
    border-radius: 9999px;
    /* pill shape */
    font-weight: 600;
}

.status-offline-nex {
    font-size: 0.75rem;
    background-color: #f0c2b6;
    color: #f44336;
    padding: 4px 12px;
    border-radius: 9999px;
    /* pill shape */
    font-weight: 600;
}

.data-grid-nex {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
    justify-content: center;
    width: 100%;
}

.data-point-nex {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.value-nex {
    font-weight: 700;
    font-size: 20px;
    color: #5d82d2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.label-nex {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 4px;
}

.icon-ok-nex {
    color: #10b981;
    font-size: 1.5rem;
}

.icon-alarm-nex {
    color: #ef4444;
    font-size: 1.5rem;
}

.updated-nex {
    margin-top: 20px;
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
}

.widget-nex {
  background: white;
  border-radius: 12px;
  /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);*/
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

.header-new {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
}

.status.online {
  background: #4caf50;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.status.offline {
  background: #f44336;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.main-nex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aqi-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: sans-serif;
  margin: 10px;
}

.good-aqi-circle .circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid #00E400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #444;
}

.moderate-aqi-circle .circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid #FFFF00;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #444;
}

.unhealthy-for-sensitive-groups-aqi-circle .circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid #FF7E00;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #444;
}

.unhealthy-aqi-circle .circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid #FF0000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #444;
}

.very-unhealthy-aqi-circle .circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid #8F3F97;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #444;
}

.hazardous-aqi-circle .circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid #7E0023;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #444;
}

.unknown-aqi-circle .circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid #a1a1a1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #444;
}

.aqi-circle .quality {
  font-weight: bold;
}

.aqi-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: sans-serif;
  margin: 10px;
}

.aqi-category-text {
  margin-top: 10px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  max-width: 120px;
}

.temp-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.temperature {
  text-align: center;
}

.temperature .value-nex {
  font-size: 20px;
  font-weight: bold;
}

.temp-metrics {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.metrics-horizontal {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.metrics-horizontal .metric {
  font-size: 12px;
  text-align: center;
}

.metrics {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

.metric {
  font-size: 12px;
}

.details {
  margin-top: 15px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.footer-nex {
  margin-top: 15px;
  font-size: 12px;
  color: #888;
  text-align: right;
}

.footer-nex-left {
  margin-top: 15px;
  font-size: 12px;
  color: #888;
  text-align: left;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* body {
      background-color: #111827;
      color: #d1d5db;
    } */

    .card {
        background-color: #1f2937;
        border: 1px solid #374151;
    }

    .device-name {
        color: #f9fafb;
    }

    .status-offline {
        background-color: #f44336;
        color: #f0c2b6;
    }

    .status-online {
        background-color: #064e3b;
        color: #a7f3d0;
    }

    .value-nex {
        color: #93c5fd;
    }

    .label-nex {
        color: #9ca3af;
    }

    .updated {
        color: #6b7280;
    }
}