/* ตั้งค่าฟอนต์เริ่มต้นเป็น Sarabun */
body, h1, h2, h3, h4, h5, h6, .btn, .table {
  font-family: 'Sarabun', sans-serif;
  font-size: 1rem; /* ใช้ rem เพื่อให้มีการปรับขนาดได้ตามขนาดหน้าจอ */
}

/* ตัวอย่างการปรับใช้กับหัวข้อ */
h1, h2 {
  font-family: 'Arial', sans-serif;
  font-size: 2rem; /* ขนาดฟอนต์ที่ใหญ่ขึ้นใน h1, h2 */
}

/* ปรับแต่งปุ่ม */
.btn, .btn-primary, .btn-warning, .btn-danger, .btn-banner {
  font-family: 'Sarabun', sans-serif;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
  font-size: 1rem; /* ขนาดฟอนต์ปกติ */
}

.btn-warning, .btn-danger {
  font-weight: 500;
}

.btn-primary {
  padding: 12px 20px;
  font-size: 1.125rem; /* ขนาดฟอนต์ปุ่ม */
}

.btn-primary:hover, .btn-warning:hover, .btn-danger:hover {
  transform: scale(1.05);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/* ปรับแต่ง Navbar และ Footer */
@media (min-width: 1200px) {
.navbar {
  --bs-navbar-padding-y: 0.2rem !important;
}
}
.navbar, footer {
  font-weight: 400;
}

.navbar {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background: linear-gradient(45deg, #343a40, #083a6e);
  border-bottom: 3px solid #29496c;
}

.navbar {
  position: fixed; /* ตรึง Navbar ที่ตำแหน่งคงที่ */
  top: 0; /* ให้ Navbar อยู่ที่ด้านบนสุดของหน้าจอ */
  left: 0; /* ให้ Navbar อยู่ที่ขอบซ้ายสุด */
  width: 100%; /* ให้ Navbar กว้างเต็มหน้าจอ */
  z-index: 1000; /* ให้ Navbar อยู่เหนือเนื้อหาของหน้า */
}

.nav-logo {
  height: 50px; /* ตั้งขนาดเริ่มต้น */
  width: auto;
}

.nav-logo {
  height: 50px;
  width: auto;
}

/* ปรับเมื่อ Responsive */
@media (max-width: 768px) {
  .navbar-toggler {
    position: absolute;
    top: 0.5rem; /* ตำแหน่งใกล้ขอบบน */
    left: 0.5rem; /* ชิดขอบซ้าย */
    z-index: 1050; /* ให้อยู่บนสุด */
  }

  .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0.5rem; /* จัดให้อยู่ตรงกลาง */
  }
}

.d-flex2 {
  display: flex !important
;
}

.bg-dark1 {
  --bs-bg-opacity: 1;
  background-color: rgb(30 48 66) !important;
}



@media (max-width: 768px) {
  .navbar-brand {
    justify-content: flex-start; /* โลโก้และข้อความอยู่ทางซ้าย */
  }

  .nav-logo {
    display: none; /* ซ่อนโลโก้ */
  }

  .navbar-nav {
    text-align: left; /* เมนูชิดซ้าย */
    margin-top: 27px;
  }

  .navbar {
    --bs-navbar-padding-y: 1.6rem; /* Adjust vertical padding */
  }
}

/* Body Layout */
body {
  display: flex;
  flex-direction: column; /* จัดเลย์เอาต์ในแนวตั้ง */
  min-height: 100vh; /* ความสูงขั้นต่ำให้เท่ากับความสูงของหน้าจอ */
  margin: 0; /* ลบ Margin เริ่มต้นของ Body */
}

main {
  flex: 1; /* ทำให้พื้นที่ส่วนกลางขยายได้ */
}

/* Footer Styles */
footer {
  /*position: fixed;  ตรึงตำแหน่ง */
  bottom: 0; /* ให้ Footer อยู่ที่ด้านล่างสุด */
  left: 0; /* ให้ Footer อยู่ที่ขอบซ้ายสุด */
  width: 100%; /* ให้ Footer กว้างเต็มหน้าจอ */
  background-color: #343a40; /* สีพื้นหลัง */
  color: #fff; /* สีตัวอักษร */
  padding: 20px 0; /* ระยะห่างด้านบนและล่าง */
  text-align: center; /* จัดข้อความให้อยู่กลาง */
  font-size: 0.875rem; /* ขนาดฟอนต์ */
  border-top: 2px solid #444; /* เส้นขอบด้านบน */
  z-index: 9999; /* ให้ Footer อยู่บนสุด */
}

/* ตาราง */
.table, .table-bordered {
  width: 100%;
  margin-top: 20px;
  border-radius: 8px;
  border: 2px solid #ddd;
}

.table th, .table td {
  text-align: center;
  vertical-align: middle;
  font-size: 0.875rem; /* ขนาดฟอนต์ของตาราง */
}

.table-bordered th, .table-bordered td {
  border: 1px solid #ddd;
}

.table-dark {
  background-color: #343a40;
  color: white;
}

.table-striped tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

/* การตั้งค่าการแสดงผลในมือถือ */
@media (max-width: 768px) {
  .table th, .table td {
    font-size: 0.75rem; /* ปรับขนาดฟอนต์ในตารางให้เล็กลง */
  }

  .navbar-brand {
    font-size: 1rem; /* ปรับขนาดฟอนต์ใน navbar */
  }

  .banner h1 {
    font-size: 2.5rem; /* ขนาดฟอนต์ของ h1 ใน banner */
  }

  .banner p {
    font-size: 1.2rem; /* ขนาดฟอนต์ของข้อความใน banner */
  }

  .btn-primary {
    font-size: 1rem;
    padding: 10px 16px;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .table th, .table td {
    font-size: 0.875rem; /* ปรับขนาดฟอนต์ในตารางให้เล็กลง */
  }

  .btn-primary {
    font-size: 0.875rem; /* ปรับขนาดฟอนต์ของปุ่มในอุปกรณ์ขนาดเล็ก */
    padding: 8px 14px;
  }
}

/* การตั้งค่าพื้นหลังของ header */
header {
  background-image: url('banner-image.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 5rem 0;
}

/* สไตล์ของปุ่มใน header */
header .btn {
  font-size: 1.2rem;
  padding: 0.75rem 1.5rem;
  text-transform: uppercase;
  font-weight: bold;
  border-radius: 30px;
  transition: all 0.3s ease;
}

header .btn:hover {
  background-color: #007bff;
  color: white;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

/* เพิ่มขนาดฟอนต์ในข้อความ */
header h1 {
  font-size: 3rem;
  font-weight: 700;
}

header p {
  font-size: 1.25rem;
  font-weight: 300;
}

/* ---- Statistics Section ---- */
.mt-5 {
  margin-top: 50px;
}

h2 {
  font-size: 1.75rem; /* ปรับขนาดฟอนต์ของ h2 */
  margin-bottom: 20px;
  text-align: center;
}

/* กราฟแท่งแนวนอน */
#statsChart {
  max-height: 400px;
  margin: 0 auto;
  display: block;
}

/* Footer */
footer {
  background: #212529;
  color: #d9d9d9;
  border-top: 3px solid #4a5b6c;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* ปรับแต่ง Banner */
.banner {
  background: linear-gradient(to bottom, rgb(255 0 188 / 70%), rgba(0, 0, 0, 0.7)), url(https://source.unsplash.com/1920x400/?leadership,teamwork);
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 40px 20px;
  font-family: 'Sarabun', sans-serif;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.banner-logo {
  max-width: 150px; /* ปรับขนาดโลโก้ให้เหมาะสม */
  margin-bottom: 20px;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
}

.banner-logo:hover {
  transform: scale(1.05); /* ขยายภาพเล็กน้อยเมื่อชี้เมาส์ */
}


.banner h1, .banner p {
  position: relative;
  z-index: 2;
  font-family: 'Sarabun', sans-serif;
}

.banner h1 {
  font-size: 2vw; /* ใช้ vw เพื่อให้ขนาดฟอนต์ยืดหยุ่นตามขนาดหน้าจอ */
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Media Query เพื่อปรับขนาดฟอนต์เมื่อขนาดหน้าจอเล็กลง */
@media (max-width: 768px) {
  .banner h1 {
    font-size: 3rem; /* ลดขนาดฟอนต์สำหรับหน้าจอขนาดกลาง */
  }
}

@media (max-width: 576px) {
  .banner h1 {
    font-size: 2rem; /* ลดขนาดฟอนต์สำหรับหน้าจอขนาดเล็ก */
  }
}

.banner p {
  font-size: 1.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.btn-banner {
  margin-top: 20px;
  padding: 12px 30px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  background: #8b2d6d;
  border: 2px solid #c411d5;
  border-radius: 8px;
  text-align: center;
  text-transform: uppercase;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
  cursor: pointer;
  text-decoration: none;
}

.btn-banner:hover {
  background: #50193e;
  border-color: #421332;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.5);
}

.btn-banner:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

/* เงาสำหรับกล่องฟอร์ม */
.form-container {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  padding: 20px;/*เดิมคือ 40px*/
  margin-top: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* สำหรับปุ่ม */
button, .btn {
  font-family: 'Sarabun', sans-serif;
}

.card-title {
  font-weight: 500;
}

/* กรอบเงาและเอฟเฟกต์ */
.table-striped tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

/* จัดแถวเดียวกัน */
.form-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap; /* เพิ่มความยืดหยุ่นในการจัดแถว */
}

/* จัดให้แต่ละช่องกรอกข้อมูลมีขนาดพอเหมาะ */
.form-group {
  flex: 1;
  min-width: 250px; /* กำหนดขนาดขั้นต่ำให้ฟอร์มไม่แคบเกินไป */
}

/* สไตล์ของ label */
.form-group label {
  display: block;
  margin-bottom: 5px;
}

/* ทำให้ input เต็มขนาดของ form-group */
.form-group input,
.form-group select {
  width: 100%;
}

/* ฟอร์มที่เก็บแถวทั้งหมด */
#form_fields {
  margin-top: 20px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* แถวในฟอร์ม */
.form-row {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ddd;
  gap:20px;
}

/* ปรับให้เป็นแถวเดียวในมือถือ */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column; /* ให้แต่ละช่องกรอกข้อมูลอยู่ในแถวเดียวกัน */
    gap: 15px; /* ลดระยะห่างระหว่างช่อง */
  }

  /* เพิ่มระยะห่างระหว่างฟอร์มในขนาดมือถือ */
  .form-row, .mb-3 {
    margin-bottom: 15px;
  }
}

/* ทำให้ฟอร์มดูโปร่ง */
.form-row, .mb-3 {
  margin-bottom: 40px;
}

/* เพิ่มสไตล์สำหรับขนาดหน้าจอขนาดใหญ่ */
@media (min-width: 769px) {
  .form-row {
    gap: 20px; /* ปรับระยะห่างให้มากขึ้น */
  }
}


.suggestion-list {
  position: absolute;
  z-index: 1050;
  background: #fff;
  border: 1px solid #ddd;
  width: 100%;
  margin-top: 5px;
  max-height: 150px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.suggestion-list2 {
  position: absolute;
  z-index: 1050;
  background: #fff;
  border: 1px solid #ddd;
  width: 100%;
  margin-top: 5px;
  max-height: 150px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
  padding: 10px;
  cursor: pointer;
}

.suggestion-item:hover {
  background: #f0f0f0;
}

.suggestion-item2 {
  padding: 10px;
  cursor: pointer;
}

.suggestion-item2:hover {
  background: #f0f0f0;
}


.d-none {
  display: none !important;
}

@media (max-width: 768px) {
  .suggestion-list {
    width: 100%;
  }
}




/* ในขนาดหน้าจอที่ใหญ่ขึ้น (tablet และ desktop) ให้แต่ละฟอร์มมีขนาด 25% */
@media (min-width: 576px) {
  .form-group-student-item {
    flex: 1 1 48%; /* 2 คอลัมน์ */
  }
}

@media (min-width: 992px) {
  .form-group-student-item {
    flex: 1 1 23%; /* 4 คอลัมน์ */
  }
}

/* ปรับขนาดฟอนต์ */
.form-label {
  font-size: 0.875rem; /* ขนาดฟอนต์ที่เล็กลง */
}

.form-control {
  font-size: 0.875rem; /* ขนาดฟอนต์ในช่องกรอกข้อมูล */
}

.form-select {
  font-size: 0.875rem; /* ขนาดฟอนต์ใน dropdown */
}

/* ปรับให้เหมาะสมกับขนาดหน้าจอ */
@media (max-width: 768px) {
  .form-group-student-item {
    flex: 1 1 100%; /* ฟอร์มทุกฟิลด์จะแสดงเต็มแถวในมือถือ */
  }
}



/* ฟอร์มที่เก็บแถวทั้งหมด */
#form_fields_student {
  margin-top: 20px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* แถวในฟอร์ม */
.form-row_student {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ddd;
  gap:20px;
}

/* เส้น hr */
.form-row_student hr {
  margin-top: 10px;
  border: 1px solid #ddd;
  width: 100%;
}


#form_fields_student .form-row_student:first-child hr {
  display: none;
}

/* ปุ่มเพิ่มแถว */
#add_field_btn_student {
  font-size: 18px;
  font-weight: bold;
  background-color: #28a745;
  border: none;
  color: white;
  border-radius: 5px;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  max-width: 500px;
}

#add_field_btn_student:hover {
  background-color: #218838;
}

/* ฟอร์มแถวแรกจะไม่มีเส้น hr */
#form_fields_student .form-row_student:first-child hr {
  display: none;
}



/* ฟอร์มแถวแรกจะไม่มีเส้น hr */
#form_fields_student .form-row_student:first-child hr {
  display: none;
}

/* เพิ่มฟอร์มให้ responsive */
@media (max-width: 768px) {
 
  /* ปรับปุ่มเพิ่มฟิลด์ */
  #add_field_btn_student {
      width: 100%;
  }

 
  /* ปรับขนาดให้สอดคล้อง */
  .row-number_student {
      margin-bottom: 5px;
      font-size: 14px;
      flex-direction: column;
  }

}

/* สำหรับขนาดหน้าจอใหญ่ขึ้น */
@media (max-width: 576px) {

  /* ลดขนาดปุ่ม */
  #add_field_btn_student {
      font-size: 16px;
      padding: 8px;
  }

  /* ปรับหมายเลขแถว */
  .row-number_student {
      font-size: 14px;
  }
}


.form-header {
  text-align: center;
  background: linear-gradient(45deg, #c70690, #3466f3); /* Gradient background */
  color: white;
  padding: 5px 0;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  max-width: 400px; /* ขนาดความกว้างสูงสุด */
  margin: 0 auto; /* จัดให้ตรงกลาง */
}

.form-header h2 {
  font-size: 1.2rem; /* ขนาดตัวอักษรพอดี */
  font-family: 'Sarabun', sans-serif;
  font-weight: bold;
  text-transform: uppercase; /* ตัวอักษรเป็นตัวพิมพ์ใหญ่ทั้งหมด */
  /* letter-spacing: 2px; /* เว้นระยะตัวอักษร */
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2); /* เพิ่มเงาให้ตัวอักษร */
  margin: 20px;
}

/* ปรับขนาดในมือถือ */
@media (max-width: 768px) {
  .form-header {
    padding: 10px 0; /* ลด padding บนและล่างสำหรับมือถือ */
    max-width: 90%; /* ใช้ขนาดเต็มของหน้าจอ */
  }

  .form-header h2 {
    font-size: 1.2rem; /* ลดขนาดตัวอักษรลงในมือถือ */
  }
}


.form-headerstudent {
  text-align: center;
  background: linear-gradient(45deg, #d54303, #7f12b7);
  color: white;
  padding: 5px 0;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  max-width: 400px; /* ขนาดความกว้างสูงสุด */
  margin: 0 auto; /* จัดให้ตรงกลาง */
}

.form-headerstudent h2 {
  font-size: 1.2rem; /* ขนาดตัวอักษรพอดี */
  font-family: 'Sarabun', sans-serif;
  font-weight: bold;
  text-transform: uppercase; /* ตัวอักษรเป็นตัวพิมพ์ใหญ่ทั้งหมด */
  /* letter-spacing: 2px; /* เว้นระยะตัวอักษร */
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2); /* เพิ่มเงาให้ตัวอักษร */
  margin: 20px;
}

/* ปรับขนาดในมือถือ */
@media (max-width: 768px) {
  .form-headerstudent {
    padding: 10px 0; /* ลด padding บนและล่างสำหรับมือถือ */
    max-width: 90%; /* ใช้ขนาดเต็มของหน้าจอ */
  }

  .form-headerstudent h2 {
    font-size: 1.2rem; /* ลดขนาดตัวอักษรลงในมือถือ */
  }
}


.form-header3 {
  text-align: center;
  background: linear-gradient(45deg, #0609c7, #01d8e8); /* Gradient background */
  color: white;
  padding: 5px 0;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  max-width: 400px; /* ขนาดความกว้างสูงสุด */
  margin: 0 auto; /* จัดให้ตรงกลาง */
}

.form-header3 h2 {
  font-size: 1.2rem; /* ขนาดตัวอักษรพอดี */
  font-family: 'Sarabun', sans-serif;
  font-weight: bold;
  text-transform: uppercase; /* ตัวอักษรเป็นตัวพิมพ์ใหญ่ทั้งหมด */
  /* letter-spacing: 2px; /* เว้นระยะตัวอักษร */
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2); /* เพิ่มเงาให้ตัวอักษร */
  margin: 20px;
}

/* ปรับขนาดในมือถือ */
@media (max-width: 768px) {
  .form-header3 {
    padding: 10px 0; /* ลด padding บนและล่างสำหรับมือถือ */
    max-width: 90%; /* ใช้ขนาดเต็มของหน้าจอ */
  }

  .form-header3 h2 {
    font-size: 1.2rem; /* ลดขนาดตัวอักษรลงในมือถือ */
  }
}

.text-teacher{
  font-weight:500 !important;
  color:rgb(255 45 161) !important;
}

.text-student{
  font-weight:500 !important;
  color: #c71e9c !important;
}

.text3{
  font-weight:500 !important;
  color: #065dde !important;
}


/* สไตล์สำหรับ Input Group */
.input-group-text {
  background-color: #ff2da1; /* พื้นหลังสีน้ำเงิน */
  color: #fff; /* สีไอคอน */
  border: none;
  padding: .375rem .75rem !important;
  font-size: 1rem !important;
}

.input-group-text:hover {
  background-color: #ce1179; /* สีน้ำเงินเข้มเมื่อ Hover */
  transition: background-color 0.3s;
}

/* สไตล์สำหรับ Input Group */
.input-group-text_student {
  background-color: #e86310; /* พื้นหลังสีน้ำเงิน */
  color: #fff; /* สีไอคอน */
  border: none;
  padding: .375rem .75rem !important;
  font-size: 1rem !important;
}

.input-group-text_student:hover {
  background-color: #ad4809; /* สีน้ำเงินเข้มเมื่อ Hover */
  transition: background-color 0.3s;
}

/* สไตล์สำหรับ Input Group */

.input-group-text2 {
  display: flex;
  align-items: center;
  padding: .375rem .75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  text-align: center;
  white-space: nowrap;
  background-color: var(--bs-tertiary-bg);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.input-group-text2 {
  background-color: #1e42c7; /* พื้นหลังสีน้ำเงิน */
  color: #fff; /* สีไอคอน */
  border: none;
}

.input-group-text2:hover {
  background-color: #0f277d; /* สีน้ำเงินเข้มเมื่อ Hover */
  transition: background-color 0.3s;
}


.input-group-text-end {
  display: flex;
  align-items: center;
  padding: .375rem .75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  text-align: center;
  white-space: nowrap;
  background-color: var(--bs-tertiary-bg);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.input-group-text-end {
  background-color: #141e9d26; /* พื้นหลังสีน้ำเงิน */
  color: #a59191; /* สีไอคอน */
  border: none;
}

/* ปรับสีตัวอักษรใน Label */
.form-label {
  font-weight: bold;
  color: #ff2da1; /* สีตัวหนังสือ */
}

/* ปรับสีตัวอักษรใน Label */
.form-label_student {
  font-weight: bold;
  color: #e86310; /* สีตัวหนังสือ */
}

/* ปรับสีตัวอักษรใน Label */
.form-label2 {
  font-weight: bold;
  color: #1e42c7; /* สีตัวหนังสือ */
}


/* ปรับสี Input */
.form-control {
  border: 1px solid #ddd;
  font-size: 1rem;
}

.form-control:focus {
  border-color: #007bff; /* สีขอบเมื่อโฟกัส */
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.form-select {
  font-size: 1rem;
}

hr {
  border: none; /* ลบเส้นกรอบเดิม */
  height: 1px; /* ความสูงของเส้น */
  background-color: #ccc; /* สีของเส้น */
  margin-top: 20px; /* ระยะห่างบน */
  margin-bottom: 20px; /* ระยะห่างล่าง */
}


/* ปรับปุ่ม */
button.btn-primary {
  background: linear-gradient(45deg, #007bff, #00c6ff); /* สี Gradient */
  border: none;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

button.btn-primary:hover {
  background: linear-gradient(45deg, #0056b3, #007bff); /* สีเข้มเมื่อ Hover */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transition: background 0.3s, box-shadow 0.3s;
}


/* สไตล์พื้นฐานสำหรับ confirmation_section */
#confirmation_section {
  background-color: #ffffff; /* สีพื้นหลัง */
  border: 1px solid #ddd; /* เส้นขอบ */
  border-radius: 10px; /* มุมโค้ง */
  padding: 20px; /* ระยะห่างด้านใน */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* เงา */
  font-family: 'Sarabun', sans-serif; /* ฟอนต์ Sarabun */
  color: #333; /* สีตัวอักษร */
  max-width: 350px; /* จำกัดความกว้างสูงสุด */
  position: fixed; /* ให้ตำแหน่งคงที่ */
  top: 20px; /* ระยะห่างจากด้านบน */
  right: 20px; /* ระยะห่างจากด้านขวา */
  z-index: 1050; /* อยู่เหนือองค์ประกอบอื่น */
}

/* สไตล์หัวข้อ */
#confirmation_section h3 {
  color: #007bff; /* สีน้ำเงิน */
  font-weight: bold; /* น้ำหนักตัวหนา */
  margin-bottom: 15px; /* ระยะห่างด้านล่าง */
  text-align: center; /* จัดให้อยู่ตรงกลาง */
}

/* สไตล์ข้อความ */
#confirmation_section p {
  margin: 10px 0; /* ระยะห่างระหว่างข้อความ */
  font-size: 16px; /* ขนาดตัวอักษร */
  line-height: 1.5; /* ความสูงบรรทัด */
}

/* ปุ่ม */
#confirmation_section .btn {
  padding: 10px 20px; /* ระยะห่างในปุ่ม */
  font-size: 14px; /* ขนาดตัวอักษร */
  border-radius: 5px; /* มุมโค้งของปุ่ม */
  width: 48%; /* ให้ปุ่มกว้างครึ่งหนึ่ง */
}

/* ปุ่มแก้ไข */
#confirmation_section .btn-secondary {
  background-color: #6c757d; /* สีเทา */
  color: #fff; /* สีตัวอักษรขาว */
  border: none; /* ไม่มีเส้นขอบ */
}

/* ปุ่มยืนยัน */
#confirmation_section .btn-success {
  background-color: #28a745; /* สีเขียว */
  color: #fff; /* สีตัวอักษรขาว */
  border: none; /* ไม่มีเส้นขอบ */
}

/* แถวของปุ่ม */
#confirmation_section .d-flex {
  justify-content: space-between; /* ปุ่มห่างกัน */
  margin-top: 20px; /* ระยะห่างด้านบน */
}

.d-flex1 {
  display: flex !important
;
}

/* Responsive: สำหรับหน้าจอขนาดเล็ก */
@media (max-width: 768px) {
  #confirmation_section {
    margin: 10px; /* ระยะห่างขอบรอบในหน้าจอเล็ก */
    padding: 15px; /* ลดระยะห่างภายใน */
    top: 10px; /* ระยะจากขอบบน */
    right: 10px; /* ระยะจากขอบขวา */
    left: auto; /* ลบการตั้งค่าจากขอบซ้าย */
    max-width: none; /* ปรับให้เต็มความกว้าง */
  }

  /* ปุ่ม */
#confirmation_section .btn {
  width: 100%; /* ให้ปุ่มกว้างเต็ม */
}

  #confirmation_section h3 {
    font-size: 18px; /* ลดขนาดหัวข้อ */
  }

  #confirmation_section p {
    font-size: 14px; /* ลดขนาดข้อความ */
  }

  .btn {
    width: 100%; /* ปุ่มเต็มความกว้าง */
    margin-bottom: 10px; /* ระยะห่างระหว่างปุ่ม */
  }

  .d-flex {
    flex-direction: column; /* เรียงปุ่มในแนวตั้ง */
  }
}

.row-number {
  font-weight: 700; /* ตัวหนามากขึ้น */
  color: white; /* ตัวอักษรสีขาว */
  padding: 12px 20px; /* เพิ่มขนาด padding เพื่อให้ดูสวยงาม */
  border-radius: 50px; /* มุมมนมากขึ้น */
  background: linear-gradient(135deg, #6a11cb, #2575fc); /* สีพื้นหลังที่ไล่เฉดจากม่วงเป็นฟ้า */
  display: inline-flex; /* ใช้ inline-flex เพื่อจัดตำแหน่งให้อยู่ในแนวเดียว */
  align-items: center; /* จัดข้อความให้อยู่กลางแนวตั้ง */
  justify-content: center; /* จัดข้อความให้อยู่กลางแนวนอน */
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* เงาที่ชัดขึ้น */
  transition: all 0.3s ease-in-out; /* การเปลี่ยนแปลงที่นุ่มนวล */
  cursor: pointer; /* เปลี่ยนเป็น pointer เมื่อ hover */
  margin-bottom:25px;
  flex-basis: 100%;
}

/* เอฟเฟกต์เมื่อ hover */
.row-number:hover {
  /*transform: scale(1.1);  ขยายขนาดเมื่อ hover */
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4); /* เงาที่มีความชัดขึ้น */
  background: linear-gradient(135deg, #2575fc, #6a11cb); /* สีพื้นหลังกลับทิศทางเมื่อ hover */
}

/* เอฟเฟกต์เมื่อคลิก */
.row-number:active {
  transform: scale(0.98); /* หดตัวเล็กน้อยเมื่อคลิก */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* เงาที่เบาลงเมื่อคลิก */
}


.row-number_student {
  font-weight: 700; /* ตัวหนามากขึ้น */
  color: white; /* ตัวอักษรสีขาว */
  padding: 12px 20px; /* เพิ่มขนาด padding เพื่อให้ดูสวยงาม */
  border-radius: 50px; /* มุมมนมากขึ้น */
  background: linear-gradient(135deg, #c92b98, #c18602); /* สีพื้นหลังที่ไล่เฉดจากม่วงเป็นฟ้า */
  /*display: inline-flex; ใช้ inline-flex เพื่อจัดตำแหน่งให้อยู่ในแนวเดียว */
  align-items: center; /* จัดข้อความให้อยู่กลางแนวตั้ง */
  justify-content: center; /* จัดข้อความให้อยู่กลางแนวนอน */
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* เงาที่ชัดขึ้น */
  transition: all 0.3s ease-in-out; /* การเปลี่ยนแปลงที่นุ่มนวล */
  cursor: pointer; /* เปลี่ยนเป็น pointer เมื่อ hover */
  margin-bottom:25px;
  flex-basis: 100%;
}

/* เอฟเฟกต์เมื่อ hover */
.row-number_student:hover {
  /*transform: scale(1.1); ขยายขนาดเมื่อ hover */
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4); /* เงาที่มีความชัดขึ้น */
  background: linear-gradient(135deg, #831560, #865c01); /* สีพื้นหลังกลับทิศทางเมื่อ hover */
}

/* เอฟเฟกต์เมื่อคลิก */
.row-number_student:active {
  transform: scale(0.98); /* หดตัวเล็กน้อยเมื่อคลิก */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* เงาที่เบาลงเมื่อคลิก */
}

.custom-gradient-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 3rem 0;
  position: relative;
}

.custom-gradient-divider::before,
.custom-gradient-divider::after {
  content: '';
  flex: 1;
  height: 3px;
  background: linear-gradient(to right, #007bff, #00c6ff);
}

.custom-gradient-divider::before {
  margin-right: 20px;
}

.custom-gradient-divider::after {
  margin-left: 20px;
}

.custom-gradient-divider span {
  font-size: 1.2rem;
  font-weight: bold;
  color: #007bff;
  text-transform: uppercase;
  background: #fff;
  padding: 0 15px;
}

.custom-divider span {
  animation: fadeIn 1.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.remove-row-btn {
  margin-top: auto; /* จัดให้ปุ่มอยู่ด้านล่างสุดในกรณีของ flex */
  margin-left: auto; /* ดันไปทางขวาสุด */
  align-self: center; /* จัดให้อยู่ตรงกลางแนวตั้ง */
}

.swal-title, .swal-content {
  font-family: 'Sarabun', sans-serif;
}

.swal-confirm-button, .swal-cancel-button {
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
}