* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box; /* 兼容旧版Safari */
    -moz-box-sizing: border-box; /* 兼容旧版Firefox */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: system-ui, sans-serif;
    background: #f4f6f9;
}
#watermark-box{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* 层级拉满，盖在所有普通内容之上 */
    z-index: 99999;
    /* 鼠标事件穿透，不影响页面点击、输入 */
    pointer-events: none;
    /* 禁止选中水印文字 */
    user-select: none;
    background-repeat: repeat;
}

input[type=checkbox] {
    transform: scale(1.5);
}

button:disabled:hover {
    cursor: not-allowed; /* 鼠标样式变为禁止图标 */
}

.layout {
    height: 100%;
    /*display: flex;*/
    /*min-height: 100vh;*/
}

.hidden {
    display: none;
}

.shenglue {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--left-sidebar-width);
    background: #1e293b;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0px;
    left: 0px;
    height: 100%;
}

.logo {
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #334155;
    height: var(--left-sidebar-logo-heigh);
}

.menu {
    display: flex;
    flex-direction: column;
    height: calc(100% - var(--left-sidebar-logo-heigh));
    overflow-y: auto;
}

.menu-item {
    padding: 15px 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover, .menu-item.active {
    background: #334155;
    color: #fff;
    border-left-color: #3b82f6;
}

/* 内容区样式 */
.content {
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--left-sidebar-width));
    position: absolute;
    left: var(--left-sidebar-width);
    top: 0px;
}

.topbar {
    padding: 15px 30px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    height: var(--left-sidebar-logo-heigh);
}

.view-container {
    height: calc(100% - var(--left-sidebar-logo-heigh));
    padding-top: 30px;
    flex: 1;
}

/* 模块内部样式建议写在各自的 JS 中，或者使用 BEM 命名规范避免冲突 */
.card {
    height: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

/* 搜索框样式 */
.search-input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
    width: 200px;
    height: var(--standard-heigh);
}

.w130 {
    width: 130px;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}


/* =========================================
   高级数据表格样式 (.data-table)
   ========================================= */

/* 1. 表格容器：添加阴影和圆角，让表格看起来像一张独立的卡片 */
.data-table-wrapper {
    border-radius: 8px;
    overflow: hidden; /* 确保内部表格的圆角能生效 */
    border: 1px solid #e2e8f0;
}

/* 2. 表格基础样式：撑满宽度，去除单元格间距 */
.data-table {
    width: 100%;
    border-collapse: collapse; /* 合并边框 */
    font-size: 14px;
    /*color: #334155;*/
    table-layout: fixed;
}

/* 3. 表头样式：使用浅灰背景，字体加粗，颜色稍浅 */
.data-table thead th {
    background-color: #f8fafc;
    padding: 6px 9px;
    text-align: left;
    font-weight: 600;
    /*color: #64748b;*/
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap; /* 防止表头文字换行 */
    text-overflow: ellipsis;
}

/* 4. 单元格样式：统一的上下内边距和底部分割线 */
.data-table tbody td {
    padding: 6px 9px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle; /* 内容垂直居中 */
    text-overflow: ellipsis;
}

/* 5. 斑马纹：奇数行和偶数行颜色区分，提升可读性 */
.data-table tbody tr:nth-child(even) {
    background-color: #fafbfd;
}

/* 6. 鼠标悬停效果：高亮当前行，增强交互感 */
.data-table tbody tr:hover {
    background-color: #eff6ff; /* 极浅的蓝色背景 */
    transition: background-color 0.2s ease;
}

/* 7. 最后一行去掉底部分割线，保持底部干净 */
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 8. 表格内的代码标签样式（如角色标识） */
.data-table code {
    background-color: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}


/* =========================================
   通用分页组件样式
   ========================================= */
.pagination-wrapper {
    display: flex;
    justify-content: flex-end; /* 靠右对齐，也可以改成 space-between */
    align-items: center;
    margin-top: 20px;
    gap: 6px;
    font-size: 14px;
}

.pagination-info {
    color: #64748b;
    margin-right: 15px;
}

.pagination-btn {
    min-width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.pagination-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    background: #f8fafc;
}

.pagination-ellipsis {
    padding: 0 5px;
    color: #94a3b8;
    user-select: none;
}

/* =========================================
   通用分页组件样式
   ========================================= */


/* 基础切换按钮样式 */
.toggle-btn {
    position: relative;
    width: 60px;
    height: 30px;
    border-radius: 30px;
    background-color: var(--disabled-color);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.toggle-btn::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: white;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 激活状态 */
.toggle-btn.active {
    background-color: var(--primary-color);
}

.toggle-btn.active::after {
    left: calc(100% - 27px);
}


/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    height: var(--standard-heigh);

}

.btn-s {
    display: inline-block;
    padding: 4px 4px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    height: calc(var(--standard-heigh) - 12px);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}


/* =========================================
   通用弹窗 (Modal) 样式
   ========================================= */

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    min-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-body {
    padding: 20px;
}

.modal-body-grid4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.modal-body-td {

}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 50px;
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}


/* =========================================
   通用弹窗 (Modal) 样式
   ========================================= */

/* 徽章样式 */
.badge {
    display: inline-block;
    min-width: 10px;
    padding: 5px 7px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}


.dropdown-menu {
    position: absolute;
    list-style: none;
    width: 120px;
    /*height: 200px;*/
    background-color: whitesmoke;
    border: 1px solid cornflowerblue;
    border-radius: 5px;
    z-index: 9999;
}

.dropdown-menu a {
    color: inherit; /* 继承父元素的文字颜色 */
    text-decoration: none; /* 移除下划线 */
    background-color: transparent; /* 移除可能的默认背景色 */
}

.dropdown-menu li {
    padding: 5px;
    border-bottom: 2px solid black;
}


/*  红色中划线*/
.over-price {
    text-decoration: line-through;
    text-decoration-color: red;
}


.date-picker-container {
    display: flex;
    justify-content: space-between;
}

.date-picker-data {
    display: flex;
    flex-wrap: wrap;
    width: -webkit-fill-available;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.date-picker-data-item {
    border: 1px solid #9f9c9c;
    margin-right: 5px;
    margin-bottom: 5px;
    height: fit-content;
}

.search-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


.scrollable-table tbody {
    display: block;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.scrollable-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.scrollable-table th {
    position: sticky;
    top: 0;
}