* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Ubuntu", sans-serif;
}

:root {
  --blue: #8a16f0;
  --white: #fff;
  --grey: #f5f5f5;
  --black1: #222;
  --black2: #999;
  --green: #40ed31;
  --red: #f00;
  --yellow: #fdff00;
  --boxshadow: rgba(0, 0, 0, 0.3);
}

/* body */
body {
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  position: relative;
  width: 100%;
}

/* navbar */
.navbar {
  position: fixed;
  width: 300px;
  height: 100%;
  background: var(--blue);
  border-left: 10px solid var(--blue);
  transition: 0.5s;
  overflow: hidden;
}

.navbar.active {
  width: 80px;
}

.navbar ul {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.navbar ul li {
  position: relative;
  width: 100%;
  list-style: none;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
}

.navbar ul li.selected {
  background: var(--white);
}

.navbar ul li:first-child {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 40px;
  pointer-events: none;
}

.navbar ul li a {
  position: relative;
  display: block;
  width: 100%;
  display: flex;
  text-decoration: none;
  color: var(--white);
}

.navbar ul li.selected a {
  color: var(--blue);
}

.navbar ul li a .icon {
  position: relative;
  display: block;
  min-width: 60px;
  height: 60px;
  line-height: 70px;
  text-align: center;
}

.navbar ul li a .icon ion-icon {
  font-size: 20px;
}

.navbar ul li a .title {
  position: relative;
  display: block;
  padding: 0 10px;
  height: 60px;
  line-height: 60px;
  text-align: start;
  white-space: nowrap;
}

.navbar .footer {
  bottom: 10px;
  position: absolute;
  white-space: nowrap;
  color: var(--white);
}

/* curve outside */
.navbar ul li.selected a::before {
  content: "";
  position: absolute;
  right: 0;
  top: -50px;
  width: 50px;
  height: 50px;
  background: transparent;
  border-radius: 50%;
  box-shadow: 35px 35px 0 10px var(--white);
  pointer-events: none;
}

.navbar ul li.selected a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -50px;
  width: 50px;
  height: 50px;
  background: transparent;
  border-radius: 50%;
  box-shadow: 35px -35px 0 10px var(--white);
  pointer-events: none;
}

/* main */
.main {
  position: absolute;
  width: calc(100% - 300px);
  left: 300px;
  min-height: 100vh;
  background: var(--white);
  transition: 0.5s;
}

.topbar {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.main.active {
  width: calc(100% - 80px);
  left: 80px;
}

.toggle {
  position: relative;
  top: 0;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5em;
  cursor: pointer;
}

/* header-title */
.header-title {
  font-size: 15px;
  color: var(--black2);
}

.user {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}
.user img {
  position: absolute;
  top: 0;
  left: 0;
  width: 1005;
  height: 100%;
  object-fit: cover;
}

/* card */
.cardBox {
  position: relative;
  width: 100%;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 30px;
}

.cardBox .card {
  position: relative;
  background: var(--white);
  padding: 30px;
  border-radius: 20px;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 7px 25px var(--boxshadow);
}

.cardBox .card .numbers {
  position: relative;
  font-weight: 500;
  font-size: 2em;
  color: var(--blue);
}

.cardBox .card .cardName {
  color: var(--black2);
  font-size: 1.1em;
  margin-top: 5px;
}

.cardBox .card .iconBox {
  color: var(--black2);
  font-size: 3em;
}

.cardBox .card:hover {
  background: var(--blue);
}

.cardBox .card:hover .numbers,
.cardBox .card:hover .cardName,
.cardBox .card:hover .iconBox {
  color: var(--white);
}

/* camera and details */
.data-body {
  position: relative;
  width: 100%;
  padding: 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-gap: 30px;
}

/* camera */
.data-body .camera {
  position: relative;
  display: grid;
  white-space: nowrap;
  min-height: 400px;
  background: var(--white);
  padding: 20px;
  box-shadow: 0 7px 25px var(--boxshadow);
  border-radius: 20px;
}

.cardHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cardHeader h2 {
  font-weight: 600;
  color: var(--blue);
}

.camera button {
  border: none;
  outline: none;
  position: relative;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 16px;
  background: var(--blue);
  color: var(--white);
  cursor: pointer;
}

.camera img {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  margin: 10px auto 0;
  object-fit: cover;
}

/* details */
.details {
  position: relative;
  display: grid;
  white-space: nowrap;
  min-height: 400px;
  padding: 20px;
  background: var(--white);
  box-shadow: 0 7px 25px var(--boxshadow);
  border-radius: 20px;
}

.details table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.details table thead tr th,
.details table tbody tr td {
  padding: 10px 5px;
  text-align: start;
}

.details table thead tr th {
  font-weight: 600;
}

.details table tr {
  color: var(--black1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.details table tbody tr:last-child {
  border-bottom: none;
}

.details .status {
  padding: 5px 10px;
  border-radius: 10px;
  width: fit-content;
}

.details .status.bad {
  background: var(--red);
}

.details .status.good {
  background: var(--yellow);
}

.details .status.great {
  background: var(--green);
}

/* response design */
@media (max-width: 900px) {
  .navbar {
    left: -300px;
  }
  .navbar.active {
    width: 300px;
    left: 0;
  }
  .main {
    width: 100%;
    left: 0;
  }
  .main.active {
    left: 300px;
  }
  .cardBox {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .data-body {
    grid-template-columns: repeat(1, 1fr);
  }
  .camera {
    overflow-x: auto;
  }
  .details {
    overflow-x: auto;
  }
}

@media (max-width: 400px) {
  .cardBox {
    grid-template-columns: repeat(1, 1fr);
  }
  .cardHeader h2 {
    font-size: 20px;
  }
}
