body {
  font-family: "Prompt", sans-serif !important;
}
html,
body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
  /* ขยายพื้นที่ที่เหลืออยู่ */
}

h6,
.h6,
h5,
.h5,
h4,
.h4,
h3,
.h3,
h2,
.h2,
h1,
.h1 {
  font-family: "Prompt", sans-serif;
  font-weight: 500;
  line-height: 1.2;
  color: #003a66;
}

/*** Button Start ***/
.btn {
  font-weight: 600;
  transition: 0.5s;
}

.btn-square {
  width: 32px;
  height: 32px;
}

.btn-sm-square {
  width: 34px;
  height: 34px;
}

.btn-md-square {
  width: 44px;
  height: 44px;
}

.btn-lg-square {
  width: 56px;
  height: 56px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
  border-radius: 50%;
}

.btn.btn-primary {
  background: #2e0099 !important;
  color: var(--bs-white) !important;
  font-family: "Prompt", sans-serif;
  font-weight: 400;
  transition: 0.5s;
}

.btn.btn.btn-primary:hover {
  background: var(--bs-secondary) !important;
  color: var(--bs-secondary);
  border: 1px solid var(--bs-secondary);
}

.btn.btn-secondary {
  background: #5c5c5c;
  color: var(--bs-white);
  font-family: "Prompt", sans-serif;
  font-weight: 400;
  border: none;
  transition: 0.5s;
}

.btn.btn-secondary:hover {
  background: var(--bs-dark) !important;
  color: var(--bs-white) !important;
}

/*** news start ***/
.card {
  --adm-card-spacer-y: 1.5rem;
  --adm-card-spacer-x: 1.5rem;
  --adm-card-title-spacer-y: 1rem;
  --adm-card-border-width: 0px;
  --adm-card-border-color: var(--adm-gray-200);
  --adm-card-border-radius: 0.75rem;
  --adm-card-box-shadow: 0px 4px 32px 0px rgba(0, 0, 0, 0.1);
  --adm-card-inner-border-radius: calc(0.75rem - 1px);
  --adm-card-cap-padding-y: 1.5rem;
  --adm-card-cap-padding-x: 1.5rem;
  --adm-card-cap-bg: var(--adm-card-cap-bg);
  --adm-card-cap-color: ;
  --adm-card-height: ;
  --adm-card-color: ;
  --adm-card-bg: #fff;
  --adm-card-img-overlay-padding: 1rem;
  --adm-card-group-margin: 1rem;
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  min-width: 0;
  height: var(--adm-card-height);
  word-wrap: break-word;
  background-color: var(--adm-card-bg);
  background-clip: border-box;
  border: var(--adm-card-border-width) solid var(--adm-card-border-color);
  border-radius: var(--adm-card-border-radius);
  -webkit-box-shadow: var(--adm-card-box-shadow);
  box-shadow: var(--adm-card-box-shadow);
}

.card > hr {
  margin-right: 0;
  margin-left: 0;
}

.card > .list-group {
  border-top: inherit;
  border-bottom: inherit;
}

.card > .list-group:first-child {
  border-top-width: 0;
  border-top-left-radius: var(--adm-card-inner-border-radius);
  border-top-right-radius: var(--adm-card-inner-border-radius);
}

.card > .list-group:last-child {
  border-bottom-width: 0;
  border-bottom-right-radius: var(--adm-card-inner-border-radius);
  border-bottom-left-radius: var(--adm-card-inner-border-radius);
}

.card > .card-header + .list-group,
.card > .list-group + .card-footer {
  border-top: 0;
}

.card-body {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: var(--adm-card-spacer-y) var(--adm-card-spacer-x);
  color: var(--adm-card-color);
}

.card-title {
  margin-bottom: var(--adm-card-title-spacer-y);
}

.card-subtitle {
  margin-top: calc(-0.5 * var(--adm-card-title-spacer-y));
  margin-bottom: 0;
}

.card-text:last-child {
  margin-bottom: 0;
}

.card-link:hover {
  text-decoration: none;
}

.card-link + .card-link {
  margin-left: var(--adm-card-spacer-x);
}

.card-header {
  padding: var(--adm-card-cap-padding-y) var(--adm-card-cap-padding-x);
  margin-bottom: 0;
  color: var(--adm-card-cap-color);
  background-color: var(--adm-card-cap-bg);
  border-bottom: var(--adm-card-border-width) solid var(--adm-card-border-color);
}

.card-header:first-child {
  border-radius: var(--adm-card-inner-border-radius)
    var(--adm-card-inner-border-radius) 0 0;
}

.card-footer {
  padding: var(--adm-card-cap-padding-y) var(--adm-card-cap-padding-x);
  color: var(--adm-card-cap-color);
  background-color: var(--adm-card-cap-bg);
  border-top: var(--adm-card-border-width) solid var(--adm-card-border-color);
}

.card-footer:last-child {
  border-radius: 0 0 var(--adm-card-inner-border-radius)
    var(--adm-card-inner-border-radius);
}

.card-header-tabs {
  margin-right: calc(-0.5 * var(--adm-card-cap-padding-x));
  margin-bottom: calc(-1 * var(--adm-card-cap-padding-y));
  margin-left: calc(-0.5 * var(--adm-card-cap-padding-x));
  border-bottom: 0;
}

.card-header-tabs .nav-link.active {
  background-color: var(--adm-card-bg);
  border-bottom-color: var(--adm-card-bg);
}

.card-header-pills {
  margin-right: calc(-0.5 * var(--adm-card-cap-padding-x));
  margin-left: calc(-0.5 * var(--adm-card-cap-padding-x));
}

.card-img-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding: var(--adm-card-img-overlay-padding);
  border-radius: var(--adm-card-inner-border-radius);
}

.card-img,
.card-img-top,
.card-img-bottom {
  width: 100%;
}

.card-img,
.card-img-top {
  border-top-left-radius: var(--adm-card-inner-border-radius);
  border-top-right-radius: var(--adm-card-inner-border-radius);
}

.card-img,
.card-img-bottom {
  border-bottom-right-radius: var(--adm-card-inner-border-radius);
  border-bottom-left-radius: var(--adm-card-inner-border-radius);
}

.card-group > .card {
  margin-bottom: var(--adm-card-group-margin);
}

@media (min-width: 576px) {
  .card-group {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
  }

  .card-group > .card {
    -webkit-box-flex: 1;
    -ms-flex: 1 0 0%;
    flex: 1 0 0%;
    margin-bottom: 0;
  }

  .card-group > .card + .card {
    margin-left: 0;
    border-left: 0;
  }

  .card-group > .card:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .card-group > .card:not(:last-child) .card-img-top,
  .card-group > .card:not(:last-child) .card-header {
    border-top-right-radius: 0;
  }

  .card-group > .card:not(:last-child) .card-img-bottom,
  .card-group > .card:not(:last-child) .card-footer {
    border-bottom-right-radius: 0;
  }

  .card-group > .card:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  .card-group > .card:not(:first-child) .card-img-top,
  .card-group > .card:not(:first-child) .card-header {
    border-top-left-radius: 0;
  }

  .card-group > .card:not(:first-child) .card-img-bottom,
  .card-group > .card:not(:first-child) .card-footer {
    border-bottom-left-radius: 0;
  }
}

.card-link {
  position: relative;
  overflow: hidden;
}

.card-link:hover {
  transform: scale(1.035);
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.25);
}

.card-link:hover .card-img {
  transform: scale(1.075);
}

.card-img {
  height: 100%;
}

.card-img-glass.card-img-glass-top {
  top: 0;
  left: 0;
  right: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.card-img-glass.card-img-glass-bottom {
  left: 0;
  right: 0;
  bottom: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.card-img-glass {
  position: absolute;
  padding: var(--adm-card-img-overlay-padding);
  border-radius: var(--adm-card-inner-border-radius);
  background: rgba(20, 30, 70, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
}

.card-header-modal {
  padding: 0.5rem 0.5rem;
  margin-bottom: 0;
  color: white;
  background-color: #2e0099;
  border-bottom: var(--adm-card-border-width) solid var(--adm-card-border-color);
}
.card-header-modal:first-child {
  border-radius: var(--adm-card-inner-border-radius)
    var(--adm-card-inner-border-radius) 0 0;
}

/* Custom CSS */
.navbar-custom {
  background-color: #800020; /* สีแดงเลือดหมู */
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* Navbar hover effect */
.navbar-custom:hover {
  background-color: #990024; /* สีแดงเข้ม */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.navbar-custom .navbar-brand {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s ease-in-out;
}

/* Brand hover underline animation */
.navbar-custom .navbar-brand::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background-color: #ffccd5;
  transition: width 0.4s ease;
  position: absolute;
  bottom: -5px;
  left: 0;
}

.navbar-custom .navbar-brand:hover::after {
  width: 100%;
}

.navbar-custom .navbar-brand:hover {
  color: #ffccd5;
}

/* Custom CSS for Footer */
.footer-custom {
  background-color: #800020; /* สีแดงเลือดหมู */
  color: #ffffff;
  padding: 1rem 0;
  font-size: 0.9rem;
  border-top: 3px solid #ffccd5; /* เส้นขอบสีชมพูอ่อน */
}

.footer-custom p {
  margin: 0;
  font-weight: 500;
}

.footer-custom a {
  color: #ffccd5;
  text-decoration: none;
}

.footer-custom a:hover {
  text-decoration: underline;
  color: #ffa3b1; /* สีชมพูเข้มเมื่อโฮเวอร์ */
}

@media (max-width: 768px) {
  .footer-custom {
    text-align: center;
  }
  .footer-custom .text-md-start,
  .footer-custom .text-md-end {
    text-align: center !important;
  }
}

/* Custom Secondary Navbar */
.navbar-secondary {
  display: flex;
  justify-content: flex-end; /* จัดปุ่มให้อยู่ด้านขวา */
  padding-top: 5px;
  margin-top: 1rem; /* เพิ่มระยะห่างจาก Navbar หลัก */
}

/* Back Button */
.btn-back {
  color: #ffffff;
  background-color: #800020; /* สีแดงเลือดหมู */
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-back i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.btn-back:hover {
  background-color: #990024; /* สีแดงเข้มเมื่อโฮเวอร์ */
  transform: translateY(-2px); /* ยกปุ่มขึ้นเล็กน้อย */
  color: rgb(255, 245, 227);
}

.username {
  font-size: 1rem;
  color: #ffffff;
}

/* togglestatus*/
.btn-toggle-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 2px solid;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.btn-toggle-on {
  border-color: green;
  background-color: rgba(0, 255, 0, 0.1);
  color: green;
}

.btn-toggle-off {
  border-color: red;
  background-color: rgba(255, 0, 0, 0.1);
  color: red;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-switch {
  width: 40px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 50px;
  position: relative;
  background-color: transparent;
  transition: all 0.3s ease-in-out;
}

.toggle-switch::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: currentColor;
  transform: translateY(-50%);
  transition: all 0.3s ease-in-out;
}

input[type="checkbox"].toggle-status:checked + .toggle-switch {
  background-color: rgba(0, 255, 0, 0.2);
}

input[type="checkbox"].toggle-status:checked + .toggle-switch::before {
  left: calc(100% - 16px);
  background-color: green;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* เพิ่ม scroll bar ชัดเจน */
.table-responsive {
  overflow-x: auto;
  /* เปิดการเลื่อนแนวนอน */
  -webkit-overflow-scrolling: touch;
}

/* ปรับแต่ง scroll bar */
.table-responsive::-webkit-scrollbar {
  height: 8px;
  /* ความสูงของ scroll bar */
}

.table-responsive::-webkit-scrollbar-thumb {
  background-color: #007bff;
  /* สี scroll bar */
  border-radius: 5px;
  /* มุมมน */
}

.table-responsive::-webkit-scrollbar-track {
  background-color: #f1f1f1;
  /* สีพื้นหลังของ scroll bar */
}

.action-buttons {
  white-space: nowrap; /* ห้ามข้อความในคอลัมน์ตัดบรรทัด */
}

.action-buttons button,
.action-buttons form {
  display: inline-block; /* จัดให้ทุกปุ่มในคอลัมน์อยู่บรรทัดเดียวกัน */
}
