:root {
    --navbar-height: 60px;
    --footer-height: 40px;
    --sidebar-width: 250px;
    --sidebar-width-mobile: 200px;
    --page-padding: 20px;
}

/* 全局限制页面滚动，移动端兼容 */
html, body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 顶部导航栏 */
.navbar-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    z-index: 1001;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* 左侧菜单栏 */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    z-index: 1000;
    padding-top: 20px;
    transition: transform 0.3s ease;
}

    .sidebar .nav-link {
        color: #333;
        padding: 10px 20px;
        display: block;
        border-radius: 4px;
    }

        .sidebar .nav-link:hover,
        .sidebar .nav-link.active {
            background-color: #e9ecef;
            color: #007bff;
        }

/* 内容区域，只此区域滚动 */
.content {
    position: absolute;
    top: var(--navbar-height);
    bottom: var(--footer-height);
    left: var(--sidebar-width);
    right: 0;
    padding: var(--page-padding);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 页脚固定 */
.footer {
    position: fixed;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    height: var(--footer-height);
    padding: 10px 0;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}
.table-center th,
.table-center td {
    text-align: center;
    vertical-align: middle;
}

/* 移动端兼容 */
@media (max-width: 768px) {
    :root {
        --sidebar-width: var(--sidebar-width-mobile);
    }

    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .content, .footer {
        left: 0 !important;
    }

    .navbar-top .toggler {
        display: inline-block;
        cursor: pointer;
        margin-right: 10px;
    }
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
    }

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }
.pagination {
    justify-content: center;
}
.status-badge {
    font-size: 1rem;
    padding: 10px 15px;
    line-height: 1.2;
}
.chart-container {
    position: relative;
    width: 100%;
    height: 200px;
}