/* ตั้งค่าพื้นฐานสำหรับตาราง */
.table_personal-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 0 auto;
    background-color: #ffffff; /* สีพื้นหลังอ่อน */
    padding: 0;
    border-radius: 12px;
}


/* ------------------------------
 * Table Styles (table_personal)
 * ------------------------------ */
.table_personal {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Kanit', sans-serif;
    margin: 20px 0;
    font-size: 14px;
	font-weight:300;
    color: #2c3e50;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Shadow for depth */
    background-color: #ffffff; /* White background */
}

.table_personal thead th {
    background-color: #2f4c6e; /* Dark blue for header */
    color: #ffffff; /* White text for contrast */
    padding: 10px 15px;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid #ddd;
}

.table_personal thead th:first-child {
    border-top-left-radius: 8px;
}

.table_personal thead th:last-child {
    border-top-right-radius: 8px;
}

.table_personal tbody tr {
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s ease; /* Smooth hover transition */
}

.table_personal tbody tr:nth-of-type(even) {
    background-color: #f5f9ff; /* Light blue for even rows */
}

.table_personal tbody tr:hover {
    background-color: #eaf3ff; /* Darker blue on hover */
}

.table_personal td {
    padding: 12px 15px;
}

.table_personal .action-btn {
    background-color: #2f4c6e;
    color: #ffffff;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.table_personal .action-btn:hover {
    background-color: #1e3b5a; /* Darker shade for hover */
}

/* Responsive Design */
@media (max-width: 768px) {
    .table_personal {
        font-size: 14px; /* Smaller font size for mobile */
    }

    .table_personal thead th, 
    .table_personal td {
        padding: 10px; /* Reduced padding for mobile */
    }

    .table_personal .action-btn {
        padding: 5px 10px; /* Smaller buttons on mobile */
        font-size: 13px;
    }
}




.table_tdetail {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto; /* จัดให้อยู่กึ่งกลาง */
    font-size: 14px;
}

.table_tdetail th,
.table_tdetail td {
    padding: 10px 10px;
    text-align: left; /* จัดข้อความชิดซ้าย */
    border: 0px solid #ddd;
    font-size: 14px;
    color: #333;
}

.table_tdetail th {
    background-color: #039be5; /* สีพื้นหลังหัวตาราง */
    color: white;
    font-weight: lighter;
    text-transform: uppercase;
    border-bottom: 0px solid #dddddd;
}

.table_tdetail td {
    border-bottom: 1px solid #dddddd;
}

/* กำหนดให้หัวตารางมีมุมมน */
.table_tdetail th:first-child {
    border-top-left-radius: 12px;
}

.table_tdetail th:last-child {
    border-top-right-radius: 12px;
}

/* ปรับขนาดของกราฟ */
canvas {
    width: 100% !important;
    height: auto !important;
}

/* Media Query สำหรับหน้าจอขนาดเล็ก */
@media screen and (max-width: 768px) {
    .table_personal th,
    .table_personal td {
        font-size: 12px; /* ลดขนาดตัวอักษร */
        padding: 6px;    /* ลดระยะห่าง */
        /* ไม่จำเป็นต้องระบุ text-align อีกครั้ง */
    }
}


/* ตั้งค่าพื้นฐานสำหรับตาราง .table_personal */
.table_teacherdetail-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 0 auto;
    background-color: #f5f6fa; /* สีพื้นหลังอ่อน */
    padding: 0;
    border-radius: 12px;
}

table.table_teacherdetail {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
    min-width: 100%;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto; /* จัดให้อยู่กึ่งกลาง */
}

/* กำหนดสไตล์สำหรับทุก <th> และ <td> ภายในตารางที่มีคลาส table_personal */
.table_teacherdetail th, .teacherdetail td {
    padding: 12px 15px;
    border-bottom: 1px solid #dddddd;
}

/* สไตล์สำหรับส่วนหัวของตาราง .table_personal */
.table_teacherdetail th {
    background-color: #039be5; /* สีพื้นหลังหัวตาราง */
    color: white;
    font-weight: lighter;
    text-transform: uppercase;
    font-size: 14px;
    border-bottom: 2px solid #dddddd;
}

/* สไตล์สำหรับข้อมูลในเซลล์ .table_personal */
.table_teacherdetail td {
    color: #333;
}

/* กำหนดให้แถวสุดท้ายมีมุมมน */
.table_teacherdetailth:first-child {
    border-top-left-radius: 12px;
}

.table_teacherdetail th:last-child {
    border-top-right-radius: 12px;
}

/* ตั้งค่าพื้นฐานสำหรับตาราง .table_news_sidebar */
.table_news_sidebar-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 0 auto;
    background-color: #f9f9f9;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* เพิ่มเงา */
}

table.table_news_sidebar {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* ขนาด font ใช้ rem เพื่อความยืดหยุ่น */
    text-align: left;
    background-color: #fdfdfd;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
    text-decoration: none; /* ลบขีดเส้นใต้ในลิงก์ */
   

}

.table_news_sidebar th, 
.table_news_sidebar td {
    padding: 10px 7px;
    border-bottom: 1px solid #e0e0e0;
    text-decoration: none;
    transition: background-color 0.3s ease; /* เพิ่มความนุ่มนวลในการเปลี่ยนสี */
}

.table_news_sidebar th {
     background: linear-gradient(135deg, #0a3d62 0%, #3c6382 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    border-bottom: 2px solid #3c6382;
}

.table_news_sidebar td {
    color: #333;
}

/* ปรับสีพื้นหลังเมื่อ hover */
.table_news_sidebar th:hover, 
.table_news_sidebar td:hover {
  /*  background: linear-gradient(135deg, #fff 0%, #ddd 100%); /* เปลี่ยนสีพื้นหลังเมื่อ hover */
}

/* ลบเส้นใต้ของลิ้งค์ */
.table_news_sidebar th a,
.table_news_sidebar td a {
    text-decoration: none;
    color: inherit;
}

/* เมื่อ hover ไม่ต้องขีดเส้นใต้ */
.table_news_sidebar th a:hover,
.table_news_sidebar td a:hover {
    text-decoration: none;
    background-color: transparent; /* พื้นหลังคงเดิมเมื่อ hover ลิ้งค์ */
}
