/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    position: relative;
}

/* 水印样式 */
.watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* 使用SVG创建重复水印背景 */
.watermark::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Ctext x='50%25' y='50%25' font-size='28' fill='rgba(0,0,0,0.08)' text-anchor='middle' dominant-baseline='middle' transform='rotate(-45 250 250)' font-weight='500' letter-spacing='3' font-family='Microsoft YaHei'%3E淘宝:网站源码仓库原创开发%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 500px 500px;
    background-position: 0 0;
}

/* 顶部导航栏 - 蓝色 */
.header {
    background-color: #3489be;
    color: #fff;
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 60px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.header-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header-user:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.header-user-name {
    font-size: 14px;
}

.header-user-dropdown {
    font-size: 12px;
    opacity: 0.8;
}

/* 用户下拉菜单 */
.header-user {
    position: relative;
}

.header-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    display: none;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    animation: fadeInDown 0.2s ease-out;
}

.header-user-dropdown-menu.show {
    display: block;
}

.header-user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border-bottom: 1px solid #f5f5f5;
}

.header-user-dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.header-user-dropdown-menu .dropdown-item:hover {
    background-color: #f5f7fa;
    color: #409EFF;
}

.header-user-dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
    color: #666;
}

.header-user-dropdown-menu .dropdown-item:hover i {
    color: #409EFF;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 侧边栏 - 白色 */
.sidebar {
    position: fixed;
    width: 240px;
    height: 100%;
    background-color: #fff;
    padding-top: 60px;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    z-index: 999;
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3489be 0%, #3489be 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.sidebar-user-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #52c41a;
    line-height: 1.4;
}

.sidebar-user-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #52c41a;
    flex-shrink: 0;
}

.sidebar-search {
    padding: 15px 20px;
    border-bottom: 1px solid #e8e8e8;
}

.sidebar-search-input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
}

.sidebar-search-input:focus {
    outline: none;
    border-color: #409EFF;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.sidebar-search-wrapper {
    position: relative;
}

.sidebar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

.sidebar-menu-title {
    padding: 15px 20px 10px;
    font-size: 12px;
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    position: relative;
}

.sidebar-menu li[style*="display: none"] {
    display: none !important;
}

.sidebar-menu a:hover {
    background-color: #f0f2f5;
    color: #409EFF;
}

.sidebar-menu a.active {
    background-color: #e6f7ff;
    color: #409EFF;
    border-right: 3px solid #409EFF;
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
    font-size: 16px;
}

.sidebar-menu-arrow {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.6;
}

/* 主要内容区域 */
.main-content {
    margin-left: 240px;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
    padding-top: 80px;
}

.page-title {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-title-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e8e8e8;
    background-color: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.card-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
    color: #666;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    background-color: #fff;
}

.form-control:hover {
    border-color: #409EFF;
}

.form-control:focus {
    border-color: #409EFF;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.form-col {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

/* 输入框带图标 */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 35px;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: normal;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s;
    line-height: 1.5;
    text-decoration: none;
}

.btn-primary {
    background-color: #409EFF;
    color: white;
    border-color: #409EFF;
}

.btn-primary:hover {
    background-color: #66b1ff;
    border-color: #66b1ff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

.btn-success {
    background-color: #67C23A;
    color: white;
    border-color: #67C23A;
}

.btn-success:hover {
    background-color: #85ce61;
    border-color: #85ce61;
    box-shadow: 0 2px 8px rgba(103, 194, 58, 0.3);
}

.btn-danger {
    background-color: #F56C6C;
    color: white;
    border-color: #F56C6C;
}

.btn-danger:hover {
    background-color: #f78989;
    border-color: #f78989;
    box-shadow: 0 2px 8px rgba(245, 108, 108, 0.3);
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #666;
    border-color: #d9d9d9;
}

.btn-secondary:hover {
    background-color: #fafafa;
    border-color: #409EFF;
    color: #409EFF;
}

.btn i {
    margin-right: 5px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
    background-color: #fff;
}

.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.table th {
    background-color: #fafafa;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

/* 表格列对齐规则 */
/* 操作列始终居中 */
.table th:last-child,
.table td:last-child {
    text-align: center !important;
}

/* ID列居中 */
.table th:first-child,
.table td:first-child {
    text-align: center;
}

/* 数量、时间等数字列居中 - 通过类名控制 */
.table th.text-center,
.table td.text-center {
    text-align: center !important;
}

.table th.text-right,
.table td.text-right {
    text-align: right !important;
}

/* 确保表格单元格内容对齐 */
.table td {
    word-break: break-word;
}

/* 表格列宽度均匀分配 */
.table {
    table-layout: auto;
}

/* 确保表头和单元格对齐 */
.table thead th,
.table tbody td {
    padding: 12px;
    vertical-align: middle;
}

.table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 30px;
}

.table th.sortable:hover {
    color: #409EFF;
}

.table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
}

.table th.sort-asc::after {
    content: '↑';
    color: #409EFF;
}

.table th.sort-desc::after {
    content: '↓';
    color: #409EFF;
}

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

.table a {
    color: #409EFF;
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
}

/* 操作按钮 */
.action-btn {
    padding: 4px 8px;
    font-size: 12px;
    margin: 0 2px;
    height: 28px;
    line-height: 1;
}

/* 操作菜单 - 三点下拉菜单 */
.action-menu {
    position: relative;
    display: inline-block;
}

.action-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    color: #666;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: all 0.3s;
}

.action-menu-btn:hover {
    color: #409EFF;
    background-color: #f5f7fa;
}

.action-menu-btn i {
    font-size: 16px;
}

/* 操作下拉菜单 */
.action-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    display: none;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    animation: fadeInDown 0.2s ease-out;
}

.action-dropdown-menu.show {
    display: block;
}

.action-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border-bottom: 1px solid #f5f5f5;
    white-space: nowrap;
}

.action-dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.action-dropdown-menu .dropdown-item:hover {
    background-color: #f5f7fa;
    color: #409EFF;
}

.action-dropdown-menu .dropdown-item.danger:hover {
    color: #F56C6C;
    background-color: #fef0f0;
}

.action-dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 14px;
}

/* 表格操作列居中 */
.table td:last-child {
    text-align: center;
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    line-height: 20px;
}

.status-success {
    background-color: #f0f9ff;
    color: #67C23A;
    border: 1px solid #b3e19d;
}

.status-pending {
    background-color: #fffbe6;
    color: #E6A23C;
    border: 1px solid #f5dab1;
}

.status-failed {
    background-color: #fef0f0;
    color: #F56C6C;
    border: 1px solid #fbc4c4;
}

/* 文本颜色 */
.text-success {
    color: #67C23A !important;
}

.text-danger {
    color: #F56C6C !important;
}

.text-warning {
    color: #E6A23C !important;
}

/* 搜索区域 */
.search-area {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8e8e8;
}

/* 统计卡片 */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin: 0 10px 20px;
    text-align: center;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 600;
    margin: 10px 0;
    color: #333;
}

.stat-card .stat-title {
    font-size: 14px;
    color: #999;
}

.stat-card.primary {
    border-top: 3px solid #409EFF;
}

.stat-card.success {
    border-top: 3px solid #67C23A;
}

.stat-card.danger {
    border-top: 3px solid #F56C6C;
}

.stat-card.warning {
    border-top: 3px solid #E6A23C;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 10px 0;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-select {
    padding: 5px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
}

.pagination a, .pagination button {
    color: #666;
    padding: 6px 12px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #d9d9d9;
    font-size: 14px;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    border: none;
}

.pagination a.active, .pagination button.active {
    background-color: #409EFF;
    color: white;
    border-color: #409EFF;
}

.pagination a:hover:not(.active), .pagination button:hover:not(.active) {
    border-color: #409EFF;
    color: #409EFF;
}

.pagination a.disabled, .pagination button:disabled {
    color: #d9d9d9;
    pointer-events: none;
    cursor: not-allowed;
}

/* 提示框样式 */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
}

.alert-success {
    color: #67C23A;
    background-color: #f0f9ff;
    border-color: #b3e19d;
}

.alert-danger {
    color: #F56C6C;
    background-color: #fef0f0;
    border-color: #fbc4c4;
}

/* 通知提示 - 右上角 */
.notification {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 2000;
    min-width: 300px;
    max-width: 400px;
}

.notification-item {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
}

.notification-item.success {
    border-left: 4px solid #67C23A;
}

.notification-item.error {
    border-left: 4px solid #F56C6C;
}

.notification-item.warning {
    border-left: 4px solid #E6A23C;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-item.success .notification-icon {
    color: #67C23A;
}

.notification-item.error .notification-icon {
    color: #F56C6C;
}

.notification-item.warning .notification-icon {
    color: #E6A23C;
}

.notification-content {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.notification-close:hover {
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 登录页面样式 */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #d3d8e1;
    padding: 20px;
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.login-form {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 500;
    font-size: 20px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

/* 输入框带右侧图标 */
.input-with-icon-right {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f0f2f5;
    color: #333;
    transition: all 0.3s;
    height: 40px;
    line-height: 1.5;
    padding-right: 120px;
}

.login-input::placeholder {
    color: #999;
}

.login-input:focus {
    outline: none;
    border-color: #409EFF;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.login-input:hover {
    border-color: #409EFF;
}

.input-right-content {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.input-icon-right {
    color: #999;
    font-size: 14px;
}

.input-error {
    font-size: 12px;
    white-space: nowrap;
}

.login-button-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0;
    margin-top: 10px;
}

.login-btn {
    padding: 10px 32px;
    height: 40px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    min-width: 100px;
    background-color: #409EFF;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background-color: #66b1ff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

.login-btn:active {
    background-color: #3a8ee6;
}

/* 复选框样式 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #409EFF;
}

.checkbox-wrapper label {
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 下拉菜单样式 */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.825L1.763 4.5 2.8 3.45 6 6.75l3.2-3.3L10.237 4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* 文本域样式 */
textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* 产品图片样式 */
.product-image {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
}

.product-image-large {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
}

/* 图表容器 */
.chart-container {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
    height: 400px;
}

/* 权限开关 */
.permission-switch {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.permission-switch label {
    margin-left: 10px;
    margin-bottom: 0;
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.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;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #409EFF;
}

input:focus + .slider {
    box-shadow: 0 0 1px #409EFF;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 20px;
    list-style: none;
    background-color: transparent;
    align-items: center;
    gap: 5px;
}

.breadcrumb-item {
    font-size: 14px;
    color: #666;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 8px;
    color: #ccc;
}

.breadcrumb-item a {
    color: #409EFF;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    
    .sidebar.open {
        width: 240px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .form-col {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .stat-card {
        margin-bottom: 10px;
    }
    
    .page-actions {
        flex-wrap: wrap;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #409EFF;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 10px;
}

.badge-primary {
    color: #fff;
    background-color: #409EFF;
}

.badge-success {
    color: #fff;
    background-color: #67C23A;
}

.badge-danger {
    color: #fff;
    background-color: #F56C6C;
}

.badge-warning {
    color: #fff;
    background-color: #E6A23C;
}

/* 文件上传样式 */
.file-upload {
    position: relative;
    overflow: hidden;
    margin: 10px 0;
}

.file-upload input[type=file] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    text-align: right;
    filter: alpha(opacity=0);
    opacity: 0;
    outline: none;
    background: white;
    cursor: pointer;
    display: block;
}

.file-upload-btn {
    border: 1px solid #d9d9d9;
    color: #666;
    background-color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.file-upload-btn:hover {
    border-color: #409EFF;
    color: #409EFF;
}

/* 筛选按钮 */
.filter-btn {
    background-color: #409EFF;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: #66b1ff;
}

/* 表格操作列 */
.table-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.table-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafafa;
    border-radius: 4px 4px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #fafafa;
    border-radius: 0 0 4px 4px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 确保操作列始终居中 */
.table td:has(.action-menu),
.table td:last-child:has(.action-menu) {
    text-align: center;
}
