/* Custom Styles for Red and White Theme */
body {
    font-family: 'Sarabun', sans-serif; /* แนะนำให้ใช้ Font Sarabun สำหรับภาษาไทย */
    background-color: #f8f9fa; /* สีขาว */
    color: #343a40; /* สีตัวอักษรเริ่มต้น */
    display: flex; /* [Modified] Use flexbox for sticky footer */
    flex-direction: column; /* [Modified] Stack children vertically */
    min-height: 100vh; /* [Modified] Ensure body takes at least full viewport height */
}

/* Navbar adjustments */
.navbar.bg-dark {
    background-color: #1a1a1a !important; /* ใช้สีดำที่เข้มขึ้นสำหรับ Navbar */
}

.navbar-brand {
    color: #fff !important; /* ให้ชื่อแบรนด์เป็นสีขาวเสมอ */
}

.navbar-nav .nav-link {
    color: #f8f9fa; /* สีขาวเริ่มต้นสำหรับลิงก์ที่ไม่ Active */
    transition: all 0.3s ease-in-out;
    padding: 0.7rem 1.2rem;
    margin: 0 0.25rem;
    border-radius: 0.3rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.navbar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background on hover */
}

/* Active Link Styles */
.navbar-nav .nav-link.active {
    font-weight: bold;
    /* [Modified] Removed border-bottom for cleaner look */
    /* border-bottom: 3px solid; */
    padding-bottom: 0.7rem; /* [Modified] Revert padding-bottom */
    
    /* Ensure background color is prominent for active state */
    /* No change needed here as specific classes handle background */
}

/* Specific colors for active links */
.navbar-nav .nav-link.active-warning {
    background-color: #ffc107; /* Background color for active warning links */
    color: #343a40 !important; /* Dark text for contrast */
    border-color: #e0a800; /* Darker border color */
}

.navbar-nav .nav-link.active-danger {
    background-color: #dc3545; /* Background color for active danger links */
    color: #fff !important; /* White text for contrast */
    border-color: #c82333; /* Darker border color */
}

.navbar-nav .nav-link.active-info {
    background-color: #0dcaf0; /* Background color for active info links */
    color: #343a40 !important; /* Dark text for contrast */
    border-color: #0aa5c2; /* Darker border color */
}

.navbar-nav .nav-link.active-success {
    background-color: #28a745; /* Background color for active success links */
    color: #fff !important; /* White text for contrast */
    border-color: #1e7e34; /* Darker border color */
}

/* Override default Bootstrap btn-outline-light active/focus state if needed */
.navbar-nav .nav-link.btn.btn-outline-light.active {
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-color: #fff !important;
    color: #fff !important;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}
.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.card-header.bg-danger {
    background-color: #dc3545 !important;
    color: white;
}

.table thead.bg-danger th {
    background-color: #dc3545;
    color: white;
}

/* Footer positioning */
.footer {
    margin-top: auto; /* [Modified] Push footer to the bottom */
}

/* Added to ensure main content expands */
.flex-grow-1 {
    flex-grow: 1;
}