:root {
    --sidebar-width: 210px;
    --topbar-height: 60px;
    --primary-color: #1a1a1a;
    --secondary-color: #B71C1C;
    --accent-color: #D32F2F;
    --background-color: #121212;
}

body {
    background-color: var(--background-color);
    color: #020000;
}

.topbar {
    height: var(--topbar-height);
    background-color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    color: white;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

 /* 美化滚动条样式 */
 .sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: #1a1919;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
            background: #555;
}
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    background-color: rgb(22, 21, 21);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    height: calc(100vh - 56px); 
    overflow-y: auto;     
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
}

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 20px;
    transition: all 0.3s;
}

.main-content.expanded {
    margin-left: 60px;
}

.nav-item {
    border-bottom: 1px solid #333;
}

.sub-menu {
    padding-left: 20px;
    background: #1e1e1e;
}

.nav-link {
    color: #fff;
}

.nav-link:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.nav-link.active {
    background-color: var(--accent-color);
    color: #fff;
}

.breadcrumb {
    margin-bottom: 1rem;
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

.breadcrumb-item, 
.breadcrumb-item a {
    color: #fff;
    text-decoration: none;
}

.breadcrumb-item.active,
.breadcrumb-item + .breadcrumb-item::before {
    color: #aaa;
}

.dropdown-menu {
    min-width: 120px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background-color: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #fff;
}

.dropdown-item:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.top-nav .nav-link {
    color: rgba(255,255,255,0.95);
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.top-nav .nav-link:hover {
    color: #fff;
    background-color: transparent;
}

.top-nav .nav-link.active {
    color: #fff;
    font-weight: 600;
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1040;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}