* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background-color: #f5f7fc !important;
    background-image: none !important;
}

html::before, html::after, body::before, body::after {
    display: none !important;
    content: none !important;
}

html {
    background-color: #f5f7fc !important;
    min-height: 100vh;
}

body {
    background: #f5f7fc !important;
    background-color: #f5f7fc !important;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #1a2634;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 1.5rem; /* 将 body 的 padding 移到这里，去除顶部的白线条 */
}

.dashboard-header {
    margin-bottom: 1rem; /* 减小间距 */
    display: flex;
    justify-content: space-between;
    align-items: center; /* 改为 center 垂直居中对齐 */
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0; /* 移除多余的头部上边距 */
}

.dashboard-header .layui-form-switch {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 22px; /* 调整开关高度以配合按钮 */
    line-height: 22px;
}
.dashboard-header .layui-form-switch i {
    top: 3px;
    height: 16px;
    width: 16px;
}

.title-section h1 {
    font-size: 1.9rem;
    font-weight: 700;
    background: linear-gradient(120deg, #1E2A3A, #2C3E50);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.refresh-btn {
    background: #2c3e50;
    border: none;
    color: white;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    /* 移除鼠标悬浮变化 */
}

.quick-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow-x: auto;
}

.quick-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    text-decoration: none;
    padding: 0.5rem 1rem;
    color: #5f7f9e;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    background: transparent;
}

.nav-item:hover,
.nav-item.active {
    color: #3b82f6;
    background: #eef2ff;
}

.stats-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem; /* 统一模块卡片与下方的间距 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: none; /* 彻底移除外边框 */
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px; /* 增加标题和表格之间的间距 */
    padding-bottom: 0;
    border-bottom: none;
}

.stats-title {
    font-size: 1.4rem;
    font-weight: 600;
    padding-left: 0.5rem;
    border-left: 4px solid #3b82f6;
    margin-bottom: 0;
}

.stats-header .layui-tab-title {
    border: none;
    display: flex;
    margin-bottom: 0;
}

.stats-header .layui-tab-title li {
    cursor: pointer;
}

.stats-section:last-of-type {
    margin-bottom: 0; /* 最后一个模块的底部边距清零，交由 footer 的 margin-top 控制 */
}

.stats-section .layui-tab.layui-tab-brief {
    margin: 0;
}

.stats-section .layui-tab.layui-tab-brief>.layui-tab-title {
    display: none;
}

.stats-section .layui-tab-content {
    padding: 0;
    overflow: hidden; /* 防止任何外部溢出导致模块级别滚动条 */
}

.layui-tab-title {
    border-bottom-width: 0px !important;
    border-bottom: none !important;
}

.layui-tab-title::after, .layui-tab-title::before {
    display: none !important;
}

.layui-tab-title li {
    font-weight: 600;
    color: #5f7f9e;
    padding: 0 10px;
    font-size: 0.95rem;
}

.layui-tab-title .layui-this {
    color: #3b82f6;
}

.layui-tab-brief>.layui-tab-title .layui-this:after {
    border-bottom: 2px solid #3b82f6;
}

.layui-tab-content {
    padding: 0; /* 移除原本表格上下多余的内边距 */
}

/* 优化表格样式 */
.layui-table-header th {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.layui-table-total td {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.layui-table td,
.layui-table th {
    border-color: #e2e8f0 !important;
}

.layui-table-cell {
    height: auto !important;
}

.layui-table-body .layui-table-cell {
    padding: 5px 15px !important;
    /* 调整行高 */
    line-height: 20px !important;
}

.layui-table-header .layui-table-cell,
.layui-table-total .layui-table-cell {
    padding: 5px 15px !important;
    /* 调整列头和列尾的内边距 */
    line-height: 20px !important;
    /* 降低行高 */
}

.layui-table-view {
    margin: 0; /* 防止 layui 默认的外边距 */
    border: 1px solid #e2e8f0 !important; /* 彻底修复表格外层边框 */
    border-radius: 4px;
    overflow: hidden; /* 防止 layui-table-view 产生不必要的滚动条 */
    padding-bottom: 0; 
    margin-bottom: 0 !important; /* 强制去除可能由 layui 引起的额外底部间距 */
    height: auto !important; /* 解决layui自动计算高度可能导致的滚动条 */
}

.layui-table-box {
    border: none !important; /* 移除内层重复边框 */
    border-radius: 0;
    overflow: hidden; /* 防止内部边框溢出 */
    height: auto !important; /* 强制覆盖固定高度，彻底消除多余滚动 */
}

.layui-table-body {
    overflow-y: auto !important; /* 只允许在数据体本身过长时垂直滚动 */
    overflow-x: auto !important; /* 允许在内容挤压不过时水平滚动 */
    max-height: 465px !important; /* 限制最大高度，约支持15行 */
}

.table-responsive {
    overflow-x: auto;
}

.logs-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
}

.logs-table th,
.logs-table td {
    padding: 0.8rem 0.5rem;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.logs-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #334155;
}

.logs-table tbody tr:hover {
    background-color: #f1f5f9;
}

.text-center {
    text-align: center;
}

/* 展开行的鼠标手势和过渡动画 */
.layui-table-body tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.layui-table-body tr.version-detail-tr {
    cursor: default;
}

footer {
    text-align: center;
    margin-top: 1rem; /* 通过 margin-top 增加底部和上方模块的间距 */
    padding: 0; /* 彻底移除多余的 padding */
    margin-bottom: 0;
    color: #7e95b0;
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .quick-nav {
        justify-content: center;
        padding: 0.5rem 0.2rem;
        border-radius: 0;
        margin: 0 -1.5rem 1rem -1.5rem;
        gap: 0.2rem;
    }

    .nav-item {
        padding: 0.4rem 0.3rem;
        font-size: 0.85rem;
    }

    /* 在小屏幕下，减小表格内边距以尽可能挤进屏幕，避免横向滚动 */
    .layui-table-body .layui-table-cell,
    .layui-table-header .layui-table-cell,
    .layui-table-total .layui-table-cell {
        padding: 8px 5px !important;
        font-size: 0.85rem;
    }
}

.layui-tab-title .layui-this:after{
    display: none;
}