* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    background-size: 400% 400%;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    color: #333;
    overflow-x: hidden;
    animation: oceanWave 25s ease infinite;
    position: relative;
}

/* 海洋波纹背景效果 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(26, 188, 156, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52, 211, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(72, 219, 251, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: floatingBubbles 30s ease-in-out infinite;
}

/* 添加动态光效 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 188, 156, 0.03) 100%);
    pointer-events: none;
    z-index: -1;
}

/* 删除未使用的动画 */



.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.15em;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 450px;
}

.auth-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 255, 250, 0.95) 100%);
    backdrop-filter: blur(25px) saturate(150%);
    padding: 50px 45px;
    border-radius: 32px;
    box-shadow: 
        0 30px 60px rgba(15, 38, 61, 0.12),
        0 15px 30px rgba(26, 188, 156, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(26, 188, 156, 0.2);
    animation: slideUp 0.8s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 35px 70px rgba(15, 38, 61, 0.15),
        0 20px 35px rgba(26, 188, 156, 0.1);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8em;
    font-weight: 600;
    letter-spacing: 1px;
}

.auth-card input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: all 0.3s;
    background: #f9fafb;
    font-weight: 500;
}

.auth-card input:focus {
    outline: none;
    border-color: #4facfe;
    background: #f8fafc;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.auth-card .btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
}

/* 全局提示信息 */
.hint {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin: 16px 0 24px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 100%);
    backdrop-filter: blur(16px) saturate(150%);
    border-radius: 14px;
    border: 1px solid rgba(103, 126, 234, 0.1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hint:hover {
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.9) 0%, rgba(199, 210, 254, 0.9) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

/* 统计卡片 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease;
}

.stats-row-2 {
    margin-top: 0;
    animation-delay: 0.2s;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    padding: 28px;
    border-radius: 20px;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.05),
        0 6px 12px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all 0.3s ease;
    border: 1px solid rgba(103, 126, 234, 0.08);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px) saturate(180%);
    cursor: pointer;
}



.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    opacity: 1;
}

/* 统计图标 */
.stat-icon {
    font-size: 3.5em;
    line-height: 1;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    z-index: 1;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* 统计内容区 */
.stat-content {
    flex: 1;
    z-index: 1;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1;
    color: #2196f3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}

.stat-label {
    color: #666;
    font-size: 1em;
    font-weight: 500;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* 不同类型卡片的配色 */
.stat-card.stat-primary {
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.5) 0%, rgba(186, 230, 253, 0.5) 100%);
}
.stat-card.stat-primary::before { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.stat-card.stat-primary:hover { border-color: #4facfe; }
.stat-card.stat-primary .stat-value { color: #0284c7; }

.stat-card.stat-success {
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.5) 0%, rgba(187, 247, 208, 0.5) 100%);
}
.stat-card.stat-success::before { background: linear-gradient(90deg, #10b981, #059669); }
.stat-card.stat-success:hover { border-color: #10b981; }
.stat-card.stat-success .stat-value { color: #059669; }

.stat-card.stat-warning {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.5) 0%, rgba(253, 230, 138, 0.5) 100%);
}
.stat-card.stat-warning::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-card.stat-warning:hover { border-color: #f59e0b; }
.stat-card.stat-warning .stat-value { color: #d97706; }

.stat-card.stat-danger {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.5) 0%, rgba(252, 165, 165, 0.5) 100%);
}
.stat-card.stat-danger::before { background: linear-gradient(90deg, #ef4444, #dc2626); }
.stat-card.stat-danger:hover { border-color: #ef4444; }
.stat-card.stat-danger .stat-value { color: #dc2626; }

.stat-card.stat-info {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.5) 0%, rgba(191, 219, 254, 0.5) 100%);
}
.stat-card.stat-info::before { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.stat-card.stat-info:hover { border-color: #3b82f6; }
.stat-card.stat-info .stat-value { color: #2563eb; }

/* 第二行统计卡片的特殊配色 */
.stat-card.stat-token-used {
    background: linear-gradient(135deg, rgba(207, 250, 254, 0.5) 0%, rgba(165, 243, 252, 0.5) 100%);
}
.stat-card.stat-token-used::before { background: linear-gradient(90deg, #06b6d4, #0891b2); }
.stat-card.stat-token-used:hover { border-color: #06b6d4; }
.stat-card.stat-token-used .stat-value { color: #0891b2; }

.stat-card.stat-token-today {
    background: linear-gradient(135deg, rgba(237, 233, 254, 0.5) 0%, rgba(221, 214, 254, 0.5) 100%);
}
.stat-card.stat-token-today::before { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.stat-card.stat-token-today:hover { border-color: #8b5cf6; }
.stat-card.stat-token-today .stat-value { color: #7c3aed; }

.stat-card.stat-requests {
    background: linear-gradient(135deg, rgba(252, 231, 243, 0.5) 0%, rgba(251, 207, 232, 0.5) 100%);
}
.stat-card.stat-requests::before { background: linear-gradient(90deg, #ec4899, #db2777); }
.stat-card.stat-requests:hover { border-color: #ec4899; }
.stat-card.stat-requests .stat-value { color: #db2777; }

.stat-card.stat-requests-today {
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.5) 0%, rgba(254, 215, 170, 0.5) 100%);
}
.stat-card.stat-requests-today::before { background: linear-gradient(90deg, #f97316, #ea580c); }
.stat-card.stat-requests-today:hover { border-color: #f97316; }
.stat-card.stat-requests-today .stat-value { color: #ea580c; }

/* 淡入上移动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 操作按钮区域 */
.actions-container {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
    background: linear-gradient(135deg, rgba(233, 213, 255, 0.2) 0%, rgba(216, 180, 254, 0.2) 100%);
    /* BaSui：增加按钮区域的内边距，让按钮更舒展！*/
    padding: 24px 25px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    /* BaSui：添加玻璃拟态效果 */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}







.btn-primary {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.3);
}



.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 24px rgba(26, 188, 156, 0.4),
        0 8px 16px rgba(22, 160, 133, 0.3);
    background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
    filter: brightness(1.1);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    /* BaSui：增加按钮内边距，让按钮更好点击！*/
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    /* BaSui：增加最小高度，确保视觉统一 */
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* BaSui：表格内按钮间距优化 */
.keys-table .btn-sm {
    margin: 3px 2px;
    min-width: 52px;
    white-space: nowrap;
}

/* 筛选区域 */
.filter-container {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.3) 0%, rgba(191, 219, 254, 0.3) 100%);
    /* BaSui：增加筛选区域的内边距，让它更舒适！*/
    padding: 20px 25px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    /* BaSui：添加玻璃拟态效果 */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.filter-container label {
    font-weight: 500;
    color: #333;
    letter-spacing: 0.5px;
}

.filter-container select {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-container select:hover {
    border-color: #4facfe;
}

.filter-container select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 表格样式 */
.table-container {
    border-radius: 20px;
    overflow: hidden;
    /* BaSui：更强的阴影效果，增加表格的层次感！*/
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.15);
    /* BaSui：添加玻璃拟态效果 */
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.4) 0%, rgba(191, 219, 254, 0.4) 100%);
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
}

.keys-table thead {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%);
    color: white;
}

.keys-table th {
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    white-space: nowrap;
}

.keys-table td {
    /* BaSui：增加行高，让内容不那么挤！从 14px → 20px */
    padding: 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    vertical-align: middle;
    /* BaSui：确保内容垂直居中对齐 */
}

.keys-table tbody tr {
    transition: all 0.3s ease;
    cursor: pointer;
}

.keys-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(147, 197, 253, 0.3) 0%, rgba(191, 219, 254, 0.3) 100%);
    transform: translateX(8px) scale(1.01);
    box-shadow: 
        -5px 0 0 rgba(59, 130, 246, 0.8),
        0 4px 20px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    /* BaSui：极致美化 - 表格行悬停3D效果 ✨ */
    position: relative;
    z-index: 1;
}

.keys-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 7px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    letter-spacing: 0.8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* BaSui：徽章加上轻微的3D效果 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.status-badge:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.25);
    /* BaSui：鼠标悬停时弹跳起来 ✨ */
}

.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.status-disabled {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-banned {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.test-success {
    color: #10b981;
    font-weight: 500;
}

.test-failed {
    color: #ef4444;
    font-weight: 500;
    cursor: help;
}

/* BaSui：让用户鼠标悬停时能看到完整的错误信息 */
.test-failed:hover {
    text-decoration: underline;
}

.test-untested {
    color: #6b7280;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 50px 40px;
    color: #2196f3;
    font-weight: 600;
    font-size: 16px;
    /* BaSui：Loading 加上脉冲动画 ✨ */
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: none;
    background: #f8fafc;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.pagination button:hover {
    background: #4facfe;
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    color: white;
    font-weight: 500;
}

/* 模态框 - BaSui美化版 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* BaSui：更深的背景遮罩 + 更强的模糊效果 */
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #f8fafc;
    margin: 5% auto;
    padding: 35px;
    border-radius: 24px;
    width: 90%;
    max-width: 550px;
    max-height: 80vh; /* BaSui：限制最大高度，防止内容太长覆盖整个页面 */
    overflow-y: auto; /* BaSui：内容超出时可以滚动 */
    /* BaSui：更强的阴影 + 边框光晕效果 ✨ */
    box-shadow: 0 25px 80px rgba(0,0,0,0.5),
                0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

/* BaSui：极致美化 - 模态框3D弹跳效果！🎉 */
@keyframes modalSlideUp {
    0% {
        transform: translateY(100px) scale(0.8) rotateX(20deg);
        opacity: 0;
    }
    50% {
        transform: translateY(-10px) scale(1.05) rotateX(-5deg);
    }
    75% {
        transform: translateY(5px) scale(1.02) rotateX(2deg);
    }
    100% {
        transform: translateY(0) scale(1) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: rotate(90deg);
}

.modal-input, .modal-textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    margin: 12px 0;
    font-family: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f9fafb;
}

.modal-input:focus, .modal-textarea:focus {
    outline: none;
    border-color: #4facfe;
    background: #f8fafc;
    /* BaSui：聚焦时添加发光效果 + 轻微缩放 ✨ */
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.15),
                0 4px 15px rgba(102, 126, 234, 0.2);
    transform: scale(1.01);
}

.modal-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.modal-textarea.large {
    min-height: 320px;
}

.import-result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
}

.import-result.success {
    background: #d1fae5;
    color: #065f46;
}

.import-result.warning {
    background: #fef3c7;
    color: #92400e;
}

.import-result.error {
    background: #fee2e2;
    color: #991b1b;
}

.import-result h3 {
    margin-bottom: 10px;
}

.import-result .result-details {
    margin: 10px 0;
}

.import-result .error-info {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.8;
}

/* BaSui：配置模态框样式 */
.modal-content-large {
    max-width: 700px;
    max-height: 75vh; /* BaSui：进一步降低高度，确保更好的交互性 */
    overflow-y: auto;
}

/* BaSui：批量操作模态框专用样式，内容多时滚动 */
#batchTestModal .modal-content,
#batchImportModal .modal-content,
#exportKeysModal .modal-content {
    max-height: 70vh; /* 批量操作模态框更低一些 */
    overflow-y: auto;
}

/* BaSui：系统配置卡片网格布局 - 响应式设计 ✨ */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 28px;
    margin-bottom: 32px;
    animation: gridFadeIn 0.6s ease;
}

@keyframes gridFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .config-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 22px;
    }
}

@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* BaSui：配置卡片样式 - 玻璃拟态设计 ✨ */
.config-card {
    background: linear-gradient(135deg, rgba(254, 249, 195, 0.2) 0%, rgba(253, 224, 71, 0.15) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.15), 
                0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* BaSui：顶部彩色装饰条 */
.config-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, 
        #4facfe 0%, 
        #00f2fe 50%, 
        #a0e7ff 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* BaSui：悬停动画 - 提升+发光效果 */
.config-card:hover {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25), 
                0 8px 24px rgba(118, 75, 162, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.5);
}

.config-card:hover::before {
    transform: scaleX(1);
}

/* BaSui：卡片标题区域 - 更有层次感 */
.config-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 3px solid rgba(102, 126, 234, 0.15);
    position: relative;
}

/* BaSui：图标动画效果 */
.config-card-icon {
    font-size: 36px;
    line-height: 1;
    filter: drop-shadow(0 3px 6px rgba(102, 126, 234, 0.2));
    transition: transform 0.3s ease;
}

.config-card:hover .config-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.config-card-title {
    font-size: 1.5em;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(79, 172, 254, 0.1);
}

/* BaSui：全宽配置卡片样式 */
.config-card-full {
    grid-column: 1 / -1;
    margin-bottom: 12px;
}

/* 向后兼容旧样式 */
.config-section {
    margin-bottom: 30px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.config-section:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
}

.config-section h3 {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: #374151;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.form-group {
    margin-bottom: 20px;
}

/* BaSui：表单标签样式优化 */
.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
    cursor: pointer;
}

.form-group label:hover {
    color: #2196f3;
}

.form-group label input[type="checkbox"] {
    margin-right: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    vertical-align: middle;
    accent-color: #4facfe;
    transition: all 0.2s ease;
}

.form-group label input[type="checkbox"]:hover {
    transform: scale(1.1);
}

/* BaSui：输入框样式深度优化 */
.modal-input,
.modal-textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 14px;
}

.modal-input:focus,
.modal-textarea:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 
                0 4px 12px rgba(102, 126, 234, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.modal-input:hover,
.modal-textarea:hover {
    border-color: #a5b4fc;
    background: #fafbff;
}

/* BaSui：Select下拉框样式优化 */
select.modal-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #4facfe 50%),
                      linear-gradient(135deg, #4facfe 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px),
                        calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

select.modal-input:hover {
    background-image: linear-gradient(45deg, transparent 50%, #00f2fe 50%),
                      linear-gradient(135deg, #00f2fe 50%, transparent 50%);
}

select.modal-input:focus {
    background-image: linear-gradient(45deg, transparent 50%, #4facfe 50%),
                      linear-gradient(135deg, #4facfe 50%, transparent 50%);
}

/* BaSui：提示信息样式美化 */
.form-group .hint {
    margin-top: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #6b7280;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 8px;
    border-left: 3px solid #4facfe;
    line-height: 1.6;
    font-style: normal;
    transition: all 0.3s ease;
}

.form-group .hint:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-left-color: #00f2fe;
    transform: translateX(2px);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* BaSui：配置页面操作按钮区域 - 悬浮卡片设计 ✨ */
.config-actions {
    display: flex;
    gap: 18px;
    margin-top: 40px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.3) 0%, rgba(253, 230, 138, 0.3) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.12), 
                0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    animation: slideUp 0.8s ease;
}



.config-actions .btn {
    min-width: 160px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

/* BaSui：按钮闪光效果 */
.config-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
}

.config-actions 

.config-actions .btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.config-actions .btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.config-actions .btn-warning {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
}

.config-actions .btn-secondary {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
}

/* BaSui：信息统计卡片样式 */
.stat-info {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border: 2px solid #818cf8;
}

.stat-info .stat-value {
    color: #4338ca;
}

.stat-info .stat-label {
    color: #4338ca;
}

/* BaSui：密钥管理页面美化 - 筛选区域 ✨ */
.filter-container-modern {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    flex-wrap: wrap;
    animation: filterFadeIn 0.5s ease;
}

.dashboard-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(249, 250, 251, 0.92) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dashboard-filter-summary {
    margin-left: auto;
    display: flex;
    align-items: center;
}

@keyframes filterFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
    flex: 1;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: color 0.2s ease;
}

.filter-label:hover {
    color: #2196f3;
}

.filter-icon {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(102, 126, 234, 0.3));
}

.filter-select {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #4facfe 50%),
                      linear-gradient(135deg, #4facfe 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em - 1px),
                        calc(100% - 13px) calc(1em - 1px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 35px;
}

.filter-select:hover {
    border-color: #a5b4fc;
    background-color: #fafbff;
    background-image: linear-gradient(45deg, transparent 50%, #00f2fe 50%),
                      linear-gradient(135deg, #00f2fe 50%, transparent 50%);
}

.filter-select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.filter-stats {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border: 2px solid #4facfe;
    border-radius: 20px;
    font-size: 14px;
    color: #4338ca;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
}

.stats-badge:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.stats-icon {
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

/* 统一的动画效果库 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.05);
    }
}

/* 优雅的呼吸灯效果 */
@keyframes breathe {
    0%, 100% {
        box-shadow: 0 0 20px rgba(26, 188, 156, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(26, 188, 156, 0.5);
        transform: scale(1.02);
    }
}

/* 新增浮动气泡动画 */
@keyframes floatingBubbles {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    33% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.7;
    }
    66% {
        transform: translateY(10px) scale(0.95);
        opacity: 0.4;
    }
}

/* 涟漪扩散效果 */
@keyframes rippleEffect {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* 闪烁高亮动画 */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(26, 188, 156, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(26, 188, 156, 0.8), 0 0 40px rgba(26, 188, 156, 0.4);
    }
}

/* 渐变背景动画 */
@keyframes oceanWave {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.stats-badge strong {
    font-size: 18px;
    color: #2196f3;
}

/* BaSui：美化表格容器 */
.table-container-modern {
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.3) 0%, rgba(199, 210, 254, 0.3) 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(102, 126, 234, 0.15);
    margin-bottom: 24px;
    animation: tableFadeIn 0.6s ease;
}

@keyframes tableFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* BaSui：美化密钥表格 */
.keys-table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.keys-table-modern thead {
    background: linear-gradient(135deg, rgba(199, 210, 254, 0.6) 0%, rgba(165, 180, 252, 0.6) 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.keys-table-modern thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #4facfe;
    white-space: nowrap;
}

.keys-table-modern thead th:first-child {
    text-align: center;
    width: 40px;
}

.keys-table-modern tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.keys-table-modern tbody tr:nth-child(even) {
    background-color: rgba(241, 245, 249, 0.5);
}

.keys-table-modern tbody tr:hover {
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.8) 0%, rgba(221, 214, 254, 0.8) 100%);
    transform: scale(1.001);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.keys-table-modern tbody td {
    padding: 14px 12px;
    color: #4b5563;
    font-size: 13px;
    vertical-align: middle;
}

.keys-table-modern tbody td:first-child {
    text-align: center;
}

.keys-table-modern tbody td input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4facfe;
    transition: transform 0.2s ease;
}

.keys-table-modern tbody td input[type="checkbox"]:hover {
    transform: scale(1.2);
}

/* BaSui：加载状态美化 */
.loading-modern {
    text-align: center;
    padding: 60px 20px !important;
    color: #6b7280;
    font-size: 16px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #4facfe;
    border-right-color: #00f2fe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* BaSui：美化分页控件 */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 251, 0.9) 100%);
    border-radius: 16px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.pagination-modern button {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 2px solid #4facfe;
    background: #f8fafc;
    color: #2196f3;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-modern button:hover:not(:disabled) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.pagination-modern button:disabled {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-modern button.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.pagination-modern span {
    margin: 0 8px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* 响应式 */
@media (max-width: 1200px) {
    .filter-container-modern {
        gap: 16px;
        padding: 20px;
    }

    .filter-group {
        min-width: 140px;
    }

    .stats-badge {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .actions-container {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .filter-container-modern {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .filter-group {
        min-width: unset;
    }

    .filter-stats {
        margin-left: 0;
    }

    .table-container {
        overflow-x: auto;
    }

    .table-container-modern {
        border-radius: 12px;
        overflow-x: auto;
    }

    .keys-table {
        font-size: 12px;
    }

    .keys-table-modern {
        font-size: 12px;
    }

    .keys-table th, .keys-table td {
        padding: 8px;
    }

    .keys-table-modern thead th,
    .keys-table-modern tbody td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .pagination-modern {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination-modern button {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* BaSui：新增图表容器样式 */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* BaSui：宽版图表卡片样式 */
.chart-card.chart-card-wide {
    grid-column: 1 / -1; /* 占满整行 */
    min-height: 350px;
}

.chart-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.92) 100%);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(103, 126, 234, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 16px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(103, 126, 234, 0.1);
}

.chart-card h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.chart-placeholder {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图表标题副标题样式 */
.chart-card h3 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.chart-subtitle {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    margin-left: 10px;
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 8px;
}

/* 排名徽章样式 */
.rank-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    color: white;
    font-size: 11px;
    font-weight: 700;
    margin-right: 8px;
    min-width: 28px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 密钥池徽章样式 */
.pool-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 8px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
}

/* 紧凑型密钥池徽章 - 横向小字体显示 */
.pool-badge-compact {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.pool-badge-compact.pool-default {
    background: #e5e7eb;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.pool-badge-compact.pool-custom {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: 1px solid rgba(79, 172, 254, 0.3);
}

/* 密钥ID缩短样式 */
.key-id-short {
    font-size: 11px;
    color: #6b7280;
    cursor: help;
    font-family: 'Courier New', monospace;
}

.pool-badge-default {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.pool-badge-main {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.pool-badge-backup {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.pool-badge-premium {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

/* 成功率排行样式 */
.success-rate-list {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
}

.success-rate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    border-left: 4px solid #10b981;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.success-rate-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border-left-color: #059669;
}

.success-rate-key {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-right: 10px;
}

.success-rate-key .key-text {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #666;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.success-rate-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-rate-bar {
    width: 100px;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.success-rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.success-rate-text {
    font-weight: 700;
    color: #10b981;
    min-width: 50px;
    text-align: right;
    font-size: 13px;
}

/* 使用统计热力图样式 */
.usage-stats {
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
}

.usage-stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.usage-stat-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border-left-color: #d97706;
}

.usage-stat-key {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-right: 10px;
}

.usage-stat-key .key-text {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usage-stat-bar-container {
    flex: 2;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 15px;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.usage-stat-bar {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.usage-stat-count {
    color: #78350f;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.usage-stat-percentage {
    font-size: 13px;
    color: #f59e0b;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

/* 简单的饼图样式 */
.simple-pie-chart {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        #28a745 0deg 120deg,
        #ffc107 120deg 240deg,
        #dc3545 240deg 300deg,
        #6c757d 300deg
    );
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pie-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.pie-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* BaSui：新增成功率和评分样式 - 增强版 */
.success-rate-high {
    color: #10b981;
    font-weight: 700;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    /* BaSui：增加内边距，让徽章更大更醒目！*/
    padding: 6px 14px;
    border-radius: 10px;
    display: inline-block;
    border: 1.5px solid #10b981;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.success-rate-medium {
    color: #d97706;
    font-weight: 700;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 6px 14px;
    border-radius: 10px;
    display: inline-block;
    border: 1.5px solid #f59e0b;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.success-rate-low {
    color: #dc2626;
    font-weight: 700;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    padding: 6px 14px;
    border-radius: 10px;
    display: inline-block;
    border: 1.5px solid #ef4444;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

.success-rate-none {
    color: #6b7280;
    font-weight: 600;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 6px 14px;
    border-radius: 10px;
    display: inline-block;
    border: 1.5px solid #9ca3af;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(107, 114, 128, 0.2);
}

.score-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    /* BaSui：增加评分徽章的尺寸和视觉效果！*/
    padding: 7px 15px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    display: inline-block;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 优化表格样式以适应新列 - BaSui增强版 */
.keys-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.keys-table th,
.keys-table td {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.keys-table th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    font-weight: 700;
    color: #333;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.keys-table td {
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
}

/* BaSui: 特殊列的文本对齐 */
.keys-table th:nth-child(1),
.keys-table td:nth-child(1) {
    text-align: center;
    width: 80px;
}

.keys-table th:nth-child(2),
.keys-table td:nth-child(2) {
    text-align: left;
    width: 150px;
}

.keys-table th:nth-child(3),
.keys-table td:nth-child(3) {
    text-align: center;
    width: 90px;
}

/* 数字列居中 */
.keys-table th:nth-child(4), .keys-table td:nth-child(4),  /* 使用次数 */
.keys-table th:nth-child(5), .keys-table td:nth-child(5),  /* 成功次数 */
.keys-table th:nth-child(6), .keys-table td:nth-child(6),  /* 错误次数 */
.keys-table th:nth-child(7), .keys-table td:nth-child(7),  /* 成功率 */
.keys-table th:nth-child(9), .keys-table td:nth-child(9) { /* 评分 */
    text-align: center;
    width: 85px;
}

.keys-table th:nth-child(8), .keys-table td:nth-child(8) { /* Token使用 */
    text-align: center;
    width: 140px;
}

.keys-table th:nth-child(10), .keys-table td:nth-child(10) { /* 最后使用 */
    text-align: center;
    width: 140px;
}

.keys-table th:nth-child(11), .keys-table td:nth-child(11) { /* 测试结果 */
    text-align: center;
    width: 110px;
}

.keys-table th:nth-child(12), .keys-table td:nth-child(12) { /* 备注 */
    text-align: left;
    width: 120px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.keys-table th:nth-child(13), .keys-table td:nth-child(13) { /* 操作 */
    text-align: center;
    width: 280px;
}

.keys-table code {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    /* BaSui：增加代码块的内边距和视觉效果 */
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    word-break: break-all;
    color: #2196f3;
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: inline-block;
    line-height: 1.4;
}

/* 表格横向滚动支持 */
.table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* BaSui：优化表格滚动条样式 */
.table-container::-webkit-scrollbar {
    height: 10px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 5px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

/* ===================== 余额管理样式 ===================== */

/* 余额统计卡片 */
.stat-card.stat-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.stat-card.stat-primary .stat-value {
    color: white;
}

.stat-card.stat-primary .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* 余额详情样式 */
.balance-details {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.balance-details div {
    margin-top: 4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
}

/* 使用量详情样式 */
.usage-details {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.6;
}

.usage-details div {
    margin-top: 4px;
}

/* 余额查询按钮 */
.btn.btn-primary.btn-sm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 4px 12px;
    font-size: 12px;
}

.btn.btn-primary.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* stat-info样式 */
.stat-card.stat-info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.stat-card.stat-info .stat-value {
    color: white;
}

.stat-card.stat-info .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Token统计容器样式 */
.token-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
    animation: slideIn 0.5s ease;
}

.token-stats-container .stat-card {
    min-height: 120px;
}

/* Token详情样式 */
.token-details {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.6;
}

.token-details div {
    margin-top: 4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================== Token余额概览样式 (BaSui新增) ===================== */

/* 余额概览容器 */
.balance-overview-container {
    background: linear-gradient(135deg, rgba(207, 250, 254, 0.3) 0%, rgba(165, 243, 252, 0.3) 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    animation: slideIn 0.5s ease;
}

/* BaSui：页面标题样式美化 ✨ */
.section-title {
    font-size: 2em;
    font-weight: 800;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.03em;
    position: relative;
    padding-bottom: 16px;
    animation: titleFadeIn 0.8s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 余额统计网格 */
.balance-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

/* 余额统计卡片 */
.balance-stat-card {
    background: linear-gradient(135deg, rgba(252, 231, 243, 0.3) 0%, rgba(251, 207, 232, 0.3) 100%);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.balance-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.balance-stat-icon {
    font-size: 3em;
    line-height: 1;
}

.balance-stat-content {
    flex: 1;
}

.balance-stat-value {
    font-size: 1.6em;  /* BaSui: 减小字体大小，防止数字溢出卡片 */
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.balance-stat-label {
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
    margin-bottom: 3px;
}

.balance-stat-hint {
    font-size: 0.85em;
    color: #999;
}

/* 余额卡片主题颜色 */
.balance-total {
    border-color: #10b981;
}

.balance-total .balance-stat-value {
    color: #10b981;
}

.balance-used {
    border-color: #3b82f6;
}

.balance-used .balance-stat-value {
    color: #3b82f6;
}

.balance-limit {
    border-color: #8b5cf6;
}

.balance-limit .balance-stat-value {
    color: #8b5cf6;
}

.balance-expiry {
    border-color: #f59e0b;
}

.balance-expiry .balance-stat-value {
    color: #f59e0b;
}

/* 倒计时特殊样式 */
.countdown-value {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* 过期状态动态颜色 */
.balance-expiry.expiry-critical {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.balance-expiry.expiry-critical .balance-stat-value {
    color: #ef4444;
    animation: pulse 1.5s ease-in-out infinite;
}

.balance-expiry.expiry-warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.balance-expiry.expiry-warning .balance-stat-value {
    color: #d97706;
}

.balance-expiry.expiry-safe {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.balance-expiry.expiry-safe .balance-stat-value {
    color: #059669;
}

/* 脉冲动画 */


/* 过期警告条 */
.expiry-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.3s ease;
}

.expiry-warning.critical {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left-color: #ef4444;
}

.warning-icon {
    font-size: 1.8em;
}

.warning-text {
    flex: 1;
    font-weight: 600;
    color: #92400e;
}

.expiry-warning.critical .warning-text {
    color: #991b1b;
}

/* ===================== Tab标签页样式 (BaSui新增) ===================== */

/* Header布局 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-title {
    flex: 1;
}

#logoutBtn {
    flex-shrink: 0;
    padding: 10px 20px;
    font-size: 14px;
}

/* Tab导航栏 */
.tab-navigation {
    display: flex;
    justify-content: center;  /* BaSui: 居中tab按钮 */
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0;
}

.tab-button {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 12px 12px 0 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    bottom: -3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.98);
    color: #2196f3;
    border-bottom: 3px solid rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    font-weight: 700;
    backdrop-filter: blur(10px);
}

/* Tab内容区域 */
.tab-content {
    display: none;
    animation: fadeInTab 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* BaSui: 移除重复的 config-actions 定义，已在前面定义 */

/* 响应式优化 */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-button {
        border-radius: 8px;
        bottom: 0;
    }
    
    .tab-button.active {
        border-bottom: none;
        border-left: 4px solid #4facfe;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #logoutBtn {
        width: 100%;
    }
}

/* ===================== 实时日志样式 (BaSui新增) ===================== */

/* 日志统计卡片 */
.log-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.log-stat-card {
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.3) 0%, rgba(187, 247, 208, 0.3) 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.log-stat-card:hover {
    transform: translateY(-3px);
}

.log-stat-icon {
    font-size: 2.5em;
}

.log-stat-content {
    flex: 1;
}

.log-stat-value {
    font-size: 2em;
    font-weight: 700;
    line-height: 1;
}

.log-stat-label {
    font-size: 0.95em;
    color: #666;
    margin-top: 5px;
}

.log-stat-total .log-stat-value { color: #2196f3; }
.log-stat-info .log-stat-value { color: #10b981; }
.log-stat-warn .log-stat-value { color: #f59e0b; }
.log-stat-error .log-stat-value { color: #ef4444; }

/* 日志控制面板 */
.log-controls {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.2) 0%, rgba(254, 202, 202, 0.2) 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.log-controls-left {
    display: flex;
    gap: 10px;
}

.log-status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.log-status-badge.connected {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.log-status-badge.disconnected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* 日志筛选器 */
.log-filters {
    background: linear-gradient(135deg, rgba(255, 237, 213, 0.3) 0%, rgba(254, 215, 170, 0.3) 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
}

.filter-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.filter-input {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 日志显示区域 */
.log-display-container {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    max-height: 600px;
    overflow-y: auto;
}

.log-list {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.log-empty {
    color: #999;
    text-align: center;
    padding: 40px;
    font-size: 14px;
}

/* 日志条目 */
.log-entry {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
    animation: logSlideIn 0.3s ease;
}

.log-entry:hover {
    background: rgba(255, 255, 255, 0.08);
}

@keyframes logSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 日志级别样式 */
.log-entry.log-level-info {
    border-left-color: #10b981;
}

.log-entry.log-level-warn {
    border-left-color: #f59e0b;
}

.log-entry.log-level-error {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.log-entry.log-level-debug {
    border-left-color: #6b7280;
}

/* 日志头部 */
.log-entry-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.log-timestamp {
    color: #999;
    font-size: 11px;
}

.log-level-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.log-level-badge.info {
    background: #10b981;
    color: white;
}

.log-level-badge.warn {
    background: #f59e0b;
    color: white;
}

.log-level-badge.error {
    background: #ef4444;
    color: white;
}

.log-level-badge.debug {
    background: #6b7280;
    color: white;
}

.log-type-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #4facfe;
    color: white;
}

.log-method-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.log-method-badge.GET {
    background: #10b981;
    color: white;
}

.log-method-badge.POST {
    background: #3b82f6;
    color: white;
}

.log-method-badge.PUT, .log-method-badge.PATCH {
    background: #f59e0b;
    color: white;
}

.log-method-badge.DELETE {
    background: #ef4444;
    color: white;
}

.log-status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.log-status-badge.status-2xx {
    background: #10b981;
    color: white;
}

.log-status-badge.status-3xx {
    background: #3b82f6;
    color: white;
}

.log-status-badge.status-4xx {
    background: #f59e0b;
    color: white;
}

.log-status-badge.status-5xx {
    background: #ef4444;
    color: white;
}

/* 日志内容 */
.log-entry-content {
    color: #d4d4d4;
    word-break: break-all;
}

.log-url {
    color: #4fc3f7;
    font-weight: 500;
}

.log-message {
    color: #fff;
}

.log-data {
    margin-top: 5px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    color: #a5d6a7;
    font-size: 12px;
    overflow-x: auto;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .log-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .log-controls {
        flex-direction: column;
        gap: 15px;
    }

    .log-controls-left {
        flex-direction: column;
        width: 100%;
    }

    .log-controls-left .btn {
        width: 100%;
    }
}

/* ===================== Token使用趋势图表样式 ===================== */

.token-trend-stats {
    width: 100%;
}

.token-trend-item {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #4facfe;
    transition: all 0.3s ease;
    gap: 8px;
}

.token-trend-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* BaSui: Token趋势图表头部（排名+池标签+密钥） */
.token-trend-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.token-trend-key {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #666;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.token-trend-bar-container {
    flex: 2;
    height: 28px;
    background: #f8f9fa;
    border-radius: 14px;
    overflow: hidden;
    margin: 0 10px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.token-trend-bar {
    height: 100%;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    border-radius: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.token-trend-count {
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.token-trend-percentage {
    font-size: 14px;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

/* ===================== 🚀 BaSui：多级密钥池样式 (Multi-Tier Pool Groups) ===================== */

/* 池子容器 */
.pool-groups-container {
    background: linear-gradient(135deg, rgba(254, 215, 226, 0.3) 0%, rgba(252, 231, 243, 0.3) 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    animation: slideIn 0.5s ease;
}

/* 池子网格布局 */
.pool-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* 池子卡片 */
.pool-group-card {
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.3) 0%, rgba(186, 230, 253, 0.3) 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.pool-group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* 池子卡片状态颜色 */
.pool-group-card.pool-group-safe {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.pool-group-card.pool-group-warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.pool-group-card.pool-group-empty {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* 池子卡片头部 */
.pool-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.pool-group-title {
    flex: 1;
}

.pool-group-priority {
    display: inline-block;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.pool-group-title h3 {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    margin: 0;
    letter-spacing: 0.5px;
}

.pool-group-actions {
    display: flex;
    gap: 8px;
}

/* 池子统计信息 */
.pool-group-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.pool-stat {
    text-align: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pool-stat:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pool-stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #2196f3;
    margin-bottom: 5px;
    line-height: 1;
}

.pool-stat-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.pool-stat-success .pool-stat-value {
    color: #10b981;
}

.pool-stat-warning .pool-stat-value {
    color: #f59e0b;
}

.pool-stat-danger .pool-stat-value {
    color: #ef4444;
}

/* 池子进度条 */
.pool-group-progress {
    margin-top: 15px;
}

.pool-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pool-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    transition: width 0.5s ease;
    border-radius: 4px;
}

.pool-progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9em;
    font-weight: 600;
    color: #666;
    /* BaSui：⚡使用率发光效果 - 让数据更炫酷 */
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4), 0 0 12px rgba(251, 191, 36, 0.2);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 池子描述 */
.pool-group-description {
    margin-top: 15px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid #4facfe;
    border-radius: 6px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
}

/* 池子操作按钮 */
.pool-groups-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

/* 密钥表格中的池子徽章 */
.pool-group-badge {
    display: inline-block;
    /* BaSui：增加密钥池徽章的尺寸，让它更醒目！*/
    padding: 7px 16px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-radius: 22px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(79, 172, 254, 0.35);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pool-group-badge:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.5);
    background: linear-gradient(135deg, #5fbdff 0%, #10d9ff 100%);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .pool-groups-grid {
        grid-template-columns: 1fr;
    }

    .pool-group-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .pool-groups-actions {
        flex-direction: column;
    }

    .pool-groups-actions .btn {
        width: 100%;
    }
}

/* ===================== 结束：多级密钥池样式 ===================== */


/* ===================== 🎯 密钥池选择 UI 样式 (Pool Selection UI) ===================== */

/* 单选按钮组样式 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 15px;
    background: #f9fafb;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.radio-group label:hover {
    background: #f3f4f6;
    border-color: #4facfe;
}

.radio-group label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4facfe;
}

.radio-group label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #2196f3;
}

/* 多选框组样式 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.checkbox-group .filter-checkbox {
    padding: 10px 15px;
    background: #f9fafb;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

.checkbox-group .filter-checkbox:hover {
    background: #f3f4f6;
    border-color: #4facfe;
}

/* 导出/测试模态框结果样式 */
.result-summary {
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    animation: slideIn 0.3s ease;
}

.result-summary.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
}

.result-summary.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
}

.result-summary.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.result-summary h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 700;
    color: #333;
}

.result-summary p {
    font-size: 1.05em;
    margin: 8px 0;
    font-weight: 500;
}

.result-summary .hint {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-size: 0.95em;
}

/* 多选下拉框样式优化 */
select[multiple] {
    min-height: 150px;
    padding: 10px;
    background: #f9fafb;
}

select[multiple] option {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

select[multiple] option:hover {
    background: #e0e7ff;
}

select[multiple] option:checked {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-weight: 600;
}

/* Loading 动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: #2196f3;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}



/* ===================== 结束：密钥池选择 UI 样式 ===================== */

/* ===================== 🎯 BaSui：密钥表格中的密钥池徽章样式 ===================== */

/* 默认池徽章 */
.pool-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    cursor: default;
}

.pool-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 默认池 (default) 样式 */
.pool-badge.pool-default {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #374151;
    border: 1px solid #9ca3af;
}

/* 自定义池样式 */
.pool-badge.pool-custom {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: 1px solid rgba(79, 172, 254, 0.5);
}

/* ===================== 结束：密钥表格密钥池徽章样式 ===================== */

/* 关键词过滤 Tab 美化 */
.keyword-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    margin-bottom: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.22) 0%, rgba(118, 75, 162, 0.18) 100%);
    box-shadow: 0 16px 45px rgba(102, 126, 234, 0.25);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.keyword-title-wrap h2 {
    margin-bottom: 12px;
    text-align: left;
}

.keyword-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.3px;
}

.keyword-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-weight: 600;
    letter-spacing: 0.6px;
    transition: all 0.3s ease;
}

.keyword-status-pill.is-enabled {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.keyword-status-pill.is-disabled {
    background: rgba(107, 114, 128, 0.28);
    border-color: rgba(148, 163, 184, 0.55);
}

.keyword-status-pill .pill-label {
    font-size: 13px;
    opacity: 0.85;
    text-transform: uppercase;
}

.keyword-status-pill .pill-value {
    font-size: 16px;
}

.keyword-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.keyword-stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 26px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.14);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.keyword-stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.keyword-stat-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 32px 65px rgba(76, 95, 199, 0.2);
}

.keyword-stat-card:hover::after {
    opacity: 1;
}

.keyword-stat-card .keyword-stat-icon {
    font-size: 42px;
    line-height: 1;
}

.keyword-stat-content {
    flex: 1;
}

.keyword-stat-label {
    display: block;
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 6px;
    letter-spacing: 0.4px;
}

.keyword-stat-value {
    font-size: 2.6rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.keyword-stat-badge {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.15);
}

.keyword-stat-total::after {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(14, 116, 144, 0.25) 100%);
}

.keyword-stat-total .keyword-stat-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
}

.keyword-stat-enabled::after {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
}

.keyword-stat-enabled .keyword-stat-badge {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.keyword-stat-coverage::after {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18) 0%, rgba(245, 158, 11, 0.22) 100%);
}

.keyword-stat-coverage .keyword-stat-badge {
    background: linear-gradient(135deg, #f97316 0%, #b45309 100%);
}

.keyword-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    margin-bottom: 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.9) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 22px 45px rgba(71, 85, 105, 0.15);
}

.keyword-action-info h3 {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 6px;
}

.keyword-action-info p {
    color: #64748b;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.keyword-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.keyword-action-btn {
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1f2937;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.keyword-action-btn::before,
.keyword-action-btn::after,
.keyword-row-btn::before,
.keyword-row-btn::after {
    display: none;
}

.keyword-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(59, 130, 246, 0.25);
}

.keyword-action-btn.keyword-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-color: rgba(99, 102, 241, 0.5);
}

.keyword-action-btn.keyword-secondary {
    background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%);
    color: #fff;
    border-color: rgba(14, 165, 233, 0.5);
}

.keyword-action-btn.keyword-toggle {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.5);
}

.keyword-action-btn.keyword-toggle.is-active {
    background: linear-gradient(135deg, #fca5a5 0%, #ef4444 100%);
    color: #fff;
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.3);
}

.keyword-table-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.keyword-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 26px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(230, 241, 255, 0.85) 100%);
}

.keyword-table-header h3 {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 4px;
}

.keyword-table-hint {
    font-size: 13px;
    color: #64748b;
}

.keyword-table-count {
    font-size: 13px;
    color: #475569;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
}

.keyword-rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.keyword-rules-table thead {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(129, 140, 248, 0.12) 100%);
}

.keyword-rules-table thead th {
    padding: 18px 20px;
    text-align: left;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.18em;
    color: #475569;
}

.keyword-rules-table tbody tr {
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: background 0.25s ease, transform 0.25s ease;
}

.keyword-rules-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateX(4px);
}

.keyword-rules-table tbody td {
    padding: 18px 20px;
    vertical-align: top;
    color: #334155;
}

.column-actions {
    text-align: right;
}

.keyword-rule-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.keyword-rule-status .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.keyword-rule-status.enabled {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.keyword-rule-status.enabled .status-dot {
    background: #10b981;
}

.keyword-rule-status.disabled {
    background: rgba(156, 163, 175, 0.15);
    color: #475569;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.keyword-rule-status.disabled .status-dot {
    background: #94a3b8;
}

.keyword-rule-name {
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 6px;
}

.keyword-rule-description {
    font-size: 13px;
    color: #64748b;
}

.keyword-chip-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.keyword-chip.chip-outline {
    background: transparent;
    color: #0f172a;
    border-style: dashed;
}

.keyword-chip.action-replace {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
}

.keyword-chip.action-remove {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.3);
}
.keyword-chip.action-delete_keyword {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.3);
}

.keyword-chip.action-block {
    background: rgba(239, 68, 68, 0.16);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.32);
}

.keyword-rule-pattern code,
.keyword-rule-replacement code {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.05);
    font-size: 12px;
}

.keyword-rule-replacement {
    font-size: 13px;
    color: #475569;
}

.keyword-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.keyword-row-btn {
    min-width: 44px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 0;
    border: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.keyword-row-btn:hover {
    transform: translateY(-2px) scale(1.03);
}

.keyword-row-btn-toggle.enabled {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
}

.keyword-row-btn-toggle.disabled {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #047857;
}

.keyword-row-btn-edit {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
}

.keyword-row-btn-delete {
    background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 100%);
    color: #b91c1c;
}

.rule-row.enabled {
    border-left: 4px solid rgba(16, 185, 129, 0.6);
}

.rule-row.disabled {
    border-left: 4px solid rgba(148, 163, 184, 0.8);
}

@media (max-width: 992px) {
    .keyword-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .keyword-action-buttons {
        justify-content: flex-start;
    }

    .keyword-action-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .keyword-table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .column-actions,
    .keyword-row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .keyword-rules-table thead {
        display: none;
    }

    .keyword-rules-table tbody td {
        display: block;
        width: 100%;
        padding: 12px 16px;
    }

    .keyword-rules-table tbody tr {
        display: block;
        margin-bottom: 18px;
        border-radius: 16px;
        border: 1px solid rgba(226, 232, 240, 0.8);
        overflow: hidden;
    }

    .keyword-row-actions {
        justify-content: flex-start;
    }
}
