
body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-top: 56px; /* Height of navbar */
}

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Navbar */
.navbar {
    padding: 0.5rem 1rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    z-index: 1030;
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-brand img {
    max-height: 40px;
    margin-right: 0.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease-in-out;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.15);
}

.navbar-dark .navbar-nav .nav-link i {
    margin-right: 0.5rem;
}

.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
    border: none;
    border-radius: 0.35rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 400;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: #f8f9fa;
    color: #16181b;
}

.dropdown-item.active {
    background-color: #4e73df;
    color: #fff;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px; /* Height of navbar */
    bottom: 0;
    left: 0;
    width: 225px; /* Fixed width */
    z-index: 100;
    padding: 0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    background-color: #fff;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
}

.sidebar .nav-link {
    color: #3a3b45;
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover {
    color: #4e73df;
    background-color: rgba(78, 115, 223, 0.1);
    border-left-color: #4e73df;
}

.sidebar .nav-link.active {
    color: #4e73df;
    background-color: rgba(78, 115, 223, 0.1);
    border-left-color: #4e73df;
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    color: #b7b9cc;
    padding: 1rem;
    margin-bottom: 0;
}

/* Main Content */
.main-content {
    margin-left: 225px; /* Same as sidebar width */
    padding: 1.5rem;
    transition: all 0.3s ease-in-out;
}

/* Stats Cards */
.stats-cards .card {
    border-radius: 0.35rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
}

.stats-cards .card:hover {
    transform: translateY(-5px);
}

.stats-cards .card .card-body {
    padding: 1.25rem;
}

.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h6 {
    font-weight: 700;
    font-size: 1rem;
    color: #4e73df;
    margin-bottom: 0;
}

.card-body {
    padding: 1.25rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 400px; /* Set a max height for vertical scrolling */
    overflow-y: auto;
}

.table {
    width: 100%;
    margin-bottom: 0;
    color: #212529;
    border-collapse: collapse;
}

.table th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 1;
    vertical-align: middle;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #4e73df;
    white-space: nowrap;
    padding: 0.75rem;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

.table-bordered {
    border: 1px solid #e3e6f0;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e3e6f0;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Activity Feed */
.activity-feed {
    padding: 0;
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    position: relative;
    padding-bottom: 1rem;
    padding-left: 2rem;
    border-left: 2px solid #e3e6f0;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.activity-item:last-child {
    border-left: 2px solid transparent;
    margin-bottom: 0;
}

.activity-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: -0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #4e73df;
}

.activity-content {
    padding: 0.5rem 0;
}

.activity-header {
    margin-bottom: 0.25rem;
}

.activity-user {
    font-weight: 600;
    color: #4e73df;
}

.activity-action {
    font-weight: 600;
    margin-left: 0.25rem;
}

.activity-description {
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
}

/* Notifications */
.notification-dropdown {
    min-width: 300px;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown .dropdown-header {
    background-color: #4e73df;
    color: #fff;
    padding: 0.75rem 1rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.notification-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e3e6f0;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #fff;
    flex-shrink: 0;
}

.bg-info {
    background-color: #36b9cc !important;
}

.bg-success {
    background-color: #1cc88a !important;
}

.bg-warning {
    background-color: #f6c23e !important;
}

.bg-error {
    background-color: #e74a3b !important;
}

.notification-content {
    flex: 1;
    min-width: 0; /* Prevents content from overflowing */
}

.notification-content p {
    margin-bottom: 0.25rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e3e6f0;
    padding: 1rem 0;
    margin-top: auto;
}

/* Quick Actions */
.quick-actions .btn {
    padding: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    height: 100%;
}

.quick-actions .btn i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.quick-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        box-shadow: none;
        margin-bottom: 1rem;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .navbar-brand img {
        max-height: 35px;
    }
}

@media (max-width: 767.98px) {
    .stats-cards .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header .btn {
        margin-top: 0.5rem;
        align-self: flex-end;
    }
    
    .table th, 
    .table td {
        padding: 0.5rem;
    }
}

/* Form Elements */
.form-control {
    border-radius: 0.35rem;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d3e2;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
    border-color: #bac8f3;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #d1d3e2;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.35rem;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
}

.btn-info {
    background-color: #36b9cc;
    border-color: #36b9cc;
}

.btn-info:hover {
    background-color: #2c9faf;
    border-color: #2a96a5;
}

.btn-warning {
    background-color: #f6c23e;
    border-color: #f6c23e;
}

.btn-warning:hover {
    background-color: #f4b619;
    border-color: #f4b30d;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #d52a1a;
}

/* Badges */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.35rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Utility Classes */
.text-primary {
    color: #4e73df !important;
}

.text-success {
    color: #1cc88a !important;
}

.text-info {
    color: #36b9cc !important;
}

.text-warning {
    color: #f6c23e !important;
}

.text-danger {
    color: #e74a3b !important;
}

.bg-primary {
    background-color: #4e73df !important;
}

.bg-success {
    background-color: #1cc88a !important;
}

.bg-info {
    background-color: #36b9cc !important;
}

.bg-warning {
    background-color: #f6c23e !important;
}

.bg-danger {
    background-color: #e74a3b !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem 0 rgba(58, 59, 69, 0.2) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

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