/* Custom CSS Styles */

/* General Styles */
body {
    background-color: #f5f8fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    min-height: calc(100vh - 200px);
}

/* Login Page */
.login-container {
    animation: fadeIn 0.5s ease-in-out;
}

/* Card Styles */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Icon Boxes */
.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #198754;
    transition: all 0.3s ease;
}

.icon-box:hover {
    background-color: #198754;
    color: white;
    transform: scale(1.1);
}

/* Navbar */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.navbar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
}

/* Data Tables */
.datatable th {
    white-space: nowrap;
}

.datatable th, .datatable td {
    vertical-align: middle;
}

/* Form Controls */
.form-control:focus, .form-select:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Custom Buttons */
.btn-primary {
    background-color: #198754;
    border-color: #198754;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #146c43;
    border-color: #146c43;
}

.btn-outline-primary {
    color: #198754;
    border-color: #198754;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary.active {
    background-color: #198754;
    border-color: #198754;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .icon-box {
        width: 50px;
        height: 50px;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* Custom Modal Styles */
.modal-header {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.modal-content {
    border-radius: 0.5rem;
    border: none;
}

/* Footer */
footer {
    padding: 1.5rem 0;
    font-size: 0.875rem;
    box-shadow: 0 -0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Progress bars */
.progress {
    height: 0.75rem;
    border-radius: 0.75rem;
}

/* Table styles */
.table-hover tbody tr:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

/* Custom toggle button */
.custom-toggle {
    width: 60px;
    height: 30px;
    position: relative;
    border-radius: 30px;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s;
}

.custom-toggle::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    top: 3px;
    left: 3px;
    transition: left 0.3s;
}

.custom-toggle.active {
    background-color: #198754;
}

.custom-toggle.active::after {
    left: 33px;
}

/* Sidebar menu for mobile */
@media (max-width: 992px) {
    .mobile-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        z-index: 1050;
        overflow-y: auto;
        transition: left 0.3s;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-sidebar.show {
        left: 0;
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }
    
    .sidebar-backdrop.show {
        display: block;
    }
}