/* ========== Global: center checkbox column across tables ========== */
.table .col-checkbox,
.col-checkbox {
    text-align: center;
    vertical-align: middle;
}

/* Normalize checkbox offset inside the cell */
.col-checkbox input[type="checkbox"] {
    margin: 0;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: none; /* 移除最大宽度限制 */
    margin: 0 auto;
    padding: 20px;
    width: 100%; /* 全宽度 */
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 400px;
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a6fd8;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

/* 批量操作按钮禁用样式 - 统一所有按钮的禁用状态 */
.btn:disabled,
.btn[disabled],
.btn-info:disabled,
.btn-info[disabled],
.btn-primary:disabled,
.btn-primary[disabled],
.btn-warning:disabled,
.btn-warning[disabled],
.btn-danger:disabled,
.btn-danger[disabled] {
    opacity: 0.6;
    cursor: not-allowed !important;
    background-color: #6c757d;
    color: white;
    pointer-events: auto !important;
}

.btn:disabled:hover,
.btn[disabled]:hover,
.btn-info:disabled:hover,
.btn-info[disabled]:hover,
.btn-primary:disabled:hover,
.btn-primary[disabled]:hover,
.btn-warning:disabled:hover,
.btn-warning[disabled]:hover,
.btn-danger:disabled:hover,
.btn-danger[disabled]:hover {
    background-color: #6c757d;
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 导航栏样式 - 添加 !important 确保优先应用 */
.navbar {
    background: #333333 !important; /* 黑色背景，避免渐变 */
    padding: 15px 0 !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    min-height: auto !important;
}

.navbar-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    max-width: none !important; /* 移除最大宽度限制 */
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important; /* 全宽度 */
}

.navbar-brand {
    color: white !important;
    font-size: 20px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    padding: 0 !important;
}

.navbar-nav {
    display: flex !important;
    list-style: none !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.navbar-nav a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    position: relative !important;
    overflow: hidden !important;
    display: inline-block !important;
    line-height: normal !important;
    margin: 0 !important;
}

.navbar-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1); /* 使用半透明纯色 */
    transition: left 0.5s;
}

.navbar-nav a:hover::before {
    left: 100%;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.navbar-user {
    color: white !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 下拉菜单样式 */
.navbar-nav li {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.dropdown {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.dropdown a {
    /* padding: 8px 12px !important; */
    color: #ccc !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    transition: background-color 0.3s, color 0.3s !important;
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.dropdown a:hover {
    background-color: #495057 !important;
    color: white !important;
}

.dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 16px !important; /* 与其他菜单项保持一致 */
    background: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.9) !important; /* 与其他菜单项保持一致 */
    cursor: pointer !important;
    height: 100% !important;
    transition: all 0.3s ease !important; /* 与其他菜单项保持一致 */
    border-radius: 8px !important; /* 与其他菜单项保持一致 */
    font-weight: 500 !important; /* 与其他菜单项保持一致 */
    position: relative !important;
    overflow: hidden !important;
    text-decoration: none !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: normal !important;
    margin: 0 !important;
}

.dropdown-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1); /* 使用半透明纯色 */
    transition: left 0.5s;
}

.dropdown-toggle:hover::before {
    left: 100%;
}

.dropdown-toggle:hover {
    color: #ffffff !important; /* 与其他菜单项保持一致 */
    background-color: rgba(255, 255, 255, 0.2) !important; /* 与其他菜单项保持一致 */
    transform: translateY(-1px); /* 与其他菜单项保持一致 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 与其他菜单项保持一致 */
}

/* 系统管理菜单激活状态 */
.dropdown.active .dropdown-toggle,
.dropdown.open .dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
    border: none !important;
}

.dropdown-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

.dropdown-icon {
    width: 14px !important;
    height: 14px !important;
    display: inline-block !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E") !important;
    transition: transform 0.3s ease !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.dropdown.open .dropdown-icon {
    transform: rotate(180deg) !important;
}

/* 优化后的下拉菜单样式 - 添加 !important 确保优先应用 */
.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    width: 280px !important; /* 进一步增加宽度 */
    background: #ffffff !important; /* 纯白色背景，避免渐变 */
    border: none !important;
    border-radius: 16px !important; /* 增加圆角 */
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(102, 126, 234, 0.08) !important;
    z-index: 9999 !important;
    margin-top: 12px !important;
    display: none !important;
    overflow: hidden !important;
    border-top: 4px solid #667eea !important; /* 增加顶部边框厚度 */
    padding: 8px 0 !important; /* 增加内边距 */
    min-width: 0 !important; /* 覆盖Bootstrap默认的min-width */
}

.dropdown.open .dropdown-menu {
    display: block !important;
    animation: slideDown 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-menu li {
    list-style: none !important;
    transition: background-color 0.2s !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.dropdown-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 18px 24px !important;
    color: #495057 !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    border-radius: 10px !important;
    margin: 4px 12px !important;
    position: relative !important;
    overflow: hidden !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    background-color: #fafbfc !important;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.08) !important;
    border: 1px solid rgba(102, 126, 234, 0.1) !important;
    white-space: nowrap !important;
    min-height: 52px !important;
    letter-spacing: 0.2px !important;
    justify-content: flex-start !important;
    text-align: left !important;
    width: calc(100% - 24px) !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
}



.dropdown-menu a:hover {
    background: #667eea !important;
    color: #ffffff !important;
    transform: translateX(4px) translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4) !important;
    border-color: transparent !important;
    text-decoration: none !important;
}

/* 二级菜单项激活状态样式 */
.dropdown-menu a.active {
    background-color: #333333 !important; /* 与导航栏背景色一致 */
    color: #ffffff !important;
    border-color: #333333 !important;
}

/* 菜单项右侧指示器 - 统一样式 */
.dropdown-menu a::after {
    content: '→';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(102, 126, 234, 0.6);
    margin-left: auto; /* 推到右侧 */
    opacity: 0;
    transition: all 0.3s;
    font-weight: bold;
    transform: translateX(-8px);
    width: 20px; /* 统一指示器宽度 */
    height: 20px; /* 统一指示器高度 */
    font-size: 14px;
}

.dropdown-menu a:hover::after {
    opacity: 1;
    transform: translateX(0);
    color: rgba(255, 255, 255, 0.9);
}

/* 菜单项分隔线 */
.dropdown-menu-divider {
    height: 1px;
    background-color: #e9ecef; /* 纯色分隔线 */
    margin: 4px 12px;
}

/* 二级菜单标题 */
.dropdown-menu-title {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    background-color: #f8f9fa;
    margin: 0;
    border-bottom: 1px solid #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dropdown-menu {
        right: auto;
        left: 0;
        width: 100%;
        max-width: 320px;
        border-radius: 12px; /* 移动端减小圆角 */
    }
    
    .dropdown-menu a {
        padding: 16px 20px; /* 移动端统一内边距 */
        font-size: 14px; /* 移动端统一字体大小 */
        min-height: 48px; /* 移动端统一最小高度 */
        gap: 8px; /* 移动端减小间距，因为没有图标 */
        margin: 3px 8px; /* 移动端调整外边距 */
        width: calc(100% - 16px); /* 移动端统一宽度 */
    }
}

/* 焦点状态 */
.dropdown-menu a:focus {
    outline: 3px solid rgba(102, 126, 234, 0.4);
    outline-offset: 2px;
    border-radius: 10px;
}

/* 增加菜单项动画效果 - 统一动画 */
.dropdown-menu li {
    opacity: 0;
    transform: translateY(-8px); /* 统一初始位置 */
    animation: slideInDown 0.25s ease forwards; /* 统一动画时间 */
}

.dropdown-menu li:nth-child(1) { animation-delay: 0.03s; }
.dropdown-menu li:nth-child(2) { animation-delay: 0.06s; }
.dropdown-menu li:nth-child(3) { animation-delay: 0.09s; }

@keyframes slideInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 系统管理下拉菜单打开时的特殊样式 */
.dropdown.open .dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.25) !important; /* 比hover状态稍深一点 */
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.card-title {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.card-body {
    padding: 20px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    min-width: 1024px; /* 最小宽度设为1024px */
    table-layout: auto; /* 自动列宽 */
}

.table th,
.table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
    vertical-align: middle;
    word-wrap: break-word;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
    font-size: 13px;
}

.table tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* 悬停样式优先级需要高于间隔行样式 */
.table tr:hover {
    background-color: #e3f2fd !important;
}

/* 表格通用字体大小 - 统一五个页面的表格样式（对齐 amazon 模式） */
.products-table,
.samples-table,
.stocks-table,
.alibaba-new-products-table,
.amazon-table {
    font-size: 13px;
}

/* 统一单元格内边距（保持原有三个页面行为），amazon 自有 8px 不强制覆盖 */
.products-table th,
.products-table td,
.samples-table th,
.samples-table td,
.stocks-table th,
.stocks-table td {
    padding: 10px 6px;
}

/* 统一内容不换行以自适应列宽（特殊列可局部覆盖为 normal） */
.products-table td,
.samples-table td,
.stocks-table td,
.alibaba-new-products-table td,
.amazon-table td {
    white-space: nowrap;
}

/* 定义各列的宽度 - 使用类名而不是位置选择器 */
.products-table .col-checkbox {
    width: 3%; /* 使用百分比 */
    min-width: 40px;
    text-align: center;
}

.products-table .col-image_url {
    width: 6%;
    min-width: 80px;
    text-align: center;
}

.products-table .col-purchase_link {
    width: 6%;
    min-width: 80px;
    text-align: center;
}

.products-table .col-sku_1688 {
    width: 8%;
    min-width: 100px;
    text-align: center;
}

.products-table .col-product_name_1688 {
    width: 12%;
    min-width: 120px;
    text-align: left;
}

.products-table .col-variant_attributes {
    width: 6%;
    min-width: 80px;
    text-align: center;
}

.products-table .col-supplier_price {
    width: 4%;
    min-width: 50px;
    text-align: center;
}

.products-table .col-unit {
    width: 4%;
    min-width: 40px;
    text-align: center;
}

.products-table .col-min_order_quantity {
    width: 4%;
    min-width: 40px;
    text-align: center;
}

.products-table .col-supplier_name {
    width: 8%;
    min-width: 80px;
    text-align: center;
}

.products-table .col-metal_material {
    width: 5%;
    min-width: 70px;
    text-align: center;
}

.products-table .col-other_material {
    width: 6%;
    min-width: 80px;
    text-align: center;
}

.products-table .col-size {
    width: 6%;
    min-width: 80px;
    text-align: center;
}

.products-table .col-color {
    width: 8%;
    min-width: 120px;
    text-align: center;
}

.products-table .col-product_development_batch {
    width: 8%;
    min-width: 100px;
    text-align: center;
}

.products-table .col-filter_notes {
    width: 8%;
    min-width: 100px;
    text-align: center;
}

.products-table .col-is_sample_selected,
.products-table .col-is_stocked,
.products-table .col-is_alibaba_new_product {
    width: 3%;
    min-width: 30px;
    text-align: center;
}

.products-table .col-account {
    width: 6%;
    min-width: 80px;
    text-align: center;
}

.products-table .col-actions {
    width: 6%;
    min-width: 120px;
    text-align: center;
}

/* 文本处理 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-break {
    word-break: break-all;
    white-space: normal;
    line-height: 1.4;
}

/* 状态标签样式 */
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

.status-badge.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.secondary {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* 统一的状态颜色（表格徽章与下拉选择共用） */
/* 表格中使用的命名：status-badge status-pending|status-processing|status-completed|status-cancelled|status-failed */
.status-badge.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-badge.status-processing {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.status-badge.status-completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-arrived {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-badge.status-cancelled {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.status-badge.status-failed {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 下拉选择控件的状态着色（用于筛选与模态框内选择） */
.select-status {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.select-status.pending {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border-color: #ffeeba !important;
}

.select-status.processing {
    background-color: #cce5ff !important;
    color: #004085 !important;
    border-color: #b8daff !important;
}

.select-status.completed {
    background-color: #d4edda !important;
    color: #155724 !important;
    border-color: #c3e6cb !important;
}

.select-status.cancelled {
    background-color: #e2e3e5 !important;
    color: #383d41 !important;
    border-color: #d6d8db !important;
}

.select-status.failed {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-color: #f5c6cb !important;
}

/* 图片样式 */
.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.image-placeholder {
    width: 60px;
    height: 60px;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 12px;
    text-align: center;
}

/* 完全重写图片悬停预览样式，确保覆盖固定列 */
.img-hover-box {
    position: relative;
    display: inline-block;
    z-index: 1;
}

/* 确保图片预览绝对不被固定列遮挡 */
.img-hover-box .img-large {
    position: fixed; /* 关键：使用fixed定位确保脱离文档流，不被父元素z-index限制 */
    width: 300px;
    height: auto;
    max-width: 80vw;
    max-height: 80vh;
    border: 2px solid #3498db;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    z-index: 99999; /* 极高的z-index确保覆盖所有元素 */
    display: none;
    object-fit: contain;
    background-color: white;
    pointer-events: none;
    transform-origin: center center;
    transform: scale(1);
    opacity: 1;
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

/* 强制显示，不被任何条件覆盖 */
.img-hover-box:hover .img-large {
    display: block !important;
    transform: scale(1);
    opacity: 1;
}

/* 确保在所有屏幕尺寸下都能正确显示 */
@media (max-width: 768px) {
    .img-hover-box .img-large {
        width: 250px;
        max-width: 70vw;
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .img-hover-box .img-large {
        width: 200px;
        max-width: 60vw;
        max-height: 60vh;
    }
}

.img-hover-box:hover .img-large {
    display: block;
}

/* 表单样式 */
.form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.form-inline .form-group {
    margin-bottom: 10px;
}

.form-inline .form-control {
    width: auto;
    max-width: 200px;
    flex-shrink: 0;
}

/* 分页样式 */
.pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    position: relative;
    z-index: 1;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    justify-content: center;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    min-width: 40px;
    transition: all 0.2s;
    color: #495057;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
    color: #6c757d;
}

.pagination-btn:disabled:hover {
    transform: none;
}

.page-btn {
    min-width: 36px;
    padding: 6px 10px;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: #6c757d;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.jump-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    transition: border-color 0.2s;
}

.jump-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 4px rgba(102, 126, 234, 0.3);
}

.jump-btn {
    padding: 6px 12px;
    font-size: 13px;
    min-width: auto;
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.jump-btn:hover:not(:disabled) {
    background-color: #5a6fd8;
    border-color: #5a6fd8;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 警告和消息样式 */
.alert {
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 4px;
    border: 1px solid transparent;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    flex-wrap: nowrap;
    gap: 10px;
    overflow: hidden;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

/* 工具栏右侧特定样式 */
.toolbar-right .form-inline {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: flex-end;
    max-width: 100%;
    overflow: hidden;
}

.toolbar-right .form-control {
    max-width: 150px;
    min-width: 100px;
    flex-shrink: 1;
    flex-grow: 0;
}

/* 每页显示选择器特定样式 */
#pageSizeSelect {
    min-width: 80px !important;
    max-width: 100px !important;
    flex-shrink: 0 !important;
}

.toolbar-right .btn {
    flex-shrink: 0;
    flex-grow: 0;
    white-space: nowrap;
    min-width: 60px;
    max-width: 80px;
    width: auto;
}

.toolbar-right {
    min-width: auto;
    white-space: nowrap;
    flex-shrink: 1;
    max-width: 50%;
    overflow: hidden;
}

/* 筛选区域样式 */
.filter-section {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.filter-section .form-inline {
    gap: 15px;
}

.filter-section label {
    font-weight: 500;
    color: #495057;
    margin-right: 8px;
    white-space: nowrap;
}

.filter-section .form-control {
    min-width: 120px;
}

/* 筛选区域内的按钮组 */
.filter-section .btn {
    height: 38px; /* 与select控件高度保持一致 */
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.filter-section .btn-primary {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

.filter-section .btn-primary:hover {
    background-color: #5a6fd8;
    border-color: #5a6fd8;
}

.filter-section .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.filter-section .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* 表格容器增强 */
.table-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%; /* 全宽度 */
    margin-bottom: 20px; /* 底部间距 */
}

.table-container {
    overflow-x: auto;
    overflow-y: auto; /* 确保垂直滚动条显示 */
    max-height: calc(100vh - 220px); /* 进一步减少固定值，增加容器高度 */
    border-radius: 0;
    box-shadow: none;
    width: 100%; /* 全宽度 */
    padding-bottom: 40px; /* 进一步增加底部留白，防止最后一行被遮挡 */
    margin-bottom: 20px; /* 添加底部间距 */
    border: 1px solid #e9ecef; /* 添加边框，明确滚动区域 */
}

/* 在屏幕宽度大于1024px时，表格宽度自适应 */
@media (min-width: 1025px) {
    .table {
        min-width: auto; /* 移除最小宽度限制 */
        width: 100%; /* 全宽度 */
    }
    
    .table-container {
        overflow-x: visible; /* 不显示水平滚动条 */
    }
}

/* 在屏幕宽度小于等于1024px时，显示滚动条 */
@media (max-width: 1024px) {
    .table {
        min-width: 1024px; /* 保持最小宽度 */
    }
    
    .table-container {
        overflow-x: auto; /* 显示水平滚动条 */
    }
}

/* 滚动条样式 */
.table-container::-webkit-scrollbar {
    height: 12px; /* 增加水平滚动条高度 */
    width: 12px;  /* 增加垂直滚动条宽度 */
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
    border: 1px solid #b3b3b3; /* 添加边框，更加明显 */
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 复选框样式 */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-container input[type="checkbox"] {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .login-box {
        width: 90%;
        padding: 30px;
    }
    
    .navbar-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    .dropdown-menu {
        right: auto;
        left: 0;
        width: 100%;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: center;
        width: 100%;
    }
    
    .toolbar-right {
        min-width: auto;
    }
    
    .filter-section .form-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-section .form-inline > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* 移动端按钮组独立成行 */
    .filter-section .form-inline > div:last-child {
        justify-content: center;
        margin-top: 10px;
    }
    
    .filter-section .form-control {
        min-width: 150px;
        flex-shrink: 0;
    }
    
    .table-container {
        font-size: 12px;
        max-height: calc(100vh - 180px); /* 移动端调整高度，增加可用空间 */
        overflow-x: auto; /* 小屏幕上始终显示水平滚动条 */
        overflow-y: auto; /* 小屏幕上显示垂直滚动条 */
        padding-bottom: 20px; /* 移动端底部留白 */
    }
    
    .table {
        min-width: 1024px; /* 小屏幕上保持最小宽度 */
    }
    
    .products-table th,
    .products-table td {
        padding: 6px 4px;
    }
    
    .products-table .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .product-image,
    .image-placeholder {
        width: 40px;
        height: 40px;
        font-size: 10px;
    }
    
    /* 小屏幕下悬停大图优化 */
    .img-hover-box .img-large {
        width: 250px;
        max-width: 70vw;
        max-height: 70vh;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
    }
    
    .pagination {
        padding: 15px 10px;
        gap: 10px;
    }
    
    .pagination-controls {
        flex-wrap: nowrap;
        gap: 6px;
    }
    
    .pagination-pages {
        gap: 3px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }
    
    .page-btn {
        min-width: 32px;
        padding: 5px 8px;
    }

    .pagination-info {
        font-size: 13px;
        text-align: center;
    }
    
    .pagination-jump {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
        font-size: 13px;
    }
    
    .jump-input {
        width: 50px;
        padding: 5px 6px;
        font-size: 13px;
    }
    
    /* 备份模态框响应式 */
    .backup-actions-container {
        flex-direction: column !important;
        gap: 4px !important;
        align-items: stretch !important;
    }
    
    .backup-actions-container .btn {
        padding: 6px 8px !important;
        font-size: 11px !important;
        min-width: auto !important;
    }
}

/* 数据库备份模态框专用样式 */
#backupModal .modal-content {
    max-width: 700px;
    width: 90%;
}

#backupModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

#backupModal .modal-title {
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#backupModal .modal-title::before {
    content: '💾';
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

#backupModal .modal-close {
    color: white;
    opacity: 0.9;
    font-size: 26px;
    font-weight: bold;
    transition: all 0.3s ease;
}

#backupModal .modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#backupModal .modal-body {
    padding: 25px;
    background: #fafbfc;
}

#backupModal h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

#backupModal .form-group {
    margin-bottom: 20px;
}

#backupModal .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

#backupModal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

#backupModal .form-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* 备份历史记录表格样式 */
#backupHistory {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#backupHistory .table {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
}

#backupHistory .table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 12px 8px;
}

#backupHistory .table td {
    padding: 10px 8px;
    font-size: 13px;
    vertical-align: middle;
    border-color: #f1f3f4;
}

#backupHistory .table tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* 备份操作按钮容器 */
.backup-actions-cell {
    padding: 10px !important; /* 增加内边距 */
    min-width: 280px; /* 增加最小宽度 */
    width: 280px; /* 增加宽度 */
    text-align: center;
}

.backup-actions-container {
    display: flex;
    flex-direction: row;
    gap: 8px; /* 增加按钮间隙 */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 45px; /* 设置最小高度 */
}

.backup-actions-container .btn {
    padding: 8px 12px; /* 增加内边距 */
    font-size: 12px; /* 增加字体大小 */
    font-weight: 600;
    border-radius: 6px;
    min-width: 65px; /* 增加最小宽度 */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    height: 32px; /* 设置固定高度 */
    justify-content: center;
}

.backup-actions-container .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.backup-actions-container .btn:hover::before {
    left: 100%;
}

.backup-actions-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.backup-actions-container .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.backup-actions-container .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.backup-actions-container .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    color: #212529;
}

.backup-actions-container .btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #f57c00 100%);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.backup-actions-container .btn-warning:disabled {
    background: #6c757d;
    color: #ffffff;
    opacity: 0.6;
    cursor: not-allowed;
}

.backup-actions-container .btn-warning:disabled:hover {
    transform: none;
    box-shadow: none;
}

.backup-actions-container .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
}

.backup-actions-container .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* 图标样式 */
.backup-actions-container .icon-download::before {
    content: '⬇';
    font-size: 12px;
}

.backup-actions-container .icon-restore::before {
    content: '🔄';
    font-size: 10px;
}

.backup-actions-container .icon-delete::before {
    content: '🗑';
    font-size: 10px;
}

#backupModal .modal-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 2px solid #667eea;
    border-radius: 0 0 12px 12px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#backupModal .modal-footer .btn {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#backupModal .modal-footer .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#backupModal .modal-footer .btn:hover::before {
    left: 100%;
}

#backupModal .modal-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#backupModal .modal-footer .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
}

#backupModal .modal-footer .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

#backupModal .modal-footer .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    color: white;
}

#backupModal .modal-footer .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4245 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

@media (max-width: 480px) {
    .products-table {
        font-size: 11px;
    }
    
    .products-table th,
    .products-table td {
        padding: 4px 2px;
    }
    
    .product-image,
    .image-placeholder {
        width: 30px;
        height: 30px;
    }
    
    /* 移动端悬停大图优化 */
    .img-hover-box .img-large {
        width: 200px;
        max-width: 60vw;
        max-height: 60vh;
    }
    
    .btn-sm {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .table {
        min-width: 1024px; /* 保持最小宽度 */
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 内联编辑样式 */
.editable-cell {
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.editable-cell:hover {
    background-color: #f8f9fa !important;
    border: 1px dashed #007bff;
}

.editable-cell.editing {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107;
    /* 编辑时允许单元格自由扩展，不受固定宽度限制 */
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    /* 确保内容不溢出 */
    overflow: visible;
    position: relative;
}

.inline-edit-input {
    min-width: 150px;  /* 最小宽度 */
    max-width: 100%;   /* 最大不超过容器宽度 */
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    background-color: white;
    box-sizing: border-box;
}

.inline-edit-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}

/* ========== 表格下拉填充功能样式（Excel 风格） ========== */
/* 填充手柄（Excel 风格右下角小方块，黑色） */
.fill-handle {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 8px;
    height: 8px;
    background: #000;
    border: 1px solid rgba(255,255,255,0.9);
    cursor: crosshair;
    opacity: 0;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
    z-index: 15;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border-radius: 1px;
}

/* 填充手柄悬停状态 */
.fill-handle:hover {
    transform: scale(1.3);
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* 单元格悬停时显示填充手柄 */
td.editable-cell:hover .fill-handle {
    opacity: 1;
}

/* 编辑状态下隐藏填充手柄，避免干扰编辑 */
td.editable-cell.editing .fill-handle {
    opacity: 0 !important;
    pointer-events: none;
}

/* 选中样式：类似 Excel 2021（浅灰填充 + 深绿色外框） */
td.fill-selected {
    background: #f2f2f2 !important;
    color: inherit !important;
    position: relative;
    /* 关闭默认边框，使用自定义边框样式 */
    border: none !important;
    box-shadow: none !important;
}

/* 给选中列添加左右竖线，构成连续的外框 */
td.fill-selected {
    border-left: 2px solid #0b8043 !important;
    border-right: 2px solid #0b8043 !important;
}

/* 顶部和底部单元格用来绘制外框的横线 */
td.fill-selection-top {
    border-top: 2px solid #0b8043 !important;
}

td.fill-selection-bottom {
    border-bottom: 2px solid #0b8043 !important;
}

/* 选区内行之间的分隔线（浅灰，类似 Excel 内部行线） */
td.fill-selected:not(.fill-selection-top) {
    border-top: 1px solid rgba(0,0,0,0.08) !important;
}

/* 对于视觉上更连续的效果，确保单元格内容区域没有额外背景间隙 */
td.fill-selected {
    background-clip: padding-box;
}

/* 填充提示标签（保留原样） */
.fill-tooltip {
    position: fixed;
    background: rgba(33, 150, 243, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    animation: tooltipFadeIn 0.2s ease-out;
    white-space: nowrap;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fill-tooltip::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(33, 150, 243, 0.95);
}

/* 填充手柄激活状态（拖动时） */
.fill-handle.active {
    transform: scale(1.4);
    background: #000;
    box-shadow: 0 6px 12px rgba(0,0,0,0.45);
}

/* 响应式设计：小屏幕调整 */
@media (max-width: 768px) {
    .fill-handle {
        width: 10px;
        height: 10px;
        right: -2px;
        bottom: -2px;
    }
}

/* 自定义粘贴模态样式：专业化外观 */
.table-fill-modal-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    z-index: 12000;
}

.table-fill-modal {
    width: 520px;
    max-width: calc(100% - 40px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

.table-fill-modal .tfm-header {
    padding: 14px 18px;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    color: #222;
    font-size: 15px;
}

.table-fill-modal .tfm-body {
    padding: 12px 16px;
}

.table-fill-modal .tfm-instructions {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.table-fill-modal .tfm-textarea {
    width: 100%;
    min-height: 120px;
    max-height: 260px;
    padding: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    resize: vertical;
    font-size: 13px;
    line-height: 1.4;
}

.table-fill-modal .tfm-actions {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #f0f0f0;
    align-items: center;
}

.tfm-btn {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 13px;
}

.tfm-btn.primary {
    background: linear-gradient(180deg,#1a73e8,#1669d3);
    color: #fff;
    border-color: transparent;
}

.tfm-btn.tfm-paste-clipboard {
    background: #f7f9fb;
}

.tfm-btn:active { transform: translateY(1px); }


/* 右键菜单样式 */
.table-fill-context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 4px 0;
    min-width: 180px;
    z-index: 10000;
    font-size: 14px;
}

.table-fill-context-menu .menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.table-fill-context-menu .menu-item:hover {
    background-color: #f5f5f5;
}

.table-fill-context-menu .menu-separator {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}

.table-fill-context-menu .menu-item .icon {
    margin-right: 8px;
    font-size: 16px;
}

.table-fill-context-menu .menu-item .text {
    flex: 1;
    color: #333;
}

.table-fill-context-menu .menu-item .shortcut {
    margin-left: 12px;
    color: #999;
    font-size: 12px;
}

.table-fill-context-menu .menu-item[data-action="clear"]:hover {
    background-color: #ffebee;
}

.table-fill-context-menu .menu-item[data-action="clear"]:hover .text {
    color: #d32f2f;
}

.inline-edit-actions {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    justify-content: center;
}

.inline-edit-btn {
    padding: 2px 8px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.inline-edit-btn.save {
    background-color: #28a745;
    color: white;
}

.inline-edit-btn.save:hover {
    background-color: #218838;
}

.inline-edit-btn.cancel {
    background-color: #6c757d;
    color: white;
}

.inline-edit-btn.cancel:hover {
    background-color: #5a6268;
}

/* 不可编辑单元格的统一视觉提示（由公共脚本自动打标） */
/* 修改为普通样式，不使用红圈加红杠的禁止样式 */
.not-editable {
    cursor: default;
}

/* 允许 not-editable 单元格内的显式操作控件仍使用可点击指针，避免误导 */
.not-editable .btn,
.not-editable button,
.not-editable a.btn,
.not-editable .btn-link {
    cursor: pointer !important;
}

/* 筛选备注编辑框样式 */
#filterNotesModal .modal-content {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

#filterNotesModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

#filterNotesModal .modal-title {
    font-weight: 600;
}

#filterNotesModal .modal-close {
    color: white;
    opacity: 0.8;
}

#filterNotesModal .modal-close:hover {
    opacity: 1;
    color: white;
}

#filterNotesTextarea {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#filterNotesTextarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

#filterNotesModal .form-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

#filterNotesModal .modal-footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 权限管理样式 */
.modal-large {
    max-width: 98vw;
    width: 1400px;
}

.modal-large .modal-content {
    max-width: none;
    width: 100%;
    margin: 20px auto;
    max-height: 90vh;
    overflow-y: auto;
}

.permission-tabs {
    width: 100%;
}

.tab-headers {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.tab-header {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-header.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 500;
}

.tab-header:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.tab-content {
    width: 100%;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel-header {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.panel-icon {
    width: 24px;
    height: 24px;
    color: #667eea;
}

.panel-description {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

.permission-table-container {
    overflow-x: auto;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.permission-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
    border-radius: 12px;
    overflow: hidden;
    min-width: 600px;
}

.permission-table th {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    color: white;
    padding: 18px 12px;
    text-align: center;
    font-weight: 600;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.permission-table th:first-child {
    /* background: linear-gradient(135deg, #495057 0%, #6c757d 100%); */
    text-align: left;
    min-width: 200px;
    width: 200px;
    border-top-left-radius: 12px;
    padding-left: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.permission-table th:last-child {
    border-top-right-radius: 12px;
}

.permission-table td:not(:first-child) {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    padding: 14px 8px;
    text-align: center;
    border-bottom: 1px solid #f0f4f8;
    vertical-align: middle;
    transition: all 0.25s ease;
}

.permission-table tr:hover td {
    background-color: #f0f4ff;
    transform: scale(1.01);
}

.permission-table tr:nth-child(even) {
    background-color: #fdfdfd;
}

.permission-table tr:nth-child(even):hover {
    background-color: #f0f4ff;
}

.permission-table td:first-child {
    text-align: left;
    min-width: 200px;
    width: 200px;
    background-color: #f8f9fa;
    border-right: 2px solid #e9ecef;
    font-weight: 500;
    position: relative;
    padding: 16px 12px;
}

.permission-table tr:hover td:first-child {
    background-color: #e9ecef;
}

.field-name {
    font-weight: 600;
    color: #495057;
    font-size: 15px;
    margin-bottom: 6px;
    display: block;
    line-height: 1.2;
}

.field-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    color: #6c757d;
    background-color: #e3f2fd;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #bbdefb;
    font-weight: 500;
}

.permission-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 10px 6px;
    min-height: 75px;
    justify-content: center;
    width: 100%;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 16px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.25s ease;
    min-width: 70px;
    max-width: 85px;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
}

.permission-item:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.permission-item.visible {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #155724;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
}

.permission-item.editable {
    background: linear-gradient(135deg, #cce5ff 0%, #99d3ff 100%);
    border-color: #007bff;
    color: #004085;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.permission-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #667eea;
}

.permission-label {
    font-size: 10px;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.permission-icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

/* 权限状态指示器 */
.permission-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.permission-status.granted {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.permission-status.denied {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.text-muted {
    color: #6c757d !important;
    font-size: 11px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
    opacity: 0.6;
    cursor: not-allowed !important;
    background-color: #6c757d;
    color: white;
    pointer-events: auto !important;
}

.btn-secondary:disabled:hover,
.btn-secondary[disabled]:hover {
    background-color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-large {
        width: 95vw;
        max-width: 95vw;
        margin: 10px auto;
    }
    
    .modal-large .modal-content {
        margin: 10px auto;
        max-height: 90vh;
    }
    
    .permission-table {
        font-size: 12px;
        min-width: 550px;
    }
    
    .permission-table th,
    .permission-table td {
        padding: 10px 6px;
    }
    
    .permission-table th:first-child,
    .permission-table td:first-child {
        min-width: 160px;
        width: 160px;
        padding-left: 10px;
    }
    
    .permission-table th:not(:first-child),
    .permission-table td:not(:first-child) {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
    }
    
    .permission-controls {
        gap: 6px;
        padding: 8px 4px;
        min-height: 65px;
    }
    
    .permission-item {
        min-width: 60px;
        max-width: 70px;
        padding: 4px 6px;
        gap: 3px;
    }
    
    .permission-label {
        font-size: 9px;
    }
    
    .permission-checkbox {
        width: 12px;
        height: 12px;
    }
    
    .permission-icon {
        width: 10px;
        height: 10px;
    }
    
    .field-name {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .field-code {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .field-icon {
        width: 12px;
        height: 12px;
    }
    
    /* 备份操作列宽度和按钮大小优化 */
    /* 备份操作按钮容器 */
    .backup-actions-cell {
        padding: 8px !important;
        min-width: 200px;
        width: 200px;
    }

    .backup-actions-container {
        display: flex;
        flex-direction: row;
        gap: 6px;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .backup-actions-container .btn {
        padding: 6px 10px;
        font-size: 11px;
        font-weight: 600;
        border-radius: 6px;
        min-width: 55px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        display: flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
    }

    .backup-actions-container .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    .backup-actions-container .btn:hover::before {
        left: 100%;
    }

    .backup-actions-container .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .backup-actions-container .btn-primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
    }

    .backup-actions-container .btn-primary:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    .backup-actions-container .btn-warning {
        background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
        border: none;
        color: #212529;
    }

    .backup-actions-container .btn-warning:hover {
        background: linear-gradient(135deg, #e0a800 0%, #f57c00 100%);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    }

    .backup-actions-container .btn-warning:disabled {
        background: #6c757d;
        color: #ffffff;
        opacity: 0.6;
        cursor: not-allowed;
    }

    .backup-actions-container .btn-warning:disabled:hover {
        transform: none;
        box-shadow: none;
    }

    .backup-actions-container .btn-danger {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
        border: none;
        color: white;
    }

    .backup-actions-container .btn-danger:hover {
        background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    }

    /* 图标样式 */
    .backup-actions-container .icon-download::before {
        content: '⬇';
        font-size: 12px;
    }

    .backup-actions-container .icon-restore::before {
        content: '🔄';
        font-size: 10px;
    }

    .backup-actions-container .icon-delete::before {
        content: '🗑';
        font-size: 10px;
    }

    #backupModal .modal-footer {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-top: 2px solid #667eea;
        border-radius: 0 0 12px 12px;
        padding: 20px 25px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #backupModal .modal-footer .btn {
        padding: 10px 20px;
        font-weight: 600;
        border-radius: 8px;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    #backupModal .modal-footer .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s;
    }

    #backupModal .modal-footer .btn:hover::before {
        left: 100%;
    }

    #backupModal .modal-footer .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    #backupModal .modal-footer .btn-success {
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        border: none;
        color: white;
    }

    #backupModal .modal-footer .btn-success:hover {
        background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    }

    #backupModal .modal-footer .btn-secondary {
        background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
        border: none;
        color: white;
    }

    #backupModal .modal-footer .btn-secondary:hover {
        background: linear-gradient(135deg, #5a6268 0%, #3d4245 100%);
        box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
    }

    /* 备份模态框响应式样式 */
    @media (max-width: 768px) {
        .backup-actions-container {
            flex-direction: column !important;
            gap: 6px !important;
            align-items: stretch !important;
        }
        
        .backup-actions-container .btn {
            padding: 10px 15px !important; /* 移动端增加按钮内边距 */
            font-size: 13px !important; /* 移动端增加字体大小 */
            min-width: auto !important;
            justify-content: center !important;
            height: 40px !important; /* 移动端增加按钮高度 */
        }
        
        .backup-actions-cell {
            min-width: 150px !important;
            width: 150px !important;
        }
        
        #backupModal .modal-content {
            max-width: 95%;
            width: 95%;
            margin: 10px auto;
        }
    }
}

.backup-actions-container .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.backup-actions-container .btn:hover::before {
    left: 100%;
}

.backup-actions-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.backup-actions-container .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.backup-actions-container .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.backup-actions-container .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    color: #212529;
}

.backup-actions-container .btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #f57c00 100%);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.backup-actions-container .btn-warning:disabled {
    background: #6c757d;
    color: #ffffff;
    opacity: 0.6;
    cursor: not-allowed;
}

.backup-actions-container .btn-warning:disabled:hover {
    transform: none;
    box-shadow: none;
}

.backup-actions-container .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
}

.backup-actions-container .btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* 图标样式 */
.backup-actions-container .icon-download::before {
    content: '⬇';
    font-size: 12px;
}

.backup-actions-container .icon-restore::before {
    content: '🔄';
    font-size: 10px;
}

.backup-actions-container .icon-delete::before {
    content: '🗑';
    font-size: 10px;
}

#backupModal .modal-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 2px solid #667eea;
    border-radius: 0 0 12px 12px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#backupModal .modal-footer .btn {
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#backupModal .modal-footer .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#backupModal .modal-footer .btn:hover::before {
    left: 100%;
}

#backupModal .modal-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#backupModal .modal-footer .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
}

#backupModal .modal-footer .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

#backupModal .modal-footer .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    color: white;
}

#backupModal .modal-footer .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4245 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* 备份模态框响应式样式 */
@media (max-width: 768px) {
    .backup-actions-container {
        flex-direction: column !important;
        gap: 4px !important;
        align-items: stretch !important;
    }
    
    .backup-actions-container .btn {
        padding: 10px 15px !important; /* 移动端增加按钮内边距 */
        font-size: 13px !important; /* 移动端增加字体大小 */
        min-width: auto !important;
        justify-content: center !important;
        height: 40px !important; /* 移动端增加按钮高度 */
    }
    
    .backup-actions-cell {
        min-width: 150px !important;
        width: 150px !important;
    }
    
    #backupModal .modal-content {
        max-width: 95%;
        width: 95%;
        margin: 10px auto;
    }
}

/* 空状态提示美化 */
.permission-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.permission-empty-state .empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #adb5bd;
}

.permission-empty-state h5 {
    margin: 0 0 8px 0;
    color: #495057;
    font-weight: 600;
}

.permission-empty-state p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* 面板头部增强 */
.tab-panel-header {
    margin-bottom: 28px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border-left: 5px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.tab-panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 50%;
    transform: translate(40px, -40px);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: #495057;
    position: relative;
    z-index: 1;
}

.panel-icon {
    width: 28px;
    height: 28px;
    color: #667eea;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.panel-description {
    margin: 0;
    font-size: 15px;
    color: #6c757d;
    line-height: 1.5;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* 角色列标题美化 */
.permission-table th:not(:first-child) {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}

.permission-table th:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%); */
}

/* 表格行分隔线美化 */
.permission-table tr {
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.permission-table tr:not(:last-child) {
    border-bottom: 1px solid #f0f4f8;
}

.permission-table tr:hover {
    border-bottom-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

@media (max-width: 480px) {
    .permission-table-container {
        border-radius: 8px;
        padding: 4px;
    }
    
    .permission-table {
        font-size: 11px;
        min-width: 480px;
    }
    
    .permission-table th,
    .permission-table td {
        padding: 8px 4px;
    }
    
    .permission-table th:first-child,
    .permission-table td:first-child {
        min-width: 140px;
        width: 140px;
        padding-left: 8px;
    }
    
    .permission-table th:not(:first-child),
    .permission-table td:not(:first-child) {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }
    
    .permission-controls {
        gap: 4px;
        padding: 6px 2px;
        min-height: 55px;
    }
    
    .permission-item {
        min-width: 50px;
        max-width: 60px;
        padding: 3px 4px;
        gap: 2px;
        border-radius: 12px;
    }
    
    .permission-label {
        font-size: 8px;
        letter-spacing: 0.2px;
    }
    
    .permission-checkbox {
        width: 10px;
        height: 10px;
    }
    
    .permission-icon {
        width: 8px;
        height: 8px;
    }
    
    .field-name {
        font-size: 12px;
        margin-bottom: 3px;
    }
    
    .field-code {
        font-size: 9px;
        padding: 4px 3px;
    }
    
    .field-icon {
        width: 12px;
        height: 12px;
    }
}