@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600&display=swap');

:root {
  --font-kranit: 'Kanit', sans-serif;
  --shadow-1: 2px 2px 8px rgba(0, 0, 0, 0.05);
  --background-screen: #F0F2F5;
  --background-hover: #F5F6F8;
  --color-black: #141415;
  --color-dark: #7d8da1;
  --color-light: #dce1eb;
  --color-font: #344767;
  --color-danger: #f97c7c;
  --color-danger-variant: #ee6969;
  --color-success: #90f0b4;
  --color-success-variant: #80e5a6;
  --color-primary: #7380ec;
  --color-primary-variant: #4C559D;

  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-decoration: none;
  list-style: none;
  font-family: var(--font-kranit);
}

.hide {
  display: none;
}

.container {
  display: flex;
}

.row {
  display: flex;
  flex-wrap: wrap;
}

.cl-auto {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}

.cl-1 {
  flex: 0 0 8.33333%;
  max-width: 8.33333%;
}

.cl-2 {
  flex: 0 0 16.66667%;
  max-width: 16.66667%;
}

.cl-3 {
  flex: 0 0 25%;
  max-width: 25%;
}

.cl-4 {
  flex: 0 0 33.33333%;
  max-width: 33.33333%;
}

.cl-5 {
  flex: 0 0 41.66667%;
  max-width: 41.66667%;
}

.cl-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.cl-7 {
  flex: 0 0 58.33333%;
  max-width: 58.33333%;
}

.cl-8 {
  flex: 0 0 66.66667%;
  max-width: 66.66667%;
}

.cl-9 {
  flex: 0 0 75%;
  max-width: 75%;
}

.cl-10 {
  flex: 0 0 83.33333%;
  max-width: 83.33333%;
}

.cl-11 {
  flex: 0 0 91.66667%;
  max-width: 91.66667%;
}

.cl-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.box {
  border: 1px solid black;
  height: 10px;
}

.material-symbols-rounded {
  font-variation-settings:
    'FILL' 1,
    'wght' 400,
    'GRAD' 0,
    'opsz' 48
}

.selection {
  background-color: var(--color-light);
}

.dark {

  transition: var(--transition);
}

.dark:hover {
  background-color: var(--color-light);
}

.danger {
  color: white;
  background-color: var(--color-danger);
  transition: var(--transition);
}

.danger:hover {
  background-color: var(--color-danger-variant);
}

.success {
  color: white;
  background-color: var(--color-success);
  transition: var(--transition);
}

.success:hover {
  background-color: var(--color-success-variant);
}

.primary {
  color: white;
  background-color: var(--color-primary);
  transition: var(--transition);
}

.primary:hover {
  background-color: var(--color-primary-variant);
}


html,
body {
  height: 100%;
  width: 100%;
}

/* Screen */
.screen {
  height: 100%;
  width: 100%;
  background-color: var(--background-screen);
  overflow-y: hidden;
}

/* Navbar Section */
.navbar-sec {
  display: flex;
  height: 100%;
  padding: 1rem;
}

.navbar-sec .navbar {
  height: 100%;
  width: 100%;
  box-shadow: var(--shadow-1);
  padding: 1rem 0.7rem;
  border-radius: 1rem;
  background-color: white;
}

.navbar-sec .navbar .logo {
  display: flex;
  justify-content: center;
  width: 100%;
  height: fit-content;
  padding: 1rem 0;
}

.navbar-sec .navbar img {
  width: 9.6rem;
  cursor: pointer;
}

.navbar-sec .navbar hr {
  margin: 2rem 1.5rem;
  border: 1px solid var(--color-light);
}

.navbar-sec .navbar nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.navbar-sec .navbar nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  font-size: 1.2rem;
  font-weight: 500;
  border-radius: 0.5rem;
  color: var(--color-font);
  transition: var(--transition);
}

.navbar-sec .navbar nav span {
  font-size: 2rem;
  font-weight: 600;
}

.navbar-sec .navbar nav a:hover {
  background-color: var(--background-hover);
}

.navbar-sec .navbar nav a.active {
  background-color: #3C96EF;
  color: white;
}


/* Spacd Section */
.space-sec {
  height: 100%;
  width: 80%;
  padding: 1rem;
  padding-right: 2.3rem;
}

/* Top */
.space-sec .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-dark);
  padding: 1rem 0;
}

.space-sec .top h2 {
  font-size: 2.5rem;
}

.space-sec .top>input,
.space-sec .top>div input,
.space-sec .main .display .bottable input {
  padding: 0.4rem 0.7rem;
  width: 17rem;
  font-size: 1rem;
  border-radius: 0.7rem;
  border: none;
  box-shadow: var(--shadow-1);
}

.space-sec .top>div {
  display: flex;
  gap: 1rem;
}

.space-sec .top>div input {
  width: 10rem;
  text-align: center;
  font-weight: 600;
}

/* Main */
.space-sec .main {
  display: grid;
  grid-template-columns: 75% 25%;
  gap: 2rem;
  height: 100%;
}

/* Table */
.space-sec .main .table,
.space-sec .main .display {
  height: 85%;
  /* overflow-y: hidden; */
}

.space-sec .main .display {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.space-sec .main .display .info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.space-sec .main .display .info>div {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.space-sec .main .display .info div .chem-info {
  height: 100%;
  /* box-shadow: var(--shadow-1); */
  display: grid;
  grid-template-rows: 50% 50%;
  border-radius: 1.3rem;
  background-color: white;
}

.space-sec .main .display .info div .chem-info .info-text {
  display: grid;
  grid-template-columns: auto auto;
  align-self: center;
}

.space-sec .main .display .info div .chem-info .info-text .row {
  display: flex;
  flex-direction: column;
  text-align: start;
}

.space-sec .main .display .info div .chem-info .info-text .row:first-child {
  justify-self: center;
}

.space-sec .main .display .info div .chem-info .info-text .row:last-child {
  justify-self: start;
  text-align: start;
  text-overflow: ellipsis;

}

.space-sec .main .display .info div .chem-info .info-text .row h2 {
  text-overflow: ellipsis;
}

.space-sec .main .display .info div .chem-info .file-row {
  display: flex;
  align-self: center;
  justify-content: space-evenly;
  text-align: center;
  /* background-color: #344767; */
}



.space-sec .main .display .info div .chem-info .row p {
  font-size: 1.2rem;
  font-weight: 600;
}

.space-sec .main .display .info div .chem-info .file-row .chem-file {
  border: 1px solid var(--color-light);
  background-color: white;
  padding: 1.7rem;
  transition: var(--transition);
  cursor: pointer;
}

.space-sec .main .display .info div .chem-info .file-row .chem-file:hover {
  background-color: var(--color-light);
  box-shadow: var(--shadow-1);
}

.space-sec .main .display .info .in-out,
.space-sec .main .display .info .in-out div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.space-sec .main .display .info .in-out table {
  border-collapse: collapse;
  text-align: center;
}

.space-sec .main .display .info .in-out table thead {
  background-color: var(--color-success);
  color: white;
}

.space-sec .main .display .info .in-out > div:last-child table thead {
  background-color: var(--color-danger);
  color: white;
}

.space-sec .main .display .info .in-out table tbody {
  background-color: white;
}

.space-sec .main .display .info .in-out table tbody {
  display: block;
  height: 6.7vw;
  overflow-y: scroll;
  overflow-x: hidden;
}

.space-sec .main .display .info .in-out table thead,
.space-sec .main .display .info .in-out table tbody tr {
  display: table;
  table-layout: fixed;
  width: 28vw;
}

.space-sec .main .display .info .in-out table tbody tr td {
  padding: 0.2rem 0;
}

.space-sec .main .display .info .in-out table tbody tr td:nth-child(3) {
  text-align: end;
}

.space-sec .main .display>.bottable {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  height: calc(100% - 50%);
}

.space-sec .main .table table,
.space-sec .main .display .bottable table {
  border-collapse: collapse;
  width: 100%;
  height: 100%;
  background-color: white;
  box-shadow: var(--shadow-1);
  border-radius: 1rem;
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

.space-sec .main .display .bottable>table {
  height: calc(100% - 1.4rem);
}

.space-sec .main .table table tbody,
.space-sec .main .display .bottable>table tbody {
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: block;
  width: 100%;
  height: calc(100% - 7.7%);
}

.space-sec .main .display .bottable>table tbody {
  height: calc(100% - 17%);
}

.space-sec .main .table table tbody::-webkit-scrollbar,
.space-sec .main .display .bottable>table tbody::-webkit-scrollbar {
  display: none;
}

.space-sec .main .table table thead,
.space-sec .main .table table tbody tr,
.space-sec .main .display .bottable>table thead,
.space-sec .main .display .bottable>table tbody tr {
  display: table;
  table-layout: fixed;
  width: 100%;
}

.space-sec .main .table table tr,
.space-sec .main .table table td,
.space-sec .main .table table th,
.space-sec .main .display .bottable>table tr,
.space-sec .main .display .bottable>table td,
.space-sec .main .display .bottable>table th {
  border-bottom: 1px solid var(--color-light);
  text-align: center;
  padding: 1rem;
  transition: var(--transition);
}

.space-sec .main .table table td:nth-child(2),
.space-sec .main .table table td:nth-child(3),
.space-sec .main .table table th:nth-child(2),
.space-sec .main .display .bottable>table td:nth-child(2),
.space-sec .main .display .bottable>table th:nth-child(2),
.space-sec .main .display .bottable>table td:nth-child(3),
.space-sec .main .display .bottable>table th:nth-child(3) {
  text-align: start;
}

.space-sec .main .table table td:nth-child(4) {
  text-align: end;
}

.space-sec .main .table table tr:last-child td,
.space-sec .main .table table tr:last-child,
.space-sec .main .display .bottable>table tr:last-child td,
.space-sec .main .display .bottable>table tr:last-child {
  border-bottom: none;
}

.space-sec .main .table table tbody tr:hover,
.space-sec .main .display .bottable>table tbody tr:hover {
  background-color: var(--color-light);
}

.space-sec .main .table table thead,
.space-sec .main .display .bottable>table thead {
  font-size: 1.3rem;
  background-color: #3C96EF;
  color: white;
}



.space-sec .main .console {
  display: flex;
  flex-direction: column;
  background-color: white;
  height: 85%;
  border-radius: 1rem;
  box-shadow: var(--shadow-1);
  padding: 1rem 1.5rem;
  gap: 1rem;
}

.space-sec .main .console h1 {
  text-align: center;
  font-size: 3rem;
  color: var(--color-font);
}

.space-sec .main .console form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 0;
  font-size: 1.3rem;
  color: var(--color-font);
}

.space-sec .main .console .form-row {
  display: flex;
  justify-content: space-between;
}

.space-sec .main .console form input[type='number'] {
  border-radius: 0.5rem;
  padding: 1px;
  width: 6rem;
  text-align: end;
  border: 1px solid var(--color-dark);
}

.space-sec .main .console form input[type='text'] {
  border-radius: 0.5rem;
  padding: 1px;
  text-align: center;
  border: 1px solid var(--color-dark);
}

.space-sec .main .console form #name {
  text-align: start;
  width: 15rem;
  padding: 0 0.3rem;
}

.space-sec .main .console button {
  border: none;
  cursor: pointer;
  padding: 7px;
  font-size: 1rem;
}

.space-sec .main .console form table {
  padding: 0.7rem 0.1rem;
  font-size: 1rem;
  text-align: center;
  background-color: var(--background-screen);
}

.space-sec .main .console form table tr td:nth-child(3) {
  text-align: end;
}

/* Chart */

.space-sec .db {
  display: flex;
  flex-direction: column;
  gap: 1.5vw;
  height: 100%;
  width: 100%;
}

.space-sec .db .card-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.space-sec .db .card-container .card {
  display: flex;
  position: relative;
  align-items: center;
  background-color: white;
  box-shadow: var(--shadow-1);
  padding: 1rem 1.3rem;
  width: 20vw;
  border-radius: 1rem;
}

.space-sec .db .card-container .card::before {
  content: '';
  position: absolute;
  background-color: var(--color-primary);
  left: 0;
  height: 100%;
  width: 0.6vw;
}

.space-sec .db .card-container .card:nth-child(2):before {
  background-color: var(--color-success-variant);
}

.space-sec .db .card-container .card:nth-child(3):before {
  background-color: var(--color-danger-variant);
}

.space-sec .db .card-container .card>p {
  font-size: 3rem;
  font-weight: 600;
  color: var(--color-primary);
}

.space-sec .db .card-container .card:nth-child(2)>p {
  color: var(--color-success-variant);
}

.space-sec .db .card-container .card:nth-child(3)>p {
  color: var(--color-danger-variant);
}

.space-sec .db .card-container .card div {
  display: flex;
  flex-direction: column;
  margin-right: auto;
  gap: 0.5rem;
}

.space-sec .db .chart-sec {
  height: 100%;
  width: 100%;
  padding-bottom: 2vw;
}

.space-sec .db .chart-container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  box-shadow: var(--shadow-1);
  background-color: white;
}

.space-sec .db .chart-container>p {
  position: absolute;
  top: 0.7vw;
  right: 1.5vw;
  color: var(--color-dark);
}

.space-sec .db .chart-container .page-control {
  display: flex;
  gap: 1rem;
}

.disabled {
  pointer-events: none;
  color: var(--color-dark);
  cursor: default;
}

/* .space-sec .db .chart-container select {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
} */

.space-sec .db .chart-container .chart {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 80%;
  /* background-color: #344767; */
}

.modal-container {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-container .modal {
  position: relative;
  padding: 2.5rem;
  height: 30rem;
  width: 50rem;
  background-color: white;
}

.modal-container .modal span {
  position: absolute;
  font-size: 3rem;
  right: 1.3rem;
  top: 0;
  cursor: pointer;
  transition: var(--transition);
}

.modal-container .modal span:hover {
  transform: scale(1.5);
}