body {
  margin: 0;
  padding: 0;
  background-color: #1d2634;
  color: #9e9ea4;
  font-family: 'Montserrat', sans-serif;
}

.material-icons-outlined {
  vertical-align: middle;
  line-height: 1px;
  font-size: 35px;
}

.grid-container {
  display: grid;
  grid-template-columns: 160px 1fr 1fr 1fr;
  grid-template-rows: 0.2fr 3fr;
  grid-template-areas:
    'sidebar header header header'
    'sidebar main main main';
  height: 100vh;
}

/* ---------- HEADER ---------- */
.header {
  grid-area: header;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px 0 30px;
  box-shadow: 0 6px 7px -3px rgba(0, 0, 0, 0.35);
}

.menu-icon {
  display: none;
}

/* ---------- SIDEBAR ---------- */

#sidebar {
  grid-area: sidebar;
  height: 100%;
  background-color: #263043;
  overflow-y: auto;
  transition: all 0.5s;
  -webkit-transition: all 0.5s;
}

.sidebar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 30px 30px 30px;
  margin-bottom: 30px;
}

.sidebar-title > span {
  display: none;
}

.sidebar-brand {
  margin-top: 15px;
  font-size: 20px;
  font-weight: 700;
}

.sidebar-list {
  padding: 0;
  margin-top: 15px;
  list-style-type: none;
}

.sidebar-list-item {
  padding: 20px 20px 20px 20px;
  font-size: 18px;
}

.sidebar-list-item:hover {
  background-color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.sidebar-list-item > a {
  text-decoration: none;
  color: #9e9ea4;
}

.sidebar-responsive {
  display: inline !important;
  position: absolute;
  /*
    the z-index of the ApexCharts is 11
    we want the z-index of the sidebar higher so that
    the charts are not showing over the sidebar 
    on small screens
  */
  z-index: 12 !important;
}

/* ---------- MAIN ---------- */

.main-container {
  grid-area: main;
  overflow-y: auto;
  padding: 20px 20px;
  color: rgba(255, 255, 255, 0.95);
}

.main-title {
  display: flex;
  justify-content: space-between;
}

.main-cards {
  display: grid;
  grid-template-columns: 4fr;
  gap: 20px;
  margin: 20px 0;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 20px;
  border-radius: 5px;
}

.card:first-child {
  background-color: #293549;
}

.card:nth-child(2) {
  background-color: #ff6d00;
}

.card:nth-child(3) {
  background-color: #2e7d32;
}

.card:nth-child(4) {
  background-color: #d50000;
}

.card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
   position: relative;
}

.card-inner > .material-icons-outlined {
  font-size: 30px;
}

.sensor-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
}

.sensor-card-content > .sensor-card-details,
.sensor-card-content > .card-icon-field,
.sensor-card-content > .card-icon-current {
  flex: 1 1 calc(50% - 12px);
  max-width: calc(50% - 12px);
}

.sensor-card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.configure-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.configure-form .form-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.configure-form label {
  font-weight: 600;
  color: #ffffff;
}

.configure-form input[type="text"],
.configure-form input[type="file"] {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(26, 33, 46, 0.85);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.configure-form input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.configure-form input[type="text"]:focus,
.configure-form input[type="file"]:focus {
  outline: none;
  border-color: #00b894;
  box-shadow: 0 0 0 2px rgba(0, 184, 148, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background-color: #00b894;
  color: #ffffff;
  box-shadow: 0 8px 16px -10px rgba(0, 184, 148, 0.8);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #00a381;
  transform: translateY(-1px);
}

.btn-danger {
  background-color: #ff6b6b;
  color: #ffffff;
  box-shadow: 0 8px 16px -10px rgba(255, 107, 107, 0.8);
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background-color: #ff5252;
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid #00b894;
  outline-offset: 2px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.form-status {
  min-height: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.card-icon-field,
.card-icon-current {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 60px;
}

.charts-card {
  background-color: #263043;
  margin-bottom: 20px;
  padding: 25px;
  box-sizing: border-box;
  -webkit-column-break-inside: avoid;
  border-radius: 5px;
  box-shadow: 0 6px 7px -4px rgba(0, 0, 0, 0.2);
}

.chart-title {
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ---------- MEDIA QUERIES ---------- */

/* Medium <= 992px */

@media screen and (max-width: 992px) {
  .grid-container {
    grid-template-columns: 1fr;
    grid-template-rows: 0.2fr 3fr;
    grid-template-areas:
      'header'
      'main';
  }

  #sidebar {
    display: none;
  }

  .menu-icon {
    display: inline;
  }

  .sidebar-title > span {
    display: inline;
  }
}

/* Small <= 768px */

@media screen and (max-width: 768px) {
  .main-cards {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 0;
  }

  .sensor-card-content {
    flex-direction: column;
    align-items: stretch;
  }

  .sensor-card-content > .sensor-card-details,
  .sensor-card-content > .card-icon-field,
  .sensor-card-content > .card-icon-current {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .card-icon-field,
  .card-icon-current {
    max-width: 100%;
  }

  .charts {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }
}

/* Extra Small <= 576px */

@media screen and (max-width: 576px) {
  .hedaer-left {
    display: none;
  }
}