body {
    font-family: 'Sarabun', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding-top: 0;
    transform: translateX(-280px);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: 2px 0px 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 15px;
    border-radius: 0 0 15px 15px;
}

.sidebar-logo img {
    max-width: 80%;
    height: auto;
}

.sidebar h4 {
    color: #495057;
    text-align: center;
    font-weight: 600;
    margin-bottom: 30px;
    padding: 0 20px;
}

.sidebar-menu {
    padding: 0 15px;
    flex-grow: 1;
}

.sidebar-link {
    display: block;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-link:hover {
    background: linear-gradient(#8566ea);
    color: #ffffff;
    transform: translateX(5px);
    text-decoration: none;
}

.sidebar-link.text-danger:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff !important;
}
.sidebar-link.text-primary:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff !important;
}

/* Activities Card Styling for Sidebar */
.activities-dropdown {
    position: relative;
}

.activities-dropdown .sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.activities-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

.activities-card {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.activities-card.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.activities-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.activities-card-header h6 {
    margin: 0;
    font-size: 0.9em;
    font-weight: 600;
}

.activities-card-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.activities-card-header .btn-close:hover {
    opacity: 1;
}

.activities-card-body {
    padding: 8px 0;
}

.activity-link {
    display: block;
    padding: 10px 15px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9em;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.activity-link:hover {
    background: linear-gradient(135deg, #8566ea 0%, #6f42c1 100%);
    color: #ffffff;
    transform: translateX(5px);
    text-decoration: none;
}

.activity-link:active {
    background: linear-gradient(135deg, #8566ea 0%, #6f42c1 100%);
    color: #ffffff;
}

/* Ensure the card doesn't interfere with other sidebar elements */
.activities-dropdown {
    z-index: 1000;
}

/* Mobile responsiveness for activities card */
@media (max-width: 767px) {
    .activities-card {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        transform: translateY(-10px) scale(0.95);
        width: 100%;
        max-width: none;
        margin-top: 5px;
        z-index: 1002;
    }
    
    .activities-card.show {
        transform: translateY(0) scale(1);
    }
    
    /* Ensure the card appears above other elements on mobile */
    .activities-dropdown {
        z-index: 1001;
    }
}


.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px 15px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.footer-text {
    font-size: 14px;
    font-family: 'Sarabun', sans-serif;
    text-align: center;
    color: #6c757d;
    margin: 0;
}

/* Content Styling */
.content {
    padding: 20px;
    z-index: 500;
    color: #495057;
    transition: all 0.3s ease;
    min-height: 100vh;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.img-banner {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.banner-container:hover .img-banner {
    transform: scale(1.02);
}

/* Navbar Styling */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-logo {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 35px;
    filter: brightness(0) invert(1);
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Responsive Design */
@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }

    .navbar-toggler {
        display: none;
    }

    .content {
        margin-left: 280px;
    }

    .close-btn {
        display: none;
    }

    .sidebar-logo img {
        width: 100%;
        height: auto;
    }

    .navbar {
        display: none;
    }
}

@media (max-width: 767px) {
    .content.hide {
        opacity: 0;
        pointer-events: none;
    }

    .sidebar-logo {
        display: none;
    }
    
    .sidebar {
        width: 280px;
        transform: translateX(-280px);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
}

/* Card Enhancements */
.card {
    border: none;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

/* Form Enhancements */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    border: 2px solid #e9ecef;
    border-right: none;
}

/* Badge Enhancements */
.badge {
    font-size: 0.85em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Table Enhancements */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: linear-gradient(#8566ea);
    color: white;
    border: none;
    font-weight: 600;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

/* Pagination Enhancements */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: #667eea;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}