   :root{
        --blue:#343a56;
        --gray:#8a8a8a;
        --bg:#eeeeee;
        --test : #343a5628;
      }

      html, body {
        background: white;
        height: 100%;
        margin: 0;
        font-family: Arial, sans-serif;
      }

      .judul{
        color: white;
        font-size: 2rem;
        font-weight: bold;
        margin-bottom: 20px;
      }

      .container {
        z-index: 1;
      }

      /* Table Wrapper */
      .table-wrapper {
        background: white;
        border-radius: 16px;
        overflow: hidden;
    
        padding: 20px;
      }

      /* Table Scroll Area */
      .table-scroll {
        max-height: 420px;
        min-height: 420px;
        overflow-y: auto;
        background: white;
       
      }

      .table thead th {
        position: sticky;
        top: 0;
        background: white;  
        color: #ffffff;
        z-index: 3;
      }

      .table th,
      .table td {
        border: none;
        background-color: var(--blue);
        color: var(--bg);
      }

      .table tbody tr {
        border-bottom: 1px solid  #2e2e2e3b;
      }

      /* Card untuk Chart */
      .card {
        background-color: white; /* dark card */
        color: white;
        border-radius: 16px;
      }

      #mainChart {
        width: 100%;
        height: 400px;
      }

      #DailyChart {
  width: 100% !important;
  height: 400px;
}


      /* ===== Transparent Input Style ===== */

.form-control,
.form-select {
  background-color: var(--blue) !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
}

.form-control::placeholder {
  color: rgba(255,255,255,0.6);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--blue) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 216, 255, 0.25);
}
.form-control-sm {
  font-size: 0.8rem;
  padding: 4px 6px;
  min-width: 0;
}

.option {
  background-color: transparent !important;
  color: #ffffff !important;
}


/* ===== Apply Button Style ===== */
.btn-apply {
  background-color: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
  font-weight: 600;
  transition: 0.3s ease;
}

.btn-apply:hover {
  background-color: var(--blue);
  color: white;
  box-shadow: 0 0 10px var(--blue);
}


/* ===== Compact Segmented Control ===== */

/* ===== METRIC GRID FULL WIDTH ===== */

.metric-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 kolom */
  width: 100%;
  border: 1px solid var(--blue);
  border-radius: 8px;
  overflow: hidden;
}

.metric-group input[type="checkbox"] {
  display: none;
}

.metric-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--blue);
  font-weight: 500;
  background-color: transparent;
  border-right: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  transition: 0.2s ease;
  text-align: center;
}

/* Hilangkan border kanan tiap kolom ke-3 */
.metric-group label:nth-child(6n),
.metric-group label:nth-child(6n-2),
.metric-group label:nth-child(6n-4) {
  border-right: 1px solid var(--blue);
}

/* Hapus border kanan kolom ke-3 */
.metric-group label:nth-child(3n) {
  border-right: none;
}

/* Hapus border bawah 3 terakhir */
.metric-group label:nth-last-child(-n+3) {
  border-bottom: none;
}

.metric-group label:hover {
  background-color: rgba(52,58,86,0.08);
}

.metric-group input[type="checkbox"]:checked + label {
  background-color: var(--blue);
  color: white;
}

/* Tablet */
@media (max-width: 992px) {
  .metric-group {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 576px) {
  .metric-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

.metric-group input[type="checkbox"] {
  display: none;
}

.metric-group label {
  text-align: center;
  padding: 8px 6px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--blue);
  font-weight: 500;
  background-color: transparent;
  border-right: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  transition: 0.2s ease;
  white-space: nowrap;
}

/* Hilangkan border kanan otomatis */
.metric-group label:nth-child(3n) {
  border-right: none;
}

/* Untuk mobile 2 kolom */
@media (max-width: 576px) {
  .metric-group label:nth-child(2n) {
    border-right: none;
  }
}

/* Hilangkan border bawah di baris terakhir */
.metric-group label:nth-last-child(-n+3) {
  border-bottom: none;
}

@media (max-width: 576px) {
  .metric-group label:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

.metric-group label:hover {
  background-color: white;
}

.metric-group input[type="checkbox"]:checked + label {
  background-color: var(--blue);
  border: #0d1b2a 1px solid;
  color: white;
}

/* ===== Time Interval Segmented ===== */
.time-group {
  display: flex;
  width: 100%;
  border: 1px solid var(--blue);
  border-radius: 6px;
  overflow: hidden;
}

.time-group input[type="radio"] {
  display: none;
}

.time-group label {
  flex: 1;                     /* 🔥 bikin rata & sama besar */
  text-align: center;
  padding: 4px 0;              /* tinggi sama kayak metric */
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--blue);
  font-weight: 500;
  border-right: 1px solid var(--blue);
  background-color: transparent;
  transition: 0.2s ease;
}

.time-group label:last-child {
  border-right: none;
}

.time-group label:hover {
  background-color: rgba(52,58,86,0.15);
}

.time-group input[type="radio"]:checked + label {
  background-color: var(--blue);
  color: white;
}


#applyDaily {
  white-space: nowrap;
}


.chart-wrapper {
  width: 100%;       /* full lebar parent */
  min-height: 300px; /* bisa disesuaikan */
  aspect-ratio: 16/9; /* proporsional */
}
#DailyChart {
  width: 100%;
  height: 100%;      /* mengikuti wrapper */
}

#DailyChartContainer {
  display: grid;
  gap: 15px;
  width: 100%;
  min-height: 350px;
  grid-auto-rows: minmax(250px, auto);
}
/* Desktop default */
.dynamic-chart {
  background: #343a56;
  border-radius: 12px;
  width: 100%;
  min-height: 250px;
}

/* Tablet */
@media (max-width: 992px) {
  .dynamic-chart {
    min-height: 220px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  #DailyChartContainer {
    min-height: 300px;
  }

  #DailyChartContainer > div {
    height: 250px !important;
  }
}


/* ============================= */
/* NAVBAR CUSTOM                 */
/* ============================= */

.mbg-navbar {
  background-color: var(--blue);
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo-box {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* biar img nggak keluar kotak */
}

.logo-img {
  width: 80%;
  height: auto;
  object-fit: contain;
}

/* Brand Name */
.brand-name {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  
}


.schedule-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-row label {
  min-width: 45px; /* biar From & To sejajar rapi */
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--blue);
}

.schedule-row input {
  flex: 1;
}



.sensor_name{
  color: var(--blue) !important;
}