@font-face {
  font-family: "Kanit";
  src: url("Kanit-Regular.ttf");
}
@font-face {
  font-family: "Sriracha";
  src: url("Sriracha-Regular.ttf");
}

html {
  font-size: clamp(12px, 1.5vw + 8px, 16px);
}
body {
  margin: 0;
  padding: 0;
  font-family: "Kanit", sans-serif;
}
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.swal2-backdrop-show {
  background: rgba(0, 0, 0, 0.3) url("../img/bg-alert.jpg") center / cover
    no-repeat !important;
}
.swal2-popup {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(2px);
}

/* อยู่ใน header.php */

.download-section {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
}
.file-item {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  background: white;
  transition: all 0.3s ease;
}
.file-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.file-icon {
  font-size: 2rem;
  margin-right: 15px;
}
.pdf-icon {
  color: #dc3545;
}
.ppt-icon {
  color: #fd7e14;
}
.download-btn {
  transition: all 0.3s ease;
}
.download-btn:hover {
  transform: scale(1.05);
}
/* จบ header.php */

/* อยู่ใน menu.php */
.menu-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 5.125rem;
  width: 100%;
  z-index: 100;
  background: #ffffff;
  box-shadow: 0 4px 4px green;
}
.logo-img {
  height: 3.5rem;
  padding: 0;
  margin: 0;
}
.nav-link {
  font-size: 1.1rem;
  font-weight: bold;
  color: #198754;
}
/* จบ menu.php */

/* อยู่ใน banner.php - footer.php */
.banner-fixed {
  position: fixed;
  top: 5.125rem;
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100vh - 5.125rem - 4.625rem);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}
.banner-content {
  padding-left: 4rem;
}
.banner-title-small {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 4.5rem);
}
.banner-title-large {
  font-size: clamp(2rem, 5vw + 1rem, 4.5rem);
}
.text-shadow-blue {
  text-shadow: 3px 3px blue;
  color: white;
}
.text-shadow-red {
  text-shadow: 3px 3px red;
  color: white;
}

.text-form-header {
  color: blue;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 4.625rem;
  z-index: 100;
  background-color: #222;
  color: white;
  padding: 0;
  border-top: 2px solid rgba(108, 117, 125, 0.2);
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* Optional: เพิ่ม margin สำหรับ body เพื่อไม่ให้เนื้อหาถูกบัง */
body {
  margin-bottom: 4.625rem;
}
/* จบใน banner.php - footer.php */

/* backgroun ทั้งหมด */
.bg-banner {
  background-image: url("../img/bg-banner.jpg");
}
.bg-banner-1 {
  background-image: url("../img/bg-banner-1.jpg");
}
.bg-banner-2 {
  background-image: url("../img/bg-banner-2.jpg");
}
.bg-login {
  background-image: url("../img/bg-login.jpg");
}
.bg-register {
  background-image: url("../img/bg-register.jpg");
}
.bg-admin-index {
  background-image: url("../img/bg-admin-index.jpg");
}
.bg-admin-member {
  background-image: url("../img/bg-admin-member.jpg");
}
.bg-dashboard {
  background-image: url("../img/bg-member-dashboard.jpg");
}
.bg-patient {
  background-image: url("../img/bg-member-patient.jpg");
}
.bg-lab {
  background-image: url("../img/bg-member-lab.jpg");
}
.bg-pkpi {
  background-image: url("../img/bg-member-pkpi.jpg");
}
.bg-qkpi {
  background-image: url("../img/bg-member-qkpi.jpg");
}
.bg-other {
  background-image: url("../img/bg-member-other.jpg");
}
.bg-kpi-pkpi {
  background-image: url("../img/bg-kpi-pkpi.jpg");
}
.bg-kpi-qkpi {
  background-image: url("../img/bg-kpi-qkpi.jpeg");
}
.bg-member-member {
  background-image: url("../img/bg-member-member.jpg");
}
.bg_block_pkpi {
  background: linear-gradient(to right, #da4453, #89216b);
}
.bg_block_qkpi {
  background: linear-gradient(to right, #000046, #1cb5e0);
}
.bg_kpi_block_event {
  padding: 20px;
  background: linear-gradient(to right, #8360c3, #2ebf91);
}
.bg_kpi_block_odd {
  padding: 20px;
  background: linear-gradient(to right, #eecda3, #ef629f);
}

/* กรอบหลัก เต็มจอ เว้น menu-footer */
.content-section {
  position: fixed;
  top: 5.125rem;
  bottom: 4.625rem;
  left: 0;
  right: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: auto;
  scrollbar-color: rgba(80, 80, 80, 0.7) rgba(0, 0, 0, 0.05);
  scroll-behavior: smooth;
}
.content-section::-webkit-scrollbar {
  width: 14px;
}
.content-section::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
.content-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: content-box;
}
.content-section::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 1);
}

.foot-note {
  font-family: kanit;
  font-size: 0.95rem;
  color: red;
}

/* กรอบของ form */
.flex-form {
  min-height: calc(100vh - 5.125rem - 4.625rem);
  padding-top: 1rem;
  padding-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: auto;
}
.card-gradient-blue {
  border: 3px solid #cc0000; /* ขอบสีแดงเข้ม หนา */
  border-radius: 1rem;
  color: #003366;
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #4ac29a, #bdfff3);
  box-shadow: 0 6px 12px rgba(128, 128, 128, 0.8) !important; /* เงาสีเทาอ่อน */
  transition: all 0.3s ease;
}
.card-gradient-blue:hover {
  border-color: #ff0000; /* เปลี่ยนขอบเป็นแดงสดเมื่อ hover */
  box-shadow: 0 8px 16px rgba(100, 100, 100, 0.5); /* เงาเข้มขึ้น */
}

/* กรอบของ ตาราง */
.flex-list {
  min-height: calc(100vh - 5.125rem - 4.625rem);
  overflow-y: auto;
  overflow-x: auto;
}
.flex-list-outline {
  padding-top: clamp(1rem, 2.5vw + 0.5rem, 1.5rem);
  padding-bottom: clamp(1rem, 2.5vw + 0.5rem, 1.5rem);
  padding-left: clamp(1rem, 2.5vw + 0.5rem, 3rem);
  padding-right: clamp(1rem, 2.5vw + 0.5rem, 3rem);
}

.text-kpi-title {
  font-size: 2.2rem;
  color: #ffffff;
  text-shadow: 2px 2px 4px #000;
}

.text-kpi-result {
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 2px 2px 4px #000;
  color: #00ff00; /* หรือ #ff4444 ให้เปลี่ยนใน HTML ด้วยเงื่อนไข */
}
.text-kpi-highlight {
  font-size: 130%;
  font-weight: bold;
}

.text-kpi-detail {
  font-size: 1.5rem;
  color: yellow;
  text-shadow: 1px 1px 2px #000;
}

.text-kpi-nb {
  font-family: "Sriracha", cursive;
  font-size: 1.1rem;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(255, 0, 0, 0.8);
  font-style: italic;
}
.img_pass,
.img_fail {
  border-radius: 50%;
  width: clamp(30px, 3vw + 10px, 35px);
  height: auto;
  vertical-align: middle;
}

/* list-layout */

#example thead th {
  position: sticky;
  top: clamp(1rem, 5vh, 3rem);
  z-index: 10;
  background-color: blue;
  color: white;
  text-align: center;
  vertical-align: middle;
  padding: 0.2rem;
  height: 40px;
  border-color: blue;
}
th.sticky-col-left {
  position: sticky;
  top: 5.125rem;
  left: 0;
  z-index: 100;
  background-color: blue;
}
th.sticky-col-right {
  position: sticky;
  top: 5.125rem;
  right: 0;
  z-index: 100;
  background-color: blue;
}
td.sticky-col-left {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: #f8f9fa;
}
td.sticky-col-right {
  position: sticky;
  right: 0;
  z-index: 2;
  background-color: #f8f9fa;
}
td.sticky-col-right {
  position: sticky;
  right: 0;
  z-index: 2;
}
label.form-label,
input.form-control,
select.form-control,
textarea.form-control,
input.form-control::placeholder,
textarea.form-control::placeholder {
  font-size: 1rem;
}

/*ปุ่มทั้งหมด*/
.btn-custom-red {
  color: #ffffff;
  background-color: #dc3545 !important;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-red:hover {
  color: #ffffff;
  background-color: #c82333;
}
.btn-custom-purple {
  color: #ffffff;
  background-color: #8b01ed;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-purple:hover {
  color: #ffffff;
  background-color: #7954f1;
}
.btn-custom-green {
  color: #ffffff;
  background-color: #28a745;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-green:hover {
  color: #ffffff;
  background-color: #218838;
}
.btn-custom-blue {
  color: #ffffff;
  background-color: #007bff;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-blue:hover {
  color: #ffffff;
  background-color: #0069d9;
}
.btn-custom-lightblue {
  color: #ffffff;
  background-color: #5bc0de;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-lightblue:hover {
  color: #ffffff;
  background-color: #31b0d5;
}
.btn-custom-orange {
  color: #ffffff;
  background-color: #fd7e14;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-orange:hover {
  color: #ffffff;
  background-color: #e36a07;
}
.btn-custom-pink {
  color: #ffffff;
  background-color: #fc04b7;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-pink:hover {
  color: #ffffff;
  background-color: #ef6dea;
}
.btn-custom-gray {
  color: #ffffff;
  background-color: #6c757d !important ;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-gray:hover {
  color: #ffffff;
  background-color: #5a6268;
}
.btn-custom-yellow {
  color: #212529;
  background-color: #ffc107;
  box-shadow: 3px 3px 2px 0px #888888;
}
.btn-custom-yellow:hover {
  color: #212529;
  background-color: #e0a800;
}

.block_kpi {
  border: 2px solid white;
  border-radius: 20px;
  width: auto;
  height: auto;
  color: white;
  padding-left: 5px;
  padding-right: 5px;
  padding-top: 25px;
  padding-bottom: 25px;
  text-align: center;
}
.block_kpi h5 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-size: clamp(1.1rem, 1.4vw + 0.4rem, 1.2rem);
  font-family: "Kanit", sans-serif;
  margin: 0.3rem 0;
}

.block_kpi h5 span {
  font-size: clamp(1.1rem, 1.6vw + 0.4rem, 1.2rem); /* ยังคงใหญ่กว่านิดหน่อย */
  color: yellow;
  text-shadow: 1px 1px 2px red;
  font-family: "Kanit", sans-serif;
  margin-left: 0.4rem;
}

.block_kpi h6 {
  font-size: clamp(0.7rem, 1.2vw + 0.3rem, 0.8rem);
  font-family: "Kanit", sans-serif;
  margin-top: 0.5rem;
}

.block_kpi h6 a {
  font-size: clamp(0.7rem, 1.2vw + 0.3rem, 0.8rem);
  font-family: "Kanit", sans-serif;
}

.form_sum button {
  background: blue;
  color: white;
  padding: 10px 0;
  margin: 5px 0;
  border: none;
  border-radius: 10px;
  cursor: grabbing;
  width: 100%;
  font-size: 16px;
}
.form_sum button:hover {
  background: blue;
  opacity: 0.8;
  color: white;
}
.form_sum input[type="text"] {
  width: 100%;
  font-size: 16px;
  padding: 16px 8px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  box-sizing: border-box;
}
.bg_list {
  background: linear-gradient(to right, #86fde8, #acb6e5);
  padding: 30px;
}
.bg-content {
  background: #fff7d4;
}
.result {
  color: yellow;
  font-size: 30px;
}
.bg-outcome {
  background: linear-gradient(to right, #56ccf2, #2f80ed);
  color: white;
}
.btn_pkpi {
  background: linear-gradient(to right, #1cb5e0, #000046);
  color: white;
  margin-left: 10px;
}
.btn_qkpi {
  background: linear-gradient(to right, #f7b733, #fc4a1a);
  color: white;
  margin-left: 10px;
}

.kpi-img-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0;
}

.highlight {
  font-weight: bold;
  /* or any other styling you prefer */
  color: red;
  /* or any other color you prefer */
}

#example tr {
  text-align: center !important;
}

.flex-center-kpi {
  min-height: auto;
  display: flex;
  justify-content: center;
  align-items: center; /* เปลี่ยนจาก center เป็น flex-start */
  flex-direction: column;
  padding: 2rem;
}

.flex-list-kpi {
  padding: 2rem 1rem;
}
.bg-member-kpi-pkpi {
  background-image: url("../img/bg-kpi-pkpi.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}
.bg-member-kpi-qkpi {
  background-image: url("../img/bg-kpi-qkpi.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}
.bg_form_p {
  background: linear-gradient(to right, #ee9ca7, #ffdde1);
}
.bg_form_q {
  background: linear-gradient(to right, #4ac29a, #bdfff3);
}

.bg_form {
  background: linear-gradient(
    109.6deg,
    rgb(204, 228, 247) 11.2%,
    rgb(237, 246, 250) 100.2%
  );
}
/* ให้ทุก input ที่ใช้ .datepicker มี placeholder เว้นซ้าย */
input.datepicker::placeholder {
  padding-left: 4px;
  /* หรือ 0.25rem */
  color: #6c757d;
  /* คุมสีเทาเหมือน bootstrap */
  opacity: 1;
  /* ป้องกันบาง browser ทำให้จางเกินไป */
}
.swal2-popup .swal2-actions {
  gap: 5px;
}
.menu-fixed .dropdown-menu {
  background: linear-gradient(135deg, #ffffff, #f0fff4); /* gradient จริง */
  border: 1px solid #28a745;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

.menu-fixed .dropdown-item {
  color: #28a745 !important;
  font-weight: 500;
}

.menu-fixed .dropdown-item:hover,
.menu-fixed .dropdown-item:focus {
  background-color: #28a745 !important;
  color: #fff !important;
}

.underline {
  text-decoration: underline;
}

.med-card-img { 
    height: 200px; object-fit: cover; 
}