@import url("https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&family=Kanit:wght@300;400;500&family=Caveat:wght@400;700&display=swap");

* {
  box-sizing: border-box;
  font-family: "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: rgba(243, 248, 239, 0.5);
  font-size: 0.95vw;
  color: #333333;
  line-height: 1.6;
}

body {
  display: flex;
  overflow-x: hidden;
}

main {
  flex: 1;
  width: calc(100% - 18%);
  max-width: 100%;
  margin-left: 18%;
  padding: 100px 0.8vw 0;
  transition: margin-left 0.3s ease, width 0.3s ease, padding-top 0.3s ease;
}

body.sidebar-collapsed main {
  margin-left: 50px;
  width: calc(100% - 50px);
}

h5 {
  font-size: 1vw;
  color: #333333;
  font-weight: 500;
  margin-bottom: 1vw;
  font-family: "PT Serif", serif;
  letter-spacing: 0.2px;
}

h3 {
  font-size: 1.4vw !important;
  color: #333333;
  font-weight: 500;
  margin-bottom: 1.2vw;
  font-family: "PT Serif", serif;
  letter-spacing: 0.3px;
}

a {
  color: #55832a;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  font-size: 1vw;
  font-weight: 400;
}

a:hover {
  color: #a72425;
  transform: scale(1.05);
}

.title_current_site {
  display: flex;
  align-items: center;
  gap: 0.5vw;
  font-size: 1.3vw;
  font-weight: 500;
  color: #55832a;
  background: #f0c0bd;
  padding: 0.5vw 1vw;
  border-radius: 4px;
  border: 1px solid #55832a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1.5vw;
  font-family: "PT Serif", serif;
  letter-spacing: 0.3px;
}

.title_current_site:hover {
  background: #f3f8ef;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.title_current_site i {
  color: #55832a;
  transition: color 0.2s ease, transform 0.2s ease;
}

.title_current_site i:hover {
  color: #55832a;
  transform: scale(1.3);
}

#info-icon {
  cursor: pointer;
  font-size: 1.1vw;
  color: #55832a;
  transition: color 0.2s ease;
}

#info-icon:hover {
  color: #ffffff;
}

#info-icon:hover::after {
  position: absolute;
  background-color: #333333;
  color: #fff;
  padding: 0.3vw 0.6vw;
  border-radius: 2px;
  top: 2vw;
  left: 1vw;
  white-space: nowrap;
  z-index: 10;
  font-size: 0.9vw;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.rotate-chevron {
  transform: rotate(180deg);
  transition: transform 0.2s ease;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark {
  background: #55832a;
  color: #ffffff !important;
  border-color: #55832a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border: 1px solid #55832a;
  border-radius: 3px;
  font-weight: 500;
  padding: 0.6vw 1.2vw;
  transition: all 0.2s ease;
  font-size: 0.95vw;
  letter-spacing: 0.2px;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-warning:hover,
.btn-info:hover,
.btn-light:hover,
.btn-dark:hover {
  background: #61942f;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #55832a;
  transform: translateY(-1px);
}

.btn-danger {
  background: #a72425;
  border-color: #a72425;
  color: #ffffff !important;
  font-size: 0.95vw;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.btn-danger:hover {
  background: #871e1f;
  border-color: #a72425;
  color: #ffffff !important;
}

.centered-arrow {
  text-align: center;
  vertical-align: middle;
}

.centered-arrow i {
  font-size: 1.4vw;
  font-weight: 500;
  color: #55832a;
}

.description {
  position: relative;
  font-size: 1vw;
  line-height: 1.6;
  background-color: #ffffff;
  padding: 1.2vw;
  border-radius: 3px;
  margin-top: 0.8vw;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.description_card {
  position: relative;
  font-size: 1vw;
  line-height: 1.6;
  background-color: #ffffff;
  padding: 1.2vw;
  border-radius: 3px;
  margin-top: 0.8vw;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info_link {
  font-size: 1vw;
  text-decoration: none;
}

.info_link:hover {
  color: #a72425;
  text-decoration: underline;
  transition: color 0.2s ease;
  font-weight: 500;
}

.custom-container {
  border-radius: 3px;
  padding: 1.4vw;
  background-color: #ffffff;
  margin-top: 1vw;
  position: relative;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.08);
  font-size: 0.95vw;
  line-height: 1.5;
  color: #333333;
  width: 100%;
  max-width: calc(100% - 0.6vw);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5vw;
}

th,
td {
  text-align: center;
  font-size: 1vw;
  color: #333333;
  padding: 0.7vw;
  vertical-align: middle;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #dee2e6;
  margin-bottom: 1vw;
}

.table thead th {
  background-color: #f5f5f5;
  color: #333333;
  position: sticky;
  top: 0;
  z-index: 10;
  font-weight: 600;
  padding: 0.9vw 0.7vw;
  border-bottom: 2px solid #dee2e6;
}

.scrollable-table-container {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  margin-bottom: 1.5vw;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bi-info-circle {
  cursor: pointer !important;
  transition: color 0.2s ease, transform 0.2s ease !important;
}

.bi-info-circle:hover {
  color: #55832a !important;
  transform: scale(1.3) !important;
}

.fas {
  font-size: 1.1vw;
  color: #333333;
  transition: color 0.2s ease, transform 0.2s ease;
}

.fas-pencil {
  font-size: 0.95vw;
  color: #55832a;
}

.fas:hover {
  color: #55832a;
  transform: scale(1.2);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.2);
  }
}

.white_icon {
  color: white;
}

#plannedDateInput,
#datePicker {
  font-size: 1vw;
  color: #333333;
  min-width: 140px;
  max-width: 100%;
  padding: 0.5vw 0.7vw;
  border: 1px solid #ced4da;
  border-radius: 3px;
}

.button-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9vw;
  justify-content: flex-start;
  padding: 1.2vw;
  background-color: #ffffff;
  align-items: flex-start;
  margin-bottom: 1.5vw;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.button-container .btn {
  flex: 1 1 calc(50% - 1vw);
  max-width: 18vw;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95vw;
}

.button-container .input-group {
  flex: 1 1 calc(50% - 1vw);
  max-width: 25vw;
}

.button-container .input-group input {
  width: -moz-fit-content;
  width: -webkit-fit-content;
  width: fit-content;
  display: inline-block;
  min-width: 8ch;
  max-width: 100%;
}

.button-container .badge {
  flex: 0 0 auto;
  margin-top: 0.5vw;
  text-align: left;
  background-color: #333333;
  color: #fff;
  padding: 0.3vw 0.6vw;
  border-radius: 2px;
  font-size: 0.85vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.input-group {
  width: 100%;
}

.form-control,
.form-control-select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"] {
  width: -moz-fit-content;
  width: -webkit-fit-content;
  width: fit-content;
  display: inline-block;
  min-width: 8ch;
  max-width: 100%;
  border-radius: 3px;
  font-size: 1vw;
  padding: 0.5vw 0.8vw;
  border: 1px solid #ced4da;
}

.modal-dialog {
  max-width: 80vw;
}

.modal-content {
  padding: 1.2vw;
  border-radius: 3px;
  border: none;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.3vw;
  display: block;
  font-size: 1vw;
  color: #333333;
}

.mb-3 {
  margin-bottom: 1.2vw;
}

.feature-tile {
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #ffffff;
  border-radius: 3px;
  transition: all 0.3s ease;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.feature-tile i {
  font-size: 2.6rem;
  margin-bottom: 18px;
  color: #55832a;
  transition: color 0.2s ease, transform 0.2s ease;
}

.feature-tile:hover i {
  color: #a72425;
  transform: scale(1.2);
}

.feature-tile h5 {
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 1.1vw;
  color: #333333;
  font-family: "PT Serif", serif;
}

.feature-tile p {
  font-size: 1vw;
  color: #555555;
  line-height: 1.4;
}

.feature-tile a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: color 0.2s ease;
}

.feature-tile a:hover {
  color: #a72425;
}

.tile-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
}

@media (min-width: 1200px) {
  .custom-container {
    max-width: calc(100% - 0.6vw);
  }

  main {
    max-width: 99%;
  }
}

@media (max-width: 992px) {
  .custom-container {
    max-width: calc(100% - 0.6vw);
    font-size: 1.1vw;
  }

  .button-container .btn {
    max-width: 22vw;
    font-size: 1vw;
  }

  h3 {
    font-size: 1.8vw !important;
  }

  h5 {
    font-size: 1.3vw;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    font-size: 1.3vw;
  }

  main {
    margin-left: 0;
    margin-top: 0;
    padding-top: 55px;
    width: 100%;
  }

  body.sidebar-collapsed main {
    margin-left: 0;
    width: 100%;
  }

  .custom-container {
    max-width: 100%;
    font-size: 3.2vw;
    padding: 1.8vw;
  }

  .button-container .btn,
  .button-container .input-group {
    flex: 1 1 100%;
    max-width: 100%;
    font-size: 3.2vw;
  }

  .button-container .badge {
    margin-top: 0.6vw;
    font-size: 2.6vw;
  }

  main {
    padding: 55px 12px 0;
    width: 100%;
    max-width: 100%;
  }

  h3 {
    font-size: 4.2vw !important;
  }

  h5 {
    font-size: 3.6vw;
  }

  .form-control,
  .form-control-select {
    width: 100%;
    font-size: 3.2vw;
  }

  .scrollable-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table td,
  .table th {
    white-space: normal;
    font-size: 3.2vw;
  }

  .description {
    font-size: 3.2vw;
  }

  .title_current_site {
    font-size: 3.6vw;
  }

  .title_current_site i {
    font-size: 3.6vw;
  }

  a {
    font-size: 3.2vw;
  }

  .info_link {
    font-size: 3.2vw;
  }

  .feature-tile h5 {
    font-size: 3.6vw;
  }

  .feature-tile p {
    font-size: 3.2vw;
  }

  .feature-tile i {
    font-size: 2.2rem;
  }

  .tile-icon {
    width: 40px;
    height: 40px;
  }

  .nav-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
  }
}

.custom-badge-dark {
  background: #333333;
  color: #ffffff !important;
  border-radius: 4px;
  padding: 0.4vw 0.8vw;
  font-size: 1vw;
  font-weight: 500;
  letter-spacing: 0.3px;
  display: inline-block;
  margin-bottom: 1vw;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 992px) {
  .custom-badge-dark {
    font-size: 1.3vw;
    padding: 0.5vw 0.9vw;
  }
}

@media (max-width: 768px) {
  .custom-badge-dark {
    font-size: 3.5vw;
    padding: 1vw 1.5vw;
  }
}

.badge-container {
  margin: 15px 0;
  display: flex;
}

.badge-container .fas {
  margin-right: 6px;
}

.modal-body .form-control,
.modal-body .form-control-select,
.modal-body input[type="text"],
.modal-body input[type="date"],
.modal-body input[type="password"],
.modal-body input[type="email"],
.modal-body input[type="search"],
.modal-body input[type="tel"],
.modal-body input[type="url"],
.modal-body input[type="number"] {
  width: 50%;
  min-width: 50%;
  display: block;
  font-size: 1vw;
  padding: 0.6vw 0.8vw;
  border-radius: 3px;
  border: 1px solid #ced4da;
  margin-bottom: 0.5vw;
}

.modal-body select {
  max-width: 150px;
  display: block;
  font-size: 1vw;
  padding: 0.6vw 0.8vw;
  border-radius: 3px;
  border: 1px solid #ced4da;
  margin-bottom: 0.5vw;
}

.modal-body .mb-3 {
  margin-bottom: 1.5vw;
}

.modal-body label {
  display: block;
  width: 100%;
  margin-bottom: 0.4vw;
  font-weight: 500;
}

.modal-body .d-flex {
  display: flex;
  gap: 0.6vw;
  align-items: center;
}

.modal-body .d-flex select {
  flex: 1;
}

.modal-body .d-flex button {
  flex-shrink: 0;
}

select {
  min-width: 120px;
}
