body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    font-family: 'Noto Sans Thai', sans-serif; /* Apply the font to the entire body */
}

.wrapper {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 250px;
    background-color: #f8f9fa; /* Light grey background */
    padding: 15px;
    transition: transform 0.3s ease; /* Add smooth transition for toggle */
}

.sidebar h4 {
    padding-left: 10px;
    color: #007bff; /* Blue color for text */
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    padding: 10px 15px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #000;
}

.sidebar ul li a:hover {
    background-color: #e9ecef;
    border-radius: 5px;
}

.content {
    flex: 1;
    padding: 15px;
    overflow-y: auto; /* Enable vertical scrolling */
    margin-bottom: 60px; /* เพิ่มระยะห่างจากขอบจอล่าง */
    margin-top: 70px; /* เพิ่มระยะห่างจากขอบจอบน */
    background-color: #ffffff; /* Background color for content area */
    transition: margin-left 0.3s ease; /* Smooth transition for margin adjustment */
}

.navbar {
    background: linear-gradient(to bottom right, #003160, #009efc); /* Gradient from dark blue to light blue */
    width: 100%;
    z-index: 1050; /* ให้ navbar อยู่บนสุด */
    position: relative; /* ให้ navbar อยู่ด้านบนสุดของ stack */
}

.navbar-brand {
    color: #fff !important; /* White color for navbar brand */
}

.navbar-nav .nav-link {
    color: #fff !important; /* White color for navbar links */
}

.navbar-nav .nav-link:hover {
    color: #e9ecef !important; /* Light grey hover color for navbar links */
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1); /* Light border for the navbar toggler */
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%281255, 255, 255, 0.5%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.table thead th {
    background-color: #007bff; /* Blue background for the table header */
    color: #fff; /* White text color for the table header */
    text-align: center; /* Centered text */
}

.card {
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    border-radius: 15px;
}

.cardshadow {
    background-color: #ffffff; /* พื้นหลังสีขาว */
    border-radius: 15px; /* ขอบมน */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 6px 10px rgba(0, 0, 0, 0.1); /* เงาที่ให้มิติ */
    padding: 20px; /* ระยะห่างภายในการ์ด */
    margin-bottom: 20px; /* ระยะห่างภายนอกการ์ด */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* ให้การ์ดมีการเคลื่อนไหวเมื่อ hover */
    border: 1px solid #cecece; 
}

.cardshadow:hover {
    transform: translateY(-2px);  
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2), 0 5px 5px rgba(0, 0, 0, 0.2); /* เพิ่มเงาเมื่อ hover */
}

.card-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.navbar-nav .nav-link.active {
    border-bottom: 2px solid #007bff; /* สีขอบด้านล่างเมื่อเมนูเป็น active */
    background-color: transparent; /* สีพื้นหลังของเมนู active */
    color: #007bff; /* สีข้อความของเมนู active */
}

.sidebar .nav-link.active {
    border-left: 4px solid #007bff; /* สีขอบด้านซ้ายเมื่อเมนูเป็น active */
    background-color: #e9ecef; /* สีพื้นหลังของเมนู active */
}

/* Media Query for mobile responsiveness 991.98px */
@media (max-width: 991.98px), /* Mobile devices */
       (min-width: 768px) and (max-width: 1024px) and (orientation: portrait), /* iPad portrait */
       (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) /* iPad landscape */ {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px; /* Hide the sidebar out of view */
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
    }

    .sidebar.show {
        left: 0; /* Show the sidebar when toggled */
    }

    .content {
        margin-left: 0; /* Remove margin when sidebar is hidden */
    }

    .navbar-toggler {
        display: block;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
}
