/* =================================
   1. Font & Body Setup
   ================================= */

body, h1, h2, h3, h4, h5, h6, p, input, select, textarea, button, label, a, th, td, div {
    font-family: "Sarabun", sans-serif !important;
    font-weight: 400; /* น้ำหนักตัวอักษรมาตรฐาน */
    letter-spacing: 0;
}

body {
    font-weight: 300; /* น้ำหนักตัวอักษรสำหรับเนื้อหาทั่วไป */
    animation: fadeIn 0.5s ease-in;
}

h1, h2, h3 {
    font-weight: 500; /* น้ำหนักตัวอักษรสำหรับหัวข้อหลัก */
}

/* =================================
   2. Animations
   ================================= */

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

/* =================================
   3. Component Styles
   ================================= */

.card {
    border-radius: 1rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

input.form-control, 
select.form-select {
    border-radius: .5rem;
    transition: border-color 0.3s ease;
}

input.form-control:focus, 
select.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25);
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease-in-out;
}

.table-responsive {
    font-size: 0.9rem;
}

button.view-detail-btn {
    transition: all 0.2s ease-in-out;
}

button.view-detail-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

/* =================================
   4. Library Fixes & Overrides
   ================================= */
   
.tt-menu {
    /* z-index สูงๆ เพื่อให้ Dropdown ของ Autofill แสดงอยู่บนสุดเสมอ */
    z-index: 9999 !important;
}

/* =================================
   5. Layout & Responsive
   ================================= */
   
.container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 991px) {
    .card {
        width: 100%;
    }
}

/* =================================
   6. Dark Mode Specific Overrides
   ================================= */

/* สำหรับกล่องที่มี background สว่างใน dark mode */
.bg-light-subtle {
    color: #000 !important;
}

/* เพิ่มความชัดเจนให้ข้อความย่อยในกล่อง */
.bg-light-subtle p {
    color: #000 !important;
}