html {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    display: inline-block;
    text-align: center;
}

body {
    margin: 0;
    width: 100%;
}

.topnav {
    overflow: hidden;
    background-color: #4362b6;
    color: white;
    font-size: 1rem;
    padding: 5px;
	width:100%;
}


.topnav-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px; /* Jarak antara logo dan tulisan */
}

.logo-icon {
  height: 40px; /* Ukuran logo */
}
.topnav h1 {
  color: white;
  margin: 0;
  font-size: 24px;
}

#authentication-bar{
    background-color:mintcream;
    padding-top: 10px;
    padding-bottom: 10px;
}

#user-details{
    color: cadetblue;
}

.content {
    padding: 20px;
}

.card {
    background-color: white;
    box-shadow: 2px 2px 12px 1px rgba(140,140,140,.5);
    padding: 5%; 
}

.cards {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 20px;
    display: grid;
    grid-gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 2fr));
}
.single-column-mobile {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 10px;
    display: grid;
    grid-gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 2fr));
}

.reading {
    color: #193036;
}

.date-time{
    font-size: 0.8rem;
    color: #2130B8;
}

button {
    background-color: #049faa;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

button:hover {
   opacity: 0.8;
}

.deletebtn{
    background-color: #c52c2c;
}

.form-elements-container{
    padding: 16px;
    width: 50%;
	min-width:350px !important;
    margin: 0 auto;
}

#login-form input[type=text],
#login-form  input[type=password] {
    width: 100%;
	font-style: bold;
    padding: 14px 22px;
    margin: 10px 0;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

table {
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
}   
tr, td {
    padding: 0.25rem;
}
tr:nth-child(even) {
    background-color: #f2f2f2
}
tr:hover {
    background-color: #ddd;
}
th {
    position: sticky;
    top: 0;
    background-color: #50b8b4;
    color: white;
}
.reading-label {
    color: #ddd;
}
/* Tabel responsif */
#table-container {
    width: 100%;
    overflow-x: auto; /* Tambahkan scrollbar horizontal jika konten melampaui lebar */
    max-width: 100%;
  }
  
  #readings-table {
    width: 100%; /* Buat tabel menggunakan lebar penuh */
    border-collapse: collapse; /* Hilangkan spasi antar sel */
  }
  
  #readings-table th, #readings-table td {
    padding: 8px; /* Spasi di dalam sel */
    text-align: left;
    border-bottom: 1px solid #ddd; /* Tambahkan garis bawah antar baris */
  }

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: #474e5d;
    padding-top: 50px;
}
  
/* Modal Content/Box */
.modal-content {
    background-color: #fefefe;
    margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}
  
/* Style the horizontal ruler */
hr {
    border: 1px solid #f1f1f1;
    margin-bottom: 25px;
}

/* The Modal Close Button (x) */
.close {
    position: absolute;
    right: 35px;
    top: 15px;
    font-size: 40px;
    font-weight: bold;
    color: #f1f1f1;
}

.close:hover,
.close:focus {
    color: #f44336;
    cursor: pointer;
}

/* Clear floats */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Change styles for cancel button and delete button on extra small screens */
@media screen and (max-width: 300px) {
    .cancelbtn, .deletebtn {
        width: 100%;
    }
}

/* Media query untuk layar kecil (mobile) */
@media (max-width: 600px) {
    .cards {
        /* grid-template-columns: repeat(2, 1fr); Mengatur dua kolom pada layar kecil */
        grid-template-columns: 1fr; /* Set to one column */
        grid-gap: 1rem; /* Mengurangi jarak antar elemen pada layar kecil */
    }
}
/* Gaya khusus untuk card chart dan table dalam mode ponsel (satu kolom) */
@media (max-width: 768px) {
    .single-column-mobile {
        grid-template-columns: 1fr;
    }
}

/* Adjust the width of the input field */
#type-water-input {
    width: 100%; /* Set the width to 100% */
    /* max-width: 250px;  Set the maximum width to avoid it stretching too wide */
    margin: 0 auto; /* Center the input field */
    display: block; /* Make it a block element */
    text-align: left; /* left the text horizontally */
	float:left;	
}

.card-content {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Mengatur ikon tetap di kiri */
    padding: 10px;
  }
  
  .sensor-icon {
    width: 60px; /* Ukuran ikon */
    height: auto;
    margin-right: 10px; /* Jarak antara ikon dan teks */
  }

  .chart-icon {
    width: 20px;  /* Lebar ikon PNG */
    height: 20px; /* Tinggi ikon PNG */
}
  
  .text-content {
    display: flex;
    flex-direction: column; /* Mengatur teks Nitrogen dan nilai secara vertikal */
    margin: 0;  /* Menghapus margin default */
    padding: 0; /* Menghapus padding default */
    line-height: 1.2; /* Mengatur tinggi baris untuk mengurangi spasi vertikal */
    text-align: left; /* Pusatkan teks secara horizontal */
    flex-grow: 1; /* Biarkan teks mengisi sisa ruang */  
}
  
  .text-content p {
    margin: 0; /* Menghilangkan margin pada paragraf untuk mengurangi spasi vertikal */
    padding: 0;
  }

  body {
    /* background-image: url('icon/background.jpg'); */
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  .topnav {
    background-color: #535353;
    color: #fff;
    padding: 10px;
    text-align: center;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}

.bottom-nav label {
    display: block;
    margin: 0;
    padding: 5px 0;
    cursor: pointer;
}

.bottom-nav input[type="checkbox"] {
    display: none;
}

.bottom-nav input[type="checkbox"] + span {
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    display: inline-block;
    line-height: 20px;
}

.bottom-nav input[type="checkbox"] + span:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #ccc;
    border-radius: 3px;
}

.bottom-nav input[type="checkbox"]:checked + span:before {
    background: #4CAF50;
    border-color: #4CAF50;
}

.bottom-nav input[type="checkbox"]:checked + span:after {
    content: '✔';
    position: absolute;
    left: 4px;
    top: 2px;
    color: white;
    font-size: 16px;
}

/* Hide content to fit the layout */
.content-sign-in {
    margin-bottom: 60px; /* Adjust according to the height of your bottom nav */
}
/* Styling for the navigation icons */
.navigation-icons {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5); /* Optional background color */
  padding: 10px 0;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); /* Optional shadow */
  z-index: 1000; /* Ensures it stays on top */
}

.icon-label {
  display: flex;
  align-items: center;
  margin: 0 50px;
  cursor: pointer;
}


.icon-label input {
  display: none; /* Hide the default checkbox */
}

.icon {
  width: 24px;
  height: 24px;
}

.align-items-left {
text-align:left;
}
.label-genvo {
line-height:11px !important;
font-size:14px !important;
}
.label-genvo small {
line-height:11px !important;
font-size:11px !important;
color:#2130B8;
}	

/* Hide the checkbox and type water input field */
.hidden {
    display: none;
  }

  .speed-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }
  .knob {
    touch-action: none; /* Mencegah scrolling saat menyentuh knob */
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 5px 5px 15px #b8b8b8, -5px -5px 15px #ffffff;
  }



  .knob::before {
    content: '';
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e6e6e6, #ffffff);
    box-shadow: inset 5px 5px 10px #b8b8b8, inset -5px -5px 10px #ffffff;
  }

  .knob::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    position: absolute;
    top: 10px;
  }

/* Bagian atas dengan dua kolom */
.section-a {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dua kolom di bagian atas */
    gap: 10px;
    margin-bottom: 10px;
}

/* Layout for Section B: Sensor Cards */
.section-b {
    padding: 10px;
  }
  .sensor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns */
    grid-gap: 10px; /* Space between cards */
  }

  .sensor-card {
	background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
 
  
  .chart-card p {
    text-align: center;
  }
  
  .chart-icon {
    width: 30px;
    height: 30px;
  }


  .card.sensor-card {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;

  }
  
  .card-content {
    display: flex;
    align-items: center;
  }
  
  .sensor-icon {
    width: 50px;
    height: 50px;
    margin-right: 10px;
  }
  
  .text-content {
    flex: 1;
  }
  
  .card canvas {
    width: 100%;
    height: auto; /* Adjust height as needed */
    margin-top: 10px;
  }

   /* Section C - Charts */
.section-c .chart-container {
    display: flex;
    justify-content: space-between;
  }

  .chart-card {
    width: 100%;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	margin-bottom: 30px;
  }
  
  .chart-control {
    width: 100%;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	margin-bottom: 5px;
  }
  
/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    /* Section A menjadi satu kolom */
    .section-a {
        grid-template-columns: 1fr; /* Satu kolom */
        gap: 10px; /* Atur jarak antar elemen */
    }

    /* Section B: Sensor grid menjadi satu kolom */
    .sensor-grid {
        grid-template-columns: 1fr; /* Satu kolom */
        grid-gap: 10px; /* Atur jarak antar card */
    }

    /* Section C: Chart-container menjadi satu kolom */
    .section-c .chart-container {
        display: grid; /* Ubah flex menjadi grid */
        grid-template-columns: 1fr; /* Satu kolom */
        gap: 10px; /* Atur jarak antar chart */
    }

    /* Chart-card ukuran penuh */
    .chart-card {
        width: 100%; /* Lebar penuh di layar kecil */
        align-items: center;
        justify-content: flex-start;
        padding: 10px;
    }
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 90px;
  height: 30px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 30px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}
.slider:before {
  content: "OFF";
  position: absolute;
  left: 10px;
  top: 5px;
  color: white;
  font-size: 14px;
  transition: 0.4s;
}
input:checked + .slider {
  background-color: #8e44ad;
}
input:checked + .slider:before {
  content: "ON";
  left: 34px;
}