body {
  font-family: "Poppins", sans-serif;
  background-color: #f7f7f7;
}

/* #########################

     Modal Styling

   ########################*/

#modal {
  background-color: #60a5fa;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  max-width: 90vw;
  padding: 30px 20px;
  border-radius: 10px;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  animation-name: animatemodal;
  animation-duration: 0.4s;
  box-sizing: border-box;
}

#modal:hover {
  cursor: pointer;
  box-shadow: 0 0 10px black;
}

#modal-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /*  make it on top */
  background-color: rgba(0, 0, 0, 0.1);
}

.form-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.label {
  font-size: 1rem;
  padding: 0;
  margin: 0 0 6px 0;
  color: #fff;
}

#username,
#password {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  color: #000;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  margin-bottom: 12px;
}

#login-button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  font-size: 1rem;
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  cursor: pointer;
  box-sizing: border-box;
}

#login-button:hover {
  background: #1a56db;
  color: #fff;
}

/* #########################

     Loader Styling

   ########################*/

#loading-indicator {
  display: none;
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.7);
  align-items: center;
  justify-content: center;
}
.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #60a5fa;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  position: relative;
}
.spinner-inner {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 38px;
  height: 38px;
  border: 5px solid #1a56db;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite reverse;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.logo {
  width: 50px;
  border-radius: 8px;
  filter: brightness(0) invert(1);
}

.navbar {
  background-color: #60a5fa;
  padding: 10px;
  border-radius: 5px;
  color: white;
  animation: nav-loader 0.5s ease-in-out 1;
}

.navbar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.navbar-title {
  font-size: 1.2rem;
  margin: 0;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#user-info {
  color: white;
  font-size: 14px;
  white-space: nowrap;
}

#logout-button {
  border-radius: 5px;
  padding: 8px 14px;
  background-color: #1a56db;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

#logout-button:hover {
  background-color: #60a5fa;
  border: 1px solid #fff;
}

.navbar-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.navbar-button {
  padding: 10px;
  border-radius: 5px;
  background-color: #1a56db;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 15px;
  width: 150px;
  cursor: pointer;
  border: 1px solid transparent;
}

.navbar-button:hover {
  background-color: #3b82f6;
  border: 1px solid #fff;
}

/* User management form */
#user-form-container {
  padding: 15px 20px;
  margin: 10px 0;
}

.user-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.user-form input[type="text"],
.user-form input[type="password"] {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: bold;
}

.delete-btn {
  padding: 5px 10px;
  border-radius: 4px;
  background-color: #1a56db;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
}

.delete-btn:hover {
  background-color: #dc2626;
}

/* dashboard */
.main-container {
  grid-area: main;
  overflow-y: auto;
  padding: 20px 20px;
  color: #000;
}

.main-title {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  font-size: 10px;
  font-weight: bold;
}

.main-cards {
  align-items: center;
  justify-content: center;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin: 0 20px;
}

/* span cards styling */

.card span {
  font-size: 55px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.card p {
  font-size: 25px;
}

.card {
  display: flex;
  min-height: 200px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  padding: 30px 25px;
  border-radius: 5px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 1.5);
}

.card:first-child {
  background-color: #60a5fa;
  color: #fff;
  animation: card-loader 1s ease-in-out 1;
}

.card:nth-child(2) {
  background-color: #1a56db;
  color: #fff;
  animation: card-loader 1.5s ease-in-out 1;
}

.card:nth-child(3) {
  background-color: #60a5fa;
  color: #fff;
  animation: card-loader 2s ease-in-out 1;
}

.card:nth-child(4) {
  background-color: #1a56db;
  color: #fff;
  animation: card-loader 2.5s ease-in-out 1;
}

.card:nth-child(5) {
  background-color: #60a5fa;
  color: #fff;
  animation: card-loader 3s ease-in-out 1;
}

.card:nth-child(6) {
  background-color: #1a56db;
  color: #fff;
  animation: card-loader 3.5s ease-in-out 1;
}

.card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

/* TODO: need to change the styling of search bar and search button using ids */
#search-history {
  width: 24%;
  padding: 12px;
  border-radius: 5px;
  background-color: #fff;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

.search-live {
  margin-bottom: 10px;
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  background-color: #fff;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.search-bar2 {
  padding: 10px;
  display: none;
}

.search-button {
  width: 150px;
  padding: 10px;
  border-radius: 5px;
  background-color: #1a56db;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 15px;
  cursor: pointer;
}

.search-button2 {
  width: 150px;
  padding: 10px;
  border-radius: 5px;
  background-color: #1a56db;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 15px;
  cursor: pointer;
}

.search-button:hover {
  background-color: #3b82f6;
  border: 1px solid #fff;
}

.search-button2:hover {
  background-color: #3b82f6;
  border: 1px solid #fff;
}

.print-btn-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

.print-btn {
  width: 100px;
  padding: 5px;
  border-radius: 5px;
  background-color: #1a56db;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 13px;
  cursor: pointer;
}

.print-btn:hover {
  background-color: #3b82f6;
  border: 1px solid #fff;
}

/* Pagination controls */
#pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 10px;
}

.pagination-btn {
  padding: 5px 15px;
  border-radius: 5px;
  background-color: #1a56db;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 13px;
  cursor: pointer;
  border: none;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #3b82f6;
  border: 1px solid #fff;
}

.pagination-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#page-info {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

#no-results {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 16px;
}

h2 {
  color: #000;
  text-align: left;
  margin-left: 10px;
}

.table-container {
  text-align: left;
}

tr:nth-of-type(even) td {
  border-collapse: collapse;
  background-color: lightgray;
}

tr:last-of-type td {
  border-bottom: 2px solid #60a5fa;
}

th {
  border-bottom: 1px light gray;
  border-radius: 5px;
  border-collapse: collapse;
  color: #fff;
  background-color: #60a5fa;
  padding: 5px;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
}

td {
  border-bottom: 1px light gray;
  border-collapse: collapse;
  color: #000;
  background-color: #fff;
  padding: 5px;
}

table {
  width: 100%;
}

/* *********** ANIMATIONS *********** */
@keyframes icon-loader {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes card-loader {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes nav-loader {
  0% {
    opacity: 0;
    transform: translateY(-100px);
  }

  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

/* *********** MEDIA QUERIES *********** */
/* @media only screen and (max-width: 940px) { */
/*   .main-cards .navbar { */
/*     grid-template-columns: 1fr; */
/*     margin: 0 10px; */
/*   } */
/* } */
/**/
/* @media only screen and (max-width: 700px) { */
/*   .main-cards .navbar { */
/*     grid-template-columns: 1fr; */
/*     margin: 0 10px; */
/*   } */
/* } */

@media only screen and (max-width: 768px) {
  .navbar-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .navbar-user {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 4px;
  }

  .navbar-title {
    font-size: 1rem;
  }

  .navbar-list {
    justify-content: center;
  }

  .navbar-button {
    width: 100%;
    text-align: center;
    font-size: 14px;
  }

  .search-bar {
    flex-direction: column;
    gap: 10px;
  }

  .search-bar #search-history {
    width: 100%;
  }
}

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

  .logo {
    width: 40px;
  }

  .navbar-button {
    font-size: 13px;
    padding: 10px;
  }

  .print-btn {
    display: none;
  }

  .card span {
    font-size: 35px;
  }

  .card {
    min-height: auto;
    padding: 20px 15px;
  }

  th, td {
    font-size: 12px;
    padding: 3px;
  }
}

/* #########################

     Modal Animation

   ########################*/

@keyframes animatemodal {
  from {
    top: -300px;
    opacity: 0;
  }

  to {
    top: 50%;
    opacity: 1;
  }
}
