/* Custom CSS */
body {
    background-color: #f8f9fa;
    color: #2d3e50;
}
.navbar {
    background-color: #28a745;
}
.navbar-brand, .navbar-nav .nav-link {
    color: white;
}
.sidebar {
    background: linear-gradient(to right, #4caf50, #81c784);
    min-height: 100vh;
    padding: 1rem 0;
    position: fixed;
    width: 200px;
    height: 100%;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
    display: block;
}
.sidebar a {
    color: white;
    display: flex;
    align-items: center;
    padding: 10px 1.5rem;
    text-decoration: none;
    margin: 5px 0;
    transition: background 0.3s;
    display: flex;
    align-items: center;
}
.sidebar a:hover {
    background-color: #218838;
}
.sidebar a i {
    margin-right: 10px;
}
.sidebar .collapse .dropdown-item {
    padding-left: 30px; /* Indent dropdown items */
}
.sidebar .collapse .dropdown-item:hover {
    background-color: #e9ecef;
}
.sidebar .d-flex {
    width: 100%;
}
.sidebar .d-flex .fas.fa-caret-down {
    margin-left: auto; /* Move caret to the right edge */
}
 /* Animation styles */
 .collapse {
    transition: height 0.3s ease;
}
.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}

.main-content {
    margin-left: 200px;
    padding: 20px 20px 0 20px;
    transition: margin-left 0.3s ease;
}
.card-header {
    background-color: #28a745;
    color: white;
}
.btn-green {
    background-color: #28a745;
    color: white;
}
.btn-green:hover {
    background-color: #218838;
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-200px);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}
#preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #28a745;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
