body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #0d6efd 0%, #0b5ed7 100%);
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .menu-section-title,
.sidebar.collapsed .user-info span,
.sidebar.collapsed .user-actions span {
    display: none;
}

.sidebar.collapsed .sidebar-footer {
    width: 70px;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    background: rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    color: white !important;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand:hover {
    color: white !important;
    text-decoration: none !important;
}

.sidebar-collapse-toggle {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 1.2rem;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.sidebar-collapse-toggle:hover {
    opacity: 0.8 !important;
    color: white !important;
}

.sidebar-collapse-toggle i {
    color: white !important;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0 6rem 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex !important;
    align-items: center;
    padding: 0.75rem 1.5rem !important;
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none !important;
    transition: all 0.2s;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
    padding-left: 2rem !important;
}

.sidebar-menu a.active {
    background: rgba(255,255,255,0.15) !important;
    color: white !important;
    font-weight: 500;
    border-left: 3px solid white;
}

.sidebar-menu i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.menu-section-title {
    color: rgba(255,255,255,0.6) !important;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 0.5rem;
}

.sidebar-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 260px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 1001;
}

.user-menu {
    padding: 1rem 1.5rem;
}

.user-info {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.user-info .badge {
    background: rgba(255,255,255,0.2) !important;
    font-size: 0.7rem;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-actions a {
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none !important;
    padding: 0.5rem !important;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.user-actions a:hover {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.collapsed {
    margin-left: 70px;
}

.top-bar {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-wrapper {
    padding: 0;
}

.mobile-menu-toggle {
    background: transparent;
    color: #0d6efd;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-collapse-toggle {
    background: transparent;
    color: #0d6efd;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.sidebar-collapse-toggle:hover {
    background: rgba(13, 110, 253, 0.1);
    border-radius: 4px;
}

.mobile-menu-toggle:hover {
    background: rgba(13, 110, 253, 0.1);
    border-radius: 4px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-footer {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show + .main-content .sidebar-footer,
    .sidebar.show .sidebar-footer {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .main-content.collapsed {
        margin-left: 0;
    }

    .sidebar-collapse-toggle {
        display: none;
    }
}

@media (min-width: 1025px) {
    .sidebar {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: none;
    }
}

/* Card styling */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.15s ease-in-out;
}

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

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Utility classes */
.text-muted {
    color: #6c757d !important;
}

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

/* Button improvements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Table improvements */
.table {
    margin-bottom: 0;
}

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