/* 基础样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #1abc9c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.headlog {
    max-width: 36px;
    max-height: 36px;
}


.headlog img {
    width: 100%;
    height: 100%;
    filter: brightness(1.2);
    border-radius: 8px;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px var(--shadow-color);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 24px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

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




.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 0px 24px;
    height: 40px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);

}

.btn-secondary:hover {
    background: #bdc3c7;
}


.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-info {
    background: #d70046;
    color: white;
}

.btn-reset {
    background: #e3e3e3;
}



.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.alert-error {
    background: #ffeaea;
    color: var(--danger-color);
    border: 1px solid #ffcccc;
}

.alert-success {
    background: #e8f6ef;
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 主应用布局 */
.app-container {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: var(--secondary-color);
    color: white;
    transition: width 0.3s;
}

.sidebar-collapsed .sidebar {
    width: 60px;
}

.sidebar-header {
    padding: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    margin: 0;
    transition: all 0.3s;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    padding: 0 20px 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-section ul {
    list-style: none;
}

.nav-item {
    margin: 2px 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary-color);
}

/* .nav-item.active a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary-color);
} */

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}


.sidebar-collapsed .nav-section h3 {
    display: none;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.top-header {
    background: white;
    padding: 0 30px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 10;
}

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

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background: var(--light-color);
}

.top-header h1 {
    font-size: 20px;
    color: var(--dark-color);
    font-weight: 600;
}

/* 用户菜单 */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.user-info:hover {
    background: var(--light-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-name {
    font-weight: 500;
    color: var(--dark-color);
}

.user-role {
    font-size: 12px;
    color: #666;
    background: var(--light-color);
    padding: 2px 8px;
    border-radius: 10px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 5px 20px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1000;
}

.user-menu.show-menu .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.dropdown-menu a:hover {
    background: var(--light-color);
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 欢迎区域 */
.welcome-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px var(--shadow-color);
}

.welcome-section h2 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.welcome-section p {
    color: #666;
    margin-bottom: 30px;
}

/* .stats-grid {
    margin: 20px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
} */
/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.bg-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.bg-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.bg-warning {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.bg-info {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.bg-submit {
    background: linear-gradient(135deg, #db5d34, #653ecb);
}

.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.stat-number {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}



.bg-info {
    background-color: #17a2b8;
}

.bg-danger {
    background-color: #e74c3c;
}

.bg-dark {
    background-color: #343a40;
}



/* 模块容器 */
.module-container {
    max-width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px var(--shadow-color);
}

.module-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-header h2 {
    color: var(--dark-color);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 过滤栏 */
.filter-bar {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    align-items: center;
    /* flex-wrap: nowrap; */
    flex-wrap: wrap
}

.search-box,
.filter-group {
    height: 40px;
}

.search-box {
    flex: 1;
    position: relative;
    max-width: 300px;
}

/* 搜搜框 */
.search-box input {
    /* min-width: 120px; */
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filter-group select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: var(--dark-color);
    cursor: pointer;
    min-width: 150px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 数据表格 */
.table-container {
    overflow-x: auto;
    padding: 0 30px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.data-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    white-space: nowrap;
    /* 单元格内容不换行 */
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-to_execute {
    background: #cce5ff;
    color: #004085;
}

.status-executing {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* 操作按钮 */
.btn-outline-primary {
    background: #fff;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
}

.btn-refresh {
    background: #ecf0f1;
}

.btn-outline-secondary {
    padding: 5px 12px;
    font-size: 12px;
    background: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-edit {
    background: #d1ecf1;
    color: #0c5460;
}

.btn-edit:hover {
    background: #bee5eb;
    transform: scale(1.1);
}

.btn-delete {
    background: #f8d7da;
    color: #721c24;
}

.btn-delete:hover {
    background: #f1b0b7;
    transform: scale(1.1);
}

.btn-view {
    background: #d4edda;
    color: #155724;
}

.btn-view:hover {
    background: #c3e6cb;
    transform: scale(1.1);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0, #764ba2 100%);
    color: #fff;
}

.modal-header h3 {
    color: var(--dark-color);
    font-size: 18px;
    color: #fff;
}

.close-modal {
    color: #fff;
    opacity: .8;
    background: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.close-modal:hover {
    background: #df1e1e;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px 5px;
}

/* 表单样式 */
.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
}




.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 分页 */


/* 分页容器 */
.pagination {
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
}

/* 分页包装器 */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* 页码按钮区域 */
.pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 页码按钮通用样式 */
.pagination-links a,
.pagination-links span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

/* 上一页/下一页按钮 */
.page-btn {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    cursor: pointer;
}

.page-btn:hover {
    background: #e9ecef;
    color: #3498db;
    border-color: #3498db;
}

/* 数字页码按钮 */
.page-num {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    cursor: pointer;
}

.page-num:hover {
    background: #e9ecef;
    color: #3498db;
    border-color: #3498db;
}

/* 当前页码 */
.page-current {
    background: #3498db;
    color: white;
    border: 1px solid #3498db;
}

/* 省略号 */
.page-ellipsis {
    background: none;
    border: none;
    color: #6c757d;
    cursor: default;
}

/* 统计信息 */
.pagination-info {
    color: #6c757d;
    font-size: 13px;
    text-align: center;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 20px;
    display: inline-block;
}




.pagination .current {
    background: var(--primary-color);
    color: white;
}

.pagination .ellipsis {
    color: #666;
    width: auto;
}

/* 工具类 */
.text-right {
    text-align: right;
}

.truncate-text {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 在现有的样式基础上添加： */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}



/* 确保以下样式存在 */
.bg-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.bg-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

/* 防止表格影响侧边栏布局 */
.main-content {
    min-width: 0;
    /* 允许内容区域缩小 */
}

.btn-boot {
    display: flex;
}

/* 充值按钮 与 导出  */
.btn-boot .filter-group button {
    height: 40px;
    margin-right: 25px;
    border: none;
    font-size: 13px;
}

/* 响应式设计 */


/* 通知铃铛样式 */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
}

.notification-bell i {
    font-size: 20px;
    color: #555;
}

.badge-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notification-dropdown {
    width: 500px;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.notification-bell.show .notification-dropdown {
    display: block;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.dropdown-header span {
    font-weight: 600;
    color: #333;
}

.btn-read-all {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 12px;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-list .empty {
    text-align: center;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f7ff;
}

.notification-item.unread:hover {
    background: #e8f0fe;
}

.notification-item.invalid {
    opacity: 0.6;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.policy {
    background: #e3f2fd;
    color: #1976d2;
}

.notification-icon.payment {
    background: #e8f5e9;
    color: #388e3c;
}

.notification-icon.order {
    background: #fff3e0;
    color: #f57c00;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 11px;
    color: #999;
}

.dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid #eee;
    text-align: center;
}

.dropdown-footer a {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
}

/* 通知详情页面 */
.notification-page {
    max-width: 900px;
    margin: 0 auto;
}

.notification-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 6px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
}

.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.cleanup-btn {
    margin-left: auto;
    background: #e74c3c;
    color: white;
    border: none;
}


/* 闪存消息样式 */
.flash-messages {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: auto;
    max-width: 90%;
    min-width: 300px;
    pointer-events: none;
}

.alert {
    position: relative;
    padding: 12px 40px 12px 50px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: slideDown 0.3s ease-out;
    min-height: 50px;
    display: flex;
    align-items: center;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert i.fas {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.close-flash {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.close-flash:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* 不同类型的警告框样式 */
.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.global-message {
    position: fixed !important;
    top: 80px !important;
    /* 调整这个值 */
    right: 20px !important;
    z-index: 99999 !important;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 14px;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    animation: messageSlideIn 0.3s ease-out !important;
    border-left: 4px solid;
}

.global-message .message-content {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

.global-message i {
    font-size: 18px !important;
    flex-shrink: 0 !important;
}

.global-message span {
    flex-grow: 1 !important;
    line-height: 1.5 !important;
}

.message-close {
    background: none !important;
    border: none !important;
    color: inherit !important;
    font-size: 20px !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-left: 15px !important;
    opacity: 0.7 !important;
    transition: opacity 0.3s !important;
    flex-shrink: 0 !important;
}

.message-close:hover {
    opacity: 1 !important;
}

.message-success {
    background: linear-gradient(135deg, #28a745, #218838) !important;
    border-left-color: #1e7e34 !important;
}

.message-error {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    border-left-color: #bd2130 !important;
}

.message-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
    border-left-color: #d39e00 !important;
    color: #212529 !important;
}

.message-info {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
    border-left-color: #117a8b !important;
}

@keyframes messageSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes messageSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


/* 导出字段复选框样式 */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 8px;
}


.checkbox-group label {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    border: 1px solid #e9ecef;
}

.checkbox-group label:hover {
    background-color: #e9ecef;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #3498db;
    transform: scale(1.1);
}

/* 优化复选框选中状态 */
.checkbox-group input[type="checkbox"]:checked {
    background-color: #3498db;
    border-color: #3498db;
}

/* 调整模态框内容高度 */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* 导出全选选项样式 */
#exportAllData {
    margin-right: 8px;
    accent-color: #2ecc71;
}

#exportAllData+label {
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

/* 时间筛选样式 */
.filter-group input[type="date"] {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-right: 5px;
    height: 40px;
    min-width: 40%;
    max-width: 50%;
}

/* 表格调整（因为增加了列） */
.data-table {
    font-size: 13px;
    /* 稍微减小字体以适应更多列 */
}





/* 重置按钮样式 */

.btn-reset:hover {
    background-color: #e9ecef;
    border-color: #ccc;
    color: #333;
}

/* 日期范围样式 */
.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-separator {
    color: #666;
    font-size: 14px;
}



#previewModal,
#previewModal {
    z-index: 1001;
}


.badge-danger {
    background-color: #e74c3c;
    color: #f0f7ff;
}


/* 在 style.css 中添加或确认 */
.global-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
}

.global-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.global-loading div:last-child {
    margin-top: 15px;
    color: white;
    font-size: 14px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.cell-ellipsis {
    max-width: 200px;
    /* 根据表格设计，调整这个最大宽度值 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* @media (max-width: 980px) {
.search-box input {
    max-width:125px ;
}
.search-box {
      max-width:125px ;
}

} */

@media (max-width: 768px) {


    /* 详情 */
    .modal-body {
        padding: 10px !important;
    }

    /* 菜单权限 */
    .header-right {
        justify-content: center;
    }

    .panel-footer {
        justify-content: space-around;
    }

    .footer-right {
        display: flex;
        justify-content: space-around;
    }

    .footer-right button {
        width: min-content;
        padding: 0 10px;
        margin-left: 5px;
    }

    .footer-left span {
        white-space: nowrap;
    }

    .modal-footer {
        justify-content: center;
    }

    .flash-messages {
        width: 95%;
        max-width: 95%;
        min-width: unset;
    }

    .alert {
        padding: 10px 35px 10px 45px;
        font-size: 14px;
    }

    .alert i.fas {
        left: 12px;
        font-size: 16px;
    }

    /* 分页文字 */
    .pagination-info {
        font-size: 10px;
    }

    .pagination-links {
        gap: 4px
    }

    .pagination-links a,
    .pagination-links span {
        height: auto;
        min-width: auto;
        padding: 6px 10px;

    }

    .top-header {
        position: relative;
    }

    .notification-dropdown {
        font-size: 12px;
        width: 300px;
        /* top: 70px; */
        left: 50%;
        transform: translate(-60%, 0%);
        -ms-transform: translate(-60%, 0%);
        background: white;
        border-radius: 8px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        z-index: 1002;
    }

    #templateList td>span {
        display: ruby-text;
    }

    .welcome-section .stats-grid {
        margin: 0;
    }

    .tabs-header {
        justify-content: space-evenly;
    }

    .tab {
        white-space: nowrap;
        padding: 10px 2px !important;
    }

    /* 通知模板编辑 */
    .header-actions {
        justify-content: space-between;
    }

    .templte-actions button {
        width: 48%;
    }

    .btn-secondary,
    .btn-primary,
    .btn-danger,
    .btn-warning,
    .btn-info {
        white-space: nowrap;
        width: 100%;
        height: 40px;
        /* margin-top: 20px; */
    }

    .btn-success {
        white-space: nowrap;
        width: 100%;
        height: 40px;
    }

    .search-box,
    .filter-group {
        min-width: 100%;
    }

    .table-actions {
        width: 100%;
        justify-content: center;
    }

    /* #submitModal .modal-body {
        padding: 0;
    } */

    /* 搜索框 */
    .search-box input {
        width: auto;
        max-width: 324px;
        min-width: 100%;
    }

    /* select */
    .filter-group select {
        width: auto;
        max-width: 324px;
        min-width: 100%;
    }

    /* 日期 */
    .date-range {
        /* gap: 0px !important; */

        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: space-between;
    }

    .filter-group input[type="date"] {
        margin: 0 !important;
    }




    .btn-boot .filter-group {
        min-width: auto;
        width: auto;
        max-width: auto;
    }

    .btn-boot .filter-group button {
        min-width: 90px;
        max-width: 150px;
        margin: 0 !important;
        white-space: normal;
        padding: 12px 10px;
    }

    /* 按钮 */

    .btn-boot {
        width: 100%;
        justify-content: space-around;
    }


    .btn-boot .filter-group button {
        margin-right: 15px;
    }

    .filter-group button {
        margin: 0;
    }


    .switch-option {
        white-space: nowrap;
        padding: 8px;
    }

    .rebate-selector {
        flex-wrap: wrap;
    }

    .detail-item {
        flex-direction: column;
    }

    .card-title {
        white-space: nowrap;
    }



    .form-group {
        margin-bottom: 5px;
    }

    .form-group label {
        margin-bottom: 5px;
        font-size: 14px;
    }



    .order-header-info h4 {
        font-size: 12px !important;
    }

    .timeline {
        padding-left: 0 !important;
    }

    .timeline-header {
        font-size: 12px !important;
    }

    .timeline-notes {
        font-size: 12px;
    }

    .timeline-content {
        padding: 10px 5px !important;
    }

    .header-meta {
        gap: 10px !important;
        font-size: 12px;
        flex-direction: column !important;
    }

    .detail-card .card-body {
        padding: 20px 10px !important;

    }

    .filter-bar {
        padding: 20px;
    }

    #loginForm .form-group label {
        font-size: 16px;
    }

    #loginForm .form-group {
        margin-bottom: 20px !important;
    }

}



@media (max-width: 480px) {

    .login-card {
        padding: 20px;
    }

    .user-info .user-name {
        display: none;
    }

    .user-role {
        display: none;
    }

    .sidebar {
        position: fixed;
        left: -250px;
        z-index: 1000;
        height: 100vh;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-collapsed .sidebar {
        left: 0;
        width: 250px;
    }

    .main-content {
        margin-left: 0;
    }

    .header-left h1 {
        font-size: 16px;
    }

    .content-area {
        padding: 15px;
    }

    .module-header {
        flex-direction: column;
        gap: 15px;
    }



    /* .filter-bar {
        min-width: 320px;
        flex-direction: row;
        align-items: center;
    } */


    /* .form-row {
        flex-direction: column;
        gap: 15px;
    } */



    .table-container {
        padding: 0 15px;
    }

    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }
}